summaryrefslogtreecommitdiff
path: root/community/chuck/PKGBUILD
blob: 5cb5634ab2795500f294e5bf9127db867d5aa4d3 (plain)
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
# $Id: PKGBUILD 75637 2012-08-27 21:34:19Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Laurent Carlier <lordheavym@gmail.com>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: SpepS <dreamspepser at yahoo dot it>
# Contributor: Jeff Mickey <jeff@archlinux.org>
# Contributor: tardo <tardo@nagi-fanboi.net>

pkgname=chuck
pkgver=1.3.0.0
pkgrel=1
pkgdesc="Concurrent, on-the-fly audio programming language"
arch=('x86_64' 'i686')
url="http://chuck.cs.princeton.edu/"
license=('GPL')
depends=('gcc-libs' 'libsndfile')
makedepends=('bison' 'flex' 'setconf') 
source=("http://chuck.cs.princeton.edu/release/files/$pkgname-$pkgver.tgz")
sha256sums=('80bfc6ab3017c8183fe7640eca94bcb314cf4cdb1c4b70cc3abb67b4d88ff111')

if [[ $CARCH == x86_64 ]]; then
  depends=('gcc-libs-multilib' 'lib32-libsndfile' 'lib32-alsa-lib')
  makedepends+=('gcc-multilib')
fi

build() {
  cd "$srcdir/$pkgname-$pkgver/src"

  msg2 "Configuring..."
  if [[ $CARCH == x86_64 ]]; then
    setconf makefile CC 'gcc -m32'
    setconf makefile CXX 'g++ -m32'
    setconf makefile LD 'g++ -m32'
  fi
	CFLAGS+=' -fno-strict-aliasing -lpthread'
	CXXFLAGS+=' -fno-strict-aliasing -fpermissive -lpthread'

  msg2 "Compiling..."
  # Alternatives to linux-alsa are: linux-jack linux-oss osx win32
  make linux-alsa
}

package() {
  cd "$srcdir/$pkgname-$pkgver/src"

  install -Dm755 chuck $pkgdir/usr/bin/chuck
  mkdir -p "$pkgdir/usr/share/doc/$pkgname"
  cp -r ../examples "$pkgdir/usr/share/doc/$pkgname/"
}

# vim:set ts=2 sw=2 et: