diff --git a/games/fheroes2/Portfile b/games/fheroes2/Portfile index 992a680244e10..7374d4eeb721f 100644 --- a/games/fheroes2/Portfile +++ b/games/fheroes2/Portfile @@ -1,49 +1,54 @@ # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 -PortSystem 1.0 +PortSystem 1.0 -PortGroup github 1.0 -PortGroup cmake 1.1 +PortGroup github 1.0 +PortGroup cmake 1.1 -github.setup ihhub fheroes2 0.9.4 +github.setup ihhub fheroes2 0.9.6 -categories games -platforms darwin -maintainers {@oleg-derevenetz gmail.com:oleg.derevenetz} openmaintainer -license GPL-2 +categories games +platforms darwin +maintainers {@oleg-derevenetz gmail.com:oleg.derevenetz} openmaintainer +license GPL-2 -description Free implementation of Heroes of Might and Magic II game engine -long_description ${description} +description Free implementation of Heroes of Might and Magic II game engine +long_description \ + ${description} -homepage https://ihhub.github.io/fheroes2/ +homepage https://ihhub.github.io/fheroes2/ -checksums rmd160 bbbc2533b03b432e4c0fa990bd63718ce41797ea \ - sha256 d8c41db87cfa0fca42dae288c130dffd700a4c3d18051d9d9030069c9b8184bb \ - size 4530628 +checksums rmd160 a112a7467328bbfc855866a40b0a9a5b951aaa91 \ + sha256 955ca7e0effe342e0437bf3e28c9e1ec0da53b376f8f402e94330dba602aab4d \ + size 3179269 -depends_lib port:libiconv \ - port:libpng \ - port:zlib \ - port:libsdl2 \ - port:libsdl2_ttf \ - port:libsdl2_mixer \ - port:libsdl2_image +depends_build port:gettext -patchfiles patch-mapregion-ctor.diff \ - patch-missing-headers.diff \ - patch-readme-txt.diff +depends_lib port:libpng \ + port:zlib \ + port:libsdl2 \ + port:libsdl2_mixer \ + port:libsdl2_image -compiler.cxx_standard 2011 -compiler.thread_local_storage yes +patchfiles patch-readme-txt.diff + +compiler.cxx_standard \ + 2011 +compiler.thread_local_storage \ + yes + +post-build { + exec make -f Makefile -C ${worksrcpath}/files/lang +} post-destroot { - xinstall -d -m 0755 ${destroot}${prefix}/share/examples/fheroes2 + xinstall -d -m 0755 ${destroot}${prefix}/share/fheroes2/files/lang - xinstall -m 0644 ${worksrcpath}/LICENSE ${destroot}${prefix}/share/doc/fheroes2 - xinstall -m 0644 ${worksrcpath}/fheroes2.key ${destroot}${prefix}/share/examples/fheroes2 - xinstall -m 0755 ${worksrcpath}/script/demo/demo_unix.sh ${destroot}${prefix}/bin + xinstall -m 0644 ${worksrcpath}/LICENSE ${destroot}${prefix}/share/doc/fheroes2 + xinstall -m 0644 ${worksrcpath}/fheroes2.key ${destroot}${prefix}/share/fheroes2 + xinstall -m 0644 {*}[glob ${worksrcpath}/files/lang/*.mo] ${destroot}${prefix}/share/fheroes2/files/lang - move ${destroot}${prefix}/bin/demo_unix.sh ${destroot}${prefix}/bin/fheroes2-install-demo + copy ${destroot}${prefix}/share/doc/fheroes2/demo/demo_unix.sh ${destroot}${prefix}/bin/fheroes2-install-demo } notes " diff --git a/games/fheroes2/files/patch-mapregion-ctor.diff b/games/fheroes2/files/patch-mapregion-ctor.diff deleted file mode 100644 index bf00027b5b59e..0000000000000 --- a/games/fheroes2/files/patch-mapregion-ctor.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- src/fheroes2/world/world_regions.h -+++ src/fheroes2/world/world_regions.h -@@ -55,7 +55,7 @@ public: - std::vector _nodes; - size_t _lastProcessedNode = 0; - -- MapRegion() = default; -+ MapRegion() {} - - MapRegion( int regionIndex, int mapIndex, bool water, size_t expectedSize ); diff --git a/games/fheroes2/files/patch-missing-headers.diff b/games/fheroes2/files/patch-missing-headers.diff deleted file mode 100644 index 7696102602dc3..0000000000000 --- a/games/fheroes2/files/patch-missing-headers.diff +++ /dev/null @@ -1,142 +0,0 @@ ---- src/engine/image.cpp -+++ src/engine/image.cpp -@@ -23,6 +23,7 @@ - - #include - #include -+#include - #include - - namespace ---- src/engine/localevent.cpp -+++ src/engine/localevent.cpp -@@ -21,6 +21,7 @@ - ***************************************************************************/ - - #include -+#include - - #include "localevent.h" - #include "audio_mixer.h" ---- src/engine/tools.cpp -+++ src/engine/tools.cpp -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - #include - #include - #include ---- src/fheroes2/agg/bin_info.cpp -+++ src/fheroes2/agg/bin_info.cpp -@@ -25,6 +25,7 @@ - #include "monster.h" - - #include -+#include - #include - - namespace Bin_Info ---- src/fheroes2/ai/normal/ai_normal_battle.cpp -+++ src/fheroes2/ai/normal/ai_normal_battle.cpp -@@ -36,6 +36,7 @@ - #include "speed.h" - - #include -+#include - - using namespace Battle; - ---- src/fheroes2/battle/battle_board.cpp -+++ src/fheroes2/battle/battle_board.cpp -@@ -22,6 +22,7 @@ - - #include - #include -+#include - #include - #include - #include ---- src/fheroes2/battle/battle_interface.cpp -+++ src/fheroes2/battle/battle_interface.cpp -@@ -21,6 +21,7 @@ - ***************************************************************************/ - - #include -+#include - - #include "agg.h" - #include "agg_image.h" ---- src/fheroes2/dialog/dialog_quickinfo.cpp -+++ src/fheroes2/dialog/dialog_quickinfo.cpp -@@ -20,6 +20,8 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -+#include -+ - #include "agg_image.h" - #include "army.h" - #include "castle.h" ---- src/fheroes2/game/game.cpp -+++ src/fheroes2/game/game.cpp -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - - #include "agg.h" ---- src/fheroes2/gui/ui_tool.cpp -+++ src/fheroes2/gui/ui_tool.cpp -@@ -25,6 +25,8 @@ - #include "text.h" - - #include -+#include -+#include - #include - #include - #include ---- src/fheroes2/heroes/heroes_indicator.cpp -+++ src/fheroes2/heroes/heroes_indicator.cpp -@@ -21,6 +21,7 @@ - ***************************************************************************/ - - #include -+#include - - #include "agg_image.h" - #include "dialog.h" ---- src/fheroes2/maps/maps.cpp -+++ src/fheroes2/maps/maps.cpp -@@ -21,6 +21,7 @@ - ***************************************************************************/ - - #include -+#include - #include - - #include "ai.h" ---- src/fheroes2/maps/maps_tiles.cpp -+++ src/fheroes2/maps/maps_tiles.cpp -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - ---- src/fheroes2/world/world_pathfinding.cpp -+++ src/fheroes2/world/world_pathfinding.cpp -@@ -18,6 +18,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -+#include - #include - - #include "ground.h" diff --git a/games/fheroes2/files/patch-readme-txt.diff b/games/fheroes2/files/patch-readme-txt.diff index 8966705e9ba5e..aa04aeb95c42a 100644 --- a/games/fheroes2/files/patch-readme-txt.diff +++ b/games/fheroes2/files/patch-readme-txt.diff @@ -1,25 +1,22 @@ ---- doc/README.txt.orig 2021-06-11 01:14:58.000000000 +0300 -+++ doc/README.txt 2021-06-11 01:30:03.000000000 +0300 -@@ -6,15 +6,16 @@ - download a free demo version of the game with help of our scripts. +--- docs/README.txt.orig 2021-06-11 01:14:58.000000000 +0300 ++++ docs/README.txt 2021-06-11 01:30:03.000000000 +0300 +@@ -10,13 +10,14 @@ + Magic II game to be able to play. - --- Installation and Requirements --- --You are required to have at a demo or full version of Heroes of Might and Magic II --game to be able to play it. -+You will need to have a demo version or the full version of Heroes of Might and -+Magic II game to be able to play. + If you do not have the original Heroes of Might and Magic II game, please run +-'demo_windows.bat' file for Windows or 'demo_unix.sh' for Linux OS and macOS. +-This script will download and install all the necessary files from the demo +-version of the original Heroes of Might and Magic II game. ++'fheroes2-install-demo' script. This script will download and install all the ++necessary files from the demo version of the original Heroes of Might and Magic II ++game. - If you do not have the original Heroes of Might and Magic II game please run --'demo_windows.bat' file on Windows or 'demo_unix.sh' for Linux OS and MacOS. --This script will download and install all needed files. -+'fheroes2-install-demo' script. This script will download and install all needed -+files. - --If you have a legally purchased game, you need to copy all files which belong to --fheroes2 into a folder with the original game. -+If you have a legally purchased game, you need to copy all the files belonging to -+the original game to the '.fheroes2' subdirectory of your home directory (it will -+be created when you start the game for a first time). + If you have a legally purchased copy of the original game, you will need to +-copy all files belonging to the original game to the fheroes2 installation +-directory. ++copy all files belonging to the original game to the '.fheroes2' subdirectory ++of your home directory (it will be created when you start the game for a first ++time). --- License --- This project is under GNU General Public License v2.0. Please refer to file