diff options
| author | Orahcio Felício de Sousa <orahcio@gmail.com> | 2026-08-11 01:55:10 -0300 |
|---|---|---|
| committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2026-08-19 21:25:14 +0200 |
| commit | 8a2afa6e142bb3b31b837538ad3942e5e1381f52 (patch) | |
| tree | f4ced19ae7c287c7c5d3c12327685830b43ae9d2 | |
| parent | f242b91dc715772a77c25ff5431a622d7541b2d7 (diff) | |
gnu: maelstrom: Update to 4.0.2.
* gnu/packages/patches/maelstrom-use-system-physfs.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
* gnu/packages/games.scm (maelstrom): Update to 4.0.2.
[source]<snippet>: Remove unbundling code for physfs and sdl3_net.
Adapt unbundling code for physfs-sdl3 and miniz.
<patches>: Remove “patches/maelstrom-use-system-physfs.patch”.
[arguments]<#:configure-flags>: Add “-DUSE_VENDORED_PHYSFS=OFF”
and “-DUSE_VENDORED_SDL_NET=OFF”.
Change-Id: I280b9ed2a59ee245926938f3bd93d2bd92dab0f1
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Merges: guix/guix#10477
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/games.scm | 46 | ||||
| -rw-r--r-- | gnu/packages/patches/maelstrom-use-system-physfs.patch | 39 |
3 files changed, 24 insertions, 62 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 56726849ca8..d99bf29551e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -1911,7 +1911,6 @@ dist_patch_DATA = \ | |||
| 1911 | %D%/packages/patches/lxsession-potfiles-ignore.patch \ | 1911 | %D%/packages/patches/lxsession-potfiles-ignore.patch \ |
| 1912 | %D%/packages/patches/mate-common-honor-aclocal.patch \ | 1912 | %D%/packages/patches/mate-common-honor-aclocal.patch \ |
| 1913 | %D%/packages/patches/mactelnet-remove-init.patch \ | 1913 | %D%/packages/patches/mactelnet-remove-init.patch \ |
| 1914 | %D%/packages/patches/maelstrom-use-system-physfs.patch \ | ||
| 1915 | %D%/packages/patches/mailutils-variable-lookup.patch \ | 1914 | %D%/packages/patches/mailutils-variable-lookup.patch \ |
| 1916 | %D%/packages/patches/mandoc-support-zstd-compression.patch \ | 1915 | %D%/packages/patches/mandoc-support-zstd-compression.patch \ |
| 1917 | %D%/packages/patches/mantid-openmp-cleanup.patch \ | 1916 | %D%/packages/patches/mantid-openmp-cleanup.patch \ |
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 135bf7afd49..4a8d0b49cdd 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm | |||
| @@ -4909,7 +4909,7 @@ match, cannon keep, and grave-itation pit.") | |||
| 4909 | (define-public maelstrom | 4909 | (define-public maelstrom |
| 4910 | (package | 4910 | (package |
| 4911 | (name "maelstrom") | 4911 | (name "maelstrom") |
| 4912 | (version "4.0.1") | 4912 | (version "4.0.2") |
| 4913 | (source | 4913 | (source |
| 4914 | (origin | 4914 | (origin |
| 4915 | (method git-fetch) | 4915 | (method git-fetch) |
| @@ -4917,42 +4917,44 @@ match, cannon keep, and grave-itation pit.") | |||
| 4917 | (url "https://github.com/libsdl-org/Maelstrom") | 4917 | (url "https://github.com/libsdl-org/Maelstrom") |
| 4918 | (commit (string-append "release-" version)))) | 4918 | (commit (string-append "release-" version)))) |
| 4919 | (sha256 | 4919 | (sha256 |
| 4920 | (base32 "140qr4hlg63kjy3ns5d2qix0xpaq72z5yisjnmslrkxrq42ch2fk")) | 4920 | (base32 "0a3kpsd3582j0gwdwspfd27in24asjhj48i26im6d9hg1j3n4iww")) |
| 4921 | (file-name (git-file-name name version)) | 4921 | (file-name (git-file-name name version)) |
| 4922 | (snippet | 4922 | (snippet |
| 4923 | #~(begin | 4923 | #~(begin |
| 4924 | (use-modules (guix build utils)) | 4924 | (use-modules (guix build utils)) |
| 4925 | (substitute* '("game/mods.cpp" "utils/files.c") | 4925 | (substitute* '("game/mods.cpp" "utils/files.c") |
| 4926 | (("\"[^\"]*/physfssdl3.h\"") "\"physfssdl3.h\"")) | 4926 | (("#include.*(physfssdl3.h)\"" all first) |
| 4927 | (string-append "#include <" first ">"))) | ||
| 4928 | (substitute* "game/replay.cpp" | ||
| 4929 | (("#include \"\\.\\./(miniz/miniz\\.h)\"" all first) | ||
| 4930 | (string-append "#include <" first ">"))) | ||
| 4927 | (substitute* "CMakeLists.txt" | 4931 | (substitute* "CMakeLists.txt" |
| 4928 | (("set\\(original_BUILD_SHARED_LIBS.*\n") "") | 4932 | (("external/physfs/extras/physfssdl3\\.c" all) |
| 4929 | (("set\\(BUILD_SHARED_LIBS OFF\\)\n") "") | 4933 | (string-append "# " all)) |
| 4930 | (("add_subdirectory\\(external/SDL_net.*") | 4934 | (("miniz/miniz\\.c" all) |
| 4931 | (string-append "find_package(SDL3_net REQUIRED)\n" | 4935 | (string-append "# " all)) |
| 4932 | "include(CheckCSourceCompiles)\n" | 4936 | (("(pkg_check_modules\\()PhysFS.*physfs\\)\n" all first) |
| 4933 | "include(CMakeDependentOption)\n")) | 4937 | (string-append all |
| 4934 | (((string-append "set\\(BUILD_SHARED_LIBS \"\\$\\{" | 4938 | first "MINIZ IMPORTED_TARGET miniz)\n" |
| 4935 | "original_BUILD_SHARED_LIBS\\}\"\\)\n")) "") | 4939 | first "PHYSFSSDL3 IMPORTED_TARGET physfs-sdl3)\n")) |
| 4936 | (("add_subdirectory\\(macres\\)\n") "") | 4940 | (("(target_link_libraries\\(Maelstrom PRIVATE )PkgConfig::PhysFS\\)\n" all first) |
| 4937 | (("miniz/miniz\\.c\n") "") | 4941 | (string-append all |
| 4938 | (("find_package\\(SDL3_net (REQUIRED)\\)\n" all first) | 4942 | first "PkgConfig::MINIZ)\n" |
| 4939 | (string-append all "pkg_check_modules(MINIZ " first | 4943 | first "PkgConfig::PHYSFSSDL3)\n"))) |
| 4940 | " IMPORTED_TARGET miniz)\n")) | ||
| 4941 | (("(target_link_libraries\\(Maelstrom PRIVATE )SDLmac\\)" all first) | ||
| 4942 | (string-append all "\n" first "PkgConfig::MINIZ)"))) | ||
| 4943 | (for-each delete-file-recursively | 4944 | (for-each delete-file-recursively |
| 4944 | (list "macres" | 4945 | (list "macres" |
| 4945 | "miniz" | 4946 | "miniz" |
| 4946 | "Xcode")))) | 4947 | "Xcode")))))) |
| 4947 | (patches (search-patches "maelstrom-use-system-physfs.patch")))) | ||
| 4948 | (build-system cmake-build-system) | 4948 | (build-system cmake-build-system) |
| 4949 | (arguments | 4949 | (arguments |
| 4950 | (list | 4950 | (list |
| 4951 | #:tests? #f ;no tests | ||
| 4951 | #:configure-flags | 4952 | #:configure-flags |
| 4952 | #~(list "-DSTEAM=OFF" | 4953 | #~(list "-DSTEAM=OFF" |
| 4953 | "-DUSE_VENDORED_SDL=OFF" | 4954 | "-DUSE_VENDORED_SDL=OFF" |
| 4954 | "-DSTANDALONE_INSTALL=OFF") | 4955 | "-DUSE_VENDORED_PHYSFS=OFF" |
| 4955 | #:tests? #f)) ;no testes | 4956 | "-DUSE_VENDORED_SDL_NET=OFF" |
| 4957 | "-DSTANDALONE_INSTALL=OFF"))) | ||
| 4956 | (native-inputs (list pkg-config)) | 4958 | (native-inputs (list pkg-config)) |
| 4957 | (inputs (list miniz physfs physfs-sdl3 sdl3 sdl3-net)) | 4959 | (inputs (list miniz physfs physfs-sdl3 sdl3 sdl3-net)) |
| 4958 | (home-page "https://github.com/libsdl-org/Maelstrom") | 4960 | (home-page "https://github.com/libsdl-org/Maelstrom") |
diff --git a/gnu/packages/patches/maelstrom-use-system-physfs.patch b/gnu/packages/patches/maelstrom-use-system-physfs.patch deleted file mode 100644 index 12f02076111..00000000000 --- a/gnu/packages/patches/maelstrom-use-system-physfs.patch +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | Use system physfs and physfs-sdl3 instead of the vendored copy. | ||
| 2 | |||
| 3 | This patch switches Maelstrom from using bundled physfs and physfssdl3 | ||
| 4 | to using the system packages found via pkg-config. | ||
| 5 | |||
| 6 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 7 | --- a/CMakeLists.txt 2026-05-20 09:21:15.747350351 -0300 | ||
| 8 | +++ b/CMakeLists.txt 2026-05-20 09:25:32.336090395 -0300 | ||
| 9 | @@ -26,9 +26,9 @@ | ||
| 10 | set(SDL_EMSCRIPTEN_PERSISTENT_PATH /storage) | ||
| 11 | endif() | ||
| 12 | |||
| 13 | -set(PHYSFS_BUILD_SHARED OFF) | ||
| 14 | -set(PHYSFS_BUILD_TEST OFF) | ||
| 15 | -add_subdirectory(external/physfs EXCLUDE_FROM_ALL) | ||
| 16 | +find_package(PkgConfig REQUIRED) | ||
| 17 | +pkg_check_modules(PHYSFS REQUIRED IMPORTED_TARGET physfs) | ||
| 18 | +pkg_check_modules(PHYSFSSDL3 REQUIRED IMPORTED_TARGET physfs-sdl3) | ||
| 19 | |||
| 20 | option(USE_VENDORED_SDL "Use the vendored version of SDL" TRUE) | ||
| 21 | if (USE_VENDORED_SDL) | ||
| 22 | @@ -163,8 +163,6 @@ | ||
| 23 | utils/rapidxml.h | ||
| 24 | utils/rapidxml.hpp | ||
| 25 | |||
| 26 | - external/physfs/extras/physfssdl3.c | ||
| 27 | - | ||
| 28 | miniz/miniz.c | ||
| 29 | |||
| 30 | Maelstrom.rc | ||
| 31 | @@ -224,7 +222,8 @@ | ||
| 32 | endif() | ||
| 33 | |||
| 34 | target_link_libraries(Maelstrom PRIVATE SDLmac) | ||
| 35 | -target_link_libraries(Maelstrom PRIVATE physfs-static) | ||
| 36 | +target_link_libraries(Maelstrom PRIVATE PkgConfig::PHYSFS) | ||
| 37 | +target_link_libraries(Maelstrom PRIVATE PkgConfig::PHYSFSSDL3) | ||
| 38 | target_link_libraries(Maelstrom PRIVATE SDL3_net::SDL3_net) | ||
| 39 | target_link_libraries(Maelstrom PRIVATE SDL3::SDL3) \ No newline at end of file | ||
