From d2df4ad8a1f2a77958e688e715171674b38e2511 Mon Sep 17 00:00:00 2001 From: Yukari Chiba Date: Tue, 21 Oct 2025 15:30:11 +0800 Subject: [PATCH] [warzone2100] 4.6.1-1: new upstream version --- 0001-no-cast-function-type-mismatch.patch | 15 --- ...-Remove-references-to-CURLSSLBACKEND.patch | 25 ---- PKGBUILD | 118 ++++++++++++++---- 3 files changed, 97 insertions(+), 61 deletions(-) delete mode 100644 0001-no-cast-function-type-mismatch.patch delete mode 100644 0002-urlrequest_curl-Remove-references-to-CURLSSLBACKEND.patch diff --git a/0001-no-cast-function-type-mismatch.patch b/0001-no-cast-function-type-mismatch.patch deleted file mode 100644 index 3643adac0..000000000 --- a/0001-no-cast-function-type-mismatch.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- warzone2100/CMakeLists.txt -+++ warzone2100-new/CMakeLists.txt -@@ -646,6 +646,12 @@ - check_compiler_flags_output("-Werror -Wno-shadow-field-in-constructor -Wno-error=cpp" COMPILER_TYPE CXX OUTPUT_FLAGS "-Wno-shadow-field-in-constructor" OUTPUT_VARIABLE _supported_cxx_compiler_flags APPEND) - endif() - -+ check_compiler_flags_output("-Werror -Wshadow -Wno-error=cpp" COMPILER_TYPE C OUTPUT_FLAGS "-Wshadow" OUTPUT_VARIABLE _supported_c_compiler_flags APPEND) -+ -+ # -Wno-cast-function-type-mismatch -+ check_compiler_flags_output("-Werror -Wno-cast-function-type-mismatch -Wno-error=cpp" COMPILER_TYPE C OUTPUT_FLAGS "-Wno-cast-function-type-mismatch" OUTPUT_VARIABLE _supported_c_compiler_flags APPEND) -+ check_compiler_flags_output("-Werror -Wno-cast-function-type-mismatch -Wno-error=cpp" COMPILER_TYPE CXX OUTPUT_FLAGS "-Wno-cast-function-type-mismatch" OUTPUT_VARIABLE _supported_cxx_compiler_flags APPEND) -+ - # # FUTURE-TODO: Enable -Wuseless-cast (large number of warnings to fix) - # # -Wuseless-cast (GCC 4.8+) - # check_compiler_flags_output("-Werror -Wuseless-cast -Wno-error=cpp" COMPILER_TYPE C OUTPUT_FLAGS "-Wuseless-cast" OUTPUT_VARIABLE _supported_c_compiler_flags APPEND) diff --git a/0002-urlrequest_curl-Remove-references-to-CURLSSLBACKEND.patch b/0002-urlrequest_curl-Remove-references-to-CURLSSLBACKEND.patch deleted file mode 100644 index 94a0b6c62..000000000 --- a/0002-urlrequest_curl-Remove-references-to-CURLSSLBACKEND.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ee69edc107142e39736c8863e200fc3929d2e47c Mon Sep 17 00:00:00 2001 -From: past-due <30942300+past-due@users.noreply.github.com> -Date: Sat, 19 Jul 2025 13:53:44 -0400 -Subject: [PATCH] urlrequest_curl: Remove references to - CURLSSLBACKEND_SECURETRANSPORT - -cURL no longer supports this backend. Eliminates Wdeprecated-declarations warning ---- - src/urlrequest_curl.cpp | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/urlrequest_curl.cpp b/src/urlrequest_curl.cpp -index b6ac8e1e903..e91b2b1bb4d 100644 ---- a/src/urlrequest_curl.cpp -+++ b/src/urlrequest_curl.cpp -@@ -1229,8 +1229,7 @@ void urlSelectSSLBackend() - // Could not retrieve ssl backend list - libcurl is probably a slightly older version built with only a single ssl backend - return; - } -- // Note: Use CURLSSLBACKEND_DARWINSSL instead of CURLSSLBACKEND_SECURETRANSPORT to support older cURL versions -- const std::vector backendPreferencesOrder = {CURLSSLBACKEND_SCHANNEL, CURLSSLBACKEND_DARWINSSL, CURLSSLBACKEND_GNUTLS}; -+ const std::vector backendPreferencesOrder = {CURLSSLBACKEND_SCHANNEL, CURLSSLBACKEND_GNUTLS}; - std::vector ignoredBackends; - #if !defined(USE_OPENSSL_LOCKS_INIT) && !defined(CURL_OPENSSL_DOES_NOT_REQUIRE_LOCKS_INIT) - // Did not compile with support for thread-safety / locks for OpenSSL, so ignore it diff --git a/PKGBUILD b/PKGBUILD index b35616c59..9350e6890 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,40 +1,116 @@ # Maintainer: Yukari Chiba pkgname=warzone2100 -pkgver=4.5.5 -pkgrel=4 +pkgver=4.6.1 +pkgrel=1 pkgdesc="3D realtime strategy game on a future Earth" url="https://wz2100.net/" arch=(x86_64 aarch64 riscv64 loongarch64) -license=('GPL') -depends=('sdl2' 'openal' 'libvorbis' 'libtheora' 'libsodium' 'physfs' 'sqlite' 'freetype2' 'libopus' 'fmt' 'zip' 'harfbuzz' 'fribidi') -makedepends=('libzip' 'mesa' 'vulkan-headers' 'shaderc' 'cmake' 'ninja' 'linux-headers') -# 0001: Downstream, fix type mismatch warnings for bundled QuickJS -# 0002: Backport, fix deprecated warnings (which are promoted to errors) about -# CURLSSLBACKEND_SECURETRANSPORT with cURL 8.15 or later -# https://github.com/Warzone2100/warzone2100/commit/ee69edc107142e39736c8863e200fc3929d2e47c +license=('GPL-2.0-or-later') +depends=('sdl2' 'openal' 'libvorbis' 'libtheora' 'libsodium' 'physfs' 'sqlite' 'freetype2' 'libopus' 'fmt' 'zip' 'harfbuzz' 'fribidi' 'protobuf') +makedepends=('libzip' 'mesa' 'vulkan-headers' 'shaderc' 'cmake' 'ninja' 'linux-headers' 'git') source=( ${pkgname}-${pkgver}_src.tar.xz::https://github.com/Warzone2100/warzone2100/releases/download/${pkgver}/${pkgname}_src.tar.xz - 0001-no-cast-function-type-mismatch.patch - 0002-urlrequest_curl-Remove-references-to-CURLSSLBACKEND.patch + 'git+https://github.com/JuliaStrings/utf8proc.git' + 'git+https://github.com/g-truc/glm.git' + 'git+https://github.com/nemtrif/utfcpp.git' + 'git+https://github.com/past-due/launchinfo.git' + 'git+https://github.com/google/re2.git' + 'git+https://github.com/past-due/EmbeddedJSONSignature.git' + 'git+https://github.com/HowardHinnant/date.git' + 'git+https://github.com/Warzone2100/data-texpages.git' + 'git+https://github.com/Warzone2100/data-music-opus.git' + 'git+https://github.com/past-due/discord-rpc.git' + 'git+https://github.com/SRombauts/SQLiteCpp.git' + 'git+https://github.com/cameron314/readerwriterqueue.git' + 'git+https://github.com/fmtlib/fmt.git' + 'git+https://github.com/xiph/opusfile.git' + 'git+https://github.com/Warzone2100/quickjs-wz.git' + 'git+https://github.com/Warzone2100/data-fonts.git' + 'git+https://github.com/Warzone2100/maptools-cli.git' + 'git+https://github.com/BinomialLLC/basis_universal.git' + 'git+https://github.com/Warzone2100/data-terrain-classic.git' + 'git+https://github.com/Warzone2100/data-terrain-high.git' + 'git+https://github.com/Warzone2100/reclamation.git' + 'git+https://github.com/Warzone2100/fractured-kingdom.git' + 'git+https://github.com/paullouisageneau/libplum.git' + 'git+https://github.com/miniupnp/miniupnp.git' + 'git+https://github.com/TartanLlama/expected.git' + 'git+https://github.com/Warzone2100/GameNetworkingSockets.git' + 'git+https://github.com/past-due/innohelperscripts.git' + 'git+https://github.com/Warzone2100/win_installer_resources.git' + 'git+https://github.com/Warzone2100/blender-pie-addon.git' ) -sha256sums=('07f61bae721687edeb62da4877e85030a03a053a593d645194fc65778e0480ff' - 'a25200df8542dc0c432ef3dd1d74ed89ec0a54475b08b9db6dde0500d7361861' - 'df4c19d913a800d29d8379d8352804ec04b433a4f8dd3bfc768210d176ee0927') +sha256sums=('26ac5538460243f8a149d31264da71caa4d33ef6a8010037eff24e77278ca50b' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') prepare() { - # to drop const qualifier - sed -i 's/IN6_IS_ADDR_V4MAPPED(/IN6_IS_ADDR_V4MAPPED((intptr_t)/' $pkgname/lib/netplay/netsocket.cpp - _patch_ $pkgname + cd $pkgname + + git submodule init + git config submodule.3rdparty/utf8proc.url "$srcdir/utf8proc" + git config submodule.3rdparty/glm.url "$srcdir/glm" + git config submodule.3rdparty/utfcpp.url "$srcdir/utfcpp" + git config submodule.3rdparty/launchinfo.url "$srcdir/launchinfo" + git config submodule.3rdparty/re2.url "$srcdir/re2" + git config submodule.3rdparty/EmbeddedJSONSignature.url "$srcdir/EmbeddedJSONSignature" + git config submodule.3rdparty/date.url "$srcdir/date" + git config submodule.data/base/texpages.url "$srcdir/data-texpages" + git config submodule.data/music.url "$srcdir/data-music-opus" + git config submodule.3rdparty/discord-rpc.url "$srcdir/discord-rpc" + git config submodule.3rdparty/SQLiteCpp.url "$srcdir/SQLiteCpp" + git config submodule.3rdparty/readerwriterqueue.url "$srcdir/readerwriterqueue" + git config submodule.3rdparty/fmt.url "$srcdir/fmt" + git config submodule.lib/sound/3rdparty/opusfile.url "$srcdir/opusfile" + git config submodule.3rdparty/quickjs-wz.url "$srcdir/quickjs-wz" + git config submodule.data/fonts.url "$srcdir/data-fonts" + git config submodule.tools/maptools-cli.url "$srcdir/maptools-cli" + git config submodule.3rdparty/basis_universal.url "$srcdir/basis_universal" + git config submodule.3rdparty/data/terrain_overrides/classic.url "$srcdir/data-terrain-classic" + git config submodule.3rdparty/data/terrain_overrides/high.url "$srcdir/data-terrain-high" + git config submodule.3rdparty/data/mods/campaign/reclamation.url "$srcdir/reclamation" + git config submodule.3rdparty/data/mods/campaign/fractured-kingdom.url "$srcdir/fractured-kingdom" + git config submodule.3rdparty/libplum.url "$srcdir/libplum" + git config submodule.lib/netplay/3rdparty/miniupnp.url "$srcdir/miniupnp" + git config submodule.3rdparty/expected.url "$srcdir/expected" + git config submodule.3rdparty/GameNetworkingSockets.url "$srcdir/GameNetworkingSockets" + git config submodule.pkg/win_installer/innohelperscripts.url "$srcdir/innohelperscripts" + git config submodule.pkg/win_installer/resources.url "$srcdir/win_installer_resources" + git config submodule.tools/blender/pie-addon.url "$srcdir/blender-pie-addon" + git -c protocol.file.allow=always submodule update } build() { # 3rdparty/quickjs-wz/quickjs.h:993:34: error: cast-function-type-mismatch CXXFLAGS+=" -Wno-cast-function-type-mismatch" - # Workaround CMake 4.0 compatibility. - # TODO: this has been already fixed in the master branch and the workaround - # should be removed when upgrading - CMAKE_POLICY_VERSION_MINIMUM=3.5 \ cmake -B build -S ${pkgname} \ -G Ninja \ -DCMAKE_BUILD_TYPE=None \