# libcanberra 0.30 — biblioteca de sonido de eventos. plasma-workspace la linkea INCONDICIONAL en 4 subdirs
# (notificationmanager/startup-sound/kcm_notifications/kcm_soundtheme) ⇒ debe existir Canberra::Canberra.
# Backend NULL solo (--disable-alsa/oss/pulse/gstreamer): satisface el target SIN traer el stack de audio
# (deuda Capa 0 audio). find_package(Canberra) usa FindCanberra.cmake (pkg-config libcanberra.pc → target).
name    = "libcanberra"
version = "0.30"
[source]
# 0pointer.de (upstream original) murió ~2026-07. Mirror BLFS/OSUOSL = MISMO tarball byte a byte
# (sha256 verificado idéntico, 318960 bytes). Es el archivo canónico de tarballs viejos, muy estable.
tarball = "https://ftp.osuosl.org/pub/blfs/conglomeration/libcanberra/libcanberra-0.30.tar.xz"
sha256  = "c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72"
[build]
compiler = "zig-cc"
target   = "x86_64-linux-musl"
link     = "dynamic"
zig_version = "0.13.0"
[build.phases]
# El config.sub de libcanberra 0.30 (2012) no conoce el sufijo `musl` ⇒ refrescamos con el de libtool
# (dep; instala uno que sí lo conoce en /usr/share/libtool/build-aux/).
configure = '''cp /usr/share/libtool/build-aux/config.sub /usr/share/libtool/build-aux/config.guess build-aux/ 2>/dev/null || true
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig
./configure --build=$CBUILD --host=$CHOST --prefix=/usr \
  --disable-alsa --disable-oss --disable-pulse --disable-gstreamer --disable-udev \
  --disable-gtk --disable-gtk3 --disable-gtk-doc --without-systemd'''
compile   = 'make -j"$(nproc)"'
install   = "make install DESTDIR=/out && find /out -name '*.la' -delete"
[deps]
build = ["pkgconf", "libtool", "libvorbis", "libogg"]
