# 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/polypaudio/" SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz" LICENSE="LGPL-2 GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="alsa avahi caps doc glib glib1 howl jack lirc oss tcp X" # asyncns RDEPEND=" X? ( || ( ( x11-libs/libX11 ) virtual/x11 ) ) caps? ( sys-libs/libcap ) >=media-libs/libsamplerate-0.1.0 >=media-libs/libsndfile-1.0.10 oss? ( virtual/os-headers ) alsa? ( >=media-libs/alsa-lib-1.0.0 ) glib? ( >=dev-libs/glib-2.4.0 ) glib1? ( =dev-libs/glib-1.2* ) avahi? ( net-dns/avahi ) howl? ( !avahi? ( >=net-dns/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" eerror "emerged with 'howl-compat' in your USE flags. Please add that" eerror "flag, re-emerge avahi, and then emerge polypaudio." die "net-dns/avahi is missing the HOWL compatibility layer." fi } src_unpack() { unpack ${A}; cd ${S} # allow disabling features: http://0pointer.de/trac/polypaudio/ticket/16 epatch ${FILESDIR}/0.9.0-configure.patch eautoreconf } src_compile() { econf \ --disable-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" if use doc; then emake doxygen || die "emake doxygen failed" fi } src_install() { make DESTDIR="${D}" install || die "make install failed" dohtml -r doc dodoc README doc/todo if use doc; then dohtml -r doxygen fi }