summaryrefslogtreecommitdiff
path: root/multilib/chuck/PKGBUILD
blob: 655e72a9c6859063c41610175f8eb30f659ece56 (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
# $Id: PKGBUILD 67465 2012-03-11 21:38:26Z lcarlier $
# Maintainer: 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.2.1.3
pkgrel=6
pkgdesc="Concurrent, on-the-fly audio programming language."
arch=('i686' 'x86_64')
url="http://chuck.cs.princeton.edu/"
license=('GPL')
depends=('gcc-libs' 'libsndfile' 'alsa-lib')
makedepends=('bison' 'flex')
source=(http://chuck.cs.princeton.edu/release/files/$pkgname-$pkgver.tgz)
md5sums=('ac8459b4067c2491fbdeb61d122a5985')

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

build() {
	if [[ $CARCH == x86_64 ]]; then
		export CC='gcc -m32'
		export CXX='g++ -m32'
		export PKG_CONFIG_PATH=/usr/lib32/pkgconfig
	fi

	cd $srcdir/$pkgname-$pkgver/src
	CFLAGS="$CFLAGS -fno-strict-aliasing"

        # fix linking
        sed -i -e 's/-lm$/ -lpthread/' makefile.alsa

	# This can be linux-alsa linux-jack linux-oss osx win32
	make linux-alsa
}

package() {
	cd $srcdir/$pkgname-$pkgver/src
	install -D -m 755 chuck $pkgdir/usr/bin/chuck
}