| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/media-libs/libcanberra/libcanberra-0.29.ebuild,v 1.13 2012/12/11 03:45:10 axs Exp $ |
| 4 |
|
| 5 |
EAPI="4" |
| 6 |
|
| 7 |
inherit libtool systemd autotools eutils |
| 8 |
|
| 9 |
DESCRIPTION="Portable sound event library" |
| 10 |
HOMEPAGE="http://0pointer.de/lennart/projects/libcanberra/" |
| 11 |
SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.xz" |
| 12 |
|
| 13 |
LICENSE="LGPL-2.1+" |
| 14 |
SLOT="0" |
| 15 |
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris" |
| 16 |
IUSE="alsa gnome gstreamer +gtk +gtk3 oss pulseaudio +sound tdb udev" |
| 17 |
|
| 18 |
COMMON_DEPEND="media-libs/libvorbis |
| 19 |
>=sys-devel/libtool-2.2.6b |
| 20 |
alsa? ( |
| 21 |
media-libs/alsa-lib |
| 22 |
udev? ( >=virtual/udev-171 ) ) |
| 23 |
gstreamer? ( >=media-libs/gstreamer-0.10.15:0.10 ) |
| 24 |
gtk? ( >=x11-libs/gtk+-2.20.0:2 ) |
| 25 |
gtk3? ( x11-libs/gtk+:3 ) |
| 26 |
pulseaudio? ( >=media-sound/pulseaudio-0.9.11 ) |
| 27 |
tdb? ( sys-libs/tdb ) |
| 28 |
" |
| 29 |
RDEPEND="${COMMON_DEPEND} |
| 30 |
gnome? ( gnome-base/gsettings-desktop-schemas ) |
| 31 |
sound? ( x11-themes/sound-theme-freedesktop )" # Required for index.theme wrt #323379 |
| 32 |
DEPEND="${COMMON_DEPEND} |
| 33 |
app-arch/xz-utils |
| 34 |
virtual/pkgconfig" |
| 35 |
|
| 36 |
REQUIRED_USE="udev? ( alsa )" |
| 37 |
|
| 38 |
src_prepare() { |
| 39 |
# https://bugs.freedesktop.org/show_bug.cgi?id=31454 |
| 40 |
epatch "${FILESDIR}"/${PN}-0.28-underlinking.patch |
| 41 |
|
| 42 |
eautoreconf |
| 43 |
} |
| 44 |
|
| 45 |
src_configure() { |
| 46 |
econf \ |
| 47 |
--docdir="${EPREFIX}"/usr/share/doc/${PF} \ |
| 48 |
--disable-silent-rules \ |
| 49 |
$(use_enable alsa) \ |
| 50 |
$(use_enable oss) \ |
| 51 |
$(use_enable pulseaudio pulse) \ |
| 52 |
$(use_enable gstreamer) \ |
| 53 |
$(use_enable gtk) \ |
| 54 |
$(use_enable gtk3) \ |
| 55 |
$(use_enable tdb) \ |
| 56 |
$(use_enable udev) \ |
| 57 |
$(systemd_with_unitdir) \ |
| 58 |
--disable-lynx \ |
| 59 |
--disable-gtk-doc \ |
| 60 |
--with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html |
| 61 |
} |
| 62 |
|
| 63 |
src_install() { |
| 64 |
# Disable parallel installation until bug #253862 is solved |
| 65 |
emake -j1 DESTDIR="${D}" install |
| 66 |
|
| 67 |
# Remove useless .la files: |
| 68 |
# libcanberra uses lt_dlopenext instead of ld_dlopen to load the modules, |
| 69 |
# which means that it will first try appending ".la" to the given filename |
| 70 |
# prefix; if that fails, it will append the module extension for the |
| 71 |
# current system and try that (".so" on Linux, ".bundle" on Darwin, ".dll" |
| 72 |
# on Windows, etc.). Only if both fail will it return an error. |
| 73 |
find "${ED}" -name '*.la' -exec rm -f {} + || die "la file removal failed" |
| 74 |
} |