chipmunk: new package
authorFrancois Perrad <fperrad@gmail.com>
Wed, 11 Apr 2018 10:01:46 +0000 (12:01 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 28 Apr 2018 16:29:04 +0000 (18:29 +0200)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
[Thomas: use BUILD_SHARED, BUILD_STATIC and INSTALL_STATIC options.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
DEVELOPERS
package/Config.in
package/chipmunk/Config.in [new file with mode: 0644]
package/chipmunk/chipmunk.hash [new file with mode: 0644]
package/chipmunk/chipmunk.mk [new file with mode: 0644]

index b281245df26ddb7d877214f5fe3574c4b47b4525..3a4ad60044abaf4c80201bb3e9eda9d8f6af8f6d 100644 (file)
@@ -706,6 +706,7 @@ F:  board/olimex/a20_olinuxino
 F:     configs/olimex_a20_olinuxino_*
 F:     package/4th/
 F:     package/botan/
+F:     pacakge/chipmunk/
 F:     package/dado/
 F:     package/ficl/
 F:     package/gdbm/
index 19aa012933ef68a8d39b9de8e969230f9dbea635..d5ba5cd36cb894405b217cb0efce09b50b55b67c 100644 (file)
@@ -1126,6 +1126,7 @@ menu "Graphics"
        source "package/bullet/Config.in"
        source "package/cairo/Config.in"
        source "package/cairomm/Config.in"
+       source "package/chipmunk/Config.in"
        source "package/exiv2/Config.in"
        source "package/fltk/Config.in"
        source "package/fontconfig/Config.in"
diff --git a/package/chipmunk/Config.in b/package/chipmunk/Config.in
new file mode 100644 (file)
index 0000000..7275d68
--- /dev/null
@@ -0,0 +1,12 @@
+
+comment "chipmunk needs an OpenGL backend"
+       depends on !BR2_PACKAGE_HAS_LIBGL
+
+config BR2_PACKAGE_CHIPMUNK
+       bool "chipmunk"
+       depends on BR2_PACKAGE_HAS_LIBGL
+       help
+         Chipmunk2D is a simple, lightweight, fast and portable 2D
+         rigid body physics library written in C.
+
+         http://chipmunk-physics.net/
diff --git a/package/chipmunk/chipmunk.hash b/package/chipmunk/chipmunk.hash
new file mode 100644 (file)
index 0000000..7bd9b15
--- /dev/null
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256 6b6d8d5d910c4442fb9c8c4c46a178126d8c21d075cdb3ce439a7f8d8757b0ca  Chipmunk-7.0.2.tar.gz
+
+# Hash for license file:
+sha256 109cedb0301cba4e05fa99241f162bdad015c9541ae84b420b0148ac1ea588e2  LICENSE.txt
diff --git a/package/chipmunk/chipmunk.mk b/package/chipmunk/chipmunk.mk
new file mode 100644 (file)
index 0000000..a84af22
--- /dev/null
@@ -0,0 +1,28 @@
+################################################################################
+#
+# chipmunk
+#
+################################################################################
+
+CHIPMUNK_VERSION = 7.0.2
+CHIPMUNK_SITE = https://github.com/slembcke/Chipmunk2D/archive
+CHIPMUNK_SOURCE = Chipmunk-$(CHIPMUNK_VERSION).tar.gz
+CHIPMUNK_INSTALL_STAGING = YES
+CHIPMUNK_LICENSE = MIT
+CHIPMUNK_LICENSE_FILES = LICENSE.txt
+CHIPMUNK_DEPENDENCIES = libgl
+CHIPMUNK_CONF_OPTS = -DBUILD_DEMOS=OFF
+
+ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+CHIPMUNK_CONF_OPTS += -DBUILD_STATIC=ON -DINSTALL_STATIC=ON
+else
+CHIPMUNK_CONF_OPTS += -DBUILD_STATIC=OFF -DINSTALL_STATIC=OFF
+endif
+
+ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+CHIPMUNK_CONF_OPTS += -DBUILD_SHARED=ON
+else
+CHIPMUNK_CONF_OPTS += -DBUILD_SHARED=OFF
+endif
+
+$(eval $(cmake-package))