From 80e023268535b076e8f0b28d6566c84eac0fdf8e Mon Sep 17 00:00:00 2001 From: Mihail Ivanchev Date: Fri, 9 Feb 2024 16:10:20 +0100 Subject: [PATCH] devilutionX: update to 1.5.2 --- .../patches/cmake_dependency_downloads.patch | 232 ++++++++++++++++++ srcpkgs/devilutionX/template | 51 +++- 2 files changed, 277 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/devilutionX/patches/cmake_dependency_downloads.patch diff --git a/srcpkgs/devilutionX/patches/cmake_dependency_downloads.patch b/srcpkgs/devilutionX/patches/cmake_dependency_downloads.patch new file mode 100644 index 00000000000000..b0d14d4cabdbe5 --- /dev/null +++ b/srcpkgs/devilutionX/patches/cmake_dependency_downloads.patch @@ -0,0 +1,232 @@ +diff --git a/3rdParty/SDL2/CMakeLists.txt b/3rdParty/SDL2/CMakeLists.txt +index f8b6602fe..8cbadd026 100644 +--- a/3rdParty/SDL2/CMakeLists.txt ++++ b/3rdParty/SDL2/CMakeLists.txt +@@ -15,7 +15,6 @@ set(SDL_TEST_ENABLED_BY_DEFAULT OFF) + include(functions/FetchContent_MakeAvailableExcludeFromAll) + include(FetchContent) + FetchContent_Declare(SDL2 +- URL https://github.com/libsdl-org/SDL/releases/download/release-2.30.0/SDL2-2.30.0.tar.gz +- URL_HASH SHA256=36e2e41557e0fa4a1519315c0f5958a87ccb27e25c51776beb6f1239526447b0 ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdParty/SDL2/src" + ) + FetchContent_MakeAvailableExcludeFromAll(SDL2) +diff --git a/3rdParty/SDL_audiolib/CMakeLists.txt b/3rdParty/SDL_audiolib/CMakeLists.txt +index b5a9c0931..498dc5790 100644 +--- a/3rdParty/SDL_audiolib/CMakeLists.txt ++++ b/3rdParty/SDL_audiolib/CMakeLists.txt +@@ -38,8 +38,8 @@ set(USE_DEC_DRMP3 ON) + + include(FetchContent) + FetchContent_Declare(SDL_audiolib +- URL https://github.com/realnc/SDL_audiolib/archive/cc1bb6af8d4cf5e200259072bde1edd1c8c5137e.tar.gz +- URL_HASH MD5=0e8174264ac9c6b314c6b2d9a5f72efd) ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdParty/SDL_audiolib/src" ++) + FetchContent_MakeAvailableExcludeFromAll(SDL_audiolib) + + add_library(SDL_audiolib::SDL_audiolib ALIAS SDL_audiolib) +diff --git a/3rdParty/SDL_image/CMakeLists.txt b/3rdParty/SDL_image/CMakeLists.txt +index 957029adc..c8df781f3 100644 +--- a/3rdParty/SDL_image/CMakeLists.txt ++++ b/3rdParty/SDL_image/CMakeLists.txt +@@ -20,8 +20,7 @@ include(functions/FetchContent_MakeAvailableExcludeFromAll) + include(FetchContent) + + FetchContent_Declare(SDL_image +- URL https://github.com/libsdl-org/SDL_image/archive/refs/tags/release-2.0.5.tar.gz +- URL_HASH MD5=3446ed7ee3c700065dcb33426a9b0c6e ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdParty/SDL_image/src" + ) + FetchContent_MakeAvailableExcludeFromAll(SDL_image) + +diff --git a/3rdParty/asio/CMakeLists.txt b/3rdParty/asio/CMakeLists.txt +index 3c1e4bc81..453f4f8eb 100644 +--- a/3rdParty/asio/CMakeLists.txt ++++ b/3rdParty/asio/CMakeLists.txt +@@ -2,8 +2,7 @@ include(functions/FetchContent_MakeAvailableExcludeFromAll) + + include(FetchContent) + FetchContent_Declare(asio +- URL https://github.com/diasurgical/asio/archive/bd1c839ef741b14365e77964bdd5a78994c05934.tar.gz +- URL_HASH MD5=e3b470abdfe4d95e9472239902cf7a65 ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdParty/asio/src" + ) + FetchContent_MakeAvailableExcludeFromAll(asio) + +diff --git a/3rdParty/bzip2/CMakeLists.txt b/3rdParty/bzip2/CMakeLists.txt +index 796856ec3..22cf39214 100644 +--- a/3rdParty/bzip2/CMakeLists.txt ++++ b/3rdParty/bzip2/CMakeLists.txt +@@ -2,8 +2,7 @@ include(functions/FetchContent_MakeAvailableExcludeFromAll) + + include(FetchContent) + FetchContent_Declare(bzip2 +- URL https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz +- URL_HASH MD5=67e051268d0c475ea773822f7500d0e5 ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdParty/bzip2/src" + ) + FetchContent_MakeAvailableExcludeFromAll(bzip2) + +diff --git a/3rdParty/discord/CMakeLists.txt b/3rdParty/discord/CMakeLists.txt +index f70e117c2..d744e47ea 100644 +--- a/3rdParty/discord/CMakeLists.txt ++++ b/3rdParty/discord/CMakeLists.txt +@@ -4,8 +4,7 @@ include(FetchContent) + find_package(Patch REQUIRED) + + FetchContent_Declare(discordsrc +- URL https://dl-game-sdk.discordapp.net/3.2.1/discord_game_sdk.zip +- URL_HASH MD5=73e5e1b3f8413a2c7184ef17476822f2 ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdParty/discord/src" + PATCH_COMMAND "${Patch_EXECUTABLE}" -p1 -N < "${CMAKE_CURRENT_LIST_DIR}/fixes.patch" || true + ) + FetchContent_MakeAvailableExcludeFromAll(discordsrc) +diff --git a/3rdParty/find_steam_game/CMakeLists.txt b/3rdParty/find_steam_game/CMakeLists.txt +index ae5c7e6b8..6e6385730 100644 +--- a/3rdParty/find_steam_game/CMakeLists.txt ++++ b/3rdParty/find_steam_game/CMakeLists.txt +@@ -2,8 +2,7 @@ include(functions/FetchContent_MakeAvailableExcludeFromAll) + + include(FetchContent) + FetchContent_Declare(find_steam_game +- URL https://github.com/cxong/find_steam_game/archive/a2bd6273fc002214052c2ee3bd48d7c1e7d3f366.tar.gz +- URL_HASH MD5=a6950ce5d9ced8a259752bc2dc7f5311 ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdParty/find_steam_game/src" + ) + FetchContent_MakeAvailableExcludeFromAll(find_steam_game) + +diff --git a/3rdParty/googletest/CMakeLists.txt b/3rdParty/googletest/CMakeLists.txt +index a6efb9229..e31195cd6 100644 +--- a/3rdParty/googletest/CMakeLists.txt ++++ b/3rdParty/googletest/CMakeLists.txt +@@ -3,8 +3,7 @@ include(functions/FetchContent_MakeAvailableExcludeFromAll) + # branch: v1.12.x (master no longer supports C++11) + FetchContent_Declare( + googletest +- URL https://github.com/google/googletest/archive/58d77fa8070e8cec2dc1ed015d66b454c8d78850.tar.gz +- URL_HASH MD5=22bdde3b84a8c506e7aba7b3c97dc760 ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdParty/googletest/src" + ) + + set(INSTALL_GTEST OFF) +diff --git a/3rdParty/libfmt/CMakeLists.txt b/3rdParty/libfmt/CMakeLists.txt +index df2295fb7..62ca3e6f7 100644 +--- a/3rdParty/libfmt/CMakeLists.txt ++++ b/3rdParty/libfmt/CMakeLists.txt +@@ -14,13 +14,11 @@ include(FetchContent) + if(NXDK) + # branch: nxdk-v10.0.0 + FetchContent_Declare(libfmt +- URL https://github.com/diasurgical/fmt/archive/e421e854efcb21ee641349bab604d91b34af26b8.tar.gz +- URL_HASH MD5=ebaac86fca56d4ef4a162ef125433f6f ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdParty/libfmt/src" + ) + else() + FetchContent_Declare(libfmt +- URL https://github.com/fmtlib/fmt/archive/refs/tags/10.0.0.tar.gz +- URL_HASH MD5=fa629bc1178918b7af4b2ea6b6a271dc ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdParty/libfmt/src" + ) + endif() + FetchContent_MakeAvailableExcludeFromAll(libfmt) +diff --git a/3rdParty/libmpq/CMakeLists.txt b/3rdParty/libmpq/CMakeLists.txt +index 7df576b73..bc6ad4e0f 100644 +--- a/3rdParty/libmpq/CMakeLists.txt ++++ b/3rdParty/libmpq/CMakeLists.txt +@@ -10,8 +10,7 @@ include(functions/FetchContent_MakeAvailableExcludeFromAll) + + include(FetchContent) + FetchContent_Declare(libmpq +- URL https://github.com/diasurgical/libmpq/archive/b78d66c6fee6a501cc9b95d8556a129c68841b05.tar.gz +- URL_HASH MD5=da531a1a6f719e89798a26e679ffc329 ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/libmpq/src" + ) + FetchContent_MakeAvailableExcludeFromAll(libmpq) + +diff --git a/3rdParty/libpng/CMakeLists.txt b/3rdParty/libpng/CMakeLists.txt +index b0d291f92..31d8e3bac 100644 +--- a/3rdParty/libpng/CMakeLists.txt ++++ b/3rdParty/libpng/CMakeLists.txt +@@ -25,8 +25,7 @@ endif() + + include(FetchContent) + FetchContent_Declare(libpng +- URL https://github.com/glennrp/libpng/archive/0a158f3506502dfa23edfc42790dfaed82efba17.tar.gz +- URL_HASH MD5=6d705417242732e8e081bff752c98c18 ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/libpng/src" + ) + FetchContent_MakeAvailableExcludeFromAll(libpng) + +diff --git a/3rdParty/libsmackerdec/CMakeLists.txt b/3rdParty/libsmackerdec/CMakeLists.txt +index d5cf319d7..c820a6ace 100644 +--- a/3rdParty/libsmackerdec/CMakeLists.txt ++++ b/3rdParty/libsmackerdec/CMakeLists.txt +@@ -2,8 +2,7 @@ include(functions/FetchContent_MakeAvailableExcludeFromAll) + + include(FetchContent) + FetchContent_Declare(libsmackerdec +- URL https://github.com/diasurgical/libsmackerdec/archive/91e732bb6953489077430572f43fc802bf2c75b2.tar.gz +- URL_HASH MD5=c3b1ecbe702266e149b158178a03e2b3 ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/libsmackerdec/src" + ) + FetchContent_MakeAvailableExcludeFromAll(libsmackerdec) + +diff --git a/3rdParty/libsodium/CMakeLists.txt b/3rdParty/libsodium/CMakeLists.txt +index 9e308d9d0..527083750 100644 +--- a/3rdParty/libsodium/CMakeLists.txt ++++ b/3rdParty/libsodium/CMakeLists.txt +@@ -12,8 +12,7 @@ if(NOT DEVILUTIONX_SYSTEM_LIBSODIUM) + endif() + include(FetchContent) + FetchContent_Declare(libsodium +- GIT_REPOSITORY https://github.com/robinlinden/libsodium-cmake.git +- GIT_TAG a8ac4509b22b84d6c2eb7d7448f08678e4a67da6 ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/libsodium/src" + ) + FetchContent_MakeAvailableExcludeFromAll(libsodium) + endif() +diff --git a/3rdParty/libzt/CMakeLists.txt b/3rdParty/libzt/CMakeLists.txt +index e3feb8cd3..533e0ac2d 100644 +--- a/3rdParty/libzt/CMakeLists.txt ++++ b/3rdParty/libzt/CMakeLists.txt +@@ -4,8 +4,7 @@ set(BUILD_HOST_SELFTEST OFF) + + include(FetchContent) + FetchContent_Declare(libzt +- GIT_REPOSITORY https://github.com/diasurgical/libzt.git +- GIT_TAG d6c6a069a5041a3e89594c447ced3f15d77618b8) ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/libzt/src" + FetchContent_MakeAvailableExcludeFromAll(libzt) + + if(NOT ANDROID) +diff --git a/3rdParty/simpleini/CMakeLists.txt b/3rdParty/simpleini/CMakeLists.txt +index e32fcf74d..f5860ad23 100644 +--- a/3rdParty/simpleini/CMakeLists.txt ++++ b/3rdParty/simpleini/CMakeLists.txt +@@ -2,8 +2,7 @@ include(functions/FetchContent_MakeAvailableExcludeFromAll) + + include(FetchContent) + FetchContent_Declare(simpleini +- URL https://github.com/brofield/simpleini/archive/56499b5af5d2195c6acfc58c4630b70e0c9c4c21.tar.gz +- URL_HASH MD5=02a561cea03ea11acb65848318ec4a81 ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/simpleini/src" + ) + FetchContent_MakeAvailableExcludeFromAll(simpleini) + +diff --git a/3rdParty/zlib/CMakeLists.txt b/3rdParty/zlib/CMakeLists.txt +index d7a8b8041..8b5ff33cc 100644 +--- a/3rdParty/zlib/CMakeLists.txt ++++ b/3rdParty/zlib/CMakeLists.txt +@@ -4,10 +4,7 @@ set(CMAKE_POLICY_DEFAULT_CMP0048 NEW) + + include(FetchContent) + FetchContent_Declare(zlib +- URL https://www.zlib.net/zlib-1.2.13.tar.gz +- https://www.zlib.net/fossils/zlib-1.2.13.tar.gz +- https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz +- URL_HASH MD5=9b8aa094c4e5765dabf4da391f00d15c ++ SOURCE_DIR "${CMAKE_SOURCE_DIR}/zlib/src" + ) + FetchContent_MakeAvailableExcludeFromAll(zlib) + diff --git a/srcpkgs/devilutionX/template b/srcpkgs/devilutionX/template index ad911b48f8631c..698d5849ff5365 100644 --- a/srcpkgs/devilutionX/template +++ b/srcpkgs/devilutionX/template @@ -1,7 +1,12 @@ # Template file for 'devilutionX' pkgname=devilutionX -version=1.4.1 -revision=3 +version=1.5.2 +revision=1 +_assets_version=4 +_simpleini_version=4.22 +_sdl_audiolib_hash=0e8174264ac9c6b314c6b2d9a5f72efd +_libsmackerdec_hash=c3b1ecbe702266e149b158178a03e2b3 +_libmpq_hash=da531a1a6f719e89798a26e679ffc329 build_style=cmake configure_args="-DVERSION_NUM=$version -DDISABLE_ZERO_TIER=ON" hostmakedepends="pkg-config" @@ -9,12 +14,46 @@ makedepends="SDL2-devel SDL2_image-devel bzip2-devel libsodium-devel gtest-devel fmt-devel zlib-devel" short_desc="Diablo I engine for modern operating systems" maintainer="MarcoAPC " -license="Unlicense" +license="custom:Sustainable Use License" homepage="https://github.com/diasurgical/devilutionX" changelog="https://raw.githubusercontent.com/diasurgical/devilutionX/master/docs/CHANGELOG.md" -distfiles="https://github.com/diasurgical/devilutionX/releases/download/${version}/devilutionx-src.tar.xz" -checksum=f80a5414bb7b5a5ae9f6dbc69cec4ae080c29dd0a8a553cedd405d631011da9f +distfiles="https://github.com/diasurgical/devilutionX/releases/download/${version}/devilutionx-src.tar.xz + https://github.com/brofield/simpleini/archive/refs/tags/v${_simpleini_version}.tar.gz + https://github.com/realnc/SDL_audiolib/archive/${_sdl_audiolib_hash}.tar.gz + https://github.com/diasurgical/libsmackerdec/archive/${_libsmackerdec_hash}.tar.gz + https://github.com/diasurgical/libmpq/archive/${_libmpq_hash}.tar.gz + https://github.com/diasurgical/devilutionx-assets/releases/download/v${_assets_version}/spawn.mpq" +checksum="27dc99cb8b40cb6fccbb5935aac7ce0c906664cc3815bcf9e27195747db46ed3 + b3a4b8f9e03aabd491aa55fd57457115857b9b9c7ecf4abf7ff035ca9d026eb8 + 5adc71bee3506b16c505c1662da73fcfdfd878914645784f80fc70db979533a5 + e565e37ef1ae4f8846d9c9c24b861bc56fdce2d7a4ece47de448e00aa9048b87 + 348cd9c2be9c067dfcb8a2d6cd6f947ade5088e1543c1e5db1fdc5b12db6aeea + 64427cd7c1ba904eaa2e0031c16a6b136d0ecef9abc888c5ff8344b459356e38" +skip_extraction="v${_simpleini_version}.tar.gz + ${_sdl_audiolib_hash}.tar.gz + ${_libsmackerdec_hash}.tar.gz + ${_libmpq_hash}.tar.gz + spawn.mpq" + +# NOTE: DevilutionX's 3rdParty directory contains a lot of CMake package +# download instructions that we patch away (even those that are not used) to +# avoid accidental downloads during the build. The packages that are really +# needed are provide through this template. Make sure the versions / hashes +# are what DevilutionX expects and that no new downloads are added. It's a +# good idea to keep an eye on the build logs. + +post_extract() { + vsrcextract -C "3rdParty/simpleini/src" v${_simpleini_version}.tar.gz + vsrcextract -C "3rdParty/SDL_audiolib/src" ${_sdl_audiolib_hash}.tar.gz + vsrcextract -C "3rdParty/libsmackerdec/src" ${_sdl_audiolib_hash}.tar.gz + vsrcextract -C "3rdParty/libmpq/src" ${_sdl_audiolib_hash}.tar.gz +} + +pre_check() { + # The shareware version files are required for testing. + vsrccopy spawn.mpq build/ +} post_install() { - vlicense LICENSE + vlicense LICENSE.md }