aboutsummaryrefslogtreecommitdiff
path: root/games/wyrmgus
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2021-01-12 21:40:23 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2021-01-12 21:40:23 +0000
commit4943af65a0b631f81d78276384a248d9be51c8c8 (patch)
tree37932357da69ec429941ebcbcd992eb425bd5ac8 /games/wyrmgus
parent98d4bbecb715822626be4a5cdff851271f4d8dd4 (diff)
downloadports-4943af65a0b631f81d78276384a248d9be51c8c8.tar.gz
ports-4943af65a0b631f81d78276384a248d9be51c8c8.zip
- Update to 4.1.1
Notes
Notes: svn path=/head/; revision=561387
Diffstat (limited to 'games/wyrmgus')
-rw-r--r--games/wyrmgus/Makefile27
-rw-r--r--games/wyrmgus/distinfo6
-rw-r--r--games/wyrmgus/files/patch-src_database_data__type.h33
3 files changed, 45 insertions, 21 deletions
diff --git a/games/wyrmgus/Makefile b/games/wyrmgus/Makefile
index c3d7e512991d..6f8f9f69baa1 100644
--- a/games/wyrmgus/Makefile
+++ b/games/wyrmgus/Makefile
@@ -2,9 +2,8 @@
# $FreeBSD$
PORTNAME= wyrmgus
-PORTVERSION= 3.5.4
+PORTVERSION= 4.1.1
DISTVERSIONPREFIX= v
-PORTREVISION= 4
CATEGORIES= games devel
MAINTAINER= amdmi3@FreeBSD.org
@@ -13,25 +12,23 @@ COMMENT= Modified Stratagus engine for Wyrmsun
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
-LIB_DEPENDS= libpng.so:graphics/png \
- libtolua++-${LUA_VER}.so:lang/tolua++ \
- libogg.so:audio/libogg \
- liboaml.so:audio/oaml
+LIB_DEPENDS= libtolua++-${LUA_VER}.so:lang/tolua++
BUILD_DEPENDS= ${LOCALBASE}/include/boost/tokenizer.hpp:devel/boost-libs
USE_GITHUB= yes
GH_ACCOUNT= Andrettin
GH_PROJECT= Wyrmgus
-USES= cmake compiler:c++11-lib lua:51 pkgconfig sdl sqlite
-USE_SDL= sdl
+USES= cmake compiler:c++17-lang lua:51 pkgconfig sdl sqlite qt:5 xorg
+USE_QT= core gui widgets multimedia location declarative network \
+ qmake_build buildtools_build
+USE_XORG= x11
+USE_SDL= sdl mixer
CMAKE_ARGS= -DGAMEDIR:STRING="bin" \
-DTOLUA++_APP:STRING="tolua++-${LUA_VER}" \
-DTOLUA++_INCLUDE_DIR:STRING="${LUA_INCDIR}" \
-DTOLUA++_LIBRARY:STRING="${LUA_LIBDIR}/libtolua++.so" \
- -DENABLE_USEGAMEDIR:BOOL=OFF \
- -DWITH_MIKMOD:BOOL=OFF \
- -DWITH_THEORA:BOOL=OFF
+ -DENABLE_USEGAMEDIR:BOOL=OFF
PORTDOCS= *
@@ -46,13 +43,7 @@ OPENGL_USE= GL=gl,glu
OPENGL_CMAKE_ON= -DWITH_RENDERER="OpenGL"
OPENGL_CMAKE_OFF= -DWITH_RENDERER="NativeSDL"
-post-patch:
-# fix debug build
- @${REINPLACE_CMD} -e 's|OAML_LIBRARIES_SHARED_DEBUG|OAML_LIBRARIES_SHARED|' ${WRKSRC}/CMakeLists.txt
- @${REINPLACE_CMD} -e '/stratagus-dbg/ d' ${WRKSRC}/CMakeLists.txt
-
-do-install:
- ${INSTALL_PROGRAM} ${CONFIGURE_WRKSRC}/stratagus ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+post-install:
${INSTALL_DATA} ${WRKSRC}/src/win32/wyrmsun.ico ${STAGEDIR}${PREFIX}/share/pixmaps/
.include <bsd.port.mk>
diff --git a/games/wyrmgus/distinfo b/games/wyrmgus/distinfo
index f118191d395d..e87b36a99296 100644
--- a/games/wyrmgus/distinfo
+++ b/games/wyrmgus/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1547559385
-SHA256 (Andrettin-Wyrmgus-v3.5.4_GH0.tar.gz) = 34218e69d758a0bf75e2ba1ab8b3557fcb7304922fc88c2d5e5b0f5e5ac8f187
-SIZE (Andrettin-Wyrmgus-v3.5.4_GH0.tar.gz) = 1490425
+TIMESTAMP = 1610282165
+SHA256 (Andrettin-Wyrmgus-v4.1.1_GH0.tar.gz) = 97950652a6b9ab2f94d7b794e0ef1f5932f0479682dac30d7d10108a1f1dd990
+SIZE (Andrettin-Wyrmgus-v4.1.1_GH0.tar.gz) = 1536309
diff --git a/games/wyrmgus/files/patch-src_database_data__type.h b/games/wyrmgus/files/patch-src_database_data__type.h
new file mode 100644
index 000000000000..f37badb3683f
--- /dev/null
+++ b/games/wyrmgus/files/patch-src_database_data__type.h
@@ -0,0 +1,33 @@
+diff --git a/src/database/data_type.h b/src/database/data_type.h
+index 1e9aa40ce..645cb217e 100644
+--- src/database/data_type.h
++++ src/database/data_type.h
+@@ -52,6 +52,15 @@ template <typename T>
+ class data_type : public data_type_base
+ {
+ public:
++ data_type() {
++ // this check is required for class_initialized variable and,
++ // correspondingly, data_type::initialize_class() call not to
++ // be initialized away
++ if (!class_initialized) {
++ throw std::runtime_error("Never reached");
++ }
++ }
++
+ static T *get(const std::string &identifier)
+ {
+ if (identifier == "none") {
+@@ -308,12 +317,7 @@ class data_type : public data_type_base
+ static inline std::map<std::string, qunique_ptr<T>> instances_by_identifier;
+ static inline std::map<std::string, T *> instances_by_alias;
+ static inline data_module_map<std::vector<sml_data>> sml_data_to_process;
+-#ifdef __GNUC__
+- //the "used" attribute is needed under GCC, or else this variable will be optimized away (even in debug builds)
+- static inline bool class_initialized [[gnu::used]] = data_type::initialize_class();
+-#else
+ static inline bool class_initialized = data_type::initialize_class();
+-#endif
+ };
+
+ }