Skip to content
Create a gist now

Instantly share code, notes, and snippets.

@pnorcks /PKGBUILD
Last active

PKGBUILD for csound 5.19.01 package in AUR. See also the patch at
# Maintainer : SpepS <dreamspepser at yahoo dot it>
# Contributor: Bernardo Barros <>
pkgdesc="A programming language for sound rendering and signal processing."
arch=(i686 x86_64)
depends=('fltk' 'fluidsynth' 'liblo' 'portaudio' 'portmidi' 'tk')
makedepends=('eigen3' 'scons' 'swig' "java-environment>=6" 'dssi' 'boost' 'pd' 'luajit')
optdepends=('qutecsound: qt frontend'
'cecilia: tcl/tk frontend'
'cecilia4: wxpython frontend'
'vim: vim frontend'
'java-environment: java wrapper'
'luajit: lua wrapper'
'python2: python wrapper')
_csopts="useDouble=1 usePortAudio=1 usePortMIDI=1 useALSA=1 useJack=1 useFLTK=1
noFLTKThreads=1 pythonVersion=2.7 buildCsoundVST=0 buildCsoundAC=1
buildCsound5GUI=1 generateTags=0 generatePdf=0 useOSC=1 bufferoverflowu=0
useUDP=1 buildPythonOpcodes=1 buildLuaOpcodes=1 prefix=/usr instdir="$pkgdir/"
buildRelease=1 noDebug=1 gcc3opt=0 gcc4opt=native useLrint=0 useGprof=0
Word64=1 Lib64=0 dynamicCsoundLibrary=1 buildStkOpcodes=1 install=0
buildPDClass=1 useCoreAudio=0 useAltivec=0 buildDSSI=1 buildUtilities=1
buildTclcsound=1 buildWinsound=0 buildVirtual=1 buildInterfaces=1
buildLuaWrapper=1 buildPythonWrapper=1 buildJavaWrapper=1 withICL=0
withMSVC=0 withSunStudio=0 buildNewParser=1 NewParserDebug=0 buildMultiCore=1
buildvst4cs=0 useGettext=1 buildImageOpcodes=1 useOpenMP=0 tclversion=8.6
includeWii=0 includeP5Glove=0 buildBeats=1 buildcatalog=1 includeSerial=1"
build() {
cd "$srcdir/Csound$pkgver"
# fix pd install path, remove uninstaller and ldconfig call
sed -e "s|/usr/local/lib|$pkgdir/usr/lib|" \
-e "/create/,/^print ''/d" \
-e "/getuid/,/ldconfig/d" \
# add some optimization
sed -e "s_mtune_march_g" \
-i SConstruct
# Arch does not use /usr/local/ hierarchy
patch -p1 -i "$srcdir/luajit-include-path.patch"
# place stk sources for the stk opcodes
cp -a "$srcdir"/stk-4.4.2/{include,rawwaves,src} Opcodes/stk
# place
cp ../ .
scons $_csopts
package() {
cd "$srcdir/Csound$pkgver"
python2 --vimdir="/usr/share/vim/vimfiles" \
--instdir="$pkgdir" \
# link libraries
ln -s /usr/lib/ "$pkgdir/usr/lib/"
ln -s /usr/lib/ "$pkgdir/usr/lib/"
# lua bindings
install -d "$pkgdir/usr/lib/lua/5.1"
install -Dm 755 luaC{snd,soundAC}.so "$pkgdir/usr/lib/lua/5.1"
ln -s /usr/lib/lua/5.1/ "$pkgdir/usr/lib/"
# python CsoundAC bindings
install -D "$pkgdir/usr/lib/python2.7/site-packages"
# examples
install -d "$pkgdir/usr/share/$pkgname"
cp -a examples "$pkgdir/usr/share/$pkgname"
cp -a samples "$pkgdir/usr/share/$pkgname"
# export vars in profile.d
install -Dm755 ../$ "$pkgdir/etc/profile.d/$"
# python2 fix
sed -i "s/^\#\!.*python/&2/" `grep -rl "\#\!.*python" "$pkgdir"`
# vim:set ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.