rendered paste body# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit autotools
DESCRIPTION="Pd-extended by Hans-Cristoph Steiner"
HOMEPAGE="http://www.puredata.org/"
SRC_URI="mirror://sourceforge/pd-overlay/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE_PD_EXTERNALS="boids bsaylor corelibs creb cxc cyclone deprecated ekext
ext13 flatspace flib freeverb gem2pdp ggee hardware hcs hid iem_ambi iem_bin_ambi iemlib
jasch_lib mapping markex maxlib mjlib motex mrpeach msd oscx pan pddp pdogg pdp
pidip pmpd sigpack smlib toxy unauthorized vbap zexy"
IUSE="${IUSE_PD_EXTERNALS}"
S="${WORKDIR}/pure-data"
DEPEND="!media-sound/pd
unauthorized? ( >=media-libs/speex-1.1.12
media-sound/lame )
pdp? ( >=sci-libs/gsl-1.8
virtual/glut
media-libs/libsdl
media-libs/libquicktime
x11-libs/libX11
x11-libs/libXv )
pidip? ( media-libs/libtheora
media-libs/libvorbis
media-libs/libquicktime
media-libs/imlib2
media-libs/libsdl
media-video/mpeg4ip
media-libs/libmp4v2
media-gfx/imagemagick
media-libs/aalib )
pdogg? ( media-libs/libogg
media-libs/libvorbis )
media-sound/lame
media-libs/flac
media-libs/libsndfile
bsaylor? ( =sci-libs/fftw-3* )
hcs? ( dev-libs/libusb )
pdogg? ( media-libs/libogg )"
RDEPEND="${DEPEND}"
# I suspect we need both fftw version 2 and 3
src_unpack() {
unpack ${A}
cd "${S}"
# Patch pd (current snapshot is already patched)
#pushd packages
#sed -i -e "s/patch\ -p0/patch\ -p0\ -t/g" Makefile || die "sed failed"
#make patch_pd
#popd
pushd pd/src
sed -i -e 's:\($(libdir)/pd\):$(DESTDIR)\1:' makefile.in
eaclocal
eautoconf
popd
}
src_compile() {
# build pd
pushd pd/src
econf || "Configure of 'pd' failed"
emake OPT_CFLAGS="${CFLAGS}" DESTDIR="${D}" prefix="/usr" || \
die "Build of 'pd' failed"
popd
# build externals in $USE
for i in ${IUSE_PD_EXTERNALS}; do
if use $i; then
einfo "Building external: '$i'"
local my_make_opts=""
# libOSC and vocoder~ compilation fails with ccache and -j2
if [ ${i} == oscx ] || [ ${i} == unauthorized ] ; then
my_make_opts="${my_make_opts} -j1"
fi
emake OPT_CFLAGS="${CFLAGS}" DESTDIR="${D}" prefix="/usr" \
-C externals ${my_make_opts} ${i} || die "Build of '${i}' failed"
fi
done
}
src_install() {
#install pd
pushd pd/src
emake DESTDIR="${D}" prefix="/usr" install || \
die "Install of 'pd' failed"
popd
# and externals
for i in ${IUSE_PD_EXTERNALS}; do
if use $i; then
einfo "Building external: '${i}'"
emake DESTDIR="${D}" prefix="/usr" -C externals ${i}_install || \
die "Install of '${i}' failed"
fi
done
}