From f609e00ddbd86f4d703a705411915d9b0e8f9d2f Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Fri, 24 Mar 2023 11:17:36 +0100 Subject: [PATCH] crawl: bump version, use lua 5.1, fix documentation path --- ...rawl-0.27.0.recipe => crawl-0.29.0.recipe} | 8 +- .../crawl/patches/crawl-0.27.0.patchset | 171 ------------------ .../crawl/patches/crawl-0.29.0.patchset | 34 ++++ 3 files changed, 38 insertions(+), 175 deletions(-) rename games-roguelike/crawl/{crawl-0.27.0.recipe => crawl-0.29.0.recipe} (93%) delete mode 100644 games-roguelike/crawl/patches/crawl-0.27.0.patchset create mode 100644 games-roguelike/crawl/patches/crawl-0.29.0.patchset diff --git a/games-roguelike/crawl/crawl-0.27.0.recipe b/games-roguelike/crawl/crawl-0.29.0.recipe similarity index 93% rename from games-roguelike/crawl/crawl-0.27.0.recipe rename to games-roguelike/crawl/crawl-0.29.0.recipe index eacdac7ef..4e77e6473 100644 --- a/games-roguelike/crawl/crawl-0.27.0.recipe +++ b/games-roguelike/crawl/crawl-0.29.0.recipe @@ -4,11 +4,11 @@ combat and magic, involving characters of diverse skills, worshipping dieties \ of great power and caprice. To win, you'll need to be a master of tactics and \ strategy, and prevail against overwhelming odds." HOMEPAGE="https://crawl.develz.org" -COPYRIGHT="1997-2021 Linley Henzell, the dev team, and the contributors" +COPYRIGHT="1997-2022 Linley Henzell, the dev team, and the contributors" LICENSE="crawl" -REVISION="3" +REVISION="1" SOURCE_URI="https://github.com/crawl/crawl/releases/download/$portVersion/stone_soup-$portVersion-nodeps.tar.xz" -CHECKSUM_SHA256="d8a6f7419e324a225d95474e7e878d58370a0727f3d436e50fb5375ff1fdf343" +CHECKSUM_SHA256="b013f9b3bbee1f9e2113c20130a52097dbd9e83ce8e1060438bd3e83829fa9c4" SOURCE_FILENAME="crawl-$portVersion.tar.xz" SOURCE_DIR="stone_soup-$portVersion" PATCHES="crawl-$portVersion.patchset" @@ -47,7 +47,7 @@ BUILD_REQUIRES=" devel:libfreetype$secondaryArchSuffix devel:libGL$secondaryArchSuffix devel:libGLU$secondaryArchSuffix - devel:liblua$secondaryArchSuffix + devel:liblua$secondaryArchSuffix >= 5.1 devel:libncurses$secondaryArchSuffix devel:libpcre$secondaryArchSuffix devel:libpng16$secondaryArchSuffix diff --git a/games-roguelike/crawl/patches/crawl-0.27.0.patchset b/games-roguelike/crawl/patches/crawl-0.27.0.patchset deleted file mode 100644 index 02c5f7699..000000000 --- a/games-roguelike/crawl/patches/crawl-0.27.0.patchset +++ /dev/null @@ -1,171 +0,0 @@ -From dd85f3dde34513315bdcdfb0c6635f90097c6058 Mon Sep 17 00:00:00 2001 -From: Crestwave -Date: Sat, 7 Aug 2021 09:22:11 +0800 -Subject: [PATCH] fix: add support for Haiku - ---- - source/Makefile | 6 ++++++ - source/crash.cc | 2 ++ - source/endianness.h | 4 ++++ - source/files.cc | 30 +++++++++++++++++++++++++++++- - source/initfile.cc | 18 ++++++++++++++++++ - 5 files changed, 59 insertions(+), 1 deletion(-) - -diff --git a/source/Makefile b/source/Makefile -index eb65f6d..29e9342 100644 ---- a/source/Makefile -+++ b/source/Makefile -@@ -382,9 +382,11 @@ ifdef WIN32 - EXTRA_OBJECTS += icon.o - else - ifndef ANDROID -+ifneq ($(uname_S),Haiku) - EXTRA_LIBS += -pthread - endif - endif -+endif - - ifndef TILES - ifdef NEED_LIBW32C -@@ -799,6 +801,10 @@ ifneq ($(SRC_BRANCH),$(filter master release stone_soup-%, $(SRC_BRANCH))) - endif - endif - -+ifdef HAIKU_HYBRID_SECONDARY -+DEFINES_L += -DHAIKU_HYBRID_SECONDARY="\"$(HAIKU_HYBRID_SECONDARY)\"" -+endif -+ - # - # Figure out the build settings for this type of build - # -diff --git a/source/crash.cc b/source/crash.cc -index 7b4f65d..76a5fc6 100644 ---- a/source/crash.cc -+++ b/source/crash.cc -@@ -10,8 +10,10 @@ - #if defined(UNIX) - #include - #include -+#ifndef __HAIKU__ - #define BACKTRACE_SUPPORTED - #endif -+#endif - - #ifdef USE_UNIX_SIGNALS - #include -diff --git a/source/endianness.h b/source/endianness.h -index 30b8644..881a78c 100644 ---- a/source/endianness.h -+++ b/source/endianness.h -@@ -18,6 +18,10 @@ - # endif - #endif - -+#ifdef __HAIKU__ -+#include -+#endif -+ - #ifndef htole32 - #if BYTE_ORDER == LITTLE_ENDIAN - #define htole32(x) (x) -diff --git a/source/files.cc b/source/files.cc -index 9f7a2e6..14b33bc 100644 ---- a/source/files.cc -+++ b/source/files.cc -@@ -105,6 +105,10 @@ - #define F_OK 0 - #endif - -+#ifdef __HAIKU__ -+#include -+#endif -+ - #define BONES_DIAGNOSTICS (defined(WIZARD) || defined(DEBUG_BONES) || defined(DEBUG_DIAGNOSTICS)) - - #ifdef BONES_DIAGNOSTICS -@@ -354,7 +358,7 @@ static bool _create_directory(const char *dir) - { - if (!mkdir_u(dir, 0755)) - return true; -- if (errno == EEXIST) // might be not a directory -+ if (errno == EEXIST || errno == EROFS) // might be not a directory - return dir_exists(dir); - return false; - } -@@ -417,6 +421,22 @@ string canonicalise_file_separator(const string &path) - - static vector _get_base_dirs() - { -+#ifdef __HAIKU__ -+ char data_path[B_PATH_NAME_LENGTH]; -+ char docs_path[B_PATH_NAME_LENGTH]; -+ -+ find_path(B_APP_IMAGE_SYMBOL, -+ B_FIND_PATH_DATA_DIRECTORY, -+ "crawl/", -+ data_path, -+ B_PATH_NAME_LENGTH); -+ -+ find_path(B_APP_IMAGE_SYMBOL, -+ B_FIND_PATH_DOCUMENTATION_DIRECTORY, -+ "packages/crawl", -+ docs_path, -+ B_PATH_NAME_LENGTH); -+#endif - const string rawbases[] = - { - #ifdef DATA_DIR_PATH -@@ -431,6 +451,14 @@ static vector _get_base_dirs() - #ifdef __ANDROID__ - ANDROID_ASSETS, - "/sdcard/Android/data/org.develz.crawl/files/", -+#endif -+#ifdef __HAIKU__ -+ std::string(data_path), -+#ifdef HAIKU_HYBRID_SECONDARY -+ std::string(docs_path) + "_" + HAIKU_HYBRID_SECONDARY + FILE_SEPARATOR, -+#else -+ std::string(docs_path) + FILE_SEPARATOR, -+#endif - #endif - }; - -diff --git a/source/initfile.cc b/source/initfile.cc -index 94f76ff..7491eb4 100644 ---- a/source/initfile.cc -+++ b/source/initfile.cc -@@ -95,6 +95,10 @@ extern char **NXArgv; - #include - #endif - -+#ifdef __HAIKU__ -+#include -+#endif -+ - const string game_options::interrupt_prefix = "interrupt_"; - system_environment SysEnv; - -@@ -4019,6 +4023,20 @@ void get_system_environment() - } - #endif - -+#ifdef __HAIKU__ -+ if (SysEnv.crawl_dir.empty()) -+ { -+ char path[B_PATH_NAME_LENGTH]; -+ find_directory(B_USER_SETTINGS_DIRECTORY, -+ 0, -+ false, -+ path, -+ B_PATH_NAME_LENGTH); -+ -+ SysEnv.crawl_dir = catpath(std::string(path), "/crawl"); -+ } -+#endif -+ - #ifdef SAVE_DIR_PATH - if (SysEnv.crawl_dir.empty()) - SysEnv.crawl_dir = SAVE_DIR_PATH; --- -2.30.2 - diff --git a/games-roguelike/crawl/patches/crawl-0.29.0.patchset b/games-roguelike/crawl/patches/crawl-0.29.0.patchset new file mode 100644 index 000000000..4261ab75e --- /dev/null +++ b/games-roguelike/crawl/patches/crawl-0.29.0.patchset @@ -0,0 +1,34 @@ +From e39e97c526cfa60a96afcd18683a90ce62685cca Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Fri, 24 Mar 2023 11:16:09 +0100 +Subject: Haiku: documentation path + + +diff --git a/source/files.cc b/source/files.cc +index a09dc81..5c56ee2 100644 +--- a/source/files.cc ++++ b/source/files.cc +@@ -410,6 +410,12 @@ static vector _get_base_dirs() + "crawl/", + path, + B_PATH_NAME_LENGTH); ++ char docPath[B_PATH_NAME_LENGTH]; ++ find_path(B_APP_IMAGE_SYMBOL, ++ B_FIND_PATH_DOCUMENTATION_DIRECTORY, ++ "packages/crawl/", ++ docPath, ++ B_PATH_NAME_LENGTH); + #endif + const string rawbases[] = + { +@@ -428,6 +434,7 @@ static vector _get_base_dirs() + #endif + #ifdef __HAIKU__ + std::string(path), ++ std::string(docPath), + #endif + }; + +-- +2.37.3 +