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-libs / alsa-lib / alsa-lib-1.0.17-r5.ebuild
blobd73f05de8967ca9cf32b30c3e3d2472cce46660a
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-libs/alsa-lib/alsa-lib-1.0.17.ebuild,v 1.1 2008/08/02 21:02:23 betelgeuse Exp $
5 inherit eutils libtool
7 MY_P="${P/_rc/rc}"
8 S="${WORKDIR}/${MY_P}a"
10 DESCRIPTION="Advanced Linux Sound Architecture Library"
11 HOMEPAGE="http://www.alsa-project.org/"
12 SRC_URI="mirror://alsaproject/lib/${MY_P}a.tar.bz2"
14 LICENSE="LGPL-2.1"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
17 IUSE="doc debug alisp midi python"
19 RDEPEND="python? ( dev-lang/python )"
20 DEPEND="${RDEPEND}
21 >=media-sound/alsa-headers-${PV}
22 doc? ( >=app-doc/doxygen-1.2.6 )"
24 IUSE_PCM_PLUGIN="copy linear route mulaw alaw adpcm rate plug multi shm file
25 null empty share meter mmap_emul hooks lfloat ladspa dmix dshare dsnoop asym iec958
26 softvol extplug ioplug"
28 for plugin in ${IUSE_PCM_PLUGIN}; do
29 IUSE="${IUSE} alsa_pcm_plugins_${plugin}"
30 done
32 pkg_setup() {
33 if [ -z "${ALSA_PCM_PLUGINS}" ] ; then
34 ewarn "You haven't selected _any_ PCM plugins. Either you set it to something like the default"
35 ewarn "(which is being set in the profile UNLESS you unset them) or alsa based applications"
36 ewarn "are going to *misbehave* !"
37 epause 5
41 src_unpack() {
42 unpack ${A}
43 cd "${S}"
44 # git updates
45 #epatch "${FILESDIR}"/git-update-1.patch
46 #epatch "${FILESDIR}"/git-update-2.patch
48 elibtoolize
49 epunt_cxx
52 src_compile() {
53 local myconf
54 use elibc_uclibc && myconf="--without-versioned"
56 # needed to avoid gcc looping internaly
57 use hppa && export CFLAGS="-O1 -pipe"
59 econf \
60 --enable-static \
61 --enable-shared \
62 --disable-resmgr \
63 $(use_with debug) \
64 $(use_enable alisp) \
65 $(use_enable python) \
66 $(use_enable midi rawmidi) \
67 $(use_enable midi seq) \
68 $(use_enable midi aload) \
69 --with-pcm-plugins="${ALSA_PCM_PLUGINS}" \
70 --disable-dependency-tracking \
71 ${myconf} \
72 || die "configure failed"
74 emake || die "make failed"
76 if use doc; then
77 emake doc || die "failed to generate docs"
78 fgrep -Zrl "${S}" "${S}/doc/doxygen/html" | \
79 xargs -0 sed -i -e "s:${S}::"
83 src_install() {
84 emake DESTDIR="${D}" install || die "make install failed"
86 dodoc ChangeLog TODO || die
87 use doc && dohtml -r doc/doxygen/html/*
90 pkg_postinst() {
91 ewarn "Starting from alsa 1.0.11_rc3 the configuration for dmix is changed."
92 ewarn "Leaving around old asound.conf or ~/.asoundrc might make all apps"
93 ewarn "using ALSA output crash."
94 ewarn "Note that dmix output is enabled by default on the 'default' device"
95 ewarn "since ALSA 1.0.9."
96 elog ""
97 elog "Please try in-kernel ALSA drivers instead of the alsa-drivers ebuild."
98 elog "If alsa-drivers works for you where a recent kernel does not, we want "
99 elog "to know about this. Our e-mail address is alsa-bugs@gentoo.org"
100 elog "However, if you notice no sound output or instability, please try to "
101 elog "upgrade your kernel to a newer version first."