blob: e22bd64ad1481c4433e43421bc128b00322f32de [file] [log] [blame] [edit]
# Maintainer: Martell Malone <martell malone at g mail dot com>
_realname=box2d
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.3.1
pkgrel=3
pkgdesc="2D rigid body simulation library for games (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url="https://www.box2d.org/"
license=('MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake")
source=(${_realname}-${pkgver}.tar.gz::https://github.com/erincatto/Box2D/archive/v${pkgver}.tar.gz)
sha256sums=('58ffc8475a8650aadc351345aef696937747b40501ab78d72c197c5ff5b3035c')
options=(staticlibs !buildflags !strip)
build() {
mkdir -p "${srcdir}/build-${CARCH}"
cd "${srcdir}/build-${CARCH}"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake \
-G"MSYS Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DBOX2D_INSTALL=ON \
-DBOX2D_BUILD_SHARED=ON \
-DBOX2D_BUILD_STATIC=ON \
-DBOX2D_BUILD_EXAMPLES=OFF \
../Box2D-${pkgver}/Box2D
make
}
package() {
cd "${srcdir}/build-${CARCH}"
make DESTDIR=${pkgdir} install
}