# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils inherit flag-o-matic DESCRIPTION="Lightweight, free, cross-platform sound library" HOMEPAGE="http://audiere.sourceforge.net" SRC_URI="mirror://sourceforge/${PN}/${PN}-${PV}.tar.gz" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~x86" IUSE="wxwindows vorbis flac speex dumb cdaudio debug" RDEPEND="vorbis? ( media-libs/libvorbis ) flac? ( media-libs/flac ) speex? ( media-libs/speex ) wxwindows? ( x11-libs/wxGTK ) dumb? ( media-libs/dumb ) cdaudio? ( media-libs/libcdaudio )" DEPEND="${RDEPEND} sys-devel/automake sys-devel/autoconf" src_unpack() { unpack ${A} #Fix for configure.in to detect speex properly and fix a whole bunch of dependency issues. epatch ${FILESDIR}/configure.in.patch #Makefile.am needs AUTOMAKE_OPTIONS = foreign for autoreconf. epatch ${FILESDIR}/Makefile.am.patch #Kludge necessary for speex support to work, will see if filing a bug upstream helps. use speex && append-flags "-I/usr/include/speex" cd "${S}" # Rerun autotools einfo "Regenerating autotools files..." autoreconf --install --force || die "autoreconf failed" } src_compile() { MYCONF=use_enable debug use wxwindows || MYCONF="${MYCONF} --disable-wxwindows" use flac || MYCONF="${MYCONF} --disable-flac" use dumb || MYCONF="${MYCONF} --disable-dumb" use cdaudio || MYCONF="${MYCONF} --disable-cdaudio" use vorbis || MYCONF="${MYCONF} --without-vorbis" use speex || MYCONF="${MYCONF} --without-speex" econf ${MYCONF} || die "econf failed" emake || die "emake failed" } src_install() { make install DESTDIR=${D} || die "install failed" dodoc doc/*.txt }