alsa-utils update, attempted alsa-tools update (which failed, lol missing files ...
[gentoo-diskmaster-overlay.git] / media-sound / alsa-utils / alsa-utils-1.0.17-r7.ebuild
blob14ca9fc5c7050a67b892e7564539e1023a43435d
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
7 MY_P="${P/_rc/rc}"
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"
13 LICENSE="GPL-2"
14 SLOT="0.9"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
16 IUSE="nls midi minimal"
18 DEPEND=">=sys-libs/ncurses-5.1
19 dev-util/dialog
20 app-text/xmlto
21 >=media-libs/alsa-lib-${PV}"
22 RDEPEND="${DEPEND}
23 virtual/modutils
24 !minimal? ( sys-apps/pciutils )"
26 S="${WORKDIR}/${MY_P}"
28 pkg_setup() {
29 if use midi && ! built_with_use --missing true media-libs/alsa-lib midi; then
30 eerror ""
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"
37 src_unpack() {
38 unpack ${A}
39 cd "${S}"
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
51 src_compile() {
52 econf $(use_enable nls) \
53 $(use_enable midi sequencer) \
54 || die "configure failed"
56 emake || die "make failed"
59 pkg_preinst() {
60 if [[ -a /etc/modules.d/alsa ]] && [[ ! -a /etc/modprobe.d/alsa ]]; then
61 elog "Moving old alsa configuration in modules.d to new"
62 elog "location in modprobe.d in /etc/"
63 mv "${ROOT}/etc/modules.d/alsa" "${ROOT}/etc/modprobe.d/alsa"
67 src_install() {
68 local ALSA_UTILS_DOCS="ChangeLog README TODO
69 seq/aconnect/README.aconnect
70 seq/aseqnet/README.aseqnet"
72 emake DESTDIR="${D}" install || die "Installation Failed"
74 dodoc ${ALSA_UTILS_DOCS} || die
75 newdoc alsamixer/README README.alsamixer || die
77 newinitd "${FILESDIR}/alsasound.initd" alsasound
78 newconfd "${FILESDIR}/alsasound.confd" alsasound
79 insinto /etc/modprobe.d
80 newins "${FILESDIR}/alsa-modules.conf-rc" alsa
82 keepdir /var/lib/alsa
85 pkg_postinst() {
86 echo
87 elog "To take advantage of the init script, and automate the process of"
88 elog "loading and unloading the ALSA sound drivers as well as"
89 elog "storing and restoring sound-card mixer levels you should"
90 elog "add alsasound to the boot runlevel. You can do this as"
91 elog "root like so:"
92 elog " # rc-update add alsasound boot"
93 echo
94 if use minimal; then
95 ewarn "The minimal use flag disables the dependency on pciutils that"
96 ewarn "is needed by alsaconf at runtime."