| 1 |
# Copyright 1999-2008 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/alsa-lib-1.0.17.ebuild,v 1.1 2008/08/02 21:02:23 betelgeuse Exp $ |
| 4 |
|
| 5 |
inherit eutils libtool |
| 6 |
|
| 7 |
MY_P="${P/_rc/rc}" |
| 8 |
S="${WORKDIR}/${MY_P}" |
| 9 |
|
| 10 |
DESCRIPTION="Advanced Linux Sound Architecture Library" |
| 11 |
HOMEPAGE="http://www.alsa-project.org/" |
| 12 |
SRC_URI="mirror://alsaproject/lib/${MY_P}.tar.bz2" |
| 13 |
|
| 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" |
| 18 |
|
| 19 |
RDEPEND="python? ( dev-lang/python )" |
| 20 |
DEPEND="${RDEPEND} |
| 21 |
>=media-sound/alsa-headers-${PV} |
| 22 |
doc? ( >=app-doc/doxygen-1.2.6 )" |
| 23 |
|
| 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" |
| 27 |
|
| 28 |
for plugin in ${IUSE_PCM_PLUGIN}; do |
| 29 |
IUSE="${IUSE} alsa_pcm_plugins_${plugin}" |
| 30 |
done |
| 31 |
|
| 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 |
| 38 |
fi |
| 39 |
} |
| 40 |
|
| 41 |
src_unpack() { |
| 42 |
unpack ${A} |
| 43 |
cd "${S}" |
| 44 |
|
| 45 |
elibtoolize |
| 46 |
epunt_cxx |
| 47 |
} |
| 48 |
|
| 49 |
src_compile() { |
| 50 |
local myconf |
| 51 |
use elibc_uclibc && myconf="--without-versioned" |
| 52 |
|
| 53 |
# needed to avoid gcc looping internaly |
| 54 |
use hppa && export CFLAGS="-O1 -pipe" |
| 55 |
|
| 56 |
econf \ |
| 57 |
--enable-static \ |
| 58 |
--enable-shared \ |
| 59 |
--disable-resmgr \ |
| 60 |
$(use_with debug) \ |
| 61 |
$(use_enable alisp) \ |
| 62 |
$(use_enable python) \ |
| 63 |
$(use_enable midi rawmidi) \ |
| 64 |
$(use_enable midi seq) \ |
| 65 |
$(use_enable midi aload) \ |
| 66 |
--with-pcm-plugins="${ALSA_PCM_PLUGINS}" \ |
| 67 |
--disable-dependency-tracking \ |
| 68 |
${myconf} \ |
| 69 |
|| die "configure failed" |
| 70 |
|
| 71 |
emake || die "make failed" |
| 72 |
|
| 73 |
if use doc; then |
| 74 |
emake doc || die "failed to generate docs" |
| 75 |
fgrep -Zrl "${S}" "${S}/doc/doxygen/html" | \ |
| 76 |
xargs -0 sed -i -e "s:${S}::" |
| 77 |
fi |
| 78 |
} |
| 79 |
|
| 80 |
src_install() { |
| 81 |
emake DESTDIR="${D}" install || die "make install failed" |
| 82 |
|
| 83 |
dodoc ChangeLog TODO || die |
| 84 |
use doc && dohtml -r doc/doxygen/html/* |
| 85 |
} |
| 86 |
|
| 87 |
pkg_postinst() { |
| 88 |
ewarn "Starting from alsa 1.0.11_rc3 the configuration for dmix is changed." |
| 89 |
ewarn "Leaving around old asound.conf or ~/.asoundrc might make all apps" |
| 90 |
ewarn "using ALSA output crash." |
| 91 |
ewarn "Note that dmix output is enabled by default on the 'default' device" |
| 92 |
ewarn "since ALSA 1.0.9." |
| 93 |
elog "" |
| 94 |
elog "Please try in-kernel ALSA drivers instead of the alsa-drivers ebuild." |
| 95 |
elog "If alsa-drivers works for you where a recent kernel does not, we want " |
| 96 |
elog "to know about this. Our e-mail address is alsa-bugs@gentoo.org" |
| 97 |
elog "However, if you notice no sound output or instability, please try to " |
| 98 |
elog "upgrade your kernel to a newer version first." |
| 99 |
} |