Nightly git update, 1.0.18-rc1 is tagged in some of the git repos, probably seeing...
[gentoo-diskmaster-overlay.git] / media-libs / alsa-lib / alsa-lib-1.0.17-r3.ebuild
blob36a00544e283b6bd10bb22389ff76c8742468b15
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}"
10 DESCRIPTION="Advanced Linux Sound Architecture Library"
11 HOMEPAGE="http://www.alsa-project.org/"
12 SRC_URI="mirror://alsaproject/lib/${MY_P}.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
47 elibtoolize
48 epunt_cxx
51 src_compile() {
52 local myconf
53 use elibc_uclibc && myconf="--without-versioned"
55 # needed to avoid gcc looping internaly
56 use hppa && export CFLAGS="-O1 -pipe"
58 econf \
59 --enable-static \
60 --enable-shared \
61 --disable-resmgr \
62 $(use_with debug) \
63 $(use_enable alisp) \
64 $(use_enable python) \
65 $(use_enable midi rawmidi) \
66 $(use_enable midi seq) \
67 $(use_enable midi aload) \
68 --with-pcm-plugins="${ALSA_PCM_PLUGINS}" \
69 --disable-dependency-tracking \
70 ${myconf} \
71 || die "configure failed"
73 emake || die "make failed"
75 if use doc; then
76 emake doc || die "failed to generate docs"
77 fgrep -Zrl "${S}" "${S}/doc/doxygen/html" | \
78 xargs -0 sed -i -e "s:${S}::"
82 src_install() {
83 emake DESTDIR="${D}" install || die "make install failed"
85 dodoc ChangeLog TODO || die
86 use doc && dohtml -r doc/doxygen/html/*
89 pkg_postinst() {
90 ewarn "Starting from alsa 1.0.11_rc3 the configuration for dmix is changed."
91 ewarn "Leaving around old asound.conf or ~/.asoundrc might make all apps"
92 ewarn "using ALSA output crash."
93 ewarn "Note that dmix output is enabled by default on the 'default' device"
94 ewarn "since ALSA 1.0.9."
95 elog ""
96 elog "Please try in-kernel ALSA drivers instead of the alsa-drivers ebuild."
97 elog "If alsa-drivers works for you where a recent kernel does not, we want "
98 elog "to know about this. Our e-mail address is alsa-bugs@gentoo.org"
99 elog "However, if you notice no sound output or instability, please try to "
100 elog "upgrade your kernel to a newer version first."