From 9a4a32b2eb13860c41d154166817f5712d8eb870 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Tue, 25 Feb 2025 05:22:38 +0200
Subject: [PATCH 25/25] Update msys2 environment to 250216 level

- Add clang-x86_64 toolchain

See RM #1131

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 doc/README.msys2                              | 18 ++++++----
 .../installer_msys2/Makefile.autotools        | 35 +++++++++----------
 .../windows/installer_msys2/Makefile.meson    | 32 +++++++++++------
 3 files changed, 49 insertions(+), 36 deletions(-)

diff --git a/doc/README.msys2 b/doc/README.msys2
index 559e22ca8d..874fa4415d 100644
--- a/doc/README.msys2
+++ b/doc/README.msys2
@@ -10,8 +10,8 @@ using MSYS2 from https://www.msys2.org/
 ==============
 
 Current official premade MSYS2 environment version info:
-[premade]:  msys2-freeciv-win64-241102.7z
-[upstream]: https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20240727.exe
+[premade]:  msys2-freeciv-win64-250216.7z
+[upstream]: https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20241208.exe
 
 See chapter "Premade environment" for what these mean. The info
 is located here for quick reference for the specific freeciv revision.
@@ -35,8 +35,9 @@ is located here for quick reference for the specific freeciv revision.
  with listing of versions current at the time of this freeciv version.
 
  "<arch>" in the package names depends on the build target:
- - win64    -> "x86_64"
- - win64-10 -> "ucrt-x86_64"
+ - win64     -> "x86_64"
+ - win64-10  -> "ucrt-x86_64"
+ - win64-10+ -> "clang-x86_64"
 
 1) Install MSYS2 following the documentation on their homepage
 
@@ -141,9 +142,10 @@ by the date (YYMMDD) in the freeciv msys2 environment
 Most packages are included for all of win64 and
 ucrt64 (win64, with minimum requirement of Windows 10) targets.
 For each package listed below with <arch> in the name, actually
-two packages are installed;
-one where <arch> is replaced by 'x86_64', and
-one where <arch> is replaced by 'ucrt-x86_64'
+three packages are installed;
+one where <arch> is replaced by 'x86_64',
+one where <arch> is replaced by 'ucrt-x86_64', and
+one where <arch> is replaced bu 'clang-x86_64'
 
 
 Following packages have been installed:
@@ -177,6 +179,8 @@ Following packages have been installed:
 - mingw-w64-<arch>-tolua
 - mingw-w64-ucrt-x86_64-qt6-base
 - mingw-w64-ucrt-x86_64-qt6-svg
+- mingw-w64-clang-x86_64-qt6-base
+- mingw-w64-clang-x86_64-qt6-svg
 - mingw-w64-<arch>-wget2
 
 After all the packages were installed 'pacman -Scc' was run to completely
diff --git a/platforms/windows/installer_msys2/Makefile.autotools b/platforms/windows/installer_msys2/Makefile.autotools
index 121b1b2a15..47a34511fd 100644
--- a/platforms/windows/installer_msys2/Makefile.autotools
+++ b/platforms/windows/installer_msys2/Makefile.autotools
@@ -66,11 +66,7 @@ INSTSUB=${ARCHDIR}
 # msys2 has dlls in...
 DLLPATH_PREFIX=/$(ARCHDIR)/bin/
 
-ifeq ($(CI),yes)
-ICUVER=75
-else
-ICUVER=75
-endif
+ICUVER=76
 
 #
 # Make rules
@@ -123,10 +119,6 @@ snapshot:
 	cd $(SRC_ROOT) ; ./scripts/refresh_changelog.sh ; ./autogen.sh --no-configure-run
 	make -f $(MAKEFILE_NAME) VERSION_REVTYPE="git" EXTRA_CONFIG="--enable-gitrev --with-project-definition=$(SRC_ROOT)/../../../bootstrap/snapshot.project CFLAGS=\\\"-Werror \$$\$$CFLAGS\\\" CXXFLAGS=\\\"\$$\$$CXXFLAGS\\\"" all
 
-ci:
-	cd $(SRC_ROOT) ; ./autogen.sh --no-configure-run
-	make -f $(MAKEFILE_NAME) VERSION_REVTYPE="git" CI=yes EXTRA_CONFIG="--enable-gitrev --with-project-definition=$(SRC_ROOT)/../../../bootstrap/snapshot.project CFLAGS=\\\"-Werror $$CFLAGS\\\" CXXFLAGS=\\\"$$CXXFLAGS\\\"" ruledit-installer-qt6
-
 # Configure Freeciv
 
 configure-freeciv-common:
