Initial commit for 1.0.18-rc1 alsa (alsa-lib 1.0.17 -> 1.0.17a, REQUIRED if you are...
[gentoo-diskmaster-overlay.git] / media-sound / alsa-utils / alsa-utils-1.0.18_rc1.broken
blob3b2c559b0f3df56fe78d83d11a1242f5b2ab7a6f
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"
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
19         dev-util/dialog
20         app-text/xmlto
21         >=media-libs/alsa-lib-1.0.17-r4"
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"
34         fi
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
49         eautoreconf
52 src_compile() {
53         econf $(use_enable nls) \
54                 $(use_enable midi sequencer) \
55                 || die "configure failed"
57         emake || die "make failed"
60 pkg_preinst() {
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"
65         fi
68 src_install() {
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
83         keepdir /var/lib/alsa
86 pkg_postinst() {
87         echo
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"
92         elog "root like so:"
93         elog "  # rc-update add alsasound boot"
94         echo
95         if use minimal; then
96                 ewarn "The minimal use flag disables the dependency on pciutils that"
97                 ewarn "is needed by alsaconf at runtime."
98         fi