# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header$ EAPI=7 PYTHON_COMPAT=( python2_7 ) MULTILIB_COMPAT=( abi_x86_{32,64} ) # Disable tests completely because of axfer endless loop RESTRICT="test" inherit multilib multilib-minimal systemd udev git-r3 autotools DESCRIPTION="Advanced Linux Sound Architecture Utils (alsactl, alsamixer, etc.)" HOMEPAGE="http://www.alsa-project.org/" LICENSE="GPL-2" SLOT="0.9" KEYWORDS="" IUSE="bat doc +libsamplerate +ncurses nls selinux" RDEPEND=">=media-libs/alsa-lib-${PV}[${MULTILIB_USEDEP}] libsamplerate? ( media-libs/libsamplerate[${MULTILIB_USEDEP}] ) ncurses? ( >=sys-libs/ncurses-5.7-r7[${MULTILIB_USEDEP}] ) bat? ( sci-libs/fftw[${MULTILIB_USEDEP}] ) selinux? ( sec-policy/selinux-alsa ) doc? ( app-text/xmlto )" DEPEND="${RDEPEND}" BDEPEND="virtual/pkgconfig" PATCHES=( "${FILESDIR}"/${PN}-1.1.8-missing_header.patch ) if [[ ${PV} = 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/alsa-project/alsa-utils.git" SRC_URI="${SRC_URI} https://codeload.github.com/alsa-project/alsa-utils/zip/master -> ${PN}-${PV}.zip" KEYWORDS="" else SRC_URI="${SRC_URI} ftp://ftp.alsa-project.org/pub/utils/${PN}-${PV}.tar.bz2" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" fi src_unpack() { if [[ ${PV} = 9999 ]]; then git-r3_src_unpack else default fi } src_prepare() { eapply_user eautoreconf multilib_copy_sources } multilib_src_configure() { local myeconfargs=( --disable-alsaconf --disable-maintainer-mode --with-asound-state-dir="${EPREFIX}"/var/lib/alsa --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" --with-udev-rules-dir="${EPREFIX}/$(get_udevdir)"/rules.d $(use_enable bat) $(use_enable libsamplerate alsaloop) $(use_enable ncurses alsamixer) $(use_enable nls) $(usex doc '' --disable-xmlto) ) econf "${myeconfargs[@]}" } multilib_src_install() { default emake DESTDIR="${D}" install if multilib_is_native_abi; then dodoc ChangeLog README.md TODO seq/*/README.* fi #newbin "${WORKDIR}"/alsa-driver-*/utils/alsa-info.sh alsa-info newinitd "${FILESDIR}"/alsasound.initd-r8 alsasound newconfd "${FILESDIR}"/alsasound.confd-r4 alsasound insinto /etc/modprobe.d newins "${FILESDIR}"/alsa-modules.conf-rc alsa.conf keepdir /var/lib/alsa # ALSA lib parser.c:1266:(uc_mgr_scan_master_configs) error: could not # scan directory /usr/share/alsa/ucm: No such file or directory # alsaucm: unable to obtain card list: No such file or directory keepdir /usr/share/alsa/ucm } multilib_src_test_all() { default } multilib_src_install_all() { einstalldocs } multilib_pkg_postinst_all() { if [[ -z ${REPLACING_VERSIONS} ]]; then elog elog "To take advantage of the init script, and automate the process of" elog "saving and restoring sound-card mixer levels you should" elog "add alsasound to the boot runlevel. You can do this as" elog "root like so:" elog "# rc-update add alsasound boot" ewarn ewarn "The ALSA core should be built into the kernel or loaded through other" ewarn "means. There is no longer any modular auto(un)loading in alsa-utils." fi }