summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2012-02-29 00:54:13 +0000
committerTim Harder <radhermit@gentoo.org>2012-02-29 00:54:13 +0000
commitbacb67a602f2d5c1e794d7c89062e80ebee064be (patch)
treeb7b2696d530e0f68f857782b506fdafc86506917 /media-sound/csound
parentDev channel bump. (diff)
downloadgentoo-2-bacb67a602f2d5c1e794d7c89062e80ebee064be.tar.gz
gentoo-2-bacb67a602f2d5c1e794d7c89062e80ebee064be.tar.bz2
gentoo-2-bacb67a602f2d5c1e794d7c89062e80ebee064be.zip
Revbump to add luajit use flag to control using dev-lang/luajit instead of dev-lang/lua.
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
Diffstat (limited to 'media-sound/csound')
-rw-r--r--media-sound/csound/ChangeLog9
-rw-r--r--media-sound/csound/csound-5.16.6-r2.ebuild210
-rw-r--r--media-sound/csound/files/csound-5.16.6-scons.patch120
-rw-r--r--media-sound/csound/metadata.xml1
4 files changed, 316 insertions, 24 deletions
diff --git a/media-sound/csound/ChangeLog b/media-sound/csound/ChangeLog
index beecf7420338..628129c78de5 100644
--- a/media-sound/csound/ChangeLog
+++ b/media-sound/csound/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-sound/csound
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/csound/ChangeLog,v 1.7 2012/02/28 21:28:40 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/csound/ChangeLog,v 1.8 2012/02/29 00:54:13 radhermit Exp $
+
+*csound-5.16.6-r2 (29 Feb 2012)
+
+ 29 Feb 2012; Tim Harder <radhermit@gentoo.org> +csound-5.16.6-r2.ebuild,
+ files/csound-5.16.6-scons.patch, metadata.xml:
+ Revbump to add luajit use flag to control using dev-lang/luajit instead of
+ dev-lang/lua.
28 Feb 2012; Tim Harder <radhermit@gentoo.org> csound-5.16.6-r1.ebuild:
Remove duplicate LDFLAGS setting.
diff --git a/media-sound/csound/csound-5.16.6-r2.ebuild b/media-sound/csound/csound-5.16.6-r2.ebuild
new file mode 100644
index 000000000000..32d38bfb3450
--- /dev/null
+++ b/media-sound/csound/csound-5.16.6-r2.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/csound/csound-5.16.6-r2.ebuild,v 1.1 2012/02/29 00:54:13 radhermit Exp $
+
+EAPI="4"
+PYTHON_DEPEND="python? 2"
+
+inherit eutils multilib python java-pkg-opt-2 scons-utils toolchain-funcs versionator
+
+MY_PN="${PN/c/C}"
+MY_P="${MY_PN}${PV}"
+DOCS_P="${MY_PN}$(get_version_component_range 1-2)"
+
+DESCRIPTION="A sound design and signal processing system providing facilities for composition and performance"
+HOMEPAGE="http://csounds.com/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz
+ html? (
+ linguas_fr? ( mirror://sourceforge/${PN}/${DOCS_P}_manual-fr_html.zip )
+ !linguas_fr? ( mirror://sourceforge/${PN}/${DOCS_P}_manual_html.zip )
+ )
+ doc? (
+ linguas_fr? ( mirror://sourceforge/${PN}/${DOCS_P}_manual-fr_pdf.zip )
+ !linguas_fr? ( mirror://sourceforge/${PN}/${DOCS_P}_manual_pdf.zip )
+ )"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+alsa beats chua csoundac +cxx debug double-precision dssi examples fltk +fluidsynth
+html +image jack java keyboard linear lua luajit nls osc openmp doc portaudio portmidi pulseaudio
+python samples static-libs stk tcl test +threads +utils vim-syntax vst"
+
+LANGS=" de en_GB en_US es_CO fr it ro ru"
+IUSE+="${LANGS// / linguas_}"
+
+RDEPEND=">=media-libs/libsndfile-1.0.16
+ alsa? ( media-libs/alsa-lib )
+ csoundac? ( x11-libs/fltk:1[threads?]
+ dev-libs/boost
+ =dev-lang/python-2* )
+ dssi? ( media-libs/dssi
+ media-libs/ladspa-sdk )
+ fluidsynth? ( media-sound/fluidsynth )
+ fltk? ( x11-libs/fltk:1[threads?] )
+ image? ( media-libs/libpng )
+ jack? ( media-sound/jack-audio-connection-kit )
+ java? ( >=virtual/jdk-1.5 )
+ keyboard? ( x11-libs/fltk:1[threads?] )
+ linear? ( sci-mathematics/gmm )
+ lua? (
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( dev-lang/lua )
+ )
+ osc? ( media-libs/liblo )
+ portaudio? ( media-libs/portaudio )
+ portmidi? ( media-libs/portmidi )
+ pulseaudio? ( media-sound/pulseaudio )
+ stk? ( media-libs/stk )
+ tcl? ( >=dev-lang/tcl-8.5
+ >=dev-lang/tk-8.5 )
+ utils? ( !media-sound/snd )
+ vst? ( x11-libs/fltk:1[threads?]
+ dev-libs/boost
+ =dev-lang/python-2* )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc
+ chua? ( dev-libs/boost )
+ csoundac? ( dev-lang/swig )
+ html? ( app-arch/unzip )
+ doc? ( app-arch/unzip )
+ nls? ( sys-devel/gettext )
+ test? ( =dev-lang/python-2* )
+ vst? ( dev-lang/swig )"
+
+REQUIRED_USE="vst? ( csoundac )
+ java? ( cxx )
+ linear? ( double-precision )
+ lua? ( cxx )
+ python? ( cxx )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-scons.patch
+ epatch "${FILESDIR}"/${P}-tests.patch
+ epatch "${FILESDIR}"/${P}-install.patch
+
+ cat > custom.py <<-EOF
+ platform = 'linux'
+ customCPPPATH = []
+ customCCFLAGS = "${CFLAGS}".split()
+ customCXXFLAGS = "${CXXFLAGS}".split()
+ customLIBS = []
+ customLIBPATH = []
+ customLINKFLAGS = "${LDFLAGS}".split()
+ customSHLINKFLAGS = []
+ customSWIGFLAGS = []
+ EOF
+}
+
+src_compile() {
+ local myconf
+ [[ $(get_libdir) == "lib64" ]] && myconf+=" Lib64=1"
+
+ escons \
+ prefix=/usr \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ buildNewParser=1 \
+ pythonVersion=$(python_get_version) \
+ $(use_scons alsa useALSA) \
+ $(use_scons beats buildBeats) \
+ $(use_scons chua buildChuaOpcodes) \
+ $(use_scons csoundac buildCsoundAC) \
+ $(use_scons cxx buildInterfaces) \
+ $(use_scons !debug buildRelease) \
+ $(use_scons !debug noDebug) \
+ $(use_scons debug NewParserDebug) \
+ $(use_scons double-precision useDouble) \
+ $(use_scons dssi buildDSSI) \
+ $(use_scons fluidsynth buildFluidOpcodes) \
+ $(use_scons fltk buildCsound5GUI) \
+ $(use_scons fltk useFLTK) \
+ $(use_scons image buildImageOpcodes) \
+ $(use_scons jack useJack) \
+ $(use_scons java buildJavaWrapper) \
+ $(use_scons keyboard buildVirtual) \
+ $(use_scons linear buildLinearOpcodes) \
+ $(use_scons lua buildLuaOpcodes) \
+ $(use_scons lua buildLuaWrapper) \
+ $(use_scons luajit useLuaJIT) \
+ $(use_scons nls useGettext) \
+ $(use_scons osc useOSC) \
+ $(use_scons openmp useOpenMP) \
+ $(use_scons portaudio usePortAudio) \
+ $(use_scons portmidi usePortMIDI) \
+ $(use_scons pulseaudio usePulseAudio) \
+ $(use_scons python buildPythonOpcodes) \
+ $(use_scons python buildPythonWrapper) \
+ $(use_scons !static-libs dynamicCsoundLibrary) \
+ $(use_scons stk buildStkOpcodes) \
+ $(use_scons tcl buildTclcsound) \
+ $(use_scons !threads noFLTKThreads) \
+ $(use_scons threads buildMultiCore) \
+ $(use_scons utils buildUtilities) \
+ $(use_scons vst buildCsoundVST) \
+ ${myconf}
+}
+
+src_test() {
+ export LD_LIBRARY_PATH="${S}" OPCODEDIR="${S}" OPCODEDIR64="${S}"
+ cd tests
+ ./test.py || die "tests failed"
+}
+
+src_install() {
+ local myconf
+ [[ $(get_libdir) == "lib64" ]] && myconf+=" --word64"
+
+ use vim-syntax && myconf+=" --vimdir=/usr/share/vim/vimfiles"
+
+ ./install.py --instdir="${D}" --prefix=/usr ${myconf} || die "install failed"
+ dodoc AUTHORS ChangeLog readme-csound5-complete.txt
+
+ # Generate env.d file
+ if use double-precision ; then
+ echo OPCODEDIR64=/usr/$(get_libdir)/${PN}/plugins64 > "${T}"/62${PN}
+ else
+ echo OPCODEDIR=/usr/$(get_libdir)/${PN}/plugins > "${T}"/62${PN}
+ fi
+ echo "CSSTRNGS=/usr/share/locale" >> "${T}"/62${PN}
+ use stk && echo "RAWWAVE_PATH=/usr/share/csound/rawwaves" >> "${T}"/62${PN}
+ doenvd "${T}"/62${PN}
+
+ if use nls ; then
+ insinto /usr/share/locale
+ for lang in ${LANGS} ; do
+ use linguas_${lang} && doins -r po/${lang}
+ done
+ fi
+
+ if use examples ; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ if use html ; then
+ dohtml -r "${WORKDIR}"/html/*
+ fi
+
+ if use doc ; then
+ if use linguas_fr ; then
+ dodoc "${WORKDIR}"/${DOCS_P}_manual-fr.pdf
+ else
+ dodoc "${WORKDIR}"/${DOCS_P}_manual.pdf
+ fi
+ fi
+
+ use samples && dodoc -r samples
+}
diff --git a/media-sound/csound/files/csound-5.16.6-scons.patch b/media-sound/csound/files/csound-5.16.6-scons.patch
index 7b31db61468d..362fb0e8e4a0 100644
--- a/media-sound/csound/files/csound-5.16.6-scons.patch
+++ b/media-sound/csound/files/csound-5.16.6-scons.patch
@@ -10,7 +10,17 @@
commandOptions.Add('useALSA',
'Set to 1 to use ALSA for real-time audio and MIDI input and output.',
'1')
-@@ -180,6 +183,15 @@
+@@ -101,6 +104,9 @@
+ commandOptions.Add('noFLTKThreads',
+ 'Set to 1 to disable use of a separate thread for FLTK widgets.',
+ '1')
++commandOptions.Add('useLuaJIT',
++ 'Set to 1 to use the Just-In-Time Compiler for Lua',
++ '1')
+ commandOptions.Add('pythonVersion',
+ 'Set to the Python version to be used.',
+ '%d.%d' % (int(sys.hexversion) >> 24, (int(sys.hexversion) >> 16) & 255))
+@@ -180,6 +186,15 @@
commandOptions.Add('dynamicCsoundLibrary',
'Build dynamic Csound library instead of libcsound.a',
'0')
@@ -26,7 +36,7 @@
commandOptions.Add('buildStkOpcodes',
"Build opcodes encapsulating Perry Cook's Synthesis Toolkit in C++ instruments and effects",
'0')
-@@ -352,6 +364,7 @@
+@@ -352,6 +367,7 @@
fileOptions.Add('customCXXFLAGS')
fileOptions.Add('customLIBS')
fileOptions.Add('customLIBPATH')
@@ -34,7 +44,7 @@
fileOptions.Add('customSHLINKFLAGS')
fileOptions.Add('customSWIGFLAGS')
fileOptions.Update(commonEnvironment)
-@@ -366,6 +379,8 @@
+@@ -366,6 +382,8 @@
commonEnvironment.Prepend(LIBS = customLIBS)
customLIBPATH = commonEnvironment['customLIBPATH']
commonEnvironment.Prepend(LIBPATH = customLIBPATH)
@@ -43,7 +53,7 @@
customSHLINKFLAGS = commonEnvironment['customSHLINKFLAGS']
commonEnvironment.Prepend(SHLINKFLAGS = customSHLINKFLAGS)
customSWIGFLAGS = commonEnvironment['customSWIGFLAGS']
-@@ -469,14 +484,6 @@
+@@ -469,14 +487,6 @@
if commonEnvironment['buildRelease'] == '0':
commonEnvironment.Prepend(CPPFLAGS = ['-DBETA'])
@@ -58,18 +68,18 @@
if commonEnvironment['Word64'] == '1':
if compilerSun():
commonEnvironment.Append(CCFLAGS = ['-xcode=pic32'])
-@@ -494,10 +501,7 @@
+@@ -494,10 +504,7 @@
if getPlatform() == 'linux':
commonEnvironment.Append(CCFLAGS = ["-DLINUX"])
commonEnvironment.Append(CPPFLAGS = ['-DHAVE_SOCKETS'])
- commonEnvironment.Append(CPPPATH = ['/usr/local/include'])
- commonEnvironment.Append(CPPPATH = ['/usr/include'])
- commonEnvironment.Append(CPPPATH = ['/usr/include'])
+ commonEnvironment.Append(CPPPATH = ['/usr/include'])
- commonEnvironment.Append(CPPPATH = ['/usr/X11R6/include'])
commonEnvironment.Append(CCFLAGS = ["-DPIPES"])
commonEnvironment.Append(LINKFLAGS = ['-Wl,-Bdynamic'])
elif getPlatform() == 'sunos':
-@@ -559,18 +563,17 @@
+@@ -559,18 +566,17 @@
if getPlatform() == 'linux':
path1 = '/usr/include/python%s' % commonEnvironment['pythonVersion']
@@ -91,7 +101,7 @@
pythonLibs = ['python%s' % commonEnvironment['pythonVersion']]
elif getPlatform() == 'sunos':
path1 = '/usr/include/python%s' % commonEnvironment['pythonVersion']
-@@ -777,6 +780,7 @@
+@@ -777,6 +783,7 @@
zlibhfound = configure.CheckHeader("zlib.h", language = "C")
midiPluginSdkFound = configure.CheckHeader("funknown.h", language = "C++")
luaFound = configure.CheckHeader("lua.h", language = "C")
@@ -99,16 +109,46 @@
#print 'LUA: %s' % (['no', 'yes'][int(luaFound)])
swigFound = 'swig' in commonEnvironment['TOOLS']
print 'Checking for SWIG... %s' % (['no', 'yes'][int(swigFound)])
-@@ -1452,7 +1456,7 @@
+@@ -1452,24 +1459,30 @@
swigflags = csoundWrapperEnvironment['SWIGFLAGS']
print 'swigflags:', swigflags
luaWrapper = None
- if not (luaFound and commonEnvironment['buildLuaWrapper'] != '0'):
-+ if not (luajitFound and commonEnvironment['buildLuaWrapper'] != '0'):
++ if not (luaFound or luajitFound and commonEnvironment['buildLuaWrapper'] != '0'):
print 'CONFIGURATION DECISION: Not building Lua wrapper to Csound C++ interface library.'
else:
print 'CONFIGURATION DECISION: Building Lua wrapper to Csound C++ interface library.'
-@@ -1510,6 +1514,9 @@
+ luaWrapperEnvironment = csoundWrapperEnvironment.Clone()
+ if getPlatform() != 'win32':
+- csoundWrapperEnvironment.Append(CPPPATH=['/usr/include/lua5.1'])
++ if luajitFound and commonEnvironment['useLuaJIT'] == '1':
++ csoundWrapperEnvironment.Append(CPPPATH=['/usr/include/luajit-2.0'])
++ else:
++ csoundWrapperEnvironment.Append(CPPPATH=['/usr/include/lua5.1'])
+ if getPlatform() == 'win32':
+ csoundLuaInterface = luaWrapperEnvironment.SharedObject(
+ 'interfaces/lua_interface.i',
+ SWIGFLAGS = [swigflags, '-lua', '-module', 'luaCsnd', '-lua51', '-outdir', '.'])
+ luaWrapperEnvironment.Prepend(LIBS = ['csnd','luaj51'])
+- else:
+- csoundLuaInterface = luaWrapperEnvironment.SharedObject(
+- 'interfaces/lua_interface.i',
+- SWIGFLAGS = [swigflags, '-lua', '-module', 'luaCsnd', '-outdir', '.'])
+- luaWrapperEnvironment.Prepend(LIBS = ['csnd','luajit-5.1'])
+- luaWrapper = makeLuaModule(luaWrapperEnvironment, 'luaCsnd', [csoundLuaInterface])
++ else:
++ csoundLuaInterface = luaWrapperEnvironment.SharedObject(
++ 'interfaces/lua_interface.i',
++ SWIGFLAGS = [swigflags, '-lua', '-module', 'luaCsnd', '-outdir', '.'])
++ if luajitFound and commonEnvironment['useLuaJIT'] == '1':
++ luaWrapperEnvironment.Prepend(LIBS = ['csnd','luajit-5.1'])
++ else:
++ luaWrapperEnvironment.Prepend(LIBS = ['csnd','lua'])
++ luaWrapper = makeLuaModule(luaWrapperEnvironment, 'luaCsnd', [csoundLuaInterface])
+ Depends(luaWrapper, csoundLuaInterface)
+
+ if not (javaFound and commonEnvironment['buildJavaWrapper'] != '0'):
+@@ -1510,6 +1523,9 @@
javaWrapper = javaWrapperEnvironment.Program(
'lib_jcsound.jnilib', javaWrapperSources)
else:
@@ -118,7 +158,7 @@
javaWrapper = javaWrapperEnvironment.SharedLibrary(
'_jcsound', javaWrapperSources)
#Depends(javaWrapper, csoundLibrary)
-@@ -1759,9 +1766,12 @@
+@@ -1759,9 +1775,12 @@
jpluginEnvironment.Append(LINKFLAGS = ['-framework', 'Jackmp'])
makePlugin(jpluginEnvironment, 'jackTransport', 'Opcodes/jackTransport.c')
makePlugin(jpluginEnvironment, 'jacko', 'Opcodes/jacko.cpp')
@@ -133,7 +173,7 @@
makePlugin(pluginEnvironment, 'linear_algebra', 'Opcodes/linear_algebra.cpp')
print 'CONFIGURATION DECISION: Building linear algebra opcodes.'
else:
-@@ -1893,11 +1903,13 @@
+@@ -1893,11 +1912,13 @@
alsaEnvironment.Append(LIBS = ['asound', 'pthread'])
makePlugin(alsaEnvironment, 'rtalsa', ['InOut/rtalsa.c'])
@@ -148,7 +188,7 @@
if getPlatform() == 'win32':
winmmEnvironment = pluginEnvironment.Clone()
-@@ -1963,9 +1975,7 @@
+@@ -1963,9 +1984,7 @@
# FLUIDSYNTH OPCODES
@@ -159,7 +199,7 @@
print "CONFIGURATION DECISION: Building fluid opcodes."
fluidEnvironment = pluginEnvironment.Clone()
if getPlatform() == 'win32':
-@@ -1981,6 +1991,8 @@
+@@ -1981,6 +2000,8 @@
fluidEnvironment.Append(LIBS = ['pthread'])
makePlugin(fluidEnvironment, 'fluidOpcodes',
['Opcodes/fluidOpcodes/fluidOpcodes.cpp'])
@@ -168,7 +208,7 @@
# VST HOST OPCODES
-@@ -2174,7 +2186,7 @@
+@@ -2174,7 +2195,7 @@
if getPlatform() == 'win32' and pythonLibs[0] < 'python24':
Depends(pythonOpcodes, pythonImportLibrary)
@@ -177,25 +217,59 @@
if not (commonEnvironment['buildLuaOpcodes'] != '0'):
print "CONFIGURATION DECISION: Not building Lua opcodes."
-@@ -2183,10 +2195,10 @@
+@@ -2183,10 +2204,13 @@
luaEnvironment = pluginEnvironment.Clone()
if getPlatform() == 'linux':
- if(luaFound == 1):
-+ if(luajitFound == 1):
++ if(luajitFound == 1 and commonEnvironment['useLuaJIT'] == '1'):
luaEnvironment.Append(LIBS = ['luajit-5.1'])
luaEnvironment.Append(LIBS = ['util', 'dl', 'm'])
- luaEnvironment.Append(CPPPATH = '/usr/local/include/luajit-2.0')
+ luaEnvironment.Append(CPPPATH = '/usr/include/luajit-2.0')
++ elif(luaFound == 1):
++ luaEnvironment.Append(LIBS = ['lua'])
++ luaEnvironment.Append(LIBS = ['util', 'dl', 'm'])
elif getPlatform() == 'win32':
if(luaFound == 1):
luaEnvironment.Append(LIBS = ['lua51'])
-@@ -2538,7 +2550,7 @@
+@@ -2538,21 +2562,24 @@
Depends(csoundAcPythonModule, pythonWrapper)
Depends(csoundAcPythonModule, csoundac)
Depends(csoundAcPythonModule, csnd)
- if luaFound and commonEnvironment['buildLuaWrapper'] != '0':
-+ if luajitFound and commonEnvironment['buildLuaWrapper'] != '0':
- luaCsoundACWrapperEnvironment = acWrapperEnvironment.Clone()
- if getPlatform() == 'win32':
- luaCsoundACWrapperEnvironment.Prepend(LIBS = Split('luaCsnd lua51 CsoundAC csnd fltk_images'))
+- luaCsoundACWrapperEnvironment = acWrapperEnvironment.Clone()
+- if getPlatform() == 'win32':
+- luaCsoundACWrapperEnvironment.Prepend(LIBS = Split('luaCsnd lua51 CsoundAC csnd fltk_images'))
+- else:
+- luaCsoundACWrapperEnvironment.Prepend(LIBS = [luaWrapper])
+- luaCsoundACWrapperEnvironment.Prepend(LIBS = Split('luajit-5.1 CsoundAC csnd fltk_images'))
+- luaCsoundACWrapper = luaCsoundACWrapperEnvironment.SharedObject(
+- 'frontends/CsoundAC/luaCsoundAC.i', SWIGFLAGS = [swigflags, Split('-lua ')])
+- luaCsoundACWrapperEnvironment.Clean('.', 'frontends/CsoundAC/luaCsoundAC_wrap.h')
+- CsoundAclModule = makeLuaModule(luaCsoundACWrapperEnvironment, 'luaCsoundAC', [luaCsoundACWrapper])
+- Depends(CsoundAclModule, luaCsoundACWrapper)
+- Depends(CsoundAclModule, luaWrapper)
+- Depends(CsoundAclModule, csoundac)
+- Depends(CsoundAclModule, csnd)
++ if (luajitFound or luaFound) and commonEnvironment['buildLuaWrapper'] != '0':
++ luaCsoundACWrapperEnvironment = acWrapperEnvironment.Clone()
++ if getPlatform() == 'win32':
++ luaCsoundACWrapperEnvironment.Prepend(LIBS = Split('luaCsnd lua51 CsoundAC csnd fltk_images'))
++ else:
++ luaCsoundACWrapperEnvironment.Prepend(LIBS = [luaWrapper])
++ if commonEnvironment['useLuaJIT'] == '1':
++ luaCsoundACWrapperEnvironment.Prepend(LIBS = Split('luajit-5.1 CsoundAC csnd fltk_images'))
++ else:
++ luaCsoundACWrapperEnvironment.Prepend(LIBS = Split('lua CsoundAC csnd fltk_images'))
++ luaCsoundACWrapper = luaCsoundACWrapperEnvironment.SharedObject(
++ 'frontends/CsoundAC/luaCsoundAC.i', SWIGFLAGS = [swigflags, Split('-lua ')])
++ luaCsoundACWrapperEnvironment.Clean('.', 'frontends/CsoundAC/luaCsoundAC_wrap.h')
++ CsoundAclModule = makeLuaModule(luaCsoundACWrapperEnvironment, 'luaCsoundAC', [luaCsoundACWrapper])
++ Depends(CsoundAclModule, luaCsoundACWrapper)
++ Depends(CsoundAclModule, luaWrapper)
++ Depends(CsoundAclModule, csoundac)
++ Depends(CsoundAclModule, csnd)
+
+
+ # Build CsoundVST
diff --git a/media-sound/csound/metadata.xml b/media-sound/csound/metadata.xml
index 6c4c3f1a7f7e..9df9ed280012 100644
--- a/media-sound/csound/metadata.xml
+++ b/media-sound/csound/metadata.xml
@@ -14,6 +14,7 @@
<flag name="image">Build the image opcodes</flag>
<flag name="keyboard">Build Virtual MIDI keyboard</flag>
<flag name="linear">Build the linear algebra Opcodes</flag>
+ <flag name="luajit">Use the lua just-in-time compiler <pkg>dev-lang/luajit</pkg> instead of <pkg>dev-lang/lua</pkg></flag>
<flag name="portmidi">Build the PortMIDI I/O module</flag>
<flag name="samples">Install the HRTF datafiles for use with hrtfmove, hrtfmove2, hrtfstat, hrtfearly, and hrtfreverb</flag>
<flag name="stk">Build the stk opcodes</flag>