aboutsummaryrefslogtreecommitdiff
path: root/games/wyrmsun
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2019-01-05 21:05:15 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2019-01-05 21:05:15 +0000
commitf15f79ed01a80b4b0f06e13c2c274dfad1ee0bfb (patch)
treebf5c78616d71779381b9e72a41c8be06a7104679 /games/wyrmsun
parent15e5991832a8381eab5d7480c3346af4df0ee27c (diff)
downloadports-f15f79ed01a80b4b0f06e13c2c274dfad1ee0bfb.tar.gz
ports-f15f79ed01a80b4b0f06e13c2c274dfad1ee0bfb.zip
Notes
Diffstat (limited to 'games/wyrmsun')
-rw-r--r--games/wyrmsun/Makefile26
-rw-r--r--games/wyrmsun/distinfo6
-rw-r--r--games/wyrmsun/files/patch-cmake68
-rw-r--r--games/wyrmsun/files/patch-scripts_tilesets_cave.lua10
-rw-r--r--games/wyrmsun/files/patch-scripts_tilesets_dungeon.lua10
-rw-r--r--games/wyrmsun/files/wyrmsun.in3
-rw-r--r--games/wyrmsun/pkg-plist6
7 files changed, 100 insertions, 29 deletions
diff --git a/games/wyrmsun/Makefile b/games/wyrmsun/Makefile
index 74583583e228..ab17f06a8c98 100644
--- a/games/wyrmsun/Makefile
+++ b/games/wyrmsun/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= wyrmsun
-PORTVERSION= 3.4.1
+PORTVERSION= 3.5.1
DISTVERSIONPREFIX= v
CATEGORIES= games
@@ -18,33 +18,13 @@ USE_GITHUB= yes
GH_ACCOUNT= Andrettin
GH_PROJECT= Wyrmsun
-NO_BUILD= yes
+USES= cmake gnome
+INSTALLS_ICONS= yes
NO_ARCH= yes
-PLIST_FILES= bin/${PORTNAME} \
- share/applications/${PORTNAME}.desktop \
- share/appdata/${PORTNAME}.appdata.xml
PORTDATA= *
PORTDOCS= *
-SUB_FILES= ${PORTNAME}
-
OPTIONS_DEFINE= DOCS
-post-patch:
- @${REINPLACE_CMD} -e 's|wyrmgus -d /usr/share/wyrmsun|${PORTNAME}|' \
- ${WRKSRC}/linux/wyrmsun.desktop
-
-do-install:
- cd ${WRKSRC} && ${COPYTREE_SHARE} "graphics maps music oaml.defs \
- scripts sounds translations" ${STAGEDIR}${DATADIR}/
- ${INSTALL_DATA} ${WRKSRC}/linux/wyrmsun.desktop ${STAGEDIR}${PREFIX}/share/applications
- @${MKDIR} ${STAGEDIR}${PREFIX}/share/appdata
- ${INSTALL_DATA} ${WRKSRC}/linux/wyrmsun.appdata.xml ${STAGEDIR}${PREFIX}/share/appdata
- ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
-
-do-install-DOCS-on:
- @${MKDIR} ${STAGEDIR}${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/readme.txt ${STAGEDIR}${DOCSDIR}
-
.include <bsd.port.mk>
diff --git a/games/wyrmsun/distinfo b/games/wyrmsun/distinfo
index ed4a990669c6..34cc22ad5670 100644
--- a/games/wyrmsun/distinfo
+++ b/games/wyrmsun/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1541690210
-SHA256 (Andrettin-Wyrmsun-v3.4.1_GH0.tar.gz) = 2616f0dbc30b3473db9d4e9bbfb65f69fda5a4f835e6e3fba8f381e796732185
-SIZE (Andrettin-Wyrmsun-v3.4.1_GH0.tar.gz) = 272461186
+TIMESTAMP = 1545918235
+SHA256 (Andrettin-Wyrmsun-v3.5.1_GH0.tar.gz) = a2f5c0521a8d6fa0b4643478946b01957357f5c99a6b7ab5d629e519aa02f4ac
+SIZE (Andrettin-Wyrmsun-v3.5.1_GH0.tar.gz) = 273083934
diff --git a/games/wyrmsun/files/patch-cmake b/games/wyrmsun/files/patch-cmake
new file mode 100644
index 000000000000..db90dc94c445
--- /dev/null
+++ b/games/wyrmsun/files/patch-cmake
@@ -0,0 +1,68 @@
+commit 15caa201694821770e1355f989a716afd3ea650b
+Author: Dmitry Marakasov <amdmi3@amdmi3.ru>
+Date: Wed Dec 26 22:14:17 2018 +0300
+
+ Add CMake-based installation support
+
+ - Provide script to run wyrmsun from command line
+ - Fix hardcoded path to /usr/share/wyrmsun
+ - Install data, documentation, script, desktop and appdata files as well
+ as icons into designated locations
+
+diff --git CMakeLists.txt CMakeLists.txt
+new file mode 100644
+index 00000000..91ef748a
+--- /dev/null
++++ CMakeLists.txt
+@@ -0,0 +1,30 @@
++project(wyrmsun)
++cmake_minimum_required(VERSION 3.0)
++
++set(DATADIR share/wyrmsun CACHE STRING "Where to install Wyrmsun data files")
++set(DOCSDIR share/doc/wyrmsun CACHE STRING "Where to install Wyrmsun documentation")
++
++configure_file(linux/wyrmsun.sh.in linux/wyrmsun.sh @ONLY)
++
++install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/linux/wyrmsun.sh DESTINATION bin RENAME wyrmsun)
++install(FILES linux/wyrmsun.desktop DESTINATION share/applications)
++install(FILES linux/wyrmsun.appdata.xml DESTINATION share/appdata)
++install(FILES graphics/ui/icons/wyrmsun_icon_32.png DESTINATION share/icons/hicolor/32x32/apps RENAME wyrmsun.png)
++install(FILES graphics/ui/icons/wyrmsun_icon_64.png DESTINATION share/icons/hicolor/64x64/apps RENAME wyrmsun.png)
++install(FILES graphics/ui/icons/wyrmsun_icon_128.png DESTINATION share/icons/hicolor/128x128/apps RENAME wyrmsun.png)
++
++install(FILES oaml.defs DESTINATION ${DATADIR})
++
++install(DIRECTORY
++ data
++ graphics
++ maps
++ music
++ scripts
++ sounds
++ translations
++ DESTINATION ${DATADIR}
++)
++
++install(FILES readme.txt DESTINATION ${DOCSDIR})
++install(DIRECTORY documents DESTINATION ${DOCSDIR})
+diff --git linux/wyrmsun.desktop linux/wyrmsun.desktop
+index b779fa63..cad9ea6b 100644
+--- linux/wyrmsun.desktop
++++ linux/wyrmsun.desktop
+@@ -1,6 +1,6 @@
+ [Desktop Entry]
+ Categories=Game;StrategyGame;
+-Exec=wyrmgus -d /usr/share/wyrmsun
++Exec=wyrmsun
+ GenericName=Mythologic realtime-strategy game
+ GenericName[de]=Mythologisches Echtzeitstrategiespiel
+ Icon=wyrmsun
+diff --git linux/wyrmsun.sh.in linux/wyrmsun.sh.in
+new file mode 100644
+index 00000000..6bcb0675
+--- /dev/null
++++ linux/wyrmsun.sh.in
+@@ -0,0 +1,3 @@
++#!/bin/sh
++
++exec wyrmgus -d @CMAKE_INSTALL_PREFIX@/@DATADIR@ "$@"
diff --git a/games/wyrmsun/files/patch-scripts_tilesets_cave.lua b/games/wyrmsun/files/patch-scripts_tilesets_cave.lua
new file mode 100644
index 000000000000..00ec19c52aa6
--- /dev/null
+++ b/games/wyrmsun/files/patch-scripts_tilesets_cave.lua
@@ -0,0 +1,10 @@
+--- scripts/tilesets/cave.lua.orig 2018-12-25 12:18:32 UTC
++++ scripts/tilesets/cave.lua
+@@ -165,4 +165,6 @@ BuildTilesetTables()
+
+ Load("scripts/scripts.lua")
+ GameSettings.Inside = true
+-SetTimeOfDaySchedule("")
++if (LoadedGame == false) then
++ SetTimeOfDaySchedule("")
++end
diff --git a/games/wyrmsun/files/patch-scripts_tilesets_dungeon.lua b/games/wyrmsun/files/patch-scripts_tilesets_dungeon.lua
new file mode 100644
index 000000000000..9daea28c40a2
--- /dev/null
+++ b/games/wyrmsun/files/patch-scripts_tilesets_dungeon.lua
@@ -0,0 +1,10 @@
+--- scripts/tilesets/dungeon.lua.orig 2018-12-25 12:18:32 UTC
++++ scripts/tilesets/dungeon.lua
+@@ -216,4 +216,6 @@ BuildTilesetTables()
+
+ Load("scripts/scripts.lua")
+ GameSettings.Inside = true
+-SetTimeOfDaySchedule("")
++if (LoadedGame == false) then
++ SetTimeOfDaySchedule("")
++end
diff --git a/games/wyrmsun/files/wyrmsun.in b/games/wyrmsun/files/wyrmsun.in
deleted file mode 100644
index 2dc886ee3d32..000000000000
--- a/games/wyrmsun/files/wyrmsun.in
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-exec "%%LOCALBASE%%/bin/wyrmgus" -d "%%DATADIR%%" "$@"
diff --git a/games/wyrmsun/pkg-plist b/games/wyrmsun/pkg-plist
new file mode 100644
index 000000000000..69a6e0a1fef5
--- /dev/null
+++ b/games/wyrmsun/pkg-plist
@@ -0,0 +1,6 @@
+bin/wyrmsun
+share/appdata/wyrmsun.appdata.xml
+share/applications/wyrmsun.desktop
+share/icons/hicolor/128x128/apps/wyrmsun.png
+share/icons/hicolor/32x32/apps/wyrmsun.png
+share/icons/hicolor/64x64/apps/wyrmsun.png