From a58fe28cff9fc2249149bf350cc93b86c14dd6c8 Mon Sep 17 00:00:00 2001 From: Josh Heidenreich Date: Mon, 3 Feb 2014 08:42:37 +1030 Subject: add package bullet --- index.html | 4 ++++ src/bullet-1-pkgconfig.patch | 22 ++++++++++++++++++++++ src/bullet-test.cpp | 29 +++++++++++++++++++++++++++++ src/bullet.mk | 38 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+) create mode 100644 src/bullet-1-pkgconfig.patch create mode 100644 src/bullet-test.cpp create mode 100644 src/bullet.mk diff --git a/index.html b/index.html index 5a62d7b..2742b37 100644 --- a/index.html +++ b/index.html @@ -1167,6 +1167,10 @@ local-pkg-list: $(LOCAL_PKG_LIST) Boost C++ Library + bullet + Bullet physics, version 2 + + bzip2 bzip2 diff --git a/src/bullet-1-pkgconfig.patch b/src/bullet-1-pkgconfig.patch new file mode 100644 index 0000000..235e57e --- /dev/null +++ b/src/bullet-1-pkgconfig.patch @@ -0,0 +1,22 @@ +This file is part of MXE. +See index.html for further information. + +--- a/CMakeLists.txt Sat Sep 14 11:25:52 2013 -0700 ++++ b/CMakeLists.txt Fri Sep 27 15:03:58 2013 +1000 +@@ -402,14 +402,14 @@ + ## the following are directories where stuff will be installed to + SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/bullet/" CACHE PATH "The subdirectory to the header prefix") + SET(PKGCONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig/" CACHE STRING "Base directory for pkgconfig files") +- IF(NOT WIN32) ++ + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/bullet.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/bullet.pc @ONLY) + INSTALL( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/bullet.pc + DESTINATION + ${PKGCONFIG_INSTALL_PREFIX}) +- ENDIF(NOT WIN32) ++ + ENDIF(INSTALL_LIBS) + + #INSTALL of other files requires CMake 2.6 diff --git a/src/bullet-test.cpp b/src/bullet-test.cpp new file mode 100644 index 0000000..808f00a --- /dev/null +++ b/src/bullet-test.cpp @@ -0,0 +1,29 @@ +/* + * This file is part of MXE. + * See index.html for further information. + */ + +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-variable" + +#include + +int main(int argc, char *argv[]) +{ + btBroadphaseInterface* broadphase = new btDbvtBroadphase(); + btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration(); + btCollisionDispatcher* dispatcher = new btCollisionDispatcher(collisionConfiguration); + btSequentialImpulseConstraintSolver* solver = new btSequentialImpulseConstraintSolver(); + btDiscreteDynamicsWorld* dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher, broadphase, solver, collisionConfiguration); + + (void)argc; + (void)argv; + + delete dynamicsWorld; + delete solver; + delete dispatcher; + delete collisionConfiguration; + delete broadphase; + + return 0; +} diff --git a/src/bullet.mk b/src/bullet.mk new file mode 100644 index 0000000..1e4c37f --- /dev/null +++ b/src/bullet.mk @@ -0,0 +1,38 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := bullet +$(PKG)_IGNORE := +$(PKG)_VERSION := 2.82-r2704 +$(PKG)_CHECKSUM := a0867257b9b18e9829bbeb4c6c5872a5b29d1d33 +$(PKG)_SUBDIR := bullet-$($(PKG)_VERSION) +$(PKG)_FILE := bullet-$($(PKG)_VERSION).tgz +$(PKG)_URL := https://bullet.googlecode.com/files/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(WGET) -q -O- 'http://code.google.com/p/bullet/downloads/list?sort=-uploaded' | \ + $(SED) -n 's,.*bullet-\([0-9][^<]*\)\.tgz,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && cmake . \ + -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + -DINSTALL_LIBS=ON \ + -DBUILD_CPU_DEMOS=OFF \ + -DBUILD_DEMOS=OFF \ + -DBUILD_EXTRAS=OFF \ + -DBUILD_MULTITHREADING=OFF \ + -DBUILD_UNIT_TESTS=OFF \ + -DUSE_CUSTOM_VECOR_MATH=OFF \ + -DUSE_DOUBLE_PRECISION=OFF \ + -DUSE_GLUT=OFF \ + -DUSE_GRAPHICAL_BENCHMARK=OFF + $(MAKE) -C '$(1)' -j '$(JOBS)' install VERBOSE=1 + + '$(TARGET)-g++' \ + -W -Wall -Werror -ansi -pedantic \ + '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` +endef -- cgit v0.12