OLD | NEW |
(Empty) | |
| 1 # Copyright 1999-2011 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.24.1.ebuild,
v 1.3 2011/02/17 17:26:29 sping Exp $ |
| 4 |
| 5 EAPI=3 |
| 6 |
| 7 PYTHON_DEPEND="python? 2" |
| 8 |
| 9 inherit eutils libtool python multilib |
| 10 |
| 11 MY_P=${P/_rc/rc} |
| 12 S=${WORKDIR}/${MY_P} |
| 13 |
| 14 DESCRIPTION="Advanced Linux Sound Architecture Library" |
| 15 HOMEPAGE="http://www.alsa-project.org/" |
| 16 SRC_URI="mirror://alsaproject/lib/${MY_P}.tar.bz2" |
| 17 |
| 18 LICENSE="LGPL-2.1" |
| 19 SLOT="0" |
| 20 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd6
4-linux ~x86-linux" |
| 21 IUSE="doc debug alisp python static-libs" |
| 22 |
| 23 DEPEND=">=media-sound/alsa-headers-1.0.24 |
| 24 doc? ( >=app-doc/doxygen-1.2.6 )" |
| 25 RDEPEND="" |
| 26 |
| 27 IUSE_PCM_PLUGIN="copy linear route mulaw alaw adpcm rate plug multi shm file |
| 28 null empty share meter mmap_emul hooks lfloat ladspa dmix dshare dsnoop asym iec
958 |
| 29 softvol extplug ioplug" |
| 30 |
| 31 for plugin in ${IUSE_PCM_PLUGIN}; do |
| 32 IUSE="${IUSE} alsa_pcm_plugins_${plugin}" |
| 33 done |
| 34 |
| 35 pkg_setup() { |
| 36 if [ -z "${ALSA_PCM_PLUGINS}" ] ; then |
| 37 ewarn "You haven't selected _any_ PCM plugins. Either you set it
to something like the default" |
| 38 ewarn "(which is being set in the profile UNLESS you unset them)
or alsa based applications" |
| 39 ewarn "are going to *misbehave* !" |
| 40 epause 5 |
| 41 fi |
| 42 |
| 43 if use python; then |
| 44 python_set_active_version 2 |
| 45 fi |
| 46 } |
| 47 |
| 48 src_prepare() { |
| 49 elibtoolize |
| 50 epunt_cxx |
| 51 } |
| 52 |
| 53 src_configure() { |
| 54 local myconf |
| 55 use elibc_uclibc && myconf="--without-versioned" |
| 56 |
| 57 econf \ |
| 58 $(use_enable static-libs static) \ |
| 59 --enable-shared \ |
| 60 --disable-resmgr \ |
| 61 --enable-rawmidi \ |
| 62 --enable-seq \ |
| 63 --enable-aload \ |
| 64 $(use_with debug) \ |
| 65 $(use_enable alisp) \ |
| 66 $(use_enable python) \ |
| 67 --with-pcm-plugins="${ALSA_PCM_PLUGINS}" \ |
| 68 --disable-dependency-tracking \ |
| 69 ${myconf} |
| 70 } |
| 71 |
| 72 src_compile() { |
| 73 emake || die |
| 74 |
| 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}::" |
| 79 fi |
| 80 } |
| 81 |
| 82 src_install() { |
| 83 emake DESTDIR="${D}" install || die |
| 84 |
| 85 find "${ED}" -name '*.la' -exec rm -f {} + |
| 86 find "${ED}"/usr/$(get_libdir)/alsa-lib -name '*.a' -exec rm -f {} + |
| 87 |
| 88 dodoc ChangeLog TODO || die |
| 89 use doc && dohtml -r doc/doxygen/html/* |
| 90 } |
| 91 |
| 92 pkg_postinst() { |
| 93 elog "Please try in-kernel ALSA drivers instead of the alsa-driver ebuil
d." |
| 94 elog "If alsa-driver works for you where a *recent* kernel does not, we
want " |
| 95 elog "to know about this. Our e-mail address is alsa-bugs@gentoo.org" |
| 96 elog "However, if you notice no sound output or instability, please try
to " |
| 97 elog "upgrade your kernel to a newer version first." |
| 98 } |
OLD | NEW |