diff --git a/mingw-w64-librocket-git/0001-Debugging-cmake.patch b/mingw-w64-librocket-git/0001-Debugging-cmake.patch deleted file mode 100644 index 0e34fda919..0000000000 --- a/mingw-w64-librocket-git/0001-Debugging-cmake.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 00a3839e26aff416872bf6c51cf7a8d905313871 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Thu, 10 Jul 2014 23:39:15 +0100 -Subject: [PATCH] Debugging cmake - ---- - Build/CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Build/CMakeLists.txt b/Build/CMakeLists.txt -index 2b38364..289968f 100755 ---- a/Build/CMakeLists.txt -+++ b/Build/CMakeLists.txt -@@ -81,11 +81,13 @@ mark_as_advanced(FREETYPE_INCLUDE_DIRS FREETYPE_LIBRARY FREETYPE_LINK_DIRECTORIE - if(BUILD_PYTHON_BINDINGS) - find_package(PythonInterp 2 REQUIRED) - find_package(PythonLibs 2 REQUIRED) -+ message(STATUS "PYTHON_EXECUTABLE is ${PYTHON_EXECUTABLE}") - execute_process( - COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print(sysconfig.get_python_lib(1,0,prefix=''))" - OUTPUT_VARIABLE PYTHON_INSTDIR - OUTPUT_STRIP_TRAILING_WHITESPACE - ) -+ message(STATUS "PYTHON_INSTDIR is ${PYTHON_INSTDIR}") - if(PYTHONLIBS_FOUND) - include_directories(${PYTHON_INCLUDE_DIR}) - endif() --- -2.0.1 - diff --git a/mingw-w64-librocket-git/PKGBUILD b/mingw-w64-librocket-git/PKGBUILD index 9be9e34e6b..603a0664bb 100644 --- a/mingw-w64-librocket-git/PKGBUILD +++ b/mingw-w64-librocket-git/PKGBUILD @@ -21,10 +21,12 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" options=('staticlibs' 'strip') source=("${_realname}"::"git+https://github.com/libRocket/libRocket.git" - "0001-Debugging-cmake.patch") + "find-mingw-python.patch" + "dll-exports.patch") md5sums=('SKIP' - '42086f8ce4d937e9f3d640e957fda512') + '4cbe833d6edde34de35f5d284a20ecc0' + 'e768c35e89e5f567b08ce4264d064701') pkgver() { cd "$srcdir/$_realname" @@ -33,7 +35,8 @@ pkgver() { prepare() { cd "$srcdir/$_realname" - git am "$srcdir"/0001-Debugging-cmake.patch + patch -p1 -i "$srcdir"/find-mingw-python.patch + patch -p1 -i ${srcdir}/dll-exports.patch } build() { @@ -41,20 +44,19 @@ build() { mkdir -p "${srcdir}/build-${CARCH}" cd "${srcdir}/build-${CARCH}" - cmake --debug-output -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX="" \ # :PATH=${pkgdir}${MINGW_PREFIX} \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_PYTHON_BINDINGS=OFF \ - -DBUILD_STATIC_LIBS=ON \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DBUILD_PYTHON_BINDINGS=ON \ -DBUILD_SHARED_LIBS=ON \ -DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/python2.exe \ -DBUILD_SAMPLES=ON \ -DCMAKE_GNUtoMS=0 \ ../$_realname/Build - make -j4 + make } package() { cd "${srcdir}/build-${CARCH}" - make install DESTDIR=$pkgdir${MINGW_PREFIX} + make install } diff --git a/mingw-w64-librocket-git/dll-exports.patch b/mingw-w64-librocket-git/dll-exports.patch new file mode 100644 index 0000000000..3523f9cdc4 --- /dev/null +++ b/mingw-w64-librocket-git/dll-exports.patch @@ -0,0 +1,113 @@ +diff -Naur librocket-orig/Include/Rocket/Controls/Header.h librocket/Include/Rocket/Controls/Header.h +--- librocket-orig/Include/Rocket/Controls/Header.h 2014-07-11 09:39:04.672400000 +0400 ++++ librocket/Include/Rocket/Controls/Header.h 2014-07-11 09:56:53.265200000 +0400 +@@ -30,18 +30,18 @@ + + #include + +-#if !defined STATIC_LIB +- #ifdef ROCKET_PLATFORM_WIN32 +- #ifdef RocketControls_EXPORTS ++#if defined(ROCKET_PLATFORM_WIN32) ++ #if defined(RocketControls_EXPORTS) || !defined(STATIC_LIB) + #define ROCKETCONTROLS_API __declspec(dllexport) + #else + #define ROCKETCONTROLS_API __declspec(dllimport) + #endif +- #else ++#else ++ #if !defined(STATIC_LIB) + #define ROCKETCONTROLS_API __attribute__((visibility("default"))) ++ #else ++ #define ROCKETCONTROLS_API + #endif +-#else +- #define ROCKETCONTROLS_API + #endif + + #endif +diff -Naur librocket-orig/Include/Rocket/Core/Header.h librocket/Include/Rocket/Core/Header.h +--- librocket-orig/Include/Rocket/Core/Header.h 2014-07-11 09:39:04.688000000 +0400 ++++ librocket/Include/Rocket/Core/Header.h 2014-07-11 09:53:04.163600000 +0400 +@@ -30,18 +30,18 @@ + + #include + +-#if !defined STATIC_LIB +- #if defined ROCKET_PLATFORM_WIN32 +- #if defined RocketCore_EXPORTS ++#if defined(ROCKET_PLATFORM_WIN32) ++ #if (defined RocketCore_EXPORTS) || !defined(STATIC_LIB) + #define ROCKETCORE_API __declspec(dllexport) + #else + #define ROCKETCORE_API __declspec(dllimport) + #endif +- #else ++#else ++ #if !defined(STATIC_LIB) + #define ROCKETCORE_API __attribute__((visibility("default"))) ++ #else ++ #define ROCKETCORE_API + #endif +-#else +- #define ROCKETCORE_API + #endif + + #endif +diff -Naur librocket-orig/Include/Rocket/Core/Python/Header.h librocket/Include/Rocket/Core/Python/Header.h +--- librocket-orig/Include/Rocket/Core/Python/Header.h 2014-07-11 09:39:04.703600000 +0400 ++++ librocket/Include/Rocket/Core/Python/Header.h 2014-07-11 09:53:23.991200000 +0400 +@@ -30,18 +30,18 @@ + + #include + +-#if !defined STATIC_LIB +-#if defined ROCKET_PLATFORM_WIN32 +- #if defined RocketCorePython_EXPORTS ++#if defined(ROCKET_PLATFORM_WIN32) ++ #if defined(RocketCorePython_EXPORTS) || !defined(STATIC_LIB) + #define ROCKETCOREPYTHON_API __declspec(dllexport) + #else + #define ROCKETCOREPYTHON_API __declspec(dllimport) + #endif + #else +- #define ROCKETCOREPYTHON_API __attribute__((visibility("default"))) +-#endif +-#else +- #define ROCKETCOREPYTHON_API ++ #if !defined(STATIC_LIB) ++ #define ROCKETCOREPYTHON_API __attribute__((visibility("default"))) ++ #else ++ #define ROCKETCOREPYTHON_API ++ #endif + #endif + + #endif +diff -Naur librocket-orig/Include/Rocket/Debugger/Header.h librocket/Include/Rocket/Debugger/Header.h +--- librocket-orig/Include/Rocket/Debugger/Header.h 2014-07-11 09:39:04.719200000 +0400 ++++ librocket/Include/Rocket/Debugger/Header.h 2014-07-11 09:55:06.233600000 +0400 +@@ -30,18 +30,18 @@ + + #include + +-#if !defined STATIC_LIB +- #ifdef ROCKET_PLATFORM_WIN32 +- #ifdef RocketDebugger_EXPORTS ++#if defined(ROCKET_PLATFORM_WIN32) ++ #if defined(RocketDebugger_EXPORTS) || !defined(STATIC_LIB) + #define ROCKETDEBUGGER_API __declspec(dllexport) + #else + #define ROCKETDEBUGGER_API __declspec(dllimport) + #endif +- #else ++#else ++ #if !defined(STATIC_LIB) + #define ROCKETDEBUGGER_API __attribute__((visibility("default"))) ++ #else ++ #define ROCKETDEBUGGER_API + #endif +-#else +- #define ROCKETDEBUGGER_API + #endif + + #endif diff --git a/mingw-w64-librocket-git/find-mingw-python.patch b/mingw-w64-librocket-git/find-mingw-python.patch new file mode 100644 index 0000000000..41d2321f39 --- /dev/null +++ b/mingw-w64-librocket-git/find-mingw-python.patch @@ -0,0 +1,38 @@ +--- librocket/Build/CMakeLists.txt.orig 2014-07-11 08:36:08.919800000 +0400 ++++ librocket/Build/CMakeLists.txt 2014-07-11 08:41:33.611600000 +0400 +@@ -95,7 +109,7 @@ + find_package(Boost 1.40.0 COMPONENTS python REQUIRED) + if(Boost_FOUND) + include_directories(${Boost_INCLUDE_DIR}) +- list(APPEND PY_BINDINGS_LINK_LIBS ${Boost_LIBRARIES}) ++ list(APPEND PY_BINDINGS_LINK_LIBS ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) + endif() + + endif() +@@ -161,7 +175,7 @@ + set_target_properties(${NAME} PROPERTIES PREFIX "") + + install(TARGETS ${NAME} +- LIBRARY DESTINATION ${PYTHON_INSTDIR} ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTDIR} + ) + endforeach(library) + endif() +@@ -297,14 +311,14 @@ + + if(BUILD_PYTHON_BINDINGS) + install(FILES ${PROJECT_SOURCE_DIR}/bin/rocket.py +- DESTINATION ${PYTHON_INSTDIR} ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTDIR} + ) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/Include/Rocket +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/include + ) + else() + install(DIRECTORY ${PROJECT_SOURCE_DIR}/Include/Rocket +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/include + PATTERN "Python" EXCLUDE + ) + endif()