guix_mirror_bot pushed a commit to branch master
in repository guix.

commit d7002cba33fb7fe0b2aa96f27b51e551a739f2f6
Author: bdunahu <[email protected]>
AuthorDate: Thu Jun 4 22:38:00 2026 -0400

    gnu: warzone2100: Split monolithic patch file.
    
    The goal behind these changes is to allow for easier maintenance, and 
further unbundling of dependencies.
    
    * gnu/packages/patches/warzone2100-unbundle-libs.patch:  Remove logic for
    unbundling discord-rpc (not required), inih, utfcpp, and basis-universal.
    * gnu/packages/patches/warzone2100-unbundle-inih.patch: New file.
    * gnu/packages/patches/warzone2100-unbundle-utfcpp.patch: New file.
    * gnu/packages/patches/warzone2100-unbundle-basis-universal.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register new patch files.
    * gnu/packages/games.scm (warzone2100): Apply new patch files.
    
    Signed-off-by: Liliana Marie Prikler <[email protected]>
---
 gnu/local.mk                                       |   3 +
 gnu/packages/games.scm                             |   5 +-
 ... => warzone2100-unbundle-basis-universal.patch} | 217 ++++------------
 .../patches/warzone2100-unbundle-inih.patch        |  45 ++++
 .../patches/warzone2100-unbundle-libs.patch        | 279 ++-------------------
 .../patches/warzone2100-unbundle-utfcpp.patch      |  51 ++++
 6 files changed, 172 insertions(+), 428 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 410ad254ae..b0c3ebc14a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2648,7 +2648,10 @@ dist_patch_DATA =                                        
        \
   %D%/packages/patches/vtk-7-python-compat.patch               \
   %D%/packages/patches/vulkan-tools-wayland-1.24.patch          \
   %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch       \
+  %D%/packages/patches/warzone2100-unbundle-basis-universal.patch      \
   %D%/packages/patches/warzone2100-unbundle-libs.patch         \
+  %D%/packages/patches/warzone2100-unbundle-inih.patch         \
+  %D%/packages/patches/warzone2100-unbundle-utfcpp.patch       \
   %D%/packages/patches/wcstools-extend-makefiles.patch \
   %D%/packages/patches/wdl-link-libs-and-fix-jnetlib.patch     \
   %D%/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch \
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 716fc32c65..a18dc99f31 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -7398,7 +7398,10 @@ fighting over what remains.")
                                   "re2"
                                   "utf8proc"
                                   "utfcpp")))))
-       (patches (search-patches "warzone2100-unbundle-libs.patch"))
+       (patches (search-patches "warzone2100-unbundle-basis-universal.patch"
+                                "warzone2100-unbundle-libs.patch"
+                                "warzone2100-unbundle-inih.patch"
+                                "warzone2100-unbundle-utfcpp.patch"))
        (sha256
         (base32
          "0fmiy0pm56yy69c0nhynjdiaslwlfg8cdvfl5s78g5pzdi1y47s3"))))
