mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
box2d, fix libVersion, cleanup (#9932)
This commit is contained in:
@@ -5,16 +5,19 @@ winner of the 2008 Independant Game Festival Grand Prize"
|
||||
HOMEPAGE="http://www.box2d.org"
|
||||
COPYRIGHT="2007-2015 Erin Catto"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/erincatto/Box2D/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="d6b4650ff897ee1ead27cf77a5933ea197cbeef6705638dd181adc2e816b23c2"
|
||||
|
||||
ARCHITECTURES="all !x86"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
box2d$secondaryArchSuffix = $portVersion
|
||||
lib:libBox2D$secondaryArchSuffix = 2.4.0
|
||||
lib:libBox2D$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
@@ -22,7 +25,7 @@ REQUIRES="
|
||||
|
||||
PROVIDES_devel="
|
||||
box2d${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libBox2D$secondaryArchSuffix = 2.4.0
|
||||
devel:libBox2D$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
box2d$secondaryArchSuffix == $portVersion base
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
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="2"
|
||||
SOURCE_URI="https://github.com/erincatto/Box2D/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="58ffc8475a8650aadc351345aef696937747b40501ab78d72c197c5ff5b3035c"
|
||||
SOURCE_DIR="box2d-$portVersion"
|
||||
PATCHES="box2d-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
box2d23$secondaryArchSuffix = $portVersion
|
||||
lib:libBox2D$secondaryArchSuffix = 2.3.0
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libGLU$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd Box2D
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix \
|
||||
-DBOX2D_INSTALL_DOC=ON \
|
||||
-DBOX2D_BUILD_SHARED=ON \
|
||||
-DBOX2D_BUILD_STATIC=OFF \
|
||||
-DBOX2D_BUILD_EXAMPLES=OFF \
|
||||
-DBOX2D_INCLUDE_DIR=$includeDir \
|
||||
-DLIB_INSTALL_DIR=$libDir \
|
||||
-DDOC_INSTALL_DIR=$docDir \
|
||||
-DINCLUDE_INSTALL_DIR=$includeDir
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd Box2D
|
||||
make install
|
||||
|
||||
prepareInstalledDevelLib libBox2D
|
||||
|
||||
rm -rf $developDir $libDir/cmake $documentationDir $libDir/Box2D
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
From 7a4ea159b9e5582b3fcc150e22403bd2e850bc35 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Thu, 2 Jan 2020 12:58:20 +0100
|
||||
Subject: Fix installation paths for cmake
|
||||
|
||||
|
||||
diff --git a/Box2D/Box2D/CMakeLists.txt b/Box2D/Box2D/CMakeLists.txt
|
||||
index 05087d3..f45b6d4 100644
|
||||
--- a/Box2D/Box2D/CMakeLists.txt
|
||||
+++ b/Box2D/Box2D/CMakeLists.txt
|
||||
@@ -184,14 +184,14 @@ source_group(Rope FILES ${BOX2D_Rope_SRCS} ${BOX2D_Rope_HDRS})
|
||||
|
||||
if(BOX2D_INSTALL)
|
||||
# install headers
|
||||
- install(FILES ${BOX2D_General_HDRS} DESTINATION include/Box2D)
|
||||
- install(FILES ${BOX2D_Collision_HDRS} DESTINATION include/Box2D/Collision)
|
||||
- install(FILES ${BOX2D_Shapes_HDRS} DESTINATION include/Box2D/Collision/Shapes)
|
||||
- install(FILES ${BOX2D_Common_HDRS} DESTINATION include/Box2D/Common)
|
||||
- install(FILES ${BOX2D_Dynamics_HDRS} DESTINATION include/Box2D/Dynamics)
|
||||
- install(FILES ${BOX2D_Contacts_HDRS} DESTINATION include/Box2D/Dynamics/Contacts)
|
||||
- install(FILES ${BOX2D_Joints_HDRS} DESTINATION include/Box2D/Dynamics/Joints)
|
||||
- install(FILES ${BOX2D_Rope_HDRS} DESTINATION include/Box2D/Rope)
|
||||
+ install(FILES ${BOX2D_General_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/Box2D)
|
||||
+ install(FILES ${BOX2D_Collision_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/Box2D/Collision)
|
||||
+ install(FILES ${BOX2D_Shapes_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/Box2D/Collision/Shapes)
|
||||
+ install(FILES ${BOX2D_Common_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/Box2D/Common)
|
||||
+ install(FILES ${BOX2D_Dynamics_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/Box2D/Dynamics)
|
||||
+ install(FILES ${BOX2D_Contacts_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/Box2D/Dynamics/Contacts)
|
||||
+ install(FILES ${BOX2D_Joints_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/Box2D/Dynamics/Joints)
|
||||
+ install(FILES ${BOX2D_Rope_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/Box2D/Rope)
|
||||
|
||||
# install libraries
|
||||
if(BOX2D_BUILD_SHARED)
|
||||
@@ -207,7 +207,7 @@ if(BOX2D_INSTALL)
|
||||
# install build system hooks for third-party apps
|
||||
install(EXPORT Box2D-targets DESTINATION ${LIB_INSTALL_DIR}/Box2D)
|
||||
|
||||
- set (BOX2D_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
|
||||
+ set (BOX2D_INCLUDE_DIR ${INCLUDE_INSTALL_DIR})
|
||||
set (BOX2D_INCLUDE_DIRS ${BOX2D_INCLUDE_DIR} )
|
||||
set (BOX2D_LIBRARY_DIRS ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR})
|
||||
set (BOX2D_LIBRARY Box2D)
|
||||
diff --git a/Box2D/CMakeLists.txt b/Box2D/CMakeLists.txt
|
||||
index a290f15..8ba6f91 100644
|
||||
--- a/Box2D/CMakeLists.txt
|
||||
+++ b/Box2D/CMakeLists.txt
|
||||
@@ -15,7 +15,9 @@ option(BOX2D_BUILD_STATIC "Build Box2D static libraries" ON)
|
||||
option(BOX2D_BUILD_EXAMPLES "Build Box2D examples" ON)
|
||||
|
||||
set(BOX2D_VERSION 2.3.0)
|
||||
-set(LIB_INSTALL_DIR lib${LIB_SUFFIX})
|
||||
+set(LIB_INSTALL_DIR lib${LIB_SUFFIX} CACHE PATH "lib installation path")
|
||||
+set(DOC_INSTALL_DIR share/doc/Box2D CACHE PATH "doc installation path")
|
||||
+set(INCLUDE_INSTALL_DIR include CACHE PATH "header installation path")
|
||||
|
||||
# The Box2D library.
|
||||
add_subdirectory(Box2D)
|
||||
@@ -32,5 +34,5 @@ if(BOX2D_BUILD_EXAMPLES)
|
||||
endif(BOX2D_BUILD_EXAMPLES)
|
||||
|
||||
if(BOX2D_INSTALL_DOC)
|
||||
- install(DIRECTORY Documentation DESTINATION share/doc/Box2D PATTERN ".svn" EXCLUDE)
|
||||
+ install(DIRECTORY Documentation DESTINATION ${DOC_INSTALL_DIR} PATTERN ".svn" EXCLUDE)
|
||||
endif(BOX2D_INSTALL_DOC)
|
||||
--
|
||||
2.24.1
|
||||
|
||||
Reference in New Issue
Block a user