blob: 5456ebce7132976c01fefb033154037838a74551 (
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
|
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Josh Taylor (deficite) <joshtaylor.mail@gmail.com>
# Contributor: Christophe Robin (bombstrike) <crobin@php.net>
pkgname=newton-dynamics
pkgver=2.33
pkgrel=2
pkgdesc="A simple physics API"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.newtondynamics.com"
license=('custom')
depends=()
makedepends=('unrar')
source=("http://newton-dynamics.googlecode.com/files/newton-dynamics-${pkgver}.rar"
'assert-fix.patch')
md5sums=('b8394c7c3f4e8a1bd41ffa07c5979a9e'
'fa747c99d0516d66f03175fca1f1ba34')
build() {
_srcdir="${srcdir}/newton-dynamics-${pkgver}"
[ "$CARCH" = "i686" ] && platform="linux32"
[ "$CARCH" = "x86_64" ] && platform="linux64"
builddir="${_srcdir}/coreLibrary_200/projets/${platform}"
# clean build directory
[ -d "${_srcdir}" ] && rm -Rf "${_srcdir}"
# decompress package
cd "${srcdir}"
unrar x "newton-dynamics-${pkgver}.rar"
# needed for building
mkdir -p "${_srcdir}/packages/${platform}"
# patch issue with an _ASSERT call instead of _ASSERTE
cd "${_srcdir}/coreLibrary_200"
patch -p0 < "${srcdir}/assert-fix.patch"
## build lib
cd "${builddir}"
sed -i 's/ -o libNewton.so/ -lpthread -lstdc++ -o libNewton.so/' makefile
make
install -D -m644 "${builddir}/libNewton.a" "${pkgdir}/usr/lib/libNewton.a"
install -D -m755 "${builddir}/libNewton.so" "${pkgdir}/usr/lib/libNewton.so"
install -D -m644 "${_srcdir}/coreLibrary_200/source/newton/Newton.h" "${pkgdir}/usr/include/Newton.h"
}
|