diff options
Diffstat (limited to 'media-sound/zynaddsubfx/zynaddsubfx-2.4.0.ebuild')
-rw-r--r-- | media-sound/zynaddsubfx/zynaddsubfx-2.4.0.ebuild | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/media-sound/zynaddsubfx/zynaddsubfx-2.4.0.ebuild b/media-sound/zynaddsubfx/zynaddsubfx-2.4.0.ebuild new file mode 100644 index 000000000000..3bdff26dd6fc --- /dev/null +++ b/media-sound/zynaddsubfx/zynaddsubfx-2.4.0.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/zynaddsubfx/zynaddsubfx-2.4.0.ebuild,v 1.1 2009/08/10 07:28:00 aballier Exp $ + +EAPI=2 +inherit eutils toolchain-funcs + +MY_P=ZynAddSubFX-${PV} + +DESCRIPTION="ZynAddSubFX is an opensource software synthesizer." +HOMEPAGE="http://zynaddsubfx.sourceforge.net/" +SRC_URI="mirror://sourceforge/zynaddsubfx/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +IUSE="oss alsa jack lash +fltk" + +RDEPEND="fltk? ( >=x11-libs/fltk-1.1.2:1.1 ) + =sci-libs/fftw-3* + jack? ( media-sound/jack-audio-connection-kit ) + alsa? ( media-libs/alsa-lib ) + lash? ( media-sound/lash ) + >=dev-libs/mini-xml-2.2.1" +# portaudio? ( media-libs/portaudio )" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + sed -i -e '/CXXFLAGS +=/s:CXXFLAGS +=:override CXXFLAGS +=:' \ + -e '/export CXXFLAGS/d' \ + -e '/\$(MAKE) -C UI/s:$: CXXFLAGS="${CXXFLAGS}":' \ + -e '/\$(MAKE) -C $@/s:$: CXXFLAGS="${CXXFLAGS}":' \ + "${S}/src/Makefile" || die "unable to reset CXXFLAGS overrides." + sed -e 's/gcc -g/$(CC) $(CFLAGS)/' \ + -e 's/gcc -o/$(CC) $(LDFLAGS) -o/' \ + -i "${S}/ExternalPrograms/Spliter/Makefile" || die + sed -e 's/gcc -o/$(CC) $(LDFLAGS) -o/' \ + -e 's/gcc/$(CC) $(CFLAGS)/' \ + -i "${S}/ExternalPrograms/Controller/Makefile" || die + epatch "${FILESDIR}/${P}-string.patch" + epatch "${FILESDIR}/${P}-ldflags.patch" +} + +use_echo_yesno() { + if use $1 ; then + echo "YES" + else + echo "NO" + fi +} + +src_configure() { + cd "${S}/src" + echo "OS_PORT=LINUX" > Makefile.inc + echo "FFTW_VERSION=3" >> Makefile.inc + echo "ASM_F2I=NO" >> Makefile.inc + echo "DISABLE_GUI=$(use_echo_yesno !fltk)" >> Makefile.inc + if use oss ; then + use alsa || echo "MIDIIN=OSS" >> Makefile.inc + if use jack; then + echo "AUDIOOUT=OSS_AND_JACK" >> Makefile.inc + else + echo "AUDIOOUT=OSS" >> Makefile.inc + fi + else + if use jack; then + echo "AUDIOOUT=JACK" >> Makefile.inc + else + echo "AUDIOOUT=NONE" >> Makefile.inc + fi + fi + if use alsa ; then + echo "MIDIIN=ALSA" >> Makefile.inc + else + use oss || echo "MIDIIN=NONE" >> Makefile.inc + fi + echo "LINUX_USE_LASH=$(use_echo_yesno lash)" >> Makefile.inc +} + +src_compile() { + tc-export CC CXX + + cd "${S}/src" + emake -j1 \ + CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + || die "compile failed" + if use fltk ; then + cd "${S}/ExternalPrograms/Spliter" + emake || die + cd "${S}/ExternalPrograms/Controller" + emake || die + fi +} + +src_install() { + dobin "${S}/src/zynaddsubfx" + use fltk && dobin "${S}/ExternalPrograms/Spliter/spliter" + use fltk && dobin "${S}/ExternalPrograms/Controller/controller" + dodoc ChangeLog FAQ.txt HISTORY.txt README.txt ZynAddSubFX.lsm bugs.txt + + insinto "/usr/share/${PN}" + doins -r "${S}/banks" "${S}/examples" +} |