public
Last active

PKGBUILD for csound 5.19.01 package in AUR. See also the patch at https://gist.github.com/4343594.

  • Download Gist
PKGBUILD
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
# Maintainer : SpepS <dreamspepser at yahoo dot it>
# Contributor: Bernardo Barros <bernardobarros@gmail.com>
 
pkgname=csound
pkgver=5.19.01
pkgrel=2
pkgdesc="A programming language for sound rendering and signal processing."
arch=(i686 x86_64)
url="http://csound.sourceforge.net/"
license=('LGPL')
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')
provides=('csound5')
conflicts=('csound5')
source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}5/${pkgname}5.19/Csound${pkgver}.tar.gz"
"$pkgname.sh"
"custom.py"
"http://ccrma.stanford.edu/software/stk/release/stk-4.4.2.tar.gz"
"luajit-include-path.patch"
)
md5sums=('c9a1c92865ef0af61dcb3fd7d92d24ee'
'71df553af0ba829df857c583a5938783'
'be16a6b7887fdc30f55fb62505cc1d3a'
'0b7bd1f913ca01fb8b2201ebcf853358'
'742b7e4e1295bca822335d0c65b0b73a')
_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" \
-i install.py
 
# 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 custom.py
cp ../custom.py .
 
scons $_csopts
}
 
package() {
cd "$srcdir/Csound$pkgver"
 
python2 install.py --vimdir="/usr/share/vim/vimfiles" \
--instdir="$pkgdir" \
--prefix="/usr"
 
# link libraries
ln -s /usr/lib/libcsound64.so "$pkgdir/usr/lib/libcsound.so"
ln -s /usr/lib/libcsound64.so "$pkgdir/usr/lib/libcsound.so.5.2"
 
# 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/luaCsnd.so "$pkgdir/usr/lib/luaCsnd.so"
 
# python CsoundAC bindings
install -D _CsoundAC.so CsoundAC.py "$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 ../$pkgname.sh "$pkgdir/etc/profile.d/$pkgname.sh"
 
# python2 fix
sed -i "s/^\#\!.*python/&2/" `grep -rl "\#\!.*python" "$pkgdir"`
}
 
# vim:set ts=2 sw=2 et:

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.