1 # Maintainer : Arch Linux Pro Audio <dev@archaudio.org>
2 # Contributor: SpepS <dreamspepser at yahoo dot it>
3 # Contributor: Bernardo Barros <bernardobarros@gmail.com>
8 pkgdesc="A programming language for sound rendering and signal processing."
10 url="http://csound.sourceforge.net/"
12 depends=('fltk' 'fluidsynth' 'liblo' 'portaudio' 'portmidi' 'tk')
13 makedepends=('scons' 'swig' "java-environment>=6" 'dssi' 'boost' 'pd' 'lua')
14 optdepends=('qutecsound: qt frontend'
15 'cecilia: tcl/tk frontend'
16 'cecilia4: wxpython frontend'
18 'java-environment: java wrapper'
20 'python2: python wrapper')
23 source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}5/${pkgname}${pkgver%.*}/Csound${pkgver}.tar.gz"
24 "$pkgname.sh" "http://ccrma.stanford.edu/software/stk/release/stk-4.4.2.tar.gz") # needed by stk opcodes
25 md5sums=('c035606c63bf1c950a5ade16f338b100'
26 '71df553af0ba829df857c583a5938783'
27 '0b7bd1f913ca01fb8b2201ebcf853358')
28 _csopts="useDouble=1 usePortAudio=1 usePortMIDI=1 useALSA=1 useJack=1 useFLTK=1
29 noFLTKThreads=1 pythonVersion=2.7 buildCsoundVST=0 buildCsoundAC=1
30 buildCsound5GUI=1 generateTags=0 generatePdf=0 useOSC=1 bufferoverflowu=0
31 useUDP=1 buildPythonOpcodes=1 buildLuaOpcodes=1 prefix=/usr instdir="$pkgdir/"
32 buildRelease=1 noDebug=1 gcc3opt=0 gcc4opt=native useLrint=0 useGprof=0
33 Word64=1 Lib64=0 dynamicCsoundLibrary=1 buildStkOpcodes=1 install=0
34 buildPDClass=1 useCoreAudio=0 useAltivec=0 buildDSSI=1 buildUtilities=1
35 buildTclcsound=1 buildWinsound=0 buildVirtual=1 buildInterfaces=1
36 buildLuaWrapper=1 buildPythonWrapper=1 buildJavaWrapper=1 withICL=0
37 withMSVC=0 withSunStudio=0 buildNewParser=1 NewParserDebug=0 buildMultiCore=1
38 buildvst4cs=0 useGettext=1 buildImageOpcodes=1 useOpenMP=0 tclversion=8.5
39 includeWii=0 includeP5Glove=0 buildBeats=1 buildcatalog=1 includeSerial=1"
42 cd "$srcdir/Csound$pkgver"
44 # fix pd install path, remove uninstaller and ldconfig call
45 sed -e "s|/usr/local/lib|$pkgdir/usr/lib|" \
46 -e "/create/,/^print ''/d" \
47 -e "/getuid/,/ldconfig/d" \
50 # add custom java include path, remove fltk include path
51 sed -e '/\(usr\/\)\(include\)\/fltk-1.1/s//\1lib\/jvm\/java-6-openjdk\/\2/p;/6/s//7/p;' \
52 -e '/openjdk\/include/s//&\/linux/p;/7/s//6/' custom.py.mkg > custom.py
54 # add build optimization and java include path fixes, fix lua link
55 sed -e "s_mtune_march_g" \
59 # place stk sources for the stk opcodes
60 cp -a "$srcdir"/stk-4.4.2/{include,rawwaves,src} Opcodes/stk
66 cd "$srcdir/Csound$pkgver"
68 python2 install.py --vimdir="/usr/share/vim/vimfiles" \
73 ln -s /usr/lib/libcsound64.so "$pkgdir/usr/lib/libcsound.so"
74 ln -s /usr/lib/libcsound64.so "$pkgdir/usr/lib/libcsound.so.5.2"
77 install -d "$pkgdir/usr/lib/lua/5.1"
78 install -Dm 755 luaC{snd,soundAC}.so "$pkgdir/usr/lib/lua/5.1"
79 ln -s /usr/lib/lua/5.1/luaCsnd.so "$pkgdir/usr/lib/luaCsnd.so"
81 # python CsoundAC bindings
82 install -D _CsoundAC.so CsoundAC.py "$pkgdir/usr/lib/python2.7/site-packages"
85 install -d "$pkgdir/usr/share/$pkgname"
86 cp -a examples "$pkgdir/usr/share/$pkgname"
87 cp -a samples "$pkgdir/usr/share/$pkgname"
89 # export vars in profile.d
90 install -Dm755 ../$pkgname.sh "$pkgdir/etc/profile.d/$pkgname.sh"
93 sed -i "s/^\#\!.*python/&2/" `grep -rl "\#\!.*python" "$pkgdir"`
96 # vim:set ts=2 sw=2 et: