pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

openhexagon: reconfigure build



Module Name:	pkgsrc-wip
Committed By:	Iain Hibbert <plunky%netbsd.org@localhost>
Pushed By:	plunky
Date:		Fri May 8 18:00:02 2020 +0100
Changeset:	a814d1b43e3a7616a544134d0904aa04d9e4b146

Modified Files:
	openhexagon/Makefile
	openhexagon/TODO
	openhexagon/distinfo
Added 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
Removed Files:
	openhexagon/patches/patch-CMakeLists.txt

Log Message:
openhexagon: reconfigure build

Bring all the tagged submodules into openhexagon directly. Tell
cmake know where the library/include files for each will be, then
configure and build. All relevant files will be found when they
are needed.

this means we don't need to worry about the lack of release
versions for the submodules as separate packages.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a814d1b43e3a7616a544134d0904aa04d9e4b146

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 openhexagon/Makefile                               | 56 +++++++++++++++++-----
 openhexagon/TODO                                   |  5 --
 openhexagon/distinfo                               | 33 ++++++++++++-
 openhexagon/patches/patch-CMakeLists.txt           | 35 --------------
 ...e3bc8ffe91cb94e6ba061254f3bba18b_CMakeLists.txt | 16 +++++++
 ...patch-SSVOpenHexagon-2.0-preview_CMakeLists.txt | 37 ++++++++++++++
 ...84f5e4cf88c71fe67b4588806d290f71_CMakeLists.txt | 24 ++++++++++
 ...e3a9b65883f22991190e652a455121c1_CMakeLists.txt | 17 +++++++
 8 files changed, 170 insertions(+), 53 deletions(-)

diffs:
diff --git a/openhexagon/Makefile b/openhexagon/Makefile
index 6c7653084a..e9299fa7dd 100644
--- a/openhexagon/Makefile
+++ b/openhexagon/Makefile
@@ -9,30 +9,67 @@ HOMEPAGE=	https://vittorioromeo.info/projects.html
 COMMENT=	Open-source clone of the game "Super Hexagon by Terry Cavanagh"
 LICENSE=	afl-3.0
 
-MODULES=	SSVOpenHexagon-2.0-preview \
-		SSVOpenHexagonAssets-1d125de695be2e74c9f2ad3198e8b5b29911d010
+# (sorted in order of build dependency)
+MODULES=	SSVUtils-c8190f843ab5bdfcff99e92aec7421c413c887e3 \
+		SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b \
+		SSVJsonCpp-a45c64c418dc0b1fab1eec52fa70b6a14308c635 \
+		SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1 \
+		SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71 \
+		SSVMenuSystem-03d32b26b2880a35d5daa1ad7ab6199a4d19c742 \
+		SSVLuaWrapper-ca905bddae86358182cf85eff2d0220ccdd785d0 \
+		SSVOpenHexagonAssets-1d125de695be2e74c9f2ad3198e8b5b29911d010 \
+		SSVOpenHexagon-2.0-preview
 
 .for dist in ${MODULES:=.tar.gz}
 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
 
 SUBST_CLASSES+=		wrap
 SUBST_STAGE.wrap=	pre-configure
-SUBST_MESSAGE.wrap=	Adjusting wrapper
+SUBST_MESSAGE.wrap=	Adjusting shell wrapper
 SUBST_FILES.wrap=	${PKGBASE}
 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_SED.include=	-e 's,lua5.1,lua-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR},'
+
+MODULE_PATH=	${MODULES:NSSVOpenHexagon*:=${WRKDIR}/%/cmake/modules}
+
+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+=	-DMODULE_PATH=${BUILDLINK_DIR}/lib/cmake
+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}
 
-WRKSRC=	${WRKDIR}/${MODULES:MSSVOpenHexagon-*}
+CONFIGURE_DIRS+=	${MODULES:NSSVOpenHexagonAssets*}
+
+BUILD_DIRS+=		${MODULES:NSSVOpenHexagonAssets*}
+
+INSTALL_DIRS+=		${MODULES:MSSVOpenHexagon-*}
 
 INSTALLATION_DIRS+=	bin lib/${PKGBASE}
 
@@ -49,13 +86,8 @@ post-install:
 	cd ${WRKDIR}/${MODULES:MSSVOpenHexagonAssets-*}/_RELEASE && \
 	    ${PAX} -rwpm Assets Packs ${DESTDIR}${PREFIX}/lib/${PKGBASE}
 
+LUA_VERSIONS_ACCEPTED=	51
+
 .include "../../wip/sfml+/buildlink3.mk"
-.include "../../wip/SSVJsonCpp/buildlink3.mk"
-.include "../../wip/SSVUtils/buildlink3.mk"
-.include "../../wip/SSVStart/buildlink3.mk"
-.include "../../wip/SSVEntitySystem/buildlink3.mk"
-.include "../../wip/SSVLuaWrapper/buildlink3.mk"
-.include "../../wip/SSVMenuSystem/buildlink3.mk"
-.include "../../wip/SSVUtilsJson/buildlink3.mk"
 .include "../../lang/lua/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/openhexagon/TODO b/openhexagon/TODO
index 910ca745b4..71ed896a56 100644
--- a/openhexagon/TODO
+++ b/openhexagon/TODO
@@ -7,11 +7,6 @@ This seems to be working if slow on my computer
 - this is the last tagged version of OpenHexagon and is 7
   years old but there has been some work upstream since
 
-- the dependencies suck there are no version numbers have
-  just used the tag that was used in the submodule. The
-  submodules need to be built before we run cmake here so
-  have packaged them separately
-
 - I have written a wrapper script which sets up a
   $HOME/.openhexagon dir with symlinks to the assets etc
   it kind of works but could be better, particularly
diff --git a/openhexagon/distinfo b/openhexagon/distinfo
index 1ad46f4aa2..c59a6b89d0 100644
--- a/openhexagon/distinfo
+++ b/openhexagon/distinfo
@@ -1,5 +1,21 @@
 $NetBSD$
 
+SHA1 (SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b.tar.gz) = e950b4d6dc4e9304baaefff7080203480304cf4a
+RMD160 (SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b.tar.gz) = 9c149e64d7e44c552afd24ee2766c70d5460e7d9
+SHA512 (SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b.tar.gz) = e1baa7cb26bc2215baf569b1aa1a4240b17310b2e1717a23f9e9978cf8bc4f72df64573aa474b17bbfe6896793c48a9facd0ed80e4d0f792631297dd548aaf81
+Size (SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b.tar.gz) = 8727 bytes
+SHA1 (SSVJsonCpp-a45c64c418dc0b1fab1eec52fa70b6a14308c635.tar.gz) = 58e7ba1d423bfc665d25af04867c73a6a64ca85c
+RMD160 (SSVJsonCpp-a45c64c418dc0b1fab1eec52fa70b6a14308c635.tar.gz) = facfac9b3ed42cf110b08efe7f7f8061b39a3819
+SHA512 (SSVJsonCpp-a45c64c418dc0b1fab1eec52fa70b6a14308c635.tar.gz) = ddda771a57d13d5bc4aa877b2c7c50092a00ddffeefcbe0aaf70b978451d29599b3d69ef387372a52c37244edbad9dbfcf3e4013c273873a39c590042881e2d9
+Size (SSVJsonCpp-a45c64c418dc0b1fab1eec52fa70b6a14308c635.tar.gz) = 39249 bytes
+SHA1 (SSVLuaWrapper-ca905bddae86358182cf85eff2d0220ccdd785d0.tar.gz) = 095585d544f693db3e59b30f08752de44eeef9db
+RMD160 (SSVLuaWrapper-ca905bddae86358182cf85eff2d0220ccdd785d0.tar.gz) = 8f55374360b2874ac2f85db45e52dee035549750
+SHA512 (SSVLuaWrapper-ca905bddae86358182cf85eff2d0220ccdd785d0.tar.gz) = 4bc3180232f73acaa2cc02ebd4bf86b1971ea4dfad04e22e7ea49b983e99e580720c2e6250969c8b7dfd76738a987074f9dd60c352dd38b3755007c83127760a
+Size (SSVLuaWrapper-ca905bddae86358182cf85eff2d0220ccdd785d0.tar.gz) = 20005 bytes
+SHA1 (SSVMenuSystem-03d32b26b2880a35d5daa1ad7ab6199a4d19c742.tar.gz) = 310c5ab4dfed8f5bb28493b53ccb5c3519559fd8
+RMD160 (SSVMenuSystem-03d32b26b2880a35d5daa1ad7ab6199a4d19c742.tar.gz) = df70f743baa65d8ce6c40df6c47e711d0466567f
+SHA512 (SSVMenuSystem-03d32b26b2880a35d5daa1ad7ab6199a4d19c742.tar.gz) = cde4b7694147d4045d89e46facefaf4d47e7263dc290643ff1498f7eae0f40c1bae5fa86f35f7981445d3c2f7fc22ecd8c65a6ec117dea0cd48fe5ca212a0ce2
+Size (SSVMenuSystem-03d32b26b2880a35d5daa1ad7ab6199a4d19c742.tar.gz) = 8911 bytes
 SHA1 (SSVOpenHexagon-2.0-preview.tar.gz) = 6bb86de3a194e816957d8cdd55fc423259c2c000
 RMD160 (SSVOpenHexagon-2.0-preview.tar.gz) = 7feefde13a795d687dbe09b96062e149851f5d5c
 SHA512 (SSVOpenHexagon-2.0-preview.tar.gz) = 0836b6b477227ee768ce43f411b065b1b25fff6ba16401d5ebde1443cde3f03e36d9bb1d11043e958a3f4a38e9af2f0b801aecd39b4edb31007c45c9ce074fdb
