diff options
author | Timothy Gu <timothygu99@gmail.com> | 2014-09-05 04:16:19 (GMT) |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2014-09-05 04:16:37 (GMT) |
commit | a54c7d7c355f60466651a22ce3652c787df1aad9 (patch) | |
tree | 175c54024ffe1715b053d9474cf32884cce384d4 /src | |
parent | 7fec33d41bd0eaf5ade892a2e917c913c2691469 (diff) | |
download | mxe-a54c7d7c355f60466651a22ce3652c787df1aad9.zip mxe-a54c7d7c355f60466651a22ce3652c787df1aad9.tar.gz mxe-a54c7d7c355f60466651a22ce3652c787df1aad9.tar.bz2 |
chipmunk: numerous fixes
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/chipmunk-1-lib.patch | 60 | ||||
-rw-r--r-- | src/chipmunk.mk | 17 |
2 files changed, 71 insertions, 6 deletions
diff --git a/src/chipmunk-1-lib.patch b/src/chipmunk-1-lib.patch new file mode 100644 index 0000000..a98a87c --- /dev/null +++ b/src/chipmunk-1-lib.patch @@ -0,0 +1,60 @@ +This file is part of MXE. +See index.html for further information. + +Taken from https://github.com/slembcke/Chipmunk2D/pull/87. + +From e3f2b8aa221170988b9349cdce161fe0f109109b Mon Sep 17 00:00:00 2001 +From: Timothy Gu <timothygu99@gmail.com> +Date: Thu, 4 Sep 2014 20:23:24 -0700 +Subject: [PATCH] build: Make lib and executable install path settable + +Also changes DLL install dir to bin/ and install DLL import libs. +--- + CMakeLists.txt | 6 ++++++ + src/CMakeLists.txt | 6 ++++-- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 863afc0..4c99925 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,6 +15,12 @@ if(NOT CMAKE_BUILD_TYPE) + FORCE) + endif() + ++# to manually select install locations of libraries and executables ++# -D LIB_INSTALL_DIR mylib ++# -D BIN_INSTALL_DIR newbin ++set(LIB_INSTALL_DIR lib CACHE STRING "Install location of libraries") ++set(BIN_INSTALL_DIR bin CACHE STRING "Install location of executables") ++ + # other options for the build, you can i.e. activate the shared library by passing + # -D BUILD_SHARED=ON + # to cmake. Other options analog +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 2e817ea..633a101 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -22,7 +22,9 @@ if(BUILD_SHARED) + # need to explicitly link to the math library because the CMake/Android toolchains may not do it automatically + target_link_libraries(chipmunk m) + endif(ANDROID) +- install(TARGETS chipmunk RUNTIME DESTINATION lib LIBRARY DESTINATION lib) ++ install(TARGETS chipmunk RUNTIME DESTINATION ${BIN_INSTALL_DIR} ++ LIBRARY DESTINATION ${LIB_INSTALL_DIR} ++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) + endif(BUILD_SHARED) + + if(BUILD_STATIC) +@@ -37,7 +39,7 @@ if(BUILD_STATIC) + # Sets chipmunk_static to output "libchipmunk.a" not "libchipmunk_static.a" + set_target_properties(chipmunk_static PROPERTIES OUTPUT_NAME chipmunk) + if(INSTALL_STATIC) +- install(TARGETS chipmunk_static ARCHIVE DESTINATION lib) ++ install(TARGETS chipmunk_static ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) + endif(INSTALL_STATIC) + endif(BUILD_STATIC) + +-- +1.8.3.2 + diff --git a/src/chipmunk.mk b/src/chipmunk.mk index 1dfdcad..e987468 100644 --- a/src/chipmunk.mk +++ b/src/chipmunk.mk @@ -7,12 +7,13 @@ $(PKG)_VERSION := 6.2.1 $(PKG)_CHECKSUM := 4b34fd79d232b523f80f4b7e21d7d7c866bfade0 $(PKG)_SUBDIR := Chipmunk2D-Chipmunk-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := https://github.com/slembcke/Chipmunk2D/archive/Chipmunk-$(PKG_VERSION).tar.gz +$(PKG)_URL := https://github.com/slembcke/Chipmunk2D/archive/Chipmunk-$($(PKG)_VERSION).tar.gz $(PKG)_DEPS := gcc define $(PKG)_UPDATE - echo 'TODO: write update script for $(PKG).' >&2; - echo $($(PKG)_VERSION) + $(WGET) -q -O- 'https://github.com/slembcke/Chipmunk2D/releases' | \ + $(SED) -n 's,.*/archive/Chipmunk-\([0-9][^>]*\)\.tar.*,\1,p' | \ + head -1 endef define $(PKG)_BUILD @@ -21,9 +22,13 @@ define $(PKG)_BUILD -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ -DBUILD_DEMOS=OFF \ -DINSTALL_DEMOS=OFF \ - -DBUILD_SHARED=OFF \ - -DBUILD_STATIC=ON \ - -DINSTALL_STATIC=ON + $(if $(BUILD_STATIC), \ + -DBUILD_SHARED=OFF \ + -DBUILD_STATIC=ON \ + -DINSTALL_STATIC=ON, \ + -DBUILD_SHARED=ON \ + -DBUILD_STATIC=OFF \ + -DINSTALL_STATIC=OFF) $(MAKE) -C '$(1)/build' -j '$(JOBS)' install |