From 9c5604c30df1a1b6855f0753e20c175586d7b678 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Wed, 15 Mar 2023 17:04:32 +0100
Subject: [PATCH] Windows package: ensure that the embedded MinGW compiler
 comes with all its dependencies

---
 windows/deps/Makefile    |  2 +-
 windows/deps/versions.mk | 26 +++++++++++++++++++-------
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/windows/deps/Makefile b/windows/deps/Makefile
index 83a3474a40..9664f349db 100644
--- a/windows/deps/Makefile
+++ b/windows/deps/Makefile
@@ -176,7 +176,7 @@ lib64-msys2: tarballs/mingw-w64-x86_64-boost-$(MINGW64_BOOST_VERSION)-any.pkg.ta
 	for f in $^; do tar xf $$f --directory $@ --strip-components 1 $(MSYS2_EXCLUDES); done
 	touch $@
 
-mingw64: tarballs/mingw-w64-x86_64-gcc-$(MINGW64_GCC_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-gcc-libs-$(MINGW64_GCC_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-gmp-$(MINGW64_GMP_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-binutils-$(MINGW64_BINUTILS_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-headers-git-$(MINGW64_HEADERS_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-crt-git-$(MINGW64_CRT_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-winpthreads-git-$(MINGW64_WINPTHREADS_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-libwinpthread-git-$(MINGW64_WINPTHREADS_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-zlib-$(MINGW64_ZLIB_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-zstd-$(MINGW64_ZSTD_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-isl-$(MINGW64_ISL_VERSION)-any.pkg.tar.zst
+mingw64: tarballs/mingw-w64-x86_64-gcc-$(MINGW64_GCC_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-gcc-libs-$(MINGW64_GCC_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-gmp-$(MINGW64_GMP_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-binutils-$(MINGW64_BINUTILS_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-headers-git-$(MINGW64_HEADERS_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-crt-git-$(MINGW64_CRT_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-winpthreads-git-$(MINGW64_WINPTHREADS_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-libwinpthread-git-$(MINGW64_WINPTHREADS_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-zlib-$(MINGW64_ZLIB_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-zstd-$(MINGW64_ZSTD_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-isl-$(MINGW64_ISL_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-mpc-$(MINGW64_MPC_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-mpfr-$(MINGW64_MPFR_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-libiconv-$(MINGW64_LIBICONV_VERSION)-any.pkg.tar.zst tarballs/mingw-w64-x86_64-windows-default-manifest-$(MINGW64_WINDOWS_DEFAULT_MANIFEST_VERSION)-any.pkg.tar.zst
 	rm -rf $@
 	for f in $^; do tar xf $$f $(MSYS2_EXCLUDES); done
 	touch $@
diff --git a/windows/deps/versions.mk b/windows/deps/versions.mk
index ed654a3351..33b9a0c59e 100644
--- a/windows/deps/versions.mk
+++ b/windows/deps/versions.mk
@@ -41,25 +41,37 @@ MINGW64_LIBAEC_VERSION = 1.0.6-2
 ## MinGW packages for the embedded compiler
 
 # pacman -Ss mingw-w64-x86_64-gcc$
-MINGW64_GCC_VERSION = 12.2.0-7
+MINGW64_GCC_VERSION = 12.2.0-10
 
 # pacman -Ss mingw-w64-x86_64-gmp
-MINGW64_GMP_VERSION = 6.2.1-4
+MINGW64_GMP_VERSION = 6.2.1-5
 
 # pacman -Ss mingw-w64-x86_64-binutils
-MINGW64_BINUTILS_VERSION = 2.39-2
+MINGW64_BINUTILS_VERSION = 2.40-2
 
 # pacman -Ss mingw-w64-x86_64-headers-git
-MINGW64_HEADERS_VERSION = 10.0.0.r186.gfc55e181b-1
+MINGW64_HEADERS_VERSION = 10.0.0.r234.g283e5b23a-1
 
 # pacman -Ss mingw-w64-x86_64-crt-git
-MINGW64_CRT_VERSION = 10.0.0.r186.gfc55e181b-1
+MINGW64_CRT_VERSION = 10.0.0.r234.g283e5b23a-1
 
 # pacman -Ss mingw-w64-x86_64-winpthreads-git
-MINGW64_WINPTHREADS_VERSION = 10.0.0.r186.gfc55e181b-1
+MINGW64_WINPTHREADS_VERSION = 10.0.0.r234.g283e5b23a-1
 
 # pacman -Ss mingw-w64-x86_64-zstd
-MINGW64_ZSTD_VERSION = 1.5.2-2
+MINGW64_ZSTD_VERSION = 1.5.4-1
 
 # pacman -Ss mingw-w64-x86_64-isl
 MINGW64_ISL_VERSION = 0.25-1
+
+# pacman -Ss mingw-w64-x86_64-mpc
+MINGW64_MPC_VERSION = 1.3.1-1
+
+# pacman -Ss mingw-w64-x86_64-mpfr
+MINGW64_MPFR_VERSION = 4.2.0-1
+
+# pacman -Ss mingw-w64-x86_64-libiconv
+MINGW64_LIBICONV_VERSION = 1.17-3
+
+# pacman -Ss mingw-w64-x86_64-windows-default-manifest
+MINGW64_WINDOWS_DEFAULT_MANIFEST_VERSION = 6.4-4
-- 
GitLab