@@ -8,5 +24,20 @@ SHA1 (SSVOpenHexagonAssets-1d125de695be2e74c9f2ad3198e8b5b29911d010.tar.gz) = 10
 RMD160 (SSVOpenHexagonAssets-1d125de695be2e74c9f2ad3198e8b5b29911d010.tar.gz) = c4d0a272df325b2475a59fa12eeb3d1ab0828fd9
 SHA512 (SSVOpenHexagonAssets-1d125de695be2e74c9f2ad3198e8b5b29911d010.tar.gz) = 616491b2378031f0b1ca124ecfb54448ad19a13979927ac58a588b6aa7af1ac4059194cfc2ee78739352938b843f09df8564e6dcd82201e8ccadae3cd7523d2e
 Size (SSVOpenHexagonAssets-1d125de695be2e74c9f2ad3198e8b5b29911d010.tar.gz) = 43488512 bytes
-SHA1 (patch-CMakeLists.txt) = be352f48dd9285853e2cacf89e81df9baed6fca9
+SHA1 (SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71.tar.gz) = cbf1fa5b8acad236de089c07f2f6f4d45eabe9a8
+RMD160 (SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71.tar.gz) = 0049b678079b0d0126d57e3014318b1b8f16d26e
+SHA512 (SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71.tar.gz) = 3e2a1114274bb86cee4ec303a7b2be6f7fa24a3cbd74cf4bd9b5f24056fda40188892b11f955e078877fbfe92f4ea1a95e8350438d5921646e74fb1f1de98817
+Size (SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71.tar.gz) = 23834 bytes
+SHA1 (SSVUtils-c8190f843ab5bdfcff99e92aec7421c413c887e3.tar.gz) = 3e3ef609c586c4ec19f2832479a1118f15c0a827
+RMD160 (SSVUtils-c8190f843ab5bdfcff99e92aec7421c413c887e3.tar.gz) = 0179924721b01f7fec4fb38a5c44fc92805e33b1
+SHA512 (SSVUtils-c8190f843ab5bdfcff99e92aec7421c413c887e3.tar.gz) = 66d4d194045b52bf0f5c4ce76afac0d070237cb22829527078a8a50dd522e0fac307b5fd8e90c96347db30591ab08d2eaa0ea7b4ec72386ea5c4ccdbe06ae13d
+Size (SSVUtils-c8190f843ab5bdfcff99e92aec7421c413c887e3.tar.gz) = 49728 bytes
+SHA1 (SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1.tar.gz) = 31338e8e2f569d6a53267989ab6fca2449d52e82
+RMD160 (SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1.tar.gz) = 2c38b263bfd125772dd4c2799a5579a41e941b3f
+SHA512 (SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1.tar.gz) = bcc01f6dc70353100ca3cf184d16c65ebac0cc0b256aa31c0c9c8925b96eb6cd3dc79c685d4d250f83ca3656498d927da796c5fdd813518db3d15cf096a11f97
+Size (SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1.tar.gz) = 8298 bytes
+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
diff --git a/openhexagon/patches/patch-CMakeLists.txt b/openhexagon/patches/patch-CMakeLists.txt
deleted file mode 100644
index c307ab3abc..0000000000
--- a/openhexagon/patches/patch-CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD$
-
-find dependencies and install in relation to pkgsrc
-
---- CMakeLists.txt.orig	2013-07-13 23:37:47.000000000 +0000
-+++ 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-SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b_CMakeLists.txt b/openhexagon/patches/patch-SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b_CMakeLists.txt
new file mode 100644
index 0000000000..31707519d8
--- /dev/null
+++ b/openhexagon/patches/patch-SSVEntitySystem-8123beabe3bc8ffe91cb94e6ba061254f3bba18b_CMakeLists.txt
@@ -0,0 +1,16 @@
+$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
new file mode 100644
index 0000000000..dbe267d1b9
--- /dev/null
+++ b/openhexagon/patches/patch-SSVOpenHexagon-2.0-preview_CMakeLists.txt
@@ -0,0 +1,37 @@
+$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
new file mode 100644
index 0000000000..23e4705d71
--- /dev/null
+++ b/openhexagon/patches/patch-SSVStart-112229f184f5e4cf88c71fe67b4588806d290f71_CMakeLists.txt
@@ -0,0 +1,24 @@
+$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
new file mode 100644
index 0000000000..1f2ec9cd20
--- /dev/null
+++ b/openhexagon/patches/patch-SSVUtilsJson-95836250e3a9b65883f22991190e652a455121c1_CMakeLists.txt
@@ -0,0 +1,17 @@
+$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