diff --git a/games-strategy/vcmi/patches/vcmi-1.2.0.patchset b/games-strategy/vcmi/patches/vcmi-1.2.0.patchset deleted file mode 100644 index 04647a3d6..000000000 --- a/games-strategy/vcmi/patches/vcmi-1.2.0.patchset +++ /dev/null @@ -1,95 +0,0 @@ -From c8826a02d817f00325ee1b4a075823d4ab165a7e Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Sun, 26 Mar 2023 18:42:08 +0200 -Subject: Haiku patch - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 84fe7a7..be08c7d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -341,6 +341,9 @@ if(NOT WIN32 AND NOT APPLE_IOS) - if(HAVE_RT_LIB) - set(SYSTEM_LIBS ${SYSTEM_LIBS} rt) - endif() -+ if(HAIKU) -+ set(SYSTEM_LIBS ${SYSTEM_LIBS} network) -+ endif() - endif() - - if(ENABLE_LUA) -diff --git a/Global.h b/Global.h -index afb2994..9a69cbe 100644 ---- a/Global.h -+++ b/Global.h -@@ -41,6 +41,10 @@ static_assert(sizeof(bool) == 1, "Bool needs to be 1 byte in size."); - # define VCMI_UNIX - # define VCMI_XDG - # define VCMI_FREEBSD -+#elif defined(__HAIKU__) -+# define VCMI_UNIX -+# define VCMI_XDG -+# define VCMI_HAIKU - #elif defined(__GNU__) || defined(__gnu_hurd__) || (defined(__MACH__) && !defined(__APPLE__)) - # define VCMI_UNIX - # define VCMI_XDG -diff --git a/lib/CThreadHelper.cpp b/lib/CThreadHelper.cpp -index 240aa6c..e98a422 100644 ---- a/lib/CThreadHelper.cpp -+++ b/lib/CThreadHelper.cpp -@@ -12,6 +12,8 @@ - - #ifdef VCMI_WINDOWS - #include -+#elif defined(VCMI_HAIKU) -+ #include - #elif !defined(VCMI_APPLE) && !defined(VCMI_FREEBSD) && !defined(VCMI_HURD) - #include - #endif -@@ -89,6 +91,8 @@ void setThreadName(const std::string &name) - prctl(PR_SET_NAME, name.c_str(), 0, 0, 0); - #elif defined(VCMI_APPLE) - pthread_setname_np(name.c_str()); -+#elif defined(VCMI_HAIKU) -+ rename_thread(find_thread(NULL), name.c_str()); - #endif - } - -diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt -index 9eabe58..fd69809 100644 ---- a/server/CMakeLists.txt -+++ b/server/CMakeLists.txt -@@ -33,7 +33,7 @@ else() - set(server_LIBS vcmi) - endif() - --if(CMAKE_SYSTEM_NAME MATCHES FreeBSD) -+if(CMAKE_SYSTEM_NAME MATCHES FreeBSD OR HAIKU) - set(server_LIBS execinfo ${server_LIBS}) - endif() - target_link_libraries(vcmiserver PRIVATE ${server_LIBS} minizip::minizip) -diff --git a/vcmibuilder b/vcmibuilder -index 027a7a7..996277a 100755 ---- a/vcmibuilder -+++ b/vcmibuilder -@@ -52,7 +52,7 @@ then - echo " --convertMP3 " "Convert all mp3 files into ogg/vorbis" - echo " " "Requires ffmpeg or avconv" - echo -- echo " --dest DIRECTORY " "Path where resulting data will be placed. Default is ~/.local/share/vcmi" -+ echo " --dest DIRECTORY " "Path where resulting data will be placed. Default is `finddir B_USER_NONPACKAGED_DATA_DIRECTORY`/vcmi" - echo - echo " --validate " "Run basic validness checks" - exit 0 -@@ -161,7 +161,7 @@ then - dest_dir="$HOME/Library/Application Support/vcmi" - elif [[ -z "$XDG_DATA_HOME" ]] - then -- dest_dir="$HOME/.local/share/vcmi" -+ dest_dir="`finddir B_USER_NONPACKAGED_DATA_DIRECTORY`/vcmi" - else - dest_dir="$XDG_DATA_HOME/vcmi" - fi --- -2.37.3 - diff --git a/games-strategy/vcmi/patches/vcmi-1.3.1.patchset b/games-strategy/vcmi/patches/vcmi-1.3.1.patchset new file mode 100644 index 000000000..44c9f9d89 --- /dev/null +++ b/games-strategy/vcmi/patches/vcmi-1.3.1.patchset @@ -0,0 +1,31 @@ +From c8826a02d817f00325ee1b4a075823d4ab165a7e Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sun, 26 Mar 2023 18:42:08 +0200 +Subject: Haiku patch + + +diff --git a/vcmibuilder b/vcmibuilder +index 027a7a7..996277a 100755 +--- a/vcmibuilder ++++ b/vcmibuilder +@@ -52,7 +52,7 @@ then + echo " --convertMP3 " "Convert all mp3 files into ogg/vorbis" + echo " " "Requires ffmpeg or avconv" + echo +- echo " --dest DIRECTORY " "Path where resulting data will be placed. Default is ~/.local/share/vcmi" ++ echo " --dest DIRECTORY " "Path where resulting data will be placed. Default is `finddir B_USER_NONPACKAGED_DATA_DIRECTORY`/vcmi" + echo + echo " --validate " "Run basic validness checks" + exit 0 +@@ -161,7 +161,7 @@ then + dest_dir="$HOME/Library/Application Support/vcmi" + elif [[ -z "$XDG_DATA_HOME" ]] + then +- dest_dir="$HOME/.local/share/vcmi" ++ dest_dir="`finddir B_USER_NONPACKAGED_DATA_DIRECTORY`/vcmi" + else + dest_dir="$XDG_DATA_HOME/vcmi" + fi +-- +2.37.3 + diff --git a/games-strategy/vcmi/vcmi-1.2.0.recipe b/games-strategy/vcmi/vcmi-1.3.1.recipe similarity index 94% rename from games-strategy/vcmi/vcmi-1.2.0.recipe rename to games-strategy/vcmi/vcmi-1.3.1.recipe index 9a443dcbb..e1244388d 100644 --- a/games-strategy/vcmi/vcmi-1.2.0.recipe +++ b/games-strategy/vcmi/vcmi-1.3.1.recipe @@ -6,11 +6,11 @@ application with an impressive amount of features. You'll require the original game files to use this port." HOMEPAGE="https://vcmi.eu" -COPYRIGHT="2005-2017 VCMI Team" +COPYRIGHT="2005-2023 VCMI Team" LICENSE="GNU GPL v2" REVISION="1" SOURCE_URI="https://github.com/vcmi/vcmi/archive/$portVersion.tar.gz" -CHECKSUM_SHA256="fb7ad26f19e91647c480fed3183e205c8c3f48da955f7ab797ebdbae74efc2d3" +CHECKSUM_SHA256="1c714487a6c3c7b9fd956fc2a50d05a1ebcc9431c6b9c72f256143be38f4e0da" PATCHES="vcmi-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" @@ -101,4 +101,6 @@ INSTALL() make -C build install rm -r $prefix/share # desktop file and png icons we don't care about + + addAppDeskbarSymlink $binDir/vcmilauncher "VCMI (Heroes Of Might And Magic III)" }