From 6aaf26bf205aee2c6d96f4c4fe4ceff31f1e02b5 Mon Sep 17 00:00:00 2001 From: Aaron Colwell <300262+acolwell@users.noreply.github.com> Date: Thu, 16 May 2024 13:43:00 -0700 Subject: [PATCH] Fix windows pacman repo build. Msys2 updated gcc in the last few days which has caused the package repo build to fail. Here are some minor fixes to make the build work again. - Add fmt to openimageio's dependency list since the version included with the openimageio source now appears to cause an internal compiler error. - Added an include for math.h to in a libsox test file to make the compiler stop generating an error about fabs() not being defined. - Fix type mismatch and missing declaration errors in ImageMagick. - Updated mingw-w64-dump_syms gitcommit to point to a version that fixes a missing header build error. --- .../mingw-w64-dump_syms/PKGBUILD | 4 +- .../mingw-w64-imagemagick/PKGBUILD | 4 ++ .../fix-compiler-errors.patch | 39 +++++++++++++++++++ .../mingw-w64-openimageio/PKGBUILD | 1 + tools/MINGW-packages/mingw-w64-sox/PKGBUILD | 7 +++- .../mingw-w64-sox/include-math-header.patch | 11 ++++++ .../windows_pacman_repo_version.txt | 2 +- 7 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 tools/MINGW-packages/mingw-w64-imagemagick/fix-compiler-errors.patch create mode 100644 tools/MINGW-packages/mingw-w64-sox/include-math-header.patch diff --git a/tools/MINGW-packages/mingw-w64-dump_syms/PKGBUILD b/tools/MINGW-packages/mingw-w64-dump_syms/PKGBUILD index 7788fd0e8..2b16023c6 100644 --- a/tools/MINGW-packages/mingw-w64-dump_syms/PKGBUILD +++ b/tools/MINGW-packages/mingw-w64-dump_syms/PKGBUILD @@ -3,8 +3,8 @@ _realname=breakpad pkgbase=mingw-w64-natron_dump_syms pkgname="${MINGW_PACKAGE_PREFIX}-natron_dump_syms" -gitcommit=1a92fe4a44c954577dd678e22252848e5fc714c2 -pkgver=2156.1a92fe4a +gitcommit=aa833ca824b1cd5915995bf1fb6bc377c421bd07 +pkgver=2159.aa833ca8 pkgrel=1 pkgdesc="Dump win32 dwarf symbols" arch=('any') diff --git a/tools/MINGW-packages/mingw-w64-imagemagick/PKGBUILD b/tools/MINGW-packages/mingw-w64-imagemagick/PKGBUILD index 669942532..1572eee5a 100644 --- a/tools/MINGW-packages/mingw-w64-imagemagick/PKGBUILD +++ b/tools/MINGW-packages/mingw-w64-imagemagick/PKGBUILD @@ -41,6 +41,7 @@ source=( ImageMagick-6-mingw.patch ImageMagick-6.9.11-disable-ltdl.diff ImageMagick-6.9.10-gimp210.diff + fix-compiler-errors.patch ) sha256sums=( 'SKIP' @@ -50,6 +51,7 @@ sha256sums=( 'c5066995e3cc5fe81cc36b194a4a70fb2bc6ff6e5808062a09d6e767e4bd23eb' 'eb83e383f720c109b3ef7fb8c774cf108aec6ac6e71722ac5292b60feaaf3dd6' '98f5da106e24f49fff16020ceae375c4f46108ad9a786002c1895b1c17f3dbeb' + '775b28eb46c81a243ce2eff450e3339433c993e6acf6c0340b23aac62e836dd1' ) prepare() { @@ -70,6 +72,8 @@ prepare() { patch -p0 -i ${srcdir}/ImageMagick-6.9.10-gimp210.diff fi + patch -p1 -i ${srcdir}/fix-compiler-errors.patch + # fix linker sed -i 's#$(MAGICK_DEP_LIBS)#$(MAGICK_DEP_LIBS) -lws2_32#g' ${MCORE}/MakeFile.am diff --git a/tools/MINGW-packages/mingw-w64-imagemagick/fix-compiler-errors.patch b/tools/MINGW-packages/mingw-w64-imagemagick/fix-compiler-errors.patch new file mode 100644 index 000000000..7b3515b57 --- /dev/null +++ b/tools/MINGW-packages/mingw-w64-imagemagick/fix-compiler-errors.patch @@ -0,0 +1,39 @@ +diff -ru a/magick/utility-private.h b/magick/utility-private.h +--- a/magick/utility-private.h 2024-05-16 16:18:24.863994300 -0700 ++++ b/magick/utility-private.h 2024-05-16 16:18:57.352206600 -0700 +@@ -273,7 +273,7 @@ + path_wide=create_wchar_path(path); + if (path_wide == (WCHAR *) NULL) + return(-1); +- status=wstat(path_wide,attributes); ++ status=_wstati64(path_wide,attributes); + path_wide=(WCHAR *) RelinquishMagickMemory(path_wide); + return(status); + #endif + +diff -ru a/magick/utility.c b/magick/utility.c +--- a/magick/utility.c 2020-05-31 09:04:03.000000000 -0700 ++++ b/magick/utility.c 2024-05-17 08:05:06.523764900 -0700 +@@ -67,6 +67,9 @@ + #if defined(MAGICKCORE_HAVE_PROCESS_H) + #include + #endif ++#if defined(MAGICKCORE_HAVE_GETPAGESIZE) ++int getpagesize(); ++#endif + #if defined(MAGICKCORE_HAVE_MACH_O_DYLD_H) + #include + #end + + diff -ru a/wand/mogrify.c b/wand/mogrify.c +--- a/wand/mogrify.c 2020-05-31 09:04:03.000000000 -0700 ++++ b/wand/mogrify.c 2024-05-17 08:33:23.368934800 -0700 +@@ -3983,7 +3983,7 @@ + "preserve-timestamp")); + if (preserve_timestamp != MagickFalse) + { +- struct utimbuf ++ struct _utimbuf + timestamp; + + timestamp.actime=properties.st_atime; diff --git a/tools/MINGW-packages/mingw-w64-openimageio/PKGBUILD b/tools/MINGW-packages/mingw-w64-openimageio/PKGBUILD index 25373a17c..83b7dc937 100644 --- a/tools/MINGW-packages/mingw-w64-openimageio/PKGBUILD +++ b/tools/MINGW-packages/mingw-w64-openimageio/PKGBUILD @@ -11,6 +11,7 @@ url="http://www.openimageio.org/" license=("BSD-3") depends=("${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-fmt" "${MINGW_PACKAGE_PREFIX}-jasper" "${MINGW_PACKAGE_PREFIX}-giflib" "${MINGW_PACKAGE_PREFIX}-libjpeg" diff --git a/tools/MINGW-packages/mingw-w64-sox/PKGBUILD b/tools/MINGW-packages/mingw-w64-sox/PKGBUILD index 45ae3f7bf..6fec3ac88 100644 --- a/tools/MINGW-packages/mingw-w64-sox/PKGBUILD +++ b/tools/MINGW-packages/mingw-w64-sox/PKGBUILD @@ -15,14 +15,17 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" ) depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libmad") source=("https://downloads.sourceforge.net/sourceforge/${_realname}/${_realname}-$pkgver.tar.bz2" - "remove-libssp-detection.patch") + "remove-libssp-detection.patch" + "include-math-header.patch") sha256sums=('81a6956d4330e75b5827316e44ae381e6f1e8928003c6aa45896da9041ea149c' - '57d8fe423a97b554d4f34a9952a9827974ecc5f706ac602c4dd77d32bae2afd6') + '57d8fe423a97b554d4f34a9952a9827974ecc5f706ac602c4dd77d32bae2afd6' + '2a1612b9755147cab4f3113bc804d485cf51d032f05c5da2496e99382d9b3681') prepare() { cd "${srcdir}/${_realname}-${pkgver}" patch -Np1 -i "${srcdir}/remove-libssp-detection.patch" + patch -Np1 -i "${srcdir}/include-math-header.patch" autoreconf -fiv } diff --git a/tools/MINGW-packages/mingw-w64-sox/include-math-header.patch b/tools/MINGW-packages/mingw-w64-sox/include-math-header.patch new file mode 100644 index 000000000..0b001d23f --- /dev/null +++ b/tools/MINGW-packages/mingw-w64-sox/include-math-header.patch @@ -0,0 +1,11 @@ +diff -ur a/src/sox_sample_test.h b/src/sox_sample_test.h +--- a/src/sox_sample_test.h 2012-01-23 14:27:33.000000000 -0800 ++++ b/src/sox_sample_test.h 2024-05-16 14:11:33.908971100 -0700 +@@ -19,6 +19,7 @@ + #undef NDEBUG /* Must undef above assert.h or other that might include it. */ + #endif + #include ++#include + #include "sox.h" + + #define TEST_UINT(bits) \ diff --git a/tools/MINGW-packages/windows_pacman_repo_version.txt b/tools/MINGW-packages/windows_pacman_repo_version.txt index e0492b582..a56bd6d09 100644 --- a/tools/MINGW-packages/windows_pacman_repo_version.txt +++ b/tools/MINGW-packages/windows_pacman_repo_version.txt @@ -1 +1 @@ -20240201-1 +20240516-1