From 3bf6694201551211a4dc0a6f40d5fb7544de891b Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Sun, 13 Apr 2008 15:44:38 +0000 Subject: [PATCH] all options supported by use flags git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@886 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- ....0_pre20080412-exclude_modules_colon.patch | 26 ++++++++++++ pkg/gentoo/sems-1.0.0_pre20080412.ebuild | 42 ++++++++++++++----- 2 files changed, 58 insertions(+), 10 deletions(-) create mode 100644 pkg/gentoo/files/sems-1.0.0_pre20080412-exclude_modules_colon.patch diff --git a/pkg/gentoo/files/sems-1.0.0_pre20080412-exclude_modules_colon.patch b/pkg/gentoo/files/sems-1.0.0_pre20080412-exclude_modules_colon.patch new file mode 100644 index 00000000..1acc7207 --- /dev/null +++ b/pkg/gentoo/files/sems-1.0.0_pre20080412-exclude_modules_colon.patch @@ -0,0 +1,26 @@ +Index: apps/Makefile +=================================================================== +--- apps/Makefile (revision 885) ++++ apps/Makefile (working copy) +@@ -4,7 +4,7 @@ + include $(COREPATH)/../Makefile.defs + + exclude_modules ?= mp3 examples py_sems +-modules ?= $(filter-out $(exclude_modules) \ ++modules ?= $(filter-out $(subst ;, ,$(exclude_modules))\ + $(wildcard Makefile*) CVS, \ + $(wildcard *) ) examples/tutorial/cc_acc + #modules = wav gsm ilbc bot echo announcement recorder voicemail dtmf_demo ivr +Index: core/plug-in/Makefile +=================================================================== +--- core/plug-in/Makefile (revision 884) ++++ core/plug-in/Makefile (working copy) +@@ -3,7 +3,7 @@ + exclude_modules ?= + #echo + +-modules = $(filter-out $(exclude_modules) \ ++modules = $(filter-out $(subst ;, ,$(exclude_modules)) \ + $(wildcard Makefile*) CVS, \ + $(wildcard *) ) + #modules = wav gsm ilbc bot echo announcement recorder voicemail dtmf_demo ivr diff --git a/pkg/gentoo/sems-1.0.0_pre20080412.ebuild b/pkg/gentoo/sems-1.0.0_pre20080412.ebuild index 90bedf05..6c41edb4 100644 --- a/pkg/gentoo/sems-1.0.0_pre20080412.ebuild +++ b/pkg/gentoo/sems-1.0.0_pre20080412.ebuild @@ -2,9 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-libs/spandsp/spandsp-0.0.3_pre26.ebuild,v 1.1 2006/11/27 21:05:46 drizzt Exp $ -inherit versionator +inherit versionator eutils -IUSE="" +IUSE="spandsp speex python libsamplerate lame mpg123 sip examples" DESCRIPTION="SEMS is a free, high performance, extensible media server for SIP (RFC3261) based VoIP services." HOMEPAGE="http://iptel.org/sems/" @@ -16,17 +16,39 @@ SLOT="0" LICENSE="GPL-2" KEYWORDS="~amd64 ~ppc ~x86" -DEPEND=">=media-libs/spandsp-0.0.4_pre18 - >=media-libs/speex-1.1.7 - >=dev-lang/python-2.4.4-r4" +DEPEND="spandsp? >=media-libs/spandsp-0.0.4_pre18 + speex? ( >=media-libs/speex-1.1.7 ) + python? ( >=dev-lang/python-2.4.4-r4 ) + lame? ( >= media-sound/lame-3.97-r1 ) + mpg123? ( >= media-sound/mpg123-1.3.1 ) + sip? ( >= dev-python/sip-4.2.1 ) + libsamplerate? ( >= media-libs/libsamplerate-0.1.2 )" + +src_unpack () { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${P}-exclude_modules_colon.patch" +} src_compile () { - if [ -x ./configure ]; then - econf - fi - if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then - emake PREFIX=/usr RELEASE=${PVR} || die "emake failed" + local myexclude="" + use examples || myexclude="examples" + use speex || myexclude="${myexclude};speex" + use python || myexclude="${myexclude};ivr;mailbox;pin_collect;conf_auth" + use lame || myexclude="${myexclude};mp3" + use sip || myexclude="${myexclude};py_sems" + + local myconf="" + use spandsp && myconf="${myconf} USE_SPANDSP=yes" + use spandsp || myconf="${myconf} WITH_MPG123DECODER=no" + use libsamplerate || myconf="${myconf} USE_LIBSAMPLERATE=yes" + + if [ "${myexclude}" != "" ]; then + myconf="${myconf} exclude_modules=${myexclude}" fi + + echo "runnning 'emake PREFIX=/usr RELEASE=${PVR} ${myconf} all'" + emake PREFIX=/usr RELEASE=${PVR} ${myconf} all || die "emake failed" } src_install () {