diff --git a/gnu/packages/patches/warzone2100-unbundle-libs.patch 
b/gnu/packages/patches/warzone2100-unbundle-basis-universal.patch
similarity index 50%
copy from gnu/packages/patches/warzone2100-unbundle-libs.patch
copy to gnu/packages/patches/warzone2100-unbundle-basis-universal.patch
index 7e8dd684a0..960eb35918 100644
--- a/gnu/packages/patches/warzone2100-unbundle-libs.patch
+++ b/gnu/packages/patches/warzone2100-unbundle-basis-universal.patch
@@ -1,102 +1,12 @@
-diff -ru a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
---- a/3rdparty/CMakeLists.txt  2025-09-16 11:41:32.000000000 -0500
-+++ b/3rdparty/CMakeLists.txt  2025-09-18 14:00:25.296819724 -0500
-@@ -1,67 +1,47 @@
- cmake_minimum_required (VERSION 3.16...3.31)
--
-+find_package(PkgConfig QUIET)
- include(CheckCompilerFlagsOutput)
- 
--SET(UTF8PROC_INSTALL OFF CACHE BOOL "Enable installation of utf8proc" FORCE)
--add_subdirectory(utf8proc EXCLUDE_FROM_ALL)
--set_property(TARGET utf8proc PROPERTY FOLDER "3rdparty")
--if(NOT MSVC)
--      set(_supported_utf8proc_cxx_compiler_flags "")
--
--      # -Wassign-enum
--      check_compiler_flags_output("-Werror -Wno-assign-enum -Wno-error=cpp" 
COMPILER_TYPE CXX   OUTPUT_FLAGS "-Wno-assign-enum" OUTPUT_VARIABLE 
_supported_utf8proc_cxx_compiler_flags APPEND)
--
--      if (NOT _supported_utf8proc_cxx_compiler_flags STREQUAL "")
--              string(REPLACE " " ";" _supported_utf8proc_cxx_compiler_flags 
"${_supported_utf8proc_cxx_compiler_flags}")
--              target_compile_options(utf8proc PRIVATE 
${_supported_utf8proc_cxx_compiler_flags})
--      endif()
--endif()
-+pkg_check_modules(UTF8PROC REQUIRED libutf8proc)
-+add_library(utf8proc UNKNOWN IMPORTED)
-+set_target_properties(utf8proc PROPERTIES
-+      IMPORTED_LOCATION ${UTF8PROC_LIBRARIES}
-+      INTERFACE_INCLUDE_DIRECTORIES ${UTF8PROC_INCLUDE_DIRS}
-+      INTERFACE_LINK_LIBRARIES ${UTF8PROC_LINK_LIBRARIES}
-+)
- 
- add_subdirectory(launchinfo EXCLUDE_FROM_ALL)
- set_property(TARGET launchinfo PROPERTY FOLDER "3rdparty")
- 
--SET(FMT_INSTALL OFF CACHE BOOL "Generate the install target" FORCE)
--SET(FMT_SYSTEM_HEADERS ON CACHE BOOL "Expose headers with marking them as 
system." FORCE)
--add_subdirectory(fmt EXCLUDE_FROM_ALL)
--set_property(TARGET fmt PROPERTY FOLDER "3rdparty")
--# Define a custom inline namespace for the fmt used by WZ, to prevent ODR 
violations if static linking to any libraries that themselves embed (a 
different version of) fmt
--target_compile_definitions(fmt PUBLIC "FMT_BEGIN_NAMESPACE=namespace fmt { 
inline namespace v12_wz2100 {")
--target_compile_definitions(fmt PUBLIC "FMT_END_NAMESPACE=}}")
--
-+pkg_check_modules(FMT REQUIRED fmt)
-+add_library(fmt UNKNOWN IMPORTED)
-+set_target_properties(fmt PROPERTIES
-+      IMPORTED_LOCATION ${FMT_LIBRARIES}
-+      INTERFACE_INCLUDE_DIRECTORIES ${FMT_INCLUDE_DIRS}
-+      INTERFACE_LINK_LIBRARIES ${FMT_LINK_LIBRARIES}
-+)
- 
- # inih library
--add_library(inih STATIC "inih/ini.h" "inih/ini.c")
--set_property(TARGET inih PROPERTY FOLDER "3rdparty")
--target_include_directories(inih PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
--target_compile_definitions(inih PRIVATE
--      "-DINI_API="
--      "-DINI_ALLOW_MULTILINE=0"
--      "-DINI_ALLOW_BOM=1"
--      "-DINI_ALLOW_INLINE_COMMENTS=0"
--      "-DINI_MAX_LINE=1024"
--      "-DINI_ALLOW_REALLOC=1"
--      "-DINI_INITIAL_ALLOC=1024"
-+pkg_check_modules(INIH REQUIRED inih)
-+add_library(inih UNKNOWN IMPORTED)
-+set_target_properties(inih PROPERTIES
-+      IMPORTED_LOCATION ${INIH_LIBRARIES}
-+      INTERFACE_INCLUDE_DIRECTORIES ${INIH_INCLUDE_DIRS}
-+      INTERFACE_LINK_LIBRARIES ${INIH_LINK_LIBRARIES}
- )
- 
- # re2
--SET(RE2_BUILD_TESTING OFF CACHE BOOL "enable testing for RE2" FORCE)
--add_subdirectory(re2 EXCLUDE_FROM_ALL)
--target_include_directories(re2 PUBLIC
--    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/re2>
-+pkg_check_modules(RE2 REQUIRED re2)
-+add_library(re2 UNKNOWN IMPORTED)
-+set_target_properties(re2 PROPERTIES
-+      IMPORTED_LOCATION ${RE2_LIBRARIES}
-+      INTERFACE_INCLUDE_DIRECTORIES ${RE2_INCLUDE_DIRS}
-+      INTERFACE_LINK_LIBRARIES ${RE2_LINK_LIBRARIES}
- )
--set_property(TARGET re2 PROPERTY FOLDER "3rdparty")
--set_property(TARGET re2 PROPERTY 
XCODE_ATTRIBUTE_GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS NO)        # 
-Wmissing-field-initializers
--set_property(TARGET re2 PROPERTY XCODE_ATTRIBUTE_GCC_WARN_SHADOW NO)  # 
-Wshadow
--set_property(TARGET re2 PROPERTY XCODE_ATTRIBUTE_WARNING_CFLAGS 
"-Wno-missing-field-initializers -Wno-shadow")
- 
- add_subdirectory(EmbeddedJSONSignature EXCLUDE_FROM_ALL)
- set_property(TARGET EmbeddedJSONSignature PROPERTY FOLDER "3rdparty")
- 
--if(ENABLE_DISCORD)
--      add_subdirectory(discord-rpc EXCLUDE_FROM_ALL)
--      set_property(TARGET discord-rpc PROPERTY FOLDER "3rdparty")
--endif()
--
- find_package(SQLite3 3.14 REQUIRED)
- set(SQLITECPP_USE_STATIC_RUNTIME OFF CACHE BOOL "Use static runtime" FORCE)
- set(SQLITE_HAS_CODEC OFF CACHE BOOL "Enable database encryption API. Not 
available in the public release of SQLite." FORCE)
-@@ -111,52 +91,7 @@
+Unbundles basis-universal dependency.
+
+patch by Lilah Tascheter <[email protected]>
+
+diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
+index 46c0c26e1..d13934abc 100644
+--- a/3rdparty/CMakeLists.txt
++++ b/3rdparty/CMakeLists.txt
+@@ -112,52 +112,7 @@ set_property(TARGET qjs PROPERTY FOLDER "3rdparty")
  if (WZ_ENABLE_BASIS_UNIVERSAL AND NOT WZ_CI_DISABLE_BASIS_COMPRESS_TEXTURES)
  
        # basis-universal
@@ -150,7 +60,7 @@ diff -ru a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
  
        # Test basisu -version
        execute_process(
-@@ -174,86 +109,6 @@
+@@ -175,99 +130,6 @@ if (WZ_ENABLE_BASIS_UNIVERSAL AND NOT 
WZ_CI_DISABLE_BASIS_COMPRESS_TEXTURES)
  
  endif()
  
@@ -234,36 +144,38 @@ diff -ru a/3rdparty/CMakeLists.txt 
b/3rdparty/CMakeLists.txt
 -
 -endif(WZ_ENABLE_BASIS_UNIVERSAL)
 -
- if (WZ_PROFILING_NVTX)
-       include(FetchContent)
-       FetchContent_Declare(
-diff -ru a/lib/framework/wzstring.cpp b/lib/framework/wzstring.cpp
---- a/lib/framework/wzstring.cpp
-+++ b/lib/framework/wzstring.cpp
-@@ -29,8 +29,8 @@
- // "By default, Visual Studio always returns the value 199711L for the 
__cplusplus preprocessor macro."
- #define UTF_CPP_CPLUSPLUS 201703L
- #endif
--#include <utfcpp/source/utf8.h>
--#include <utf8proc/utf8proc.h>
-+#include <utf8cpp/utf8.h>
-+#include <utf8proc.h>
- 
- WzUniCodepoint WzUniCodepoint::fromASCII(unsigned char charLiteral)
- {
-diff -ru a/lib/ivis_opengl/CMakeLists.txt b/lib/ivis_opengl/CMakeLists.txt
---- a/lib/ivis_opengl/CMakeLists.txt   2025-09-16 11:41:32.000000000 -0500
-+++ b/lib/ivis_opengl/CMakeLists.txt   2025-09-18 14:00:13.716771596 -0500
-@@ -88,7 +88,7 @@
- include(WZTargetConfiguration)
- WZ_TARGET_CONFIGURATION(ivis-opengl)
- 
--target_link_libraries(ivis-opengl PRIVATE framework launchinfo fmt::fmt)
-+target_link_libraries(ivis-opengl PRIVATE framework launchinfo fmt)
- if(CMAKE_SYSTEM_NAME MATCHES "Emscripten")
-       # We should be using the Emscripten port linker flags for FreeType & 
Harfbuzz
- else()
-@@ -116,8 +116,11 @@
+-if (WZ_PROFILING_NVTX)
+-      include(FetchContent)
+-      FetchContent_Declare(
+-        nvtx
+-        GIT_REPOSITORY https://github.com/NVIDIA/NVTX.git
+-        GIT_TAG        a1ceb0677f67371ed29a2b1c022794f077db5fe7
+-      )
+-
+-      FetchContent_MakeAvailable(nvtx)
+-      set(PROFILING_NVTX_INCLUDE ${CUDAToolkit_INCLUDE_DIRS} PARENT_SCOPE)
+-
+-endif ()
+-
+ set(PLUM_NO_EXAMPLE ON CACHE BOOL "Disable example build" FORCE)
+ add_subdirectory(libplum EXCLUDE_FROM_ALL)
+ set_target_properties(plum plum-static PROPERTIES FOLDER "3rdparty")
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5012b2881..ccc08af46 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ cmake_minimum_required(VERSION 3.16...3.31)
+-
++find_package(PkgConfig QUIET)
+ set(_OLD_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
+ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+ include(WZVcpkgInit) # Must come before project() command
+diff --git a/lib/ivis_opengl/CMakeLists.txt b/lib/ivis_opengl/CMakeLists.txt
+index fd2d62a2c..5ad9845bc 100644
+--- a/lib/ivis_opengl/CMakeLists.txt
++++ b/lib/ivis_opengl/CMakeLists.txt
+@@ -118,8 +118,11 @@ if(TARGET etcpak)
        target_link_libraries(ivis-opengl PRIVATE etcpak)
        target_compile_definitions(ivis-opengl PRIVATE "-DETCPAK_ENABLED")
  endif()
@@ -277,48 +189,3 @@ diff -ru a/lib/ivis_opengl/CMakeLists.txt 
b/lib/ivis_opengl/CMakeLists.txt
        target_compile_definitions(ivis-opengl PRIVATE "-DBASIS_ENABLED")
  else()
        message(WARNING "Basis-universal support is disabled")
-diff -ru a/lib/netplay/CMakeLists.txt b/lib/netplay/CMakeLists.txt
---- a/lib/netplay/CMakeLists.txt       2025-09-16 11:41:32.000000000 -0500
-+++ b/lib/netplay/CMakeLists.txt       2025-09-18 13:37:23.686969530 -0500
-@@ -108,7 +108,7 @@
- include(WZTargetConfiguration)
- WZ_TARGET_CONFIGURATION(netplay)
- target_link_libraries(netplay
--      PRIVATE framework re2::re2 nlohmann_json plum-static Threads::Threads 
ZLIB::ZLIB fmt::fmt
-+      PRIVATE framework re2 nlohmann_json plum-static Threads::Threads 
ZLIB::ZLIB fmt
-       PUBLIC tl::expected)
- 
- if(WZ_USE_IMPORTED_MINIUPNPC)
-diff -ru a/src/3rdparty/INIReaderWriter.cpp b/src/3rdparty/INIReaderWriter.cpp
---- a/src/3rdparty/INIReaderWriter.cpp 2025-09-16 11:41:32.000000000 -0500
-+++ b/src/3rdparty/INIReaderWriter.cpp 2025-09-18 13:37:23.687094584 -0500
-@@ -13,7 +13,7 @@
- #ifndef INI_API
- # define INI_API
- #endif
--#include <inih/ini.h>
-+#include <ini.h>
- #include "INIReaderWriter.h"
- 
- using std::string;
-diff -ru a/src/CMakeLists.txt b/src/CMakeLists.txt
---- a/src/CMakeLists.txt       2025-09-16 11:41:32.000000000 -0500
-+++ b/src/CMakeLists.txt       2025-09-18 13:37:23.687282446 -0500
-@@ -130,7 +130,7 @@
- 
- target_link_libraries(warzone2100 exception-handler gamelib wzmaplib 
ZipIOProvider ivis-opengl netplay sdl-backend framework sequence sound widget)
- target_link_libraries(warzone2100 launchinfo EmbeddedJSONSignature)
--target_link_libraries(warzone2100 fmt::fmt)
-+target_link_libraries(warzone2100 fmt)
- if(ENABLE_NLS)
-       target_link_libraries(warzone2100 ${Intl_LIBRARIES})
- endif()
-@@ -146,7 +146,7 @@
-       include(IncludeFindCurl)
-       target_link_libraries(warzone2100 CURL::libcurl)
- endif()
--target_link_libraries(warzone2100 re2::re2)
-+target_link_libraries(warzone2100 re2)
- 
- find_package(SQLite3 3.14 REQUIRED)
- target_link_libraries(warzone2100 SQLite::SQLite3)
diff --git a/gnu/packages/patches/warzone2100-unbundle-inih.patch 
b/gnu/packages/patches/warzone2100-unbundle-inih.patch
new file mode 100644
index 0000000000..05513e3f90
--- /dev/null
+++ b/gnu/packages/patches/warzone2100-unbundle-inih.patch
@@ -0,0 +1,45 @@
+Unbundles inih dependency.
+
+patch by Lilah Tascheter <[email protected]>
+
+diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
+index 46c0c26e1..462bced09 100644
+--- a/3rdparty/CMakeLists.txt
++++ b/3rdparty/CMakeLists.txt
+@@ -30,17 +30,12 @@ target_compile_definitions(fmt PUBLIC 
"FMT_END_NAMESPACE=}}")
+ 
+ 
+ # inih library
+-add_library(inih STATIC "inih/ini.h" "inih/ini.c")
+-set_property(TARGET inih PROPERTY FOLDER "3rdparty")
+-target_include_directories(inih PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
+-target_compile_definitions(inih PRIVATE
+-      "-DINI_API="
+-      "-DINI_ALLOW_MULTILINE=0"
+-      "-DINI_ALLOW_BOM=1"
+-      "-DINI_ALLOW_INLINE_COMMENTS=0"
+-      "-DINI_MAX_LINE=1024"
+-      "-DINI_ALLOW_REALLOC=1"
+-      "-DINI_INITIAL_ALLOC=1024"
++pkg_check_modules(INIH REQUIRED inih)
++add_library(inih UNKNOWN IMPORTED)
++set_target_properties(inih PROPERTIES
++      IMPORTED_LOCATION ${INIH_LIBRARIES}
++      INTERFACE_INCLUDE_DIRECTORIES ${INIH_INCLUDE_DIRS}
++      INTERFACE_LINK_LIBRARIES ${INIH_LINK_LIBRARIES}
+ )
+ 
+ # re2
+diff --git a/src/3rdparty/INIReaderWriter.cpp 
b/src/3rdparty/INIReaderWriter.cpp
+index 542166fee..5c118c887 100644
+--- a/src/3rdparty/INIReaderWriter.cpp
++++ b/src/3rdparty/INIReaderWriter.cpp
+@@ -13,7 +13,7 @@
+ #ifndef INI_API
+ # define INI_API
+ #endif
+-#include <inih/ini.h>
++#include <ini.h>
+ #include "INIReaderWriter.h"
+ 
+ using std::string;
diff --git a/gnu/packages/patches/warzone2100-unbundle-libs.patch 
b/gnu/packages/patches/warzone2100-unbundle-libs.patch
index 7e8dd684a0..ee2160db84 100644
--- a/gnu/packages/patches/warzone2100-unbundle-libs.patch
+++ b/gnu/packages/patches/warzone2100-unbundle-libs.patch
@@ -1,34 +1,12 @@
-diff -ru a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
---- a/3rdparty/CMakeLists.txt  2025-09-16 11:41:32.000000000 -0500
-+++ b/3rdparty/CMakeLists.txt  2025-09-18 14:00:25.296819724 -0500
-@@ -1,67 +1,47 @@
- cmake_minimum_required (VERSION 3.16...3.31)
--
-+find_package(PkgConfig QUIET)
- include(CheckCompilerFlagsOutput)
- 
--SET(UTF8PROC_INSTALL OFF CACHE BOOL "Enable installation of utf8proc" FORCE)
--add_subdirectory(utf8proc EXCLUDE_FROM_ALL)
--set_property(TARGET utf8proc PROPERTY FOLDER "3rdparty")
--if(NOT MSVC)
--      set(_supported_utf8proc_cxx_compiler_flags "")
--
--      # -Wassign-enum
--      check_compiler_flags_output("-Werror -Wno-assign-enum -Wno-error=cpp" 
COMPILER_TYPE CXX   OUTPUT_FLAGS "-Wno-assign-enum" OUTPUT_VARIABLE 
_supported_utf8proc_cxx_compiler_flags APPEND)
--
--      if (NOT _supported_utf8proc_cxx_compiler_flags STREQUAL "")
--              string(REPLACE " " ";" _supported_utf8proc_cxx_compiler_flags 
"${_supported_utf8proc_cxx_compiler_flags}")
--              target_compile_options(utf8proc PRIVATE 
${_supported_utf8proc_cxx_compiler_flags})
--      endif()
--endif()
-+pkg_check_modules(UTF8PROC REQUIRED libutf8proc)
-+add_library(utf8proc UNKNOWN IMPORTED)
-+set_target_properties(utf8proc PROPERTIES
-+      IMPORTED_LOCATION ${UTF8PROC_LIBRARIES}
-+      INTERFACE_INCLUDE_DIRECTORIES ${UTF8PROC_INCLUDE_DIRS}
-+      INTERFACE_LINK_LIBRARIES ${UTF8PROC_LINK_LIBRARIES}
-+)
- 
+Unbundles fmt and re2 dependencies.
+
+patch by Lilah Tascheter <[email protected]>
+
+diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
+index 46c0c26e1..0afbdf480 100644
+--- a/3rdparty/CMakeLists.txt
++++ b/3rdparty/CMakeLists.txt
+@@ -20,13 +20,13 @@ endif()
  add_subdirectory(launchinfo EXCLUDE_FROM_ALL)
  set_property(TARGET launchinfo PROPERTY FOLDER "3rdparty")
  
@@ -39,7 +17,6 @@ diff -ru a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
 -# Define a custom inline namespace for the fmt used by WZ, to prevent ODR 
violations if static linking to any libraries that themselves embed (a 
different version of) fmt
 -target_compile_definitions(fmt PUBLIC "FMT_BEGIN_NAMESPACE=namespace fmt { 
inline namespace v12_wz2100 {")
 -target_compile_definitions(fmt PUBLIC "FMT_END_NAMESPACE=}}")
--
 +pkg_check_modules(FMT REQUIRED fmt)
 +add_library(fmt UNKNOWN IMPORTED)
 +set_target_properties(fmt PROPERTIES
@@ -48,24 +25,9 @@ diff -ru a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
 +      INTERFACE_LINK_LIBRARIES ${FMT_LINK_LIBRARIES}
 +)
  
+ 
  # inih library
--add_library(inih STATIC "inih/ini.h" "inih/ini.c")
--set_property(TARGET inih PROPERTY FOLDER "3rdparty")
--target_include_directories(inih PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
--target_compile_definitions(inih PRIVATE
--      "-DINI_API="
--      "-DINI_ALLOW_MULTILINE=0"
--      "-DINI_ALLOW_BOM=1"
--      "-DINI_ALLOW_INLINE_COMMENTS=0"
--      "-DINI_MAX_LINE=1024"
--      "-DINI_ALLOW_REALLOC=1"
--      "-DINI_INITIAL_ALLOC=1024"
-+pkg_check_modules(INIH REQUIRED inih)
-+add_library(inih UNKNOWN IMPORTED)
-+set_target_properties(inih PROPERTIES
-+      IMPORTED_LOCATION ${INIH_LIBRARIES}
-+      INTERFACE_INCLUDE_DIRECTORIES ${INIH_INCLUDE_DIRS}
-+      INTERFACE_LINK_LIBRARIES ${INIH_LINK_LIBRARIES}
+@@ -44,15 +44,13 @@ target_compile_definitions(inih PRIVATE
  )
  
  # re2
@@ -87,174 +49,11 @@ diff -ru a/3rdparty/CMakeLists.txt 
b/3rdparty/CMakeLists.txt
  
  add_subdirectory(EmbeddedJSONSignature EXCLUDE_FROM_ALL)
  set_property(TARGET EmbeddedJSONSignature PROPERTY FOLDER "3rdparty")
- 
--if(ENABLE_DISCORD)
--      add_subdirectory(discord-rpc EXCLUDE_FROM_ALL)
--      set_property(TARGET discord-rpc PROPERTY FOLDER "3rdparty")
--endif()
--
- find_package(SQLite3 3.14 REQUIRED)
- set(SQLITECPP_USE_STATIC_RUNTIME OFF CACHE BOOL "Use static runtime" FORCE)
- set(SQLITE_HAS_CODEC OFF CACHE BOOL "Enable database encryption API. Not 
available in the public release of SQLite." FORCE)
-@@ -111,52 +91,7 @@
- if (WZ_ENABLE_BASIS_UNIVERSAL AND NOT WZ_CI_DISABLE_BASIS_COMPRESS_TEXTURES)
- 
-       # basis-universal
--      set(_ORIGINAL_CMAKE_PROGRAM_PATH "${CMAKE_PROGRAM_PATH}")
--      if(DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_HOST_TRIPLET)
--        # Partial workaround for: 
https://github.com/microsoft/vcpkg/issues/17001
--        # Explicitly add the HOST_TRIPLET paths to CMAKE_PROGRAM_PATH
--        list(APPEND CMAKE_PROGRAM_PATH 
"${VCPKG_INSTALLED_DIR}/${VCPKG_HOST_TRIPLET}")
--      endif()
--      find_program(BASIS_UNIVERSAL_CLI NAMES basisu PATH_SUFFIXES 
"tools/basisu" NO_CACHE)
--      set(CMAKE_PROGRAM_PATH "${_ORIGINAL_CMAKE_PROGRAM_PATH}")
--      if(NOT BASIS_UNIVERSAL_CLI)
--        message(STATUS "Pre-installed basisu tool not found - attempting to 
build for host system")
--
--        # Build the tool for the host system at configure time
--        set(BASISU_BINARY_DIR 
"${CMAKE_CURRENT_BINARY_DIR}/basis_universal_host_tool/")
--        execute_process(
--                COMMAND ${CMAKE_COMMAND} -E make_directory 
"${BASISU_BINARY_DIR}"
--                WORKING_DIRECTORY 
"${CMAKE_CURRENT_SOURCE_DIR}/basis_universal_host_build"
--                RESULT_VARIABLE _basis_result
--        )
--        if(NOT _basis_result EQUAL 0)
--              message(FATAL_ERROR "Failed to create directory for 
basis_universal_host_build")
--        endif()
--        execute_process(
--                COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release 
"${CMAKE_CURRENT_SOURCE_DIR}/basis_universal_host_build"
--                WORKING_DIRECTORY "${BASISU_BINARY_DIR}"
--                RESULT_VARIABLE _basis_result
--        )
--        if(NOT _basis_result EQUAL 0)
--              message(FATAL_ERROR "Failed to configure 
basis_universal_host_build")
--        endif()
--        execute_process(
--                COMMAND ${CMAKE_COMMAND} --build "${BASISU_BINARY_DIR}" 
--config Release
--                WORKING_DIRECTORY "${BASISU_BINARY_DIR}"
--                RESULT_VARIABLE _basis_result
--        )
--        if(NOT _basis_result EQUAL 0)
--              message(FATAL_ERROR "Basis-Universal host tool build failed")
--        endif()
--        message(STATUS "Basis-Universal Host Tool Built")
--
--        find_program(BASIS_UNIVERSAL_CLI NAMES basisu PATHS 
"${BASISU_BINARY_DIR}/basis_install/bin" NO_CACHE NO_DEFAULT_PATH)
--        if(NOT BASIS_UNIVERSAL_CLI)
--              message(FATAL_ERROR "Built basisu CLI tool not found!")
--        endif()
--      else()
--        message(STATUS "Pre-installed basisu tool found: 
${BASIS_UNIVERSAL_CLI}")
--      endif()
-+      find_program(BASIS_UNIVERSAL_CLI NAMES basisu REQUIRED)
- 
-       # Test basisu -version
-       execute_process(
-@@ -174,86 +109,6 @@
- 
- endif()
- 
--if (WZ_ENABLE_BASIS_UNIVERSAL)
--
--      # basis-universal transcoder
--
--      add_library(basis_transcoder STATIC 
"${CMAKE_CURRENT_SOURCE_DIR}/basis_universal/transcoder/basisu_transcoder.cpp" 
"${CMAKE_CURRENT_SOURCE_DIR}/basis_universal/transcoder/basisu_transcoder.h" 
"${CMAKE_CURRENT_SOURCE_DIR}/basis_universal/zstd/zstddeclib.c")
--      set_property(TARGET basis_transcoder PROPERTY FOLDER "3rdparty")
--      target_include_directories(basis_transcoder SYSTEM PUBLIC 
"${CMAKE_CURRENT_SOURCE_DIR}/basis_universal/transcoder")
--
--      if(NOT MSVC)
--              set(_supported_basistranscoder_cxx_compiler_flags "")
--
--              # -fno-strict-aliasing          (GCC, Clang)
--              check_compiler_flags_output("-Werror -fno-strict-aliasing 
-Wno-error=cpp" COMPILER_TYPE CXX   OUTPUT_FLAGS "-fno-strict-aliasing" 
OUTPUT_VARIABLE _supported_basistranscoder_cxx_compiler_flags APPEND)
--
--              # -Wcast-align                          (GCC 3.4+, Clang 3.2+)
--              check_compiler_flags_output("-Werror -Wno-cast-align 
-Wno-error=cpp" COMPILER_TYPE CXX   OUTPUT_FLAGS "-Wno-cast-align" 
OUTPUT_VARIABLE _supported_basistranscoder_cxx_compiler_flags APPEND)
--
--              # -Wdeprecated-declarations
--              check_compiler_flags_output("-Werror 
-Wno-deprecated-declarations -Wno-error=cpp" COMPILER_TYPE CXX   OUTPUT_FLAGS 
"-Wno-deprecated-declarations" OUTPUT_VARIABLE 
_supported_basistranscoder_cxx_compiler_flags APPEND)
--
--              # -Wunused-but-set-variable
--              check_compiler_flags_output("-Werror 
-Wno-unused-but-set-variable -Wno-error=cpp" COMPILER_TYPE CXX   OUTPUT_FLAGS 
"-Wno-unused-but-set-variable" OUTPUT_VARIABLE 
_supported_basistranscoder_cxx_compiler_flags APPEND)
--
--              # -Wunused-function
--              check_compiler_flags_output("-Werror -Wno-unused-function 
-Wno-error=cpp" COMPILER_TYPE CXX   OUTPUT_FLAGS "-Wno-unused-function" 
OUTPUT_VARIABLE _supported_basistranscoder_cxx_compiler_flags APPEND)
--
--              # -Wunused-const-variable
--              check_compiler_flags_output("-Werror -Wno-unused-const-variable 
-Wno-error=cpp" COMPILER_TYPE CXX   OUTPUT_FLAGS "-Wno-unused-const-variable" 
OUTPUT_VARIABLE _supported_basistranscoder_cxx_compiler_flags APPEND)
--
--              # -Wunknown-warning-option
--              check_compiler_flags_output("-Werror 
-Wno-unknown-warning-option -Wno-error=cpp" COMPILER_TYPE CXX   OUTPUT_FLAGS 
"-Wno-unknown-warning-option" OUTPUT_VARIABLE 
_supported_basistranscoder_cxx_compiler_flags APPEND)
--
--              # -Wnontrivial-memcall
--              check_compiler_flags_output("-Werror -Wno-nontrivial-memcall 
-Wno-error=cpp" COMPILER_TYPE CXX   OUTPUT_FLAGS "-Wno-nontrivial-memcall" 
OUTPUT_VARIABLE _supported_basistranscoder_cxx_compiler_flags APPEND)
--
--              if (NOT _supported_basistranscoder_cxx_compiler_flags STREQUAL 
"")
--                      string(REPLACE " " ";" 
_supported_basistranscoder_cxx_compiler_flags 
"${_supported_basistranscoder_cxx_compiler_flags}")
--                      target_compile_options(basis_transcoder PRIVATE 
${_supported_basistranscoder_cxx_compiler_flags})
--              endif()
--      endif()
--
--      # Must also set BASISD_IS_BIG_ENDIAN if the target platform is 
big-endian!
--      if (NOT DEFINED CMAKE_CXX_BYTE_ORDER AND CMAKE_VERSION VERSION_LESS 
3.20)
--              # CMake < 3.20 does not have CMAKE_<LANG>_BYTE_ORDER
--              # Instead, use the older TestBigEndian module (although this 
may not work for cross-compilation)
--              if (NOT CMAKE_CROSSCOMPILING)
--                      include(TestBigEndian)
--                      test_big_endian(IS_BIGENDIAN)
--                      if (IS_BIGENDIAN)
--                              set(CMAKE_CXX_BYTE_ORDER "BIG_ENDIAN")
--                      endif()
--              else()
--                      message(WARNING "Unable to determine endianness for 
target architecture. Either upgrade to CMake 3.20+, or - if big endian - 
manually set the CMAKE_CXX_BYTE_ORDER cache variable to \"BIG_ENDIAN\". 
Otherwise, assuming little endian.")
--              endif()
--      endif()
--      if (DEFINED CMAKE_CXX_BYTE_ORDER AND CMAKE_CXX_BYTE_ORDER STREQUAL 
"BIG_ENDIAN")
--              message(STATUS "Defining BASISD_IS_BIG_ENDIAN=1")
--              target_compile_definitions(basis_transcoder PRIVATE 
"-DBASISD_IS_BIG_ENDIAN=1")
--      endif()
--
--      # Must set BASISU_HAVE_STD_TRIVIALLY_COPYABLE if the target supports 
std::is_trivially_copyable
--      include(CheckCXXSourceCompiles)
--      check_cxx_source_compiles("
--              #include <type_traits>
--              const bool val = std::is_trivially_copyable<bool>::value;
--              int main()
--              {
--                      return 0;
--              }"
--              HAVE_STD_IS_TRIVIALLY_COPYABLE
--      )
--      if (HAVE_STD_IS_TRIVIALLY_COPYABLE)
--              target_compile_definitions(basis_transcoder PUBLIC 
"-DBASISU_HAVE_STD_TRIVIALLY_COPYABLE")
--      endif()
--
--      # Disable certain transcoder formats
--      target_compile_definitions(basis_transcoder PRIVATE 
"-DBASISD_SUPPORT_ATC=0" "-DBASISD_SUPPORT_PVRTC1=0" 
"-DBASISD_SUPPORT_PVRTC2=0")
--
--endif(WZ_ENABLE_BASIS_UNIVERSAL)
--
- if (WZ_PROFILING_NVTX)
-       include(FetchContent)
-       FetchContent_Declare(
-diff -ru a/lib/framework/wzstring.cpp b/lib/framework/wzstring.cpp
---- a/lib/framework/wzstring.cpp
-+++ b/lib/framework/wzstring.cpp
-@@ -29,8 +29,8 @@
- // "By default, Visual Studio always returns the value 199711L for the 
__cplusplus preprocessor macro."
- #define UTF_CPP_CPLUSPLUS 201703L
- #endif
--#include <utfcpp/source/utf8.h>
--#include <utf8proc/utf8proc.h>
-+#include <utf8cpp/utf8.h>
-+#include <utf8proc.h>
- 
- WzUniCodepoint WzUniCodepoint::fromASCII(unsigned char charLiteral)
- {
-diff -ru a/lib/ivis_opengl/CMakeLists.txt b/lib/ivis_opengl/CMakeLists.txt
---- a/lib/ivis_opengl/CMakeLists.txt   2025-09-16 11:41:32.000000000 -0500
-+++ b/lib/ivis_opengl/CMakeLists.txt   2025-09-18 14:00:13.716771596 -0500
-@@ -88,7 +88,7 @@
+diff --git a/lib/ivis_opengl/CMakeLists.txt b/lib/ivis_opengl/CMakeLists.txt
+index fd2d62a2c..72e9c7544 100644
+--- a/lib/ivis_opengl/CMakeLists.txt
++++ b/lib/ivis_opengl/CMakeLists.txt
+@@ -90,7 +90,7 @@ set_property(TARGET ivis-opengl PROPERTY FOLDER "lib")
  include(WZTargetConfiguration)
  WZ_TARGET_CONFIGURATION(ivis-opengl)
  
@@ -263,24 +62,11 @@ diff -ru a/lib/ivis_opengl/CMakeLists.txt 
b/lib/ivis_opengl/CMakeLists.txt
  if(CMAKE_SYSTEM_NAME MATCHES "Emscripten")
        # We should be using the Emscripten port linker flags for FreeType & 
Harfbuzz
  else()
-@@ -116,8 +116,11 @@
-       target_link_libraries(ivis-opengl PRIVATE etcpak)
-       target_compile_definitions(ivis-opengl PRIVATE "-DETCPAK_ENABLED")
- endif()
--if(WZ_ENABLE_BASIS_UNIVERSAL AND TARGET basis_transcoder)
--      target_link_libraries(ivis-opengl PRIVATE basis_transcoder)
-+if(WZ_ENABLE_BASIS_UNIVERSAL)
-+      find_package(PkgConfig QUIET)
-+      pkg_check_modules(BASIS REQUIRED basisu_encoder)
-+      target_include_directories(ivis-opengl PUBLIC ${BASIS_INCLUDE_DIRS})
-+      target_link_libraries(ivis-opengl PRIVATE ${BASIS_LINK_LIBRARIES})
-       target_compile_definitions(ivis-opengl PRIVATE "-DBASIS_ENABLED")
- else()
-       message(WARNING "Basis-universal support is disabled")
-diff -ru a/lib/netplay/CMakeLists.txt b/lib/netplay/CMakeLists.txt
---- a/lib/netplay/CMakeLists.txt       2025-09-16 11:41:32.000000000 -0500
-+++ b/lib/netplay/CMakeLists.txt       2025-09-18 13:37:23.686969530 -0500
-@@ -108,7 +108,7 @@
+diff --git a/lib/netplay/CMakeLists.txt b/lib/netplay/CMakeLists.txt
+index 511ac7b89..9379143a3 100644
+--- a/lib/netplay/CMakeLists.txt
++++ b/lib/netplay/CMakeLists.txt
+@@ -113,7 +113,7 @@ set_property(TARGET netplay PROPERTY FOLDER "lib")
  include(WZTargetConfiguration)
  WZ_TARGET_CONFIGURATION(netplay)
  target_link_libraries(netplay
@@ -289,22 +75,11 @@ diff -ru a/lib/netplay/CMakeLists.txt 
b/lib/netplay/CMakeLists.txt
        PUBLIC tl::expected)
  
  if(WZ_USE_IMPORTED_MINIUPNPC)
-diff -ru a/src/3rdparty/INIReaderWriter.cpp b/src/3rdparty/INIReaderWriter.cpp
---- a/src/3rdparty/INIReaderWriter.cpp 2025-09-16 11:41:32.000000000 -0500
-+++ b/src/3rdparty/INIReaderWriter.cpp 2025-09-18 13:37:23.687094584 -0500
-@@ -13,7 +13,7 @@
- #ifndef INI_API
- # define INI_API
- #endif
--#include <inih/ini.h>
-+#include <ini.h>
- #include "INIReaderWriter.h"
- 
- using std::string;
-diff -ru a/src/CMakeLists.txt b/src/CMakeLists.txt
---- a/src/CMakeLists.txt       2025-09-16 11:41:32.000000000 -0500
-+++ b/src/CMakeLists.txt       2025-09-18 13:37:23.687282446 -0500
-@@ -130,7 +130,7 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 4f07f0edb..4fe645425 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -130,7 +130,7 @@ endif()
  
  target_link_libraries(warzone2100 exception-handler gamelib wzmaplib 
ZipIOProvider ivis-opengl netplay sdl-backend framework sequence sound widget)
  target_link_libraries(warzone2100 launchinfo EmbeddedJSONSignature)
@@ -313,7 +88,7 @@ diff -ru a/src/CMakeLists.txt b/src/CMakeLists.txt
  if(ENABLE_NLS)
        target_link_libraries(warzone2100 ${Intl_LIBRARIES})
  endif()
-@@ -146,7 +146,7 @@
+@@ -146,7 +146,7 @@ else()
        include(IncludeFindCurl)
        target_link_libraries(warzone2100 CURL::libcurl)
  endif()
diff --git a/gnu/packages/patches/warzone2100-unbundle-utfcpp.patch 
b/gnu/packages/patches/warzone2100-unbundle-utfcpp.patch
new file mode 100644
index 0000000000..bdb2755095
--- /dev/null
+++ b/gnu/packages/patches/warzone2100-unbundle-utfcpp.patch
@@ -0,0 +1,51 @@
+Unbundles utfcpp dependency.
+
+patch by Lilah Tascheter <[email protected]>
+
+diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
+index 46c0c26e1..8317e3248 100644
+--- a/3rdparty/CMakeLists.txt
++++ b/3rdparty/CMakeLists.txt
+@@ -3,19 +3,12 @@
+
+ include(CheckCompilerFlagsOutput)
+ 
+-SET(UTF8PROC_INSTALL OFF CACHE BOOL "Enable installation of utf8proc" FORCE)
+-add_subdirectory(utf8proc EXCLUDE_FROM_ALL)
+-set_property(TARGET utf8proc PROPERTY FOLDER "3rdparty")
+-if(NOT MSVC)
+-      set(_supported_utf8proc_cxx_compiler_flags "")
+-
+-      # -Wassign-enum
+-      check_compiler_flags_output("-Werror -Wno-assign-enum -Wno-error=cpp" 
COMPILER_TYPE CXX   OUTPUT_FLAGS "-Wno-assign-enum" OUTPUT_VARIABLE 
_supported_utf8proc_cxx_compiler_flags APPEND)
+-
+-      if (NOT _supported_utf8proc_cxx_compiler_flags STREQUAL "")
+-              string(REPLACE " " ";" _supported_utf8proc_cxx_compiler_flags 
"${_supported_utf8proc_cxx_compiler_flags}")
+-              target_compile_options(utf8proc PRIVATE 
${_supported_utf8proc_cxx_compiler_flags})
+-      endif()
+-endif()
++pkg_check_modules(UTF8PROC REQUIRED libutf8proc)
++add_library(utf8proc UNKNOWN IMPORTED)
++set_target_properties(utf8proc PROPERTIES
++      IMPORTED_LOCATION ${UTF8PROC_LIBRARIES}
++      INTERFACE_INCLUDE_DIRECTORIES ${UTF8PROC_INCLUDE_DIRS}
++      INTERFACE_LINK_LIBRARIES ${UTF8PROC_LINK_LIBRARIES}
++)
+ 
+ add_subdirectory(launchinfo EXCLUDE_FROM_ALL)
+ set_property(TARGET launchinfo PROPERTY FOLDER "3rdparty")
+diff --git a/lib/framework/wzstring.cpp b/lib/framework/wzstring.cpp
+index 8bad73540..139daaf0d 100644
+--- a/lib/framework/wzstring.cpp
++++ b/lib/framework/wzstring.cpp
+@@ -29,8 +29,8 @@
+ // "By default, Visual Studio always returns the value 199711L for the 
__cplusplus preprocessor macro."
+ #define UTF_CPP_CPLUSPLUS 201703L
+ #endif
+-#include <utfcpp/source/utf8.h>
+-#include <utf8proc/utf8proc.h>
++#include <utf8cpp/utf8.h>
++#include <utf8proc.h>
+ 
+ WzUniCodepoint WzUniCodepoint::fromASCII(unsigned char charLiteral)
+ {

Reply via email to