@@ -341,7 +333,14 @@ DEFAULT_FCMP_DLLS := \
 	libthai-0.dll \
 	libdatrie-1.dll \
 	libunistring-5.dll \
-	librsvg-2-2.dll
+	librsvg-2-2.dll \
+	libtiff-6.dll \
+	libjpeg-8.dll \
+	libLerc.dll \
+	libwebp-7.dll \
+	libdeflate.dll \
+	libjbig-0.dll \
+	libsharpyuv-0.dll
 
 install-env-default-fcmp: install-env-common
 	cp -R $(addprefix $(DLLPATH_PREFIX), $(DEFAULT_FCMP_DLLS)) $(INST_DIR)/$(WINARCH)-$(GUI)/
@@ -401,14 +400,14 @@ SDL2_DLLS := \
 	libjxl.dll \
 	libbrotlienc.dll \
 	libhwy.dll \
-        libavif-16.dll \
-        libwebpdemux-2.dll \
-        libjxl_cms.dll \
-        libaom.dll \
-        libdav1d-7.dll \
-        rav1e.dll \
-        libSvtAv1Enc-2.dll \
-        libyuv.dll
+	libavif-16.dll \
+	libwebpdemux-2.dll \
+	libjxl_cms.dll \
+	libaom.dll \
+	libdav1d-7.dll \
+	librav1e.dll \
+	libSvtAv1Enc-2.dll \
+	libyuv.dll
 
 install-env-sdl2: install-env-gtk4-fcmp
 	# Add DLLs
diff --git a/platforms/windows/installer_msys2/Makefile.meson b/platforms/windows/installer_msys2/Makefile.meson
index 089731ca6c..e1a8a43bf2 100644
--- a/platforms/windows/installer_msys2/Makefile.meson
+++ b/platforms/windows/installer_msys2/Makefile.meson
@@ -61,8 +61,10 @@ DLLPATH_PREFIX=/$(ARCHDIR)/bin/
 
 ifeq ($(CI),yes)
 ICUVER=75
+RAV1E=rav1e.dll
 else
-ICUVER=75
+ICUVER=76
+RAV1E=librav1e.dll
 endif
 
 #
@@ -198,7 +200,8 @@ SOUND_DLLS := \
 	libmpg123-0.dll \
 	libvorbisfile-3.dll \
 	libvorbis-0.dll \
-	libogg-0.dll
+	libogg-0.dll \
+	libmodplug-1.dll
 
 COMMON_DLLS := \
 	libcairo-2.dll \
@@ -275,7 +278,14 @@ FCMP_GTK3_DLLS := \
 	libpangoft2-1.0-0.dll \
 	libthai-0.dll \
 	libdatrie-1.dll \
-	librsvg-2-2.dll
+	librsvg-2-2.dll \
+	libtiff-6.dll \
+	libjpeg-8.dll \
+	libjbig-0.dll \
+	libwebp-7.dll \
+	libdeflate.dll \
+	libLerc.dll \
+	libsharpyuv-0.dll
 
 install-env-gtk3-fcmp: install-env-common
 	cp -R $(addprefix $(DLLPATH_PREFIX), $(FCMP_GTK3_DLLS)) $(INST_DIR)/$(WINARCH)-client-$(GUI)/
@@ -347,14 +357,14 @@ SDL2_DLLS := \
 	libjxl.dll \
 	libbrotlienc.dll \
 	libhwy.dll \
-        libavif-16.dll \
-        libwebpdemux-2.dll \
-        libjxl_cms.dll \
-        libaom.dll \
-        libdav1d-7.dll \
-        rav1e.dll \
-        libSvtAv1Enc-2.dll \
-        libyuv.dll
+	libavif-16.dll \
+	libwebpdemux-2.dll \
+	libjxl_cms.dll \
+	libaom.dll \
+	libdav1d-7.dll \
+	$(RAV1E) \
+	libSvtAv1Enc-2.dll \
+	libyuv.dll
 
 install-env-sdl2: install-env-gtk4-fcmp
 	# Add DLLs
-- 
2.47.2

