# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils autotools DESCRIPTION="A networked sound server with an advanced plugin system" HOMEPAGE="http://0pointer.de/lennart/projects/${PN}/" SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz" LICENSE="LGPL-2 GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="alsa avahi caps doc glib glib1 howl jack lirc lynx oss tcp X" # asyncns RDEPEND=" X? ( || ( ( x11-libs/libX11 ) virtual/x11 ) ) caps? ( sys-libs/libcap ) >=media-libs/audiofile-0.2.6-r1 >=media-libs/libsamplerate-0.1.1-r1 >=media-libs/libsndfile-1.0.10 >=dev-libs/liboil-0.3.6 oss? ( virtual/os-headers ) alsa? ( >=media-libs/alsa-lib-1.0.10 ) glib? ( >=dev-libs/glib-2.4.0 ) glib1? ( =dev-libs/glib-1.2* ) avahi? ( net-dns/avahi ) howl? ( !avahi? ( >=net-misc/howl-0.9.8 ) ) >=dev-libs/liboil-0.3.0 jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) tcp? ( sys-apps/tcp-wrappers ) lirc? ( app-misc/lirc ) " # asyncns? ( >=dev-libs/libasyncns-0.1 ) DEPEND="${RDEPEND} dev-util/pkgconfig doc? ( app-doc/doxygen ) " pkg_setup() { if use avahi && ! built_with_use net-dns/avahi howl-compat ; then echo eerror "In order to compile polypaudio, you need to have net-dns/avahi emerged" eerror "with 'howl-compat' in your USE flags. Please add that flag, re-emerge" eerror "avahi, and then emerge polypaudio." die "net-dns/avahi is missing the HOWL compatibility layer." fi } src_unpack() { unpack ${A}; cd ${S} } src_compile() { econf \ $(use_enable lynx) \ $(use_with X x) \ $(use_with caps) \ --disable-ltdl-install \ --enable-largefile \ $(use_enable oss) \ $(use_enable alsa) \ --disable-solaris \ $(use_enable glib glib2) \ $(use_enable glib1) \ --$({ use avahi || use howl;} && echo enable || echo disable)-howl \ $(use_enable jack) \ $(use_enable tcp tcpwrap) \ $(use_enable lirc) \ || die "econf failed" # $(use_enable asyncns) \ emake -j1 || die "emake failed" } src_install() { make DESTDIR="${D}" install || die "make install failed" newconfd ${FILESDIR}/pulseaudio.conf.d pulseaudio extradepend="" #use tcpd && extradepend=" portmap" use alsa && extradepend="$extradepend alsasound" sed -e "s/@extradepend@/$extradepend/" ${FILESDIR}/pulseaudio.init.d >${T}/pulseaudio doinitd ${T}/pulseaudio # # Install documentation? # dohtml -r doc dodoc README doc/todo if use doc; then dohtml -r doxygen fi }