archrelease: copy trunk to staging-x86_64
[arch-packages.git] / box2d / trunk / PKGBUILD
blob63232cb8452afef3ff0979b9eba790f748fa9425
1 # Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
3 pkgname=box2d
4 pkgver=2.4.1
5 pkgrel=1
6 pkgdesc="2D rigid body simulation library for games"
7 url="http://www.box2d.org/"
8 license=('MIT')
9 arch=('x86_64')
10 depends=('gcc-libs')
11 makedepends=('cmake' 'doxygen' 'ninja')
12 # We're going to this alternate fork until the patches are upstreamed.
13 # See https://github.com/erincatto/box2d/issues/621
14 #source=("$pkgname-$pkgver.tar.gz::https://github.com/erincatto/Box2D/archive/v${pkgver}.tar.gz"
15 source=("$pkgname-$pkgver.tar.gz::https://github.com/erincatto/box2d/archive/v2.4.1.tar.gz")
16 sha512sums=('d900f925b77906777719c91488bdc5e2df1ad1f4a8ca39a574229f5e57070e3a843bdd7530e817112605fde6d82145c872d8afdfc65b84531a73199098c81162')
18 build() {
19   cd $pkgname-$pkgver
21   cmake . \
22     -Bbuild \
23     -GNinja \
24     -DBOX2D_BUILD_DOCS=ON \
25     -DBOX2D_BUILD_TESTBED=OFF \
26     -DBUILD_SHARED_LIBS=ON \
27     -DCMAKE_INSTALL_PREFIX=/usr
28   ninja -C build
31 check() {
32   cd $pkgname-$pkgver
34   build/bin/unit_test
37 package() {
38   cd $pkgname-$pkgver
40   DESTDIR="$pkgdir" ninja -C build install
41   install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/box2d/LICENSE
44 # vim: sw=2 ts=2 et: