summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD33
-rw-r--r--chipmunk-6.0.2-ffi_duplicate_definition.patch10
3 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..19624ce7b29
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = chipmunk
+ pkgdesc = A high-performance 2D rigid body physics library
+ pkgver = 7.0.0
+ pkgrel = 1
+ url = http://chipmunk-physics.net/
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = cmake
+ depends = glibc
+ source = http://files.slembcke.net/chipmunk/release/Chipmunk-7.x/Chipmunk-7.0.0.tgz
+ sha256sums = 14ab380396a96b15951c42a2d7ca259a53ecab4e550a71857d13dcfd388a51cd
+
+pkgname = chipmunk
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..a74f70d9ec7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Astor Castelo <amcastelo[at]gatech[dot]edu>
+# Contributor: Fabio Volpe <volpefabio@gmail.com>
+# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
+
+pkgname=chipmunk
+pkgver=6.0.2
+pkgrel=1
+pkgdesc="A high-performance 2D rigid body physics library"
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/chipmunk-physics/"
+license=('MIT')
+depends=('mesa' 'freeglut' 'libxmu' 'libxext')
+makedepends=('cmake')
+source=(http://files.slembcke.net/chipmunk/release/Chipmunk-${pkgver%%.*}.x/Chipmunk-$pkgver.tgz chipmunk-6.0.2-ffi_duplicate_definition.patch)
+
+build() {
+ cd "$srcdir/Chipmunk-$pkgver"
+ patch -p0 -i "$srcdir/chipmunk-6.0.2-ffi_duplicate_definition.patch"
+ # Fix wrong lib version number
+ sed -i 's|6.0.1|6.0.2|' src/CMakeLists.txt
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_DEMOS=OFF -DCMAKE_C_FLAGS="-DCHIPMUNK_FFI" .
+ make clean
+ make
+}
+
+package() {
+ cd "$srcdir/Chipmunk-$pkgver"
+ install -Dm0644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums=('c1b7917e7ce2160fa2d5305a451b152c'
+ '5260d3d4e86cde4859a8fc3baccfde09')
diff --git a/chipmunk-6.0.2-ffi_duplicate_definition.patch b/chipmunk-6.0.2-ffi_duplicate_definition.patch
new file mode 100644
index 00000000000..ebaf62365f4
--- /dev/null
+++ b/chipmunk-6.0.2-ffi_duplicate_definition.patch
@@ -0,0 +1,10 @@
+--- include/chipmunk/chipmunk_ffi.h.orig 2011-10-13 17:32:21.383255385 +0200
++++ include/chipmunk/chipmunk_ffi.h 2011-10-13 17:32:27.493226698 +0200
+@@ -160,7 +160,6 @@
+ MAKE_PROPERTIES_REF(cpSpace, Damping);
+ MAKE_PROPERTIES_REF(cpSpace, IdleSpeedThreshold);
+ MAKE_PROPERTIES_REF(cpSpace, SleepTimeThreshold);
+-MAKE_PROPERTIES_REF(cpSpace, SleepTimeThreshold);
+ MAKE_PROPERTIES_REF(cpSpace, CollisionSlop);
+ MAKE_PROPERTIES_REF(cpSpace, CollisionBias);
+ MAKE_PROPERTIES_REF(cpSpace, CollisionPersistence);