summaryrefslogtreecommitdiff
path: root/community/stk
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/stk
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/stk')
-rw-r--r--community/stk/PKGBUILD85
-rw-r--r--community/stk/cxxflags.patch25
-rw-r--r--community/stk/runtime.patch18
3 files changed, 128 insertions, 0 deletions
diff --git a/community/stk/PKGBUILD b/community/stk/PKGBUILD
new file mode 100644
index 000000000..353f5cb1e
--- /dev/null
+++ b/community/stk/PKGBUILD
@@ -0,0 +1,85 @@
+# Maintainer: Ray Rashif <schiv@archlinux.org>
+# Maintainer: Mateusz Herych <heniekk@gmail.com>
+
+pkgname=stk
+pkgver=4.4.2
+pkgrel=5
+pkgdesc="The Synthesis ToolKit in C++"
+arch=('i686' 'x86_64')
+url="http://ccrma.stanford.edu/software/stk/"
+license=('MIT')
+depends=('gcc-libs' 'jack')
+makedepends=('pkg-config')
+optdepends=('oss: use OSSv4 output/API'
+ 'tk: run provided demos/samples')
+source=(http://ccrma.stanford.edu/software/stk/release/$pkgname-$pkgver.tar.gz
+ $pkgname.license
+ cxxflags.patch
+ runtime.patch)
+md5sums=('0b7bd1f913ca01fb8b2201ebcf853358'
+ 'a0163d75a5f516b6c93f4fc948acff73'
+ '1b09d29321d575ad670f6371651015c6'
+ '36551c348340307c765fde85d4336e73')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # fails with --as-needed
+ export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
+
+ # optimise for our target architecture(s)
+ patch -Np1 -i ../cxxflags.patch
+ autoreconf
+
+ # enable shared library
+ sed -i \
+ "s:cd src && \$(MAKE)$:& lib$pkgname.so.$pkgver:" \
+ Makefile.in
+
+ # fix demo rawwaves path
+ sed -i 's:\.\./\.\.:/usr/lib/stk:' \
+ projects/demo/demo.cpp
+
+ # run actual build
+ ./configure RAWWAVE_PATH=/usr/lib/stk/rawwaves/ \
+ --prefix=/usr \
+ --with-alsa \
+ --with-jack \
+ --with-oss
+ make
+
+ # fix executable scripts
+ patch -Np1 -i ../runtime.patch
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ mkdir -p "$pkgdir"/usr/{bin,{lib,include}/stk}
+
+ # install library
+ cp -a src/libstk.* "$pkgdir/usr/lib/"
+
+ # install headers
+ install -m644 include/* "$pkgdir/usr/include/stk/"
+ rm "$pkgdir"/usr/include/stk/*~
+
+ # install runtime files
+ cp -a rawwaves projects/demo/{demo,tcl} \
+ projects/effects/{effects,tcl} \
+ projects/ragamatic/{ragamat,tcl,rawwaves} \
+ "$pkgdir/usr/lib/stk/"
+
+ # install executables
+ install -m755 projects/{demo/StkDemo,effects/StkEffects} \
+ "$pkgdir/usr/bin/"
+
+ install -m755 projects/ragamatic/Raga \
+ "$pkgdir/usr/bin/StkRagamatic"
+
+ # install license
+ install -Dm644 ../$pkgname.license \
+ "$pkgdir/usr/share/licenses/stk/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/stk/cxxflags.patch b/community/stk/cxxflags.patch
new file mode 100644
index 000000000..bb86e929a
--- /dev/null
+++ b/community/stk/cxxflags.patch
@@ -0,0 +1,25 @@
+--- stk-4.4.2/configure.ac 2010-02-04 15:52:39.000000000 -0500
++++ configure.ac 2010-03-11 23:55:44.000000000 -0500
+@@ -51,7 +51,7 @@
+ AC_ARG_ENABLE(debug,
+ [ --enable-debug = enable various debug output],
+ [AC_SUBST( cppflag, ["-D_STK_DEBUG_ -D__RTAUDIO_DEBUG__ -D__RTMIDI_DEBUG__"] ) AC_SUBST( cxxflag, ["-g"] ) AC_SUBST( object_path, [Debug] ) AC_MSG_RESULT(yes)],
+- [AC_SUBST( cppflag, [] ) AC_SUBST( cxxflag, [-O3] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)])
++ [AC_SUBST( cppflag, [] ) AC_SUBST( cxxflag, [] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)])
+
+ # Checks for functions
+ if test $realtime = yes; then
+@@ -63,12 +63,7 @@
+ CPPFLAGS="$CPPFLAGS $cppflag"
+
+ # For debugging and optimization ... overwrite default because it has both -g and -O2
+-CXXFLAGS="$cxxflag"
+-
+-# Check compiler and use -Wall if gnu.
+-if [test $GXX = "yes" ;] then
+- AC_SUBST( cxxflag, [-Wall] )
+-fi
++CXXFLAGS="$cxxflag $CXXFLAGS"
+
+ CXXFLAGS="$CXXFLAGS $cxxflag"
+
diff --git a/community/stk/runtime.patch b/community/stk/runtime.patch
new file mode 100644
index 000000000..da7098a81
--- /dev/null
+++ b/community/stk/runtime.patch
@@ -0,0 +1,18 @@
+diff -Naur stk-4.4.2.orig//projects/demo/StkDemo stk-4.4.2/projects/demo/StkDemo
+--- stk-4.4.2.orig//projects/demo/StkDemo 2010-09-01 08:51:05.000000000 +0800
++++ stk-4.4.2/projects/demo/StkDemo 2010-09-01 08:51:48.000000000 +0800
+@@ -1 +1,2 @@
++cd /usr/lib/stk
+ wish < tcl/Demo.tcl | ./demo Clarinet -or -ip
+diff -Naur stk-4.4.2.orig//projects/effects/StkEffects stk-4.4.2/projects/effects/StkEffects
+--- stk-4.4.2.orig//projects/effects/StkEffects 2010-09-01 08:51:05.000000000 +0800
++++ stk-4.4.2/projects/effects/StkEffects 2010-09-01 08:51:54.000000000 +0800
+@@ -1 +1,2 @@
++cd /usr/lib/stk
+ wish < tcl/Effects.tcl | ./effects -ip
+diff -Naur stk-4.4.2.orig//projects/ragamatic/Raga stk-4.4.2/projects/ragamatic/Raga
+--- stk-4.4.2.orig//projects/ragamatic/Raga 2010-09-01 08:51:05.000000000 +0800
++++ stk-4.4.2/projects/ragamatic/Raga 2010-09-01 08:52:04.000000000 +0800
+@@ -1 +1,2 @@
++cd /usr/lib/stk
+ wish < tcl/Raga.tcl | ./ragamat -ip