summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorSarper Akdemir <q.sarperakdemir@gmail.com>2020-05-13 11:28:05 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-05-17 02:21:54 +0200
commita7f2239e649ea1b9ef611d758841584ab51abed0 (patch)
treeafc86a01d957c1b97525235a9a41dbd3731d0a0b /external
parent909f343f267a45028f58b577179b3e594b430d39 (diff)
external: bundle box2d
Bundled box2d with the build system of LO as a static library. If --with-system-box2d was specified checks for instance box2d in the system, defines SYSTEM_BOX2D and uses the library from the system. Change-Id: Ifb05912f2acaff273b25abebafc5af1cac3afec4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94103 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'external')
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/box2d/Makefile7
-rw-r--r--external/box2d/Module_box2d.mk20
-rw-r--r--external/box2d/README3
-rw-r--r--external/box2d/StaticLibrary_box2d.mk72
-rw-r--r--external/box2d/UnpackedTarball_box2d.mk14
6 files changed, 117 insertions, 0 deletions
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 286759927781..41e018d2ef3f 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,APACHE_COMMONS,apache-commons) \
$(call gb_Helper_optional,APR,apr) \
$(call gb_Helper_optional,BOOST,boost) \
+ $(call gb_Helper_optional,BOX2D,box2d) \
$(call gb_Helper_optional,BREAKPAD,breakpad) \
$(call gb_Helper_optional,BSH,beanshell) \
$(call gb_Helper_optional,BZIP2,bzip2) \
diff --git a/external/box2d/Makefile b/external/box2d/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/box2d/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/box2d/Module_box2d.mk b/external/box2d/Module_box2d.mk
new file mode 100644
index 000000000000..3986357b3668
--- /dev/null
+++ b/external/box2d/Module_box2d.mk
@@ -0,0 +1,20 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,box2d))
+
+$(eval $(call gb_Module_add_targets,box2d,\
+ UnpackedTarball_box2d \
+))
+
+$(eval $(call gb_Module_add_targets,box2d,\
+ StaticLibrary_box2d \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/box2d/README b/external/box2d/README
new file mode 100644
index 000000000000..d2b46b93b09f
--- /dev/null
+++ b/external/box2d/README
@@ -0,0 +1,3 @@
+Box2D is a 2D physics engine.
+
+It is available from [https://github.com/erincatto/box2d]
diff --git a/external/box2d/StaticLibrary_box2d.mk b/external/box2d/StaticLibrary_box2d.mk
new file mode 100644
index 000000000000..b50ee47aa498
--- /dev/null
+++ b/external/box2d/StaticLibrary_box2d.mk
@@ -0,0 +1,72 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,box2d))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,box2d,box2d))
+
+$(eval $(call gb_StaticLibrary_set_warnings_disabled,box2d))
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,box2d,cpp))
+
+$(eval $(call gb_StaticLibrary_set_include,box2d,\
+ -I$(call gb_UnpackedTarball_get_dir,box2d/Box2D/)\
+ $$(INCLUDE)\
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,box2d,\
+ UnpackedTarball/box2d/Box2D/Box2D/Common/b2Timer \
+ UnpackedTarball/box2d/Box2D/Box2D/Common/b2StackAllocator \
+ UnpackedTarball/box2d/Box2D/Box2D/Common/b2Draw \
+ UnpackedTarball/box2d/Box2D/Box2D/Common/b2Math \
+ UnpackedTarball/box2d/Box2D/Box2D/Common/b2BlockAllocator \
+ UnpackedTarball/box2d/Box2D/Box2D/Common/b2Settings \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/b2Body \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Contacts/b2CircleContact \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Contacts/b2ContactSolver \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Contacts/b2PolygonContact \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Contacts/b2ChainAndCircleContact \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Contacts/b2Contact \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Joints/b2RopeJoint \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Joints/b2WheelJoint \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Joints/b2FrictionJoint \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Joints/b2PrismaticJoint \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Joints/b2WeldJoint \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Joints/b2PulleyJoint \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Joints/b2MouseJoint \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Joints/b2MotorJoint \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Joints/b2DistanceJoint \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Joints/b2GearJoint \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Joints/b2Joint \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/Joints/b2RevoluteJoint \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/b2WorldCallbacks \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/b2Fixture \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/b2ContactManager \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/b2Island \
+ UnpackedTarball/box2d/Box2D/Box2D/Dynamics/b2World \
+ UnpackedTarball/box2d/Box2D/Box2D/Rope/b2Rope \
+ UnpackedTarball/box2d/Box2D/Box2D/Collision/b2TimeOfImpact \
+ UnpackedTarball/box2d/Box2D/Box2D/Collision/b2CollidePolygon \
+ UnpackedTarball/box2d/Box2D/Box2D/Collision/b2Distance \
+ UnpackedTarball/box2d/Box2D/Box2D/Collision/b2Collision \
+ UnpackedTarball/box2d/Box2D/Box2D/Collision/b2CollideEdge \
+ UnpackedTarball/box2d/Box2D/Box2D/Collision/b2CollideCircle \
+ UnpackedTarball/box2d/Box2D/Box2D/Collision/b2BroadPhase \
+ UnpackedTarball/box2d/Box2D/Box2D/Collision/Shapes/b2EdgeShape \
+ UnpackedTarball/box2d/Box2D/Box2D/Collision/Shapes/b2CircleShape \
+ UnpackedTarball/box2d/Box2D/Box2D/Collision/Shapes/b2ChainShape \
+ UnpackedTarball/box2d/Box2D/Box2D/Collision/Shapes/b2PolygonShape \
+ UnpackedTarball/box2d/Box2D/Box2D/Collision/b2DynamicTree \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/box2d/UnpackedTarball_box2d.mk b/external/box2d/UnpackedTarball_box2d.mk
new file mode 100644
index 000000000000..340a17511711
--- /dev/null
+++ b/external/box2d/UnpackedTarball_box2d.mk
@@ -0,0 +1,14 @@
+#-*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,box2d))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,box2d,$(BOX2D_TARBALL)))
+
+# vim: set noet sw=4 ts=4: