summaryrefslogtreecommitdiff
path: root/repo/box2d
diff options
context:
space:
mode:
Diffstat (limited to 'repo/box2d')
-rw-r--r--repo/box2d/box2d.xibuild32
1 files changed, 32 insertions, 0 deletions
diff --git a/repo/box2d/box2d.xibuild b/repo/box2d/box2d.xibuild
new file mode 100644
index 0000000..8723618
--- /dev/null
+++ b/repo/box2d/box2d.xibuild
@@ -0,0 +1,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
+}
+