aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2021-12-20 17:41:10 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2021-12-21 19:57:54 +0000
commite3b57880cd79ef4483f3b83fe5d4e930799e7986 (patch)
tree8d9ab1c46bf5de0e515c62c50e356a42ee7d2997 /games
parent29641b02a9c855ba6a08b1e91bb9a5b7155ba7f4 (diff)
downloadports-e3b57880cd79ef4483f3b83fe5d4e930799e7986.tar.gz
ports-e3b57880cd79ef4483f3b83fe5d4e930799e7986.zip
games/stratagus: update to 3.1.2
PR: 260562 Submitted by: agh@riseup.net
Diffstat (limited to 'games')
-rw-r--r--games/stratagus/Makefile40
-rw-r--r--games/stratagus/distinfo6
-rw-r--r--games/stratagus/files/patch-CMakeLists.txt56
-rw-r--r--games/stratagus/files/patch-gameheaders_stratagus-tinyfiledialogs.h13
-rw-r--r--games/stratagus/pkg-descr5
-rw-r--r--games/stratagus/pkg-message13
-rw-r--r--games/stratagus/pkg-plist4
7 files changed, 90 insertions, 47 deletions
diff --git a/games/stratagus/Makefile b/games/stratagus/Makefile
index 7908620c9c26..1122810f8a3f 100644
--- a/games/stratagus/Makefile
+++ b/games/stratagus/Makefile
@@ -1,9 +1,8 @@
# Created by: Travis Poppe <tlp@liquidx.org>
PORTNAME= stratagus
-PORTVERSION= 2.4.2
+PORTVERSION= 3.1.2
DISTVERSIONPREFIX= v
-PORTREVISION= 3
CATEGORIES= games
MAINTAINER= amdmi3@FreeBSD.org
@@ -14,26 +13,24 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libpng.so:graphics/png \
libtolua++-${LUA_VER}.so:lang/tolua++
+RUN_DEPENDS= zenity:x11/zenity
USE_GITHUB= yes
GH_ACCOUNT= Wargus
-USES= cmake compiler:c++11-lang gl lua:51 pkgconfig sdl sqlite python:run
-USE_GL= gl glu
-USE_SDL= sdl
+USES= cmake compiler:c++17-lang lua:51 pkgconfig sdl
+USE_SDL= sdl2 mixer2 image2
CMAKE_ARGS= -DGAMEDIR:STRING="bin" \
-DTOLUA++_APP:STRING="tolua++-${LUA_VER}" \
-DTOLUA++_INCLUDE_DIR:STRING="${LUA_INCDIR}" \
-DTOLUA++_LIBRARY:STRING="${LUA_LIBDIR}/libtolua++.so"
CMAKE_ON= ENABLE_DEV
+CMAKE_OFF= WITH_STACKTRACE # not in ports
PORTDOCS= *
-OPTIONS_DEFINE= MIKMOD MNG THEORA VORBIS X11 FLUIDSYNTH DOCS
-OPTIONS_DEFAULT=MIKMOD MNG THEORA VORBIS X11 FLUIDSYNTH
-
-MIKMOD_LIB_DEPENDS= libmikmod.so:audio/libmikmod
-MIKMOD_CMAKE_BOOL= WITH_MIKMOD
+OPTIONS_DEFINE= MNG THEORA VORBIS DOCS
+OPTIONS_DEFAULT=MNG THEORA VORBIS
MNG_DESC= MNG image library support
MNG_LIB_DEPENDS= libmng.so:graphics/libmng
@@ -46,31 +43,10 @@ VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis \
libogg.so:audio/libogg
VORBIS_CMAKE_BOOL= WITH_OGGVORBIS
-X11_DESC= X11 clipboard pasting support
-X11_USES= xorg
-X11_USE= XORG=x11
-X11_CMAKE_BOOL= WITH_X11
-
-FLUIDSYNTH_LIB_DEPENDS= libfluidsynth.so:audio/fluidsynth
-FLUIDSYNTH_CMAKE_BOOL= WITH_FLUIDSYNTH
-
-post-patch:
- @${REINPLACE_CMD} -e 's|"python"|"${PYTHON_CMD}"|' \
- ${WRKSRC}/gameheaders/stratagus-tinyfiledialogs.h
-
-post-install:
- ${INSTALL_DATA} ${WRKSRC}/doc/stratagus.6 ${STAGEDIR}${MAN6PREFIX}/man/man6
-
-post-install-DOCS-on:
- @cd ${WRKSRC}/doc && ${COPYTREE_SHARE} "[a-z]*.html *.txt graphics scripts" \
- ${STAGEDIR}${DOCSDIR}
-
.include <bsd.port.pre.mk>
.if ${CHOSEN_COMPILER_TYPE} == clang
-CXXFLAGS+= -Wno-c++11-narrowing
-.else
-CXXFLAGS+= -Wno-error
+CXXFLAGS+= -Wno-register # incompatible code included from lcms
.endif
.include <bsd.port.post.mk>
diff --git a/games/stratagus/distinfo b/games/stratagus/distinfo
index 037e96ccb24b..f4b2a048d3a9 100644
--- a/games/stratagus/distinfo
+++ b/games/stratagus/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1538587339
-SHA256 (Wargus-stratagus-v2.4.2_GH0.tar.gz) = 366be8255c7e7cb694661b5db08b81908885a8ff89007d6e24769bf619235b89
-SIZE (Wargus-stratagus-v2.4.2_GH0.tar.gz) = 1114717
+TIMESTAMP = 1640017839
+SHA256 (Wargus-stratagus-v3.1.2_GH0.tar.gz) = e88dbf5e9136329d5fbba403224465633c0b06c307dd1abef4073d58f34464e5
+SIZE (Wargus-stratagus-v3.1.2_GH0.tar.gz) = 1190124
diff --git a/games/stratagus/files/patch-CMakeLists.txt b/games/stratagus/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..19cda636d2ba
--- /dev/null
+++ b/games/stratagus/files/patch-CMakeLists.txt
@@ -0,0 +1,56 @@
+--- CMakeLists.txt.orig 2021-07-17 05:26:07 UTC
++++ CMakeLists.txt
+@@ -814,15 +814,7 @@ endif()
+
+ # Stratagus needs to have char by default signed
+ # No idea how to tell this to other compilers
+-if(CMAKE_COMPILER_IS_GNUCXX)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char -Werror")
+-endif()
+-if(CMAKE_COMPILER_IS_GNUC)
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char")
+-endif()
+-if(WIN32 AND MSVC)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+-endif()
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char")
+
+ if(CMAKE_BUILD_TYPE STREQUAL "Profile")
+ find_package(coz-profiler)
+@@ -1195,22 +1187,20 @@ endif()
+ install(TARGETS stratagus DESTINATION ${GAMEDIR})
+ install(TARGETS png2stratagus DESTINATION ${BINDIR})
+
+-if(ENABLE_DOC AND DOXYGEN_FOUND)
+- install(FILES doc/stratagus.6 DESTINATION ${MANDIR})
+- install(FILES
+- doc/development.html
+- doc/faq.html
+- doc/gpl.html
+- doc/guichan-copyright.txt
+- doc/changelog.html
+- doc/index.html
+- doc/install.html
+- doc/media.html
+- doc/README-SDL.txt
+- DESTINATION share/doc/stratagus
+- )
+- install(DIRECTORY doc/graphics doc/scripts ${CMAKE_CURRENT_BINARY_DIR}/doxygen DESTINATION ${DOCDIR})
+-endif(ENABLE_DOC AND DOXYGEN_FOUND)
++install(FILES doc/stratagus.6 DESTINATION ${MANDIR})
++install(FILES
++ doc/development.html
++ doc/faq.html
++ doc/gpl.html
++ doc/guichan-copyright.txt
++ doc/changelog.html
++ doc/index.html
++ doc/install.html
++ doc/media.html
++ doc/README-SDL.txt
++ DESTINATION share/doc/stratagus
++)
++install(DIRECTORY doc/graphics doc/scripts DESTINATION ${DOCDIR})
+
+ if(ENABLE_DEV)
+ install(FILES ${gameheaders_HDRS} DESTINATION ${STRATAGUS_HEADERS})
diff --git a/games/stratagus/files/patch-gameheaders_stratagus-tinyfiledialogs.h b/games/stratagus/files/patch-gameheaders_stratagus-tinyfiledialogs.h
new file mode 100644
index 000000000000..a70acf33aa2d
--- /dev/null
+++ b/games/stratagus/files/patch-gameheaders_stratagus-tinyfiledialogs.h
@@ -0,0 +1,13 @@
+We don't currently have osascript in ports, but for the case when
+we actually do, make sure it's not suddenly called and prefer zenity.
+
+--- gameheaders/stratagus-tinyfiledialogs.h.orig 2021-07-17 05:26:07 UTC
++++ gameheaders/stratagus-tinyfiledialogs.h
+@@ -2350,6 +2350,7 @@ static int gdialogPresent ( )
+
+ static int osascriptPresent ( )
+ {
++ return 0;
+ static int lOsascriptPresent = -1 ;
+ if ( lOsascriptPresent < 0 )
+ {
diff --git a/games/stratagus/pkg-descr b/games/stratagus/pkg-descr
index 8a86c3e7d9af..f1f8faaa46b2 100644
--- a/games/stratagus/pkg-descr
+++ b/games/stratagus/pkg-descr
@@ -2,6 +2,7 @@ Stratagus is a free cross-platform real-time strategy gaming engine. It
includes support for playing over the internet/LAN, or playing a computer
opponent. The engine is configurable and can be used to create games with
a wide-range of features specific to your needs. See the data sets page
-for a list of current games using the stratagus engine.
+for a list of current games using the Stratagus engine.
-WWW: https://launchpad.net/stratagus
+WWW: https://stratagus.com/stratagus.html
+WWW: https://github.com/Wargus/stratagus
diff --git a/games/stratagus/pkg-message b/games/stratagus/pkg-message
index 24330fad15cf..feba75931ffd 100644
--- a/games/stratagus/pkg-message
+++ b/games/stratagus/pkg-message
@@ -1,16 +1,15 @@
[
{ type: install
message: <<EOM
-NOTE: This is only the engine. If you wish to play a game that uses the
-Stratagus engine, you must manually download the Stratagus game data.
+NOTE: This is the engine only. If you would like to play a game that uses the
+Stratagus engine, you must install supporting games of the engine.
-You can use the 'games/wargus' port to extract data from a legal copy of
-Warcraft 2 (original DOS version required, won't work with the battle.net
-edition).
+wartool, available in 'games/wargus' allows the user to extract game data
+from legitimate copies of Warcraft 2, for use by Stratagus.
-For more information, please take a look at the following URL:
+For more information, visit the following URL:
-http://stratagus.sourceforge.net/games.shtml
+https://stratagus.com/
Enjoy!
EOM
diff --git a/games/stratagus/pkg-plist b/games/stratagus/pkg-plist
index 324b896e8ecf..9a88bb70631b 100644
--- a/games/stratagus/pkg-plist
+++ b/games/stratagus/pkg-plist
@@ -1,9 +1,7 @@
bin/png2stratagus
-bin/metaserver
bin/stratagus
@comment include/stratagus-game-installer.nsi
include/stratagus-game-launcher.h
include/stratagus-gameutils.h
include/stratagus-tinyfiledialogs.h
-@comment include/stratagus-maemo-extract.h
-man/man6/stratagus.6.gz
+share/man/man6/stratagus.6.gz