1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 DESCRIPTION="Advanced Linux Sound Architecture Utils (alsactl, alsamixer, etc.)"
8 HOMEPAGE="https://alsa-project.org/"
9 SRC_URI="https://www.alsa-project.org/files/pub/utils/${P}.tar.bz2"
13 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ~ppc ~ppc64 ~sh sparc x86"
14 IUSE="bat doc +libsamplerate +ncurses nls selinux"
16 CDEPEND=">=media-libs/alsa-lib-${PV}
17 libsamplerate? ( media-libs/libsamplerate )
18 ncurses? ( >=sys-libs/ncurses-5.7-r7:0= )
19 bat? ( sci-libs/fftw:= )"
21 doc? ( app-text/xmlto )"
23 selinux? ( sec-policy/selinux-alsa )"
24 BDEPEND="virtual/pkgconfig"
27 "${FILESDIR}"/${PN}-1.1.8-missing_header.patch
32 # --disable-alsaconf because it doesn't work with sys-apps/kmod wrt #456214
34 --disable-maintainer-mode
35 --with-asound-state-dir="${EPREFIX}"/var/lib/alsa
36 --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
37 --with-udev-rules-dir="${EPREFIX}/$(get_udevdir)"/rules.d
39 $(use_enable libsamplerate alsaloop)
40 $(use_enable ncurses alsamixer)
42 $(usex doc '' --disable-xmlto)
44 econf "${myeconfargs[@]}"
51 newinitd "${FILESDIR}"/alsasound.initd-r8 alsasound
52 newconfd "${FILESDIR}"/alsasound.confd-r4 alsasound
54 insinto /etc/modprobe.d
55 newins "${FILESDIR}"/alsa-modules.conf-rc alsa.conf
59 # ALSA lib parser.c:1266:(uc_mgr_scan_master_configs) error: could not
60 # scan directory /usr/share/alsa/ucm: No such file or directory
61 # alsaucm: unable to obtain card list: No such file or directory
62 keepdir /usr/share/alsa/ucm
66 if [[ -z ${REPLACING_VERSIONS} ]]; then
68 elog "To take advantage of the init script, and automate the process of"
69 elog "saving and restoring sound-card mixer levels you should"
70 elog "add alsasound to the boot runlevel. You can do this as"
72 elog "# rc-update add alsasound boot"
74 ewarn "The ALSA core should be built into the kernel or loaded through other"
75 ewarn "means. There is no longer any modular auto(un)loading in alsa-utils."