summaryrefslogtreecommitdiff
path: root/repo/box2d/box2d.xibuild
blob: 8723618bf15b88df4f899303d895ce30824f358d (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
#!/bin/sh

NAME="box2d"
DESC="2D Physics Engine for Games"

MAKEDEPS="cmake doxygen libx11 libxcursor libxinerama libxrandr ninja"

PKG_VER=2.4.1
SOURCE="https://github.com/erincatto/box2d/archive/v$PKG_VER.tar.gz"

build() {
	cmake -B build \
		-GNinja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=ON \
		-DBOX2D_BUILD_DOCS=ON \
		-DBOX2D_BUILD_TESTBED=OFF \
		-DBOX2D_BUILD_UNIT_TESTS=ON
	cmake --build build
}

check() {
	echo "Running unit_test"
	build/bin/unit_test
}

package() {
	DESTDIR="$PKG_DEST" cmake --install build
}