Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
csound5 ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
thersites
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2004
Posts: 101
Location: South West China

PostPosted: Tue Feb 14, 2006 2:10 am    Post subject: csound5 ebuild Reply with quote

My first attempt at an ebuild, but actually I don't have the time to learn how to use csound itself!
Also I've only built this on a console-only system, and so I don't know if just adding x11-libs/fltk to the RDEPENDS would give you a gui.
Anyway - if anyone's interested, here it is

<code>
`--> cat csound5-2005.12.13.ebuild
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: Exp $

inherit eutils python multilib

DESCRIPTION="Csound music"
HOMEPAGE="http://csounds.com/"
SRC_URI="http://csound.sourceforge.net/csound5-2005-12-13.tar.bz2"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

RDEPEND="media-libs/ladspa-sdk
media-libs/alsa-lib
media-libs/libsndfile"

DEPEND="${RDEPEND}
dev-util/scons"

S=${WORKDIR}/${PN}

src_compile(){
# These addpredicts are to stop sandbox violation errors
# addpredict in src_compile() alone does not stop sandbox
# violation errors in src_install(()
addpredict "/usr/include"
addpredict "/usr/lib"
scons prefix=/usr buildLoris=1 buildPythonOpcodes=1 pythonVersion=2.4 || die
}

src_install() {
dodir /usr/bin
addpredict "/usr/include"
addpredict "/usr/lib"
scons prefix=${D}/usr install || die
}

pkg_postinst() {
einfo "This is only a template ebuild - build options and DEPENDS may be
missing."
einfo "http://www.agnula.org/documentation/dp_tutorials/cs_beginner/"
einfo "http://csounds.com/"
einfo "http://www.csounds.com/ezine/"
}
</code>
Back to top
View user's profile Send private message
Tiger683
Veteran
Veteran


Joined: 08 Jan 2005
Posts: 1347
Location: Heffner's House

PostPosted: Tue Feb 14, 2006 2:56 pm    Post subject: Reply with quote

Try this first,
but to let you know, some stuff
needed for additional features is not in portage yet.... so no working portaudio for example :/
also, don't know if doxygen is needed "if use doc" only...

Code:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="Csound is a sound and music synthesis system, providing facilities for composition and performance over a wide range of platforms."

HOMEPAGE="http://csounds.com"

SRC_URI="mirror://sourceforge/${PN}/Csound5.00_src_all.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~x86 ~amd64 ~ppc ~ppc64 -*"

# We default to using als, so no useflag for it ;)
IUSE="java tcltk vst jack portaudio stk_opcodes osc_opcodes expensive_math doc amd64 ppc64 static altivec"


RDEPEND="
   media-libs/ladspa-sdk
   media-libs/alsa-lib
   >=media-libs/libsndfile-1.0.12-r1"

DEPEND="${RDEPEND}
   >=x11-libs/fltk-1.1*
   dev-util/scons
   =dev-lang/python-2.4*
   dev-lang/swig
   portaudio? (=media-libs/portaudio-19*)
   jack? (media-sound/jack)
   tcltk? (dev-lang/tcl)
   tcltk? (dev-lang/tk)
   java? (virtual/jdk)
   vst? (>=dev-libs/boost-1.32.1)
   osc_opcodes? (media-libs/liblo)
   doc? (app-doc/doxygen)"

S="${WORKDIR}/csound5"

src_unpack() {
   unpack ${A}
   cd ${S}
}

src_compile() {
   local my_scons="CC=/usr/bin/gcc CXX=/usr/bin/g++ customCCFLAGS=-I/usr/include customCXXFLAGS=-I/usr/include prefix=/usr buildRelease=1 useCoreAudio=0 buildLoris=1 pythonVersion=2.4 buildPythonOpcodes=1"
   
   # Feed scons with use-enabled options
   use expensive_math && my_scons="useDouble=1 ${my_scons}"
   use portaudio || my_scons="usePortAudio=0 ${my_scons}"
   use jack || my_scons="useJack=0 ${my_scons}"
   use vst && my_scons="buildCsoundVST=1 ${my_scons}"
   use doc && my_scons="generatePdf=1 ${my_scons}"
   use osc_opcodes && my_scons="useOSC=1 ${my_scons}"
   use static || my_scons="dynamicCsoundLibrary=1 ${my_scons}"
   use stk_opcodes && my_scons="buildStkOpcodes=1 ${my_scons}"
   use osc_opcodes && my_scons="useOSC=1 ${my_scons}"
   use tcltk && my_scons="buildTclcsound=0 ${my_scons}"
   use java && my_scons="buildJavaWrapper=1 ${my_scons}"
   ( use amd64 || use ppc64 )  && my_scons="Word64=1 ${my_scons}"
   use altivec && my_scons="useAltivec=1 ${my_scons}"

   # No sneaking here ;)
   einfo "configuring with following options:"
   einfo "${my_scons}"
   sleep 2

   # These addpredicts are to stop sandbox violation errors
   # addpredict in src_compile() alone does not stop sandbox
   # violation errors in src_install(()
   addpredict "/usr/include"
   addpredict "/usr/lib"

   # now let's pray it worx
   scons ${my_scons} || die "scons failed!"
}

src_install() {
   addpredict "/usr/include"
   addpredict "/usr/lib"
   dodir "/usr/bin"
   scons prefix=${D}/usr install || die "scons install failed!"
}

pkg_postinst() {
   ewarn "This is only a template ebuild - build options and DEPENDS may be missing."
   ewarn "http://www.agnula.org/documentation/dp_tutorials/cs_beginner/"
   ewarn "http://csounds.com/"
   ewarn "http://www.csounds.com/ezine/"
}


_________________
Retired gentoo user
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum