pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
openhexagon: rework build
Module Name: pkgsrc-wip
Committed By: Iain Hibbert <plunky%netbsd.org@localhost>
Pushed By: plunky
Date: Fri May 8 18:00:41 2020 +0100
Changeset: 64222c9ce80ff45c8bc566e1ff532c125f285d3b
Modified Files:
openhexagon/Makefile
openhexagon/distinfo
Added Files:
openhexagon/patches/patch-CMakeLists.txt
Removed Files:
openhexagon/patches/patch-SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b_CMakeLists.txt
openhexagon/patches/patch-SSVOpenHexagon-2.0-preview_CMakeLists.txt
openhexagon/patches/patch-SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71_CMakeLists.txt
openhexagon/patches/patch-SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1_CMakeLists.txt
Log Message:
openhexagon: rework build
instead of trying to build everything separately, replace dirs in
extlibs with links to the modules and leave the cmake configuration
to find the dependencies from there.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=64222c9ce80ff45c8bc566e1ff532c125f285d3b
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
openhexagon/Makefile | 47 +++++++++-------------
openhexagon/distinfo | 4 ++
openhexagon/patches/patch-CMakeLists.txt | 19 +++++++++
...e3bc8ffe91cb94e6ba061254f3bba18b_CMakeLists.txt | 16 --------
...patch-SSVOpenHexagon-2.0-preview_CMakeLists.txt | 37 -----------------
...84f5e4cf88c71fe67b4588806d290f71_CMakeLists.txt | 24 -----------
...e3a9b65883f22991190e652a455121c1_CMakeLists.txt | 17 --------
7 files changed, 42 insertions(+), 122 deletions(-)
diffs:
diff --git a/openhexagon/Makefile b/openhexagon/Makefile
index e9299fa7dd..9965c8dd47 100644
--- a/openhexagon/Makefile
+++ b/openhexagon/Makefile
@@ -9,7 +9,11 @@ HOMEPAGE= https://vittorioromeo.info/projects.html
COMMENT= Open-source clone of the game "Super Hexagon by Terry Cavanagh"
LICENSE= afl-3.0
-# (sorted in order of build dependency)
+USE_LANGUAGES= c c++14
+USE_CMAKE= yes
+USE_TOOLS+= pax sed
+
+# (sorted in dependency order)
MODULES= SSVUtils-c8190f843ab5bdfcff99e92aec7421c413c887e3 \
SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b \
SSVJsonCpp-a45c64c418dc0b1fab1eec52fa70b6a14308c635 \
@@ -25,11 +29,7 @@ DISTFILES+= ${dist}
SITES.${dist}+= ${MASTER_SITE_GITHUB:S,^,-,:=SuperV1234/${dist:S,-,/archive/,}}
.endfor
-WRKSRC= ${WRKDIR}
-
-USE_LANGUAGES= c c++14
-USE_CMAKE= yes
-USE_TOOLS+= pax sed
+WRKSRC= ${WRKDIR}/${MODULES:MSSVOpenHexagon-*}
SUBST_CLASSES+= wrap
SUBST_STAGE.wrap= pre-configure
@@ -40,39 +40,30 @@ SUBST_VARS.wrap= PREFIX PKGBASE
SUBST_CLASSES+= include
SUBST_STAGE.include= post-configure
SUBST_MESSAGE.include= Fixing hardcoded include path
-SUBST_FILES.include= ${MODULES:MSSVLuaWrapper*}/include/SSVLuaWrapper/LuaContext/LuaContext.h
+SUBST_FILES.include= extlibs/SSVLuaWrapper/include/SSVLuaWrapper/LuaContext/LuaContext.h
SUBST_SED.include= -e 's,lua5.1,lua-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR},'
-MODULE_PATH= ${MODULES:NSSVOpenHexagon*:=${WRKDIR}/%/cmake/modules}
-
+CMAKE_ARGS+= -DPKGBASE=${PKGBASE}
CMAKE_ARGS+= -DBUILD_SHARED_LIB:BOOL=OFF
CMAKE_ARGS+= -DLUA_LIBRARY=${BUILDLINK_DIR}/lib/liblua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.so
CMAKE_ARGS+= -DLUA_INCLUDE_DIR=${BUILDLINK_DIR}/${LUA_INCDIR}
-CMAKE_ARGS+= -DSSVUTILS_INCLUDE_DIR=${MODULES:MSSVUtils-*:=${WRKDIR}/%/include}
-CMAKE_ARGS+= -DSSVUTILS_LIBRARY_RELEASE=${MODULES:MSSVUtils-*:=${WRKDIR}/%/libSSVUtils-s.a}
-CMAKE_ARGS+= -DSSVENTITYSYSTEM_INCLUDE_DIR=${MODULES:MSSVEntitySystem-*:=${WRKDIR}/%/include}
-CMAKE_ARGS+= -DSSVENTITYSYSTEM_LIBRARY_RELEASE=${MODULES:MSSVEntitySystem-*:=${WRKDIR}/%/libSSVEntitySystem-s.a}
-CMAKE_ARGS+= -DSSVJSONCPP_INCLUDE_DIR=${MODULES:MSSVJsonCpp-*:=${WRKDIR}/%/include}
-CMAKE_ARGS+= -DSSVJSONCPP_LIBRARY_RELEASE=${MODULES:MSSVJsonCpp-*:=${WRKDIR}/%/libSSVJsonCpp-s.a}
-CMAKE_ARGS+= -DSSVUTILSJSON_INCLUDE_DIR=${MODULES:MSSVUtilsJson-*:=${WRKDIR}/%/include}
-CMAKE_ARGS+= -DSSVUTILSJSON_LIBRARY_RELEASE=${MODULES:MSSVUtilsJson-*:=${WRKDIR}/%/libSSVUtilsJson-s.a}
-CMAKE_ARGS+= -DSSVSTART_INCLUDE_DIR=${MODULES:MSSVStart-*:=${WRKDIR}/%/include}
-CMAKE_ARGS+= -DSSVSTART_LIBRARY_RELEASE=${MODULES:MSSVStart-*:=${WRKDIR}/%/libSSVStart-s.a}
-CMAKE_ARGS+= -DSSVMENUSYSTEM_INCLUDE_DIR=${MODULES:MSSVMenuSystem-*:=${WRKDIR}/%/include}
-CMAKE_ARGS+= -DSSVMENUSYSTEM_LIBRARY_RELEASE=${MODULES:MSSVMenuSystem-*:=${WRKDIR}/%/libSSVMenuSystem-s.a}
-CMAKE_ARGS+= -DSSVLUAWRAPPER_INCLUDE_DIR=${MODULES:MSSVLuaWrapper-*:=${WRKDIR}/%/include}
-CMAKE_ARGS+= -DSSVLUAWRAPPER_LIBRARY_RELEASE=${MODULES:MSSVLuaWrapper-*:=${WRKDIR}/%/libSSVLuaWrapper-s.a}
-CMAKE_ARGS+= -DMODULE_PATH=${MODULE_PATH:ts;:Q}
-CMAKE_ARGS+= -DPKGBASE=${PKGBASE}
-CONFIGURE_DIRS+= ${MODULES:NSSVOpenHexagonAssets*}
+.for mod in ${MODULES:NSSVOpenHexagon*:C/-.*//}
+CMAKE_ARGS+= -D${mod:tu}_INCLUDE_DIR=${WRKSRC}/extlibs/${mod}/include
+CMAKE_ARGS+= -D${mod:tu}_LIBRARY_RELEASE=${WRKSRC}/extlibs/${mod}/lib${mod}-s.a
+.endfor
-BUILD_DIRS+= ${MODULES:NSSVOpenHexagonAssets*}
+CONFIGURE_DIRS+= ${MODULES:NSSVOpenHexagon*:C/-.*//:=extlibs/%} .
-INSTALL_DIRS+= ${MODULES:MSSVOpenHexagon-*}
+INSTALL_DIRS+= .
INSTALLATION_DIRS+= bin lib/${PKGBASE}
+pre-patch:
+ for d in ${WRKDIR}/*/extlibs/*; do \
+ ${RMDIR} $${d} && ${LN} -s ${WRKDIR}/$${d##*/}-* $${d}; \
+ done
+
post-extract:
${CP} ${FILESDIR}/${PKGBASE}.sh ${WRKSRC}/${PKGBASE}
diff --git a/openhexagon/distinfo b/openhexagon/distinfo
index c59a6b89d0..db36e817ef 100644
--- a/openhexagon/distinfo
+++ b/openhexagon/distinfo
@@ -36,8 +36,12 @@ SHA1 (SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1.tar.gz) = 31338e8e2f
RMD160 (SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1.tar.gz) = 2c38b263bfd125772dd4c2799a5579a41e941b3f
SHA512 (SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1.tar.gz) = bcc01f6dc70353100ca3cf184d16c65ebac0cc0b256aa31c0c9c8925b96eb6cd3dc79c685d4d250f83ca3656498d927da796c5fdd813518db3d15cf096a11f97
Size (SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1.tar.gz) = 8298 bytes
+<<<<<<< HEAD
SHA1 (patch-SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b_CMakeLists.txt) = 98103b65ed2d871d2095c90dab073339024cab6c
SHA1 (patch-SSVOpenHexagon-2.0-preview_CMakeLists.txt) = a29047c7d863e96c353a4ab86cb590150415dcd3
SHA1 (patch-SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71_CMakeLists.txt) = 508ac106c391ec1800873236407776f479e0bf53
SHA1 (patch-SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1_CMakeLists.txt) = 9f67af75893a1c191eb88ce96a74d282fd061104
SHA1 (patch-src_SSVOpenHexagon_Online_Online.cpp) = 0676a63784d6e5ac0a24ba4b6a7ae5513c6c8d3a
+=======
+SHA1 (patch-CMakeLists.txt) = 7dacdc7f2596b7586b9b73bac1404621f2b01009
+>>>>>>> 4296dd44a... openhexagon: rework build
diff --git a/openhexagon/patches/patch-CMakeLists.txt b/openhexagon/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..cb333db64d
--- /dev/null
+++ b/openhexagon/patches/patch-CMakeLists.txt
@@ -0,0 +1,19 @@
+$NetBSD$
+
+install in pkgsrc dirs
+
+--- CMakeLists.txt.orig 2013-07-13 23:37:47.000000000 +0000
++++ CMakeLists.txt
+@@ -65,10 +65,8 @@ target_link_libraries(${PROJECT_NAME} ${
+ target_link_libraries(${PROJECT_NAME} ${LUA_LIBRARY})
+
+ if(UNIX)
+- install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION /usr/local/games/${PROJECT_NAME}/)
+- install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_SOURCE_DIR}/_RELEASE/)
+- install(DIRECTORY _RELEASE/ DESTINATION /usr/local/games/SSVOpenHexagon/)
+- install(PROGRAMS _RELEASE/${PROJECT_NAME} DESTINATION /usr/local/games/${PROJECT_NAME}/ PERMISSIONS WORLD_EXECUTE WORLD_READ)
++ install(DIRECTORY _RELEASE/ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${PKGBASE}/)
++ install(PROGRAMS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${PKGBASE}/)
+ else(WIN32)
+ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ./_RELEASE/)
+ endif()
diff --git a/openhexagon/patches/patch-SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b_CMakeLists.txt b/openhexagon/patches/patch-SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b_CMakeLists.txt
deleted file mode 100644
index 31707519d8..0000000000
--- a/openhexagon/patches/patch-SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b_CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
-find submodules correctly
-
---- SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b/CMakeLists.txt.orig 2013-07-13 23:17:16.000000000 +0000
-+++ SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b/CMakeLists.txt
-@@ -6,8 +6,7 @@ project(SSVEntitySystem)
- set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -W -pedantic" CACHE STRING "" FORCE)
- set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3" CACHE STRING "" FORCE)
- set(CMAKE_CXX_FLAGS_DEBUG "-fno-omit-frame-pointer -g3 -gdwarf-2 -O0" CACHE STRING "" FORCE)
--set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/;${CMAKE_MODULE_PATH}")
--set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/extlibs/SSVUtils/cmake/modules/;${CMAKE_MODULE_PATH}")
-+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/;${MODULE_PATH}")
-
- set(BUILD_SHARED_LIB TRUE CACHE BOOL "Build shared libraries.")
- if(BUILD_SHARED_LIB)
diff --git a/openhexagon/patches/patch-SSVOpenHexagon-2.0-preview_CMakeLists.txt b/openhexagon/patches/patch-SSVOpenHexagon-2.0-preview_CMakeLists.txt
deleted file mode 100644
index dbe267d1b9..0000000000
--- a/openhexagon/patches/patch-SSVOpenHexagon-2.0-preview_CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-$NetBSD$
-
-find submodules correctly
-
-install in pkgsrc dirs
-
---- SSVOpenHexagon-2.0-preview/CMakeLists.txt.orig 2013-07-13 23:37:47.000000000 +0000
-+++ SSVOpenHexagon-2.0-preview/CMakeLists.txt
-@@ -6,14 +6,7 @@ project(SSVOpenHexagon)
- set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -W -pedantic" CACHE STRING "" FORCE)
- set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3" CACHE STRING "" FORCE)
- set(CMAKE_CXX_FLAGS_DEBUG "-fno-omit-frame-pointer -g3 -gdwarf-2 -O0" CACHE STRING "" FORCE)
--set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/;${CMAKE_MODULE_PATH}")
--set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVJsonCpp/cmake/modules/")
--set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVUtils/cmake/modules/")
--set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVUtilsJson/cmake/modules/")
--set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVMenuSystem/cmake/modules/")
--set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVLuaWrapper/cmake/modules/")
--set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVEntitySystem/cmake/modules/")
--set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVStart/cmake/modules/")
-+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/;${MODULE_PATH}")
-
- set(SFML_STATIC_LIBRARIES FALSE CACHE BOOL "Look for static SFML libraries.")
- find_package(SFML 2 COMPONENTS audio graphics window system network)
-@@ -65,10 +58,8 @@ target_link_libraries(${PROJECT_NAME} ${
- target_link_libraries(${PROJECT_NAME} ${LUA_LIBRARY})
-
- if(UNIX)
-- install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION /usr/local/games/${PROJECT_NAME}/)
-- install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_SOURCE_DIR}/_RELEASE/)
-- install(DIRECTORY _RELEASE/ DESTINATION /usr/local/games/SSVOpenHexagon/)
-- install(PROGRAMS _RELEASE/${PROJECT_NAME} DESTINATION /usr/local/games/${PROJECT_NAME}/ PERMISSIONS WORLD_EXECUTE WORLD_READ)
-+ install(DIRECTORY _RELEASE/ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${PKGBASE}/)
-+ install(PROGRAMS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${PKGBASE}/)
- else(WIN32)
- install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ./_RELEASE/)
- endif()
diff --git a/openhexagon/patches/patch-SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71_CMakeLists.txt b/openhexagon/patches/patch-SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71_CMakeLists.txt
deleted file mode 100644
index 23e4705d71..0000000000
--- a/openhexagon/patches/patch-SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71_CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
-find submodules correctly
-
---- SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71/CMakeLists.txt.orig 2013-07-13 23:17:31.000000000 +0000
-+++ SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71/CMakeLists.txt
-@@ -6,16 +6,9 @@ project(SSVStart)
- set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -W -pedantic" CACHE STRING "" FORCE)
- set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3" CACHE STRING "" FORCE)
- set(CMAKE_CXX_FLAGS_DEBUG "-fno-omit-frame-pointer -g3 -gdwarf-2 -O0" CACHE STRING "" FORCE)
--set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/;${CMAKE_MODULE_PATH}")
--set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/extlibs/SSVUtils/cmake/modules/;${CMAKE_MODULE_PATH}")
-+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/;${MODULE_PATH}")
-
- set(SSVSTART_USE_JSON TRUE CACHE BOOL "Use JSON tools/utilities (Requires SSVJsonCpp and SSVUtilsJson).")
--if(SSVSTART_USE_JSON)
-- set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/extlibs/SSVJsonCpp/cmake/modules/;${CMAKE_MODULE_PATH}")
-- set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/extlibs/SSVUtilsJson/cmake/modules/;${CMAKE_MODULE_PATH}")
--else()
-- add_definitions(-DSSVS_N_USE_JSON)
--endif()
-
- set(BUILD_SHARED_LIB TRUE CACHE BOOL "Build shared libraries.")
- if(BUILD_SHARED_LIB)
diff --git a/openhexagon/patches/patch-SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1_CMakeLists.txt b/openhexagon/patches/patch-SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1_CMakeLists.txt
deleted file mode 100644
index 1f2ec9cd20..0000000000
--- a/openhexagon/patches/patch-SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1_CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
-find submodules correctly
-
---- SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1/CMakeLists.txt.orig 2013-07-13 23:17:35.000000000 +0000
-+++ SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1/CMakeLists.txt
-@@ -6,9 +6,7 @@ project(SSVUtilsJson)
- set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -W -pedantic" CACHE STRING "" FORCE)
- set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3" CACHE STRING "" FORCE)
- set(CMAKE_CXX_FLAGS_DEBUG "-fno-omit-frame-pointer -g3 -gdwarf-2 -O0" CACHE STRING "" FORCE)
--set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/;${CMAKE_MODULE_PATH}")
--set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/extlibs/SSVJsonCpp/cmake/modules/;${CMAKE_MODULE_PATH}")
--set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/extlibs/SSVUtils/cmake/modules/;${CMAKE_MODULE_PATH}")
-+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/;${MODULE_PATH}")
-
- find_package(SSVJsonCpp REQUIRED)
- find_package(SSVUtils REQUIRED)
Home |
Main Index |
Thread Index |
Old Index