diff options
author | Martin Gerhardy <martin.gerhardy@gmail.com> | 2015-06-29 06:34:40 (GMT) |
---|---|---|
committer | Martin Gerhardy <martin.gerhardy@gmail.com> | 2015-06-29 06:34:46 (GMT) |
commit | 3559d54844398c7630ed74ece055a9e2b4ec3626 (patch) | |
tree | d0c6fc0dd28b3d22255c6d399340e93a8b9935b2 /src/box2d.mk | |
parent | 6e6c2ab143bb4b580474cc96ddf1f4fab2584eab (diff) | |
download | mxe-3559d54844398c7630ed74ece055a9e2b4ec3626.zip mxe-3559d54844398c7630ed74ece055a9e2b4ec3626.tar.gz mxe-3559d54844398c7630ed74ece055a9e2b4ec3626.tar.bz2 |
new package box2d
this introduces a new dependency for unpacking the 7z archive from Box2D
Diffstat (limited to 'src/box2d.mk')
-rw-r--r-- | src/box2d.mk | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/box2d.mk b/src/box2d.mk new file mode 100644 index 0000000..80a9b7e --- /dev/null +++ b/src/box2d.mk @@ -0,0 +1,32 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := box2d +$(PKG)_IGNORE := +$(PKG)_VERSION := 2.3.0 +$(PKG)_CHECKSUM := 1d3ea1f872b3cab3ef5130a2404d74f9ff66f265 +$(PKG)_SUBDIR := Box2D_v$($(PKG)_VERSION)/Box2D +$(PKG)_FILE := Box2D_v$($(PKG)_VERSION).7z +$(PKG)_URL := https://box2d.googlecode.com/files/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(WGET) -q -O- 'http://code.google.com/b/box2d/downloads/list?sort=-uploaded' | \ + $(SED) -n 's,.*Box2D_v\([0-9][^<]*\)\.7z.*,\1,p' | \ + grep -v 'rc' | \ + head -1 +endef + +define $(PKG)_BUILD + mkdir '$(1).build' + cd '$(1).build' && cmake . \ + -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + -DBOX2D_INSTALL=ON \ + -DBOX2D_BUILD_EXAMPLES=OFF \ + $(if $(BUILD_SHARED), \ + -DBOX2D_BUILD_SHARED=TRUE \ + -DBOX2D_BUILD_STATIC=FALSE, \ + -DBOX2D_BUILD_SHARED=FALSE) \ + '$(1)' + $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1 +endef |