Files
haikuports/dev-games/box2d/box2d-2.3.1.recipe
Jerome Duval fc0936b040 Bump revisions for x86_64 rebuild after time_t change.
* a few apps needed build fix for time_t.
* disable compatibility packages for x86_64.
2017-06-27 15:46:25 +02:00

64 lines
1.6 KiB
Bash

SUMMARY="A 2D Physics Engine for Games"
DESCRIPTION="Box2D is a feature rich 2D rigid body physics engine, written in C++. \
It has been used in many games, including Crayon Physics Deluxe, \
winner of the 2008 Independant Game Festival Grand Prize"
HOMEPAGE="http://www.box2d.org"
COPYRIGHT="2007-2015 Erin Catto"
LICENSE="MIT"
REVISION="5"
SOURCE_URI="https://github.com/erincatto/Box2D/archive/v$portVersion.zip"
CHECKSUM_SHA256="1f04be518804a9879281a105a3c1511840371c96194b156eea5ad040d2805b46"
SOURCE_DIR="Box2D-$portVersion"
ARCHITECTURES="x86_gcc2 !x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
box2d$secondaryArchSuffix = $portVersion compat >= 2.0
lib:libBox2D$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
box2d${secondaryArchSuffix}_devel = $portVersion
devel:libBox2D$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
box2d$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libGL$secondaryArchSuffix
devel:libGLU$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:make
cmd:cmake
cmd:gcc$secondaryArchSuffix
"
BUILD()
{
cd Box2D
cmake . -DCMAKE_INSTALL_PREFIX=$prefix \
-DBOX2D_INCLUDE_DIR=$includeDir -DLIB_SUFFIX=${secondaryArchSuffix/_/\/} \
-DBOX2D_BUILD_EXAMPLES=Off -DBOX2D_BUILD_SHARED=On
make $jobArgs
}
INSTALL()
{
cd Box2D
make install
mkdir -p $(dirname $includeDir)
mv $prefix/include $includeDir
prepareInstalledDevelLib libBox2D
packageEntries devel $developDir $libDir/cmake
# Box2d is failing to make _x86 library, need to figure out correct fix here
}