1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/media-sound/alsa-utils/alsa-utils-1.0.17.ebuild,v 1.1 2008/08/02 21:00:32 betelgeuse Exp $
5 inherit eutils autotools
9 DESCRIPTION="Advanced Linux Sound Architecture Utils (alsactl, alsamixer, etc.)"
10 HOMEPAGE="http://www.alsa-project.org/"
11 SRC_URI="mirror://alsaproject/utils/${MY_P}.tar.bz2"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
16 IUSE="nls midi minimal"
17 # alsa-lib dep specifically altered to 1.0.17-r4 as it's equivalent to 1.0.17a
18 DEPEND=">=sys-libs/ncurses-5.1
21 >=media-libs/alsa-lib-1.0.17-r4"
24 !minimal? ( sys-apps/pciutils )"
26 S="${WORKDIR}/${MY_P}"
29 if use midi && ! built_with_use --missing true media-libs/alsa-lib midi; then
31 eerror "To be able to build alsa-utils with midi support you need"
32 eerror "to have built media-libs/alsa-lib with midi USE flag."
33 die "Missing midi USE flag on media-libs/alsa-lib"
41 epatch "${FILESDIR}/${PN}-1.0.11_rc2-nls.patch"
42 epatch "${FILESDIR}/${PN}-1.0.11_rc5-alsaconf-redirect.patch"
43 epatch "${FILESDIR}/${PN}-1.0.14-alsaconf-modules-update.patch"
44 epatch "${FILESDIR}/${PN}-1.0.17-seq.patch"
45 # epatch "${FILESDIR}/git-update.patch"
46 # epatch "${FILESDIR}/makefile-fix.patch"
48 # AT_M4DIR="m4" eautoreconf
53 econf $(use_enable nls) \
54 $(use_enable midi sequencer) \
55 || die "configure failed"
57 emake || die "make failed"
61 if [[ -a /etc/modules.d/alsa ]] && [[ ! -a /etc/modprobe.d/alsa ]]; then
62 elog "Moving old alsa configuration in modules.d to new"
63 elog "location in modprobe.d in /etc/"
64 mv "${ROOT}/etc/modules.d/alsa" "${ROOT}/etc/modprobe.d/alsa"
69 local ALSA_UTILS_DOCS="ChangeLog README TODO
70 seq/aconnect/README.aconnect
71 seq/aseqnet/README.aseqnet"
73 emake DESTDIR="${D}" install || die "Installation Failed"
75 dodoc ${ALSA_UTILS_DOCS} || die
76 newdoc alsamixer/README README.alsamixer || die
78 newinitd "${FILESDIR}/alsasound.initd" alsasound
79 newconfd "${FILESDIR}/alsasound.confd" alsasound
80 insinto /etc/modprobe.d
81 newins "${FILESDIR}/alsa-modules.conf-rc" alsa
88 elog "To take advantage of the init script, and automate the process of"
89 elog "loading and unloading the ALSA sound drivers as well as"
90 elog "storing and restoring sound-card mixer levels you should"
91 elog "add alsasound to the boot runlevel. You can do this as"
93 elog " # rc-update add alsasound boot"
96 ewarn "The minimal use flag disables the dependency on pciutils that"
97 ewarn "is needed by alsaconf at runtime."