diff --git a/check-versions/config.py b/check-versions/config.py index bd977a3..4907c12 100644 --- a/check-versions/config.py +++ b/check-versions/config.py @@ -85,8 +85,8 @@ debian_check = { 'registry': 'https://registry-1.docker.io', 'image name': 'library/debian', 'architecture': 'amd64', - 'reference': 'buster-slim', - 'tag_format': 'buster-{0}-slim', + 'reference': 'bullseye-slim', + 'tag_format': 'bullseye-{0}-slim', } raspios_check = { 'check': 'scrape', diff --git a/toolchains/android-common/packages/openssl/patches/00_modernize_build_system.patch b/toolchains/android-common/packages/openssl/patches/00_modernize_build_system.patch index a785551..7b60394 100644 --- a/toolchains/android-common/packages/openssl/patches/00_modernize_build_system.patch +++ b/toolchains/android-common/packages/openssl/patches/00_modernize_build_system.patch @@ -1,4 +1,4 @@ -From 79fd045374b72faccc75b046e069adde7d5feccf Mon Sep 17 00:00:00 2001 +From 8e344dcf28d972c5fce1c1db9c214196329a00aa Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sat, 29 Feb 2020 06:43:26 +0100 Subject: [PATCH 1/3] Andoid cross compile: change ANDROID_NDK_HOME to @@ -13,11 +13,11 @@ Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/11206) --- Configurations/15-android.conf | 6 +++--- - NOTES.ANDROID | 12 ++++++------ - 2 files changed, 9 insertions(+), 9 deletions(-) + NOTES.ANDROID | 16 ++++++++-------- + 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Configurations/15-android.conf b/Configurations/15-android.conf -index 7b496a4529..d5021f68d0 100644 +index 4616394f8c..c569b5053b 100644 --- a/Configurations/15-android.conf +++ b/Configurations/15-android.conf @@ -24,17 +24,17 @@ @@ -42,21 +42,31 @@ index 7b496a4529..d5021f68d0 100644 $ndk = canonpath($ndk); diff --git a/NOTES.ANDROID b/NOTES.ANDROID -index 86459778fa..b057ff2757 100644 +index 293ad4327c..8c406f8bba 100644 --- a/NOTES.ANDROID +++ b/NOTES.ANDROID -@@ -23,7 +23,7 @@ - platform. Though you still need to know the prefix to extend your PATH, - in order to invoke $(CROSS_COMPILE)gcc and company. (Configure will fail - and give you a hint if you get it wrong.) Apart from PATH adjustment -- you need to set ANDROID_NDK_HOME environment to point at NDK directory -+ you need to set ANDROID_NDK_ROOT environment to point at NDK directory - as /some/where/android-ndk-. Both variables are significant at both - configuration and compilation times. NDK customarily supports multiple - Android API levels, e.g. android-14, android-21, etc. By default latest -@@ -32,13 +32,13 @@ - target platform version. For example, to compile for ICS on ARM with - NDK 10d: +@@ -24,7 +24,7 @@ + need to know the prefix to extend your PATH, in order to invoke + $(CROSS_COMPILE)clang [*gcc on NDK 19 and lower] and company. (Configure + will fail and give you a hint if you get it wrong.) Apart from PATH +- adjustment you need to set ANDROID_NDK_HOME environment to point at the ++ adjustment you need to set ANDROID_NDK_ROOT environment to point at the + NDK directory. If you're using a side-by-side NDK the path will look + something like /some/where/android-sdk/ndk/, and for a standalone + NDK the path will be something like /some/where/android-ndk-. +@@ -35,21 +35,21 @@ + with N being the numerical value of the target platform version. For example, + to compile for Android 10 arm64 with a side-by-side NDK r20.0.5594570 + +- export ANDROID_NDK_HOME=/home/whoever/Android/android-sdk/ndk/20.0.5594570 +- PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:$PATH ++ export ANDROID_NDK_ROOT=/home/whoever/Android/android-sdk/ndk/20.0.5594570 ++ PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:$PATH + ./Configure android-arm64 -D__ANDROID_API__=29 + make + + Older versions of the NDK have GCC under their common prebuilt tools directory, so the bin path + will be slightly different. EG: to compile for ICS on ARM with NDK 10d: - export ANDROID_NDK_HOME=/some/where/android-ndk-10d - PATH=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin:$PATH @@ -71,7 +81,7 @@ index 86459778fa..b057ff2757 100644 appoint headers-n-libraries' location. It's still recognized in order to facilitate migration from older projects. However, since API level appears in CROSS_SYSROOT value, passing -D__ANDROID_API__=N can be in -@@ -53,9 +53,9 @@ +@@ -64,9 +64,9 @@ Another option is to create so called "standalone toolchain" tailored for single specific platform including Android API level, and assign its @@ -84,10 +94,10 @@ index 86459778fa..b057ff2757 100644 Running tests (on Linux) ------------------------ -- -2.29.2 +2.32.0 -From 5420db1ac909a57c1bf451c27336abcb144d1ac5 Mon Sep 17 00:00:00 2001 +From 9f74317da0d8a301a6ba2a49a8d51fa0f621795c Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 3 Mar 2020 22:55:09 +0100 Subject: [PATCH 2/3] Configurations: Fix "android" configuration target @@ -104,7 +114,7 @@ Reviewed-by: Matt Caswell 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Configurations/15-android.conf b/Configurations/15-android.conf -index d5021f68d0..ea7785c663 100644 +index c569b5053b..8ad99cc16d 100644 --- a/Configurations/15-android.conf +++ b/Configurations/15-android.conf @@ -168,7 +168,8 @@ my %targets = ( @@ -118,10 +128,10 @@ index d5021f68d0..ea7785c663 100644 }, "android-arm" => { -- -2.29.2 +2.32.0 -From c5051d5e0aa6019fb682fef8e3d237b20a2d562d Mon Sep 17 00:00:00 2001 +From 7cc6ee427fcee44566e0d76a926e0bb370ce464c Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Tue, 17 Nov 2020 22:20:43 -0600 Subject: [PATCH 3/3] Support for Android NDK r22-beta1 @@ -145,7 +155,7 @@ Reviewed-by: Richard Levitte 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/Configurations/15-android.conf b/Configurations/15-android.conf -index ea7785c663..d96050a67e 100644 +index 8ad99cc16d..fb03522862 100644 --- a/Configurations/15-android.conf +++ b/Configurations/15-android.conf @@ -30,17 +30,17 @@ @@ -282,5 +292,5 @@ index ea7785c663..d96050a67e 100644 bn_ops => $arch =~ m/64$/ ? "SIXTY_FOUR_BIT_LONG" : "BN_LLONG", -- -2.29.2 +2.32.0 diff --git a/toolchains/common/packages/faad2/patches/fix-mingw-compilation.patch b/toolchains/common/packages/faad2/patches/fix-mingw-compilation.patch deleted file mode 100644 index 627bee3..0000000 --- a/toolchains/common/packages/faad2/patches/fix-mingw-compilation.patch +++ /dev/null @@ -1,22 +0,0 @@ -From b85c7449be81f0f707dca329c2fc67733d4c6856 Mon Sep 17 00:00:00 2001 -From: Cameron Cawley -Date: Fri, 22 Dec 2017 20:04:35 +0000 -Subject: [PATCH] Fix compilation with MinGW - ---- - libfaad/decoder.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libfaad/decoder.c b/libfaad/decoder.c -index 52a387f..4f4b011 100644 ---- a/libfaad/decoder.c -+++ b/libfaad/decoder.c -@@ -53,7 +53,7 @@ - uint16_t dbg_count; - #endif - --#if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64 -+#if (defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && !defined(PACKAGE_VERSION) - #include "win32_ver.h" - #endif - diff --git a/toolchains/common/packages/flac/patches/fix-memory-h.patch b/toolchains/common/packages/flac/patches/fix-memory-h.patch deleted file mode 100644 index 2b05687..0000000 --- a/toolchains/common/packages/flac/patches/fix-memory-h.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d178058028050aeec649c85644cc9eed08f0aa37 Mon Sep 17 00:00:00 2001 -From: sezero -Date: Sun, 15 Jan 2017 01:56:56 +0300 -Subject: [PATCH] libFLAC/cpu.c: Replace memory.h include with string.h - -cpu.c was the only source to use memory.h instead of string.h. - -Signed-off-by: Erik de Castro Lopo ---- - src/libFLAC/cpu.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libFLAC/cpu.c b/src/libFLAC/cpu.c -index 1c80a728..6629fb95 100644 ---- a/src/libFLAC/cpu.c -+++ b/src/libFLAC/cpu.c -@@ -37,7 +37,7 @@ - #include "private/cpu.h" - #include "share/compat.h" - #include --#include -+#include - - #if defined(_MSC_VER) - # include /* for __cpuid() and _xgetbv() */ --- -2.11.0 - diff --git a/toolchains/common/packages/fluidsynth/build.sh b/toolchains/common/packages/fluidsynth/build.sh index d8a38a1..6434d0f 100755 --- a/toolchains/common/packages/fluidsynth/build.sh +++ b/toolchains/common/packages/fluidsynth/build.sh @@ -30,26 +30,17 @@ do_make -C gettext-runtime/intl install cd .. do_pkg_fetch glib2.0 +do_patch glib -# Patch glib to not make use of Carbon as it's deprecated in latest MacOSX -sed -i -e 's/glib_have_carbon=yes/glib_have_carbon=no/' configure.ac +# Only keep glib and gthread +sed -i -e "/subdir('/{/'glib'/n; /'gthread'/n; s/^/#/}" meson.build -# For now glib2.0 has configure support -NOCONFIGURE=1 ./autogen.sh +do_meson +ninja +ninja install -# We must export because sh keeps local to functions the variables assignments put in front of them -export glib_cv_stack_grows=no glib_cv_uscore=no -do_configure --with-pcre=internal -unset glib_cv_stack_grows glib_cv_uscore - -# Build and install only the bare minimum for fluidsynth -do_make -C glib -do_make -C gthread -do_make -C glib install -do_make -C gthread install -do_make install-pkgconfigDATA pkgconfig_DATA="glib-2.0.pc gthread-2.0.pc" - -cd .. +# We are in build directory +cd ../.. # Debian version is quite old do_http_fetch fluidsynth \ diff --git a/toolchains/common/packages/freetype/patches/0001-Fix-compilation-with-GCC-4.7.patch b/toolchains/common/packages/freetype/patches/0001-Fix-compilation-with-GCC-4.7.patch index ccd7980..678851e 100644 --- a/toolchains/common/packages/freetype/patches/0001-Fix-compilation-with-GCC-4.7.patch +++ b/toolchains/common/packages/freetype/patches/0001-Fix-compilation-with-GCC-4.7.patch @@ -1,4 +1,4 @@ -From b87a179a24114108597b231bfd7304da86254c97 Mon Sep 17 00:00:00 2001 +From 32d61fc60be24c1cc3a43f04a322beec30c95920 Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Tue, 17 Sep 2019 20:47:39 +0100 Subject: [PATCH] Fix compilation with GCC 4.7 @@ -8,17 +8,22 @@ Subject: [PATCH] Fix compilation with GCC 4.7 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c -index ca85d9751..e1e3d7141 100644 +index f55016122..410f0b65f 100644 --- a/src/sfnt/pngshim.c +++ b/src/sfnt/pngshim.c -@@ -60,10 +60,11 @@ +@@ -59,7 +59,8 @@ /* The `vector_size' attribute was introduced in gcc 3.1, which */ /* predates clang; the `__BYTE_ORDER__' preprocessor symbol was */ /* introduced in gcc 4.6 and clang 3.2, respectively. */ - /* `__builtin_shuffle' for gcc was introduced in gcc 4.7.0. */ + /* `__builtin_shuffle' for gcc was introduced in gcc 4.7.0, */ + /* however, this causes an internal compiler error on gcc 4.7. */ - #if ( ( defined( __GNUC__ ) && \ + /* */ + /* Intel compilers do not currently support __builtin_shuffle; */ + +@@ -67,7 +68,7 @@ + #if !defined( __INTEL_COMPILER ) && \ + ( ( defined( __GNUC__ ) && \ ( ( __GNUC__ >= 5 ) || \ - ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 7 ) ) ) ) || \ + ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 8 ) ) ) ) || \ @@ -26,5 +31,5 @@ index ca85d9751..e1e3d7141 100644 ( ( __clang_major__ >= 4 ) || \ ( ( __clang_major__ == 3 ) && ( __clang_minor__ >= 2 ) ) ) ) ) && \ -- -2.11.0 +2.32.0 diff --git a/toolchains/common/packages/giflib/build.sh b/toolchains/common/packages/giflib/build.sh index abfd186..13b861d 100755 --- a/toolchains/common/packages/giflib/build.sh +++ b/toolchains/common/packages/giflib/build.sh @@ -8,11 +8,12 @@ do_make_bdir do_pkg_fetch giflib -do_configure +# -Wno-format-truncation is a recent addition to GCC remove it as we don't care about the warning +sed -i -e 's/-Wno-format-truncation //' Makefile -do_make -C lib +do_make libgif.a OFLAGS="${CPPFLAGS} ${CFLAGS} ${LDFLAGS}" -# Don't install binaries and doc -do_make -C lib install +do_make install-include PREFIX=${PREFIX} +install -m 644 libgif.a "${LIBDIR:-${PKG_CONFIG_LIBDIR:-${PREFIX}/lib/pkgconfig}/..}/libgif.a" do_clean_bdir diff --git a/toolchains/common/packages/giflib/patches/fix-android-compatibility.patch b/toolchains/common/packages/giflib/patches/fix-android-compatibility.patch deleted file mode 100644 index dac7c49..0000000 --- a/toolchains/common/packages/giflib/patches/fix-android-compatibility.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 839d32fc945b4cec8ac88161883307256ebd57ab Mon Sep 17 00:00:00 2001 -From: KangLin -Date: Thu, 18 Aug 2016 17:03:09 +0800 -Subject: [PATCH] compatibility S_IREAD and S_IWRITE and SIZE_MAX in android - ---- - lib/egif_lib.c | 7 +++++++ - lib/gif_lib_private.h | 4 ++++ - lib/openbsd-reallocarray.c | 4 ++++ - 3 files changed, 15 insertions(+) - -diff --git a/lib/egif_lib.c b/lib/egif_lib.c -index 18f954f..1561201 100644 ---- a/lib/egif_lib.c -+++ b/lib/egif_lib.c -@@ -44,6 +44,13 @@ static int EGifBufferedOutput(GifFileType * GifFile, GifByteType * Buf, - #define LOBYTE(x) ((x) & 0xff) - #define HIBYTE(x) (((x) >> 8) & 0xff) - -+#ifndef S_IREAD -+#define S_IREAD S_IRUSR -+#endif -+ -+#ifndef S_IWRITE -+#define S_IWRITE S_IWUSR -+#endif - /****************************************************************************** - Open a new GIF file for write, specified by name. If TestExistance then - if the file exists this routines fails (returns NULL). -diff --git a/lib/gif_lib_private.h b/lib/gif_lib_private.h -index adaf557..d62ce8c 100644 ---- a/lib/gif_lib_private.h -+++ b/lib/gif_lib_private.h -@@ -10,6 +10,10 @@ gif_lib_private.h - internal giflib routines and structures - #include "gif_lib.h" - #include "gif_hash.h" - -+#ifndef SIZE_MAX -+ #define SIZE_MAX UINTPTR_MAX -+#endif -+ - #define EXTENSION_INTRODUCER 0x21 - #define DESCRIPTOR_INTRODUCER 0x2c - #define TERMINATOR_INTRODUCER 0x3b -diff --git a/lib/openbsd-reallocarray.c b/lib/openbsd-reallocarray.c -index 715f13c..985717b 100644 ---- a/lib/openbsd-reallocarray.c -+++ b/lib/openbsd-reallocarray.c -@@ -20,6 +20,10 @@ - #include - #include - -+#ifndef SIZE_MAX -+ #define SIZE_MAX UINTPTR_MAX -+#endif -+ - /* - * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX - * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW diff --git a/toolchains/common/packages/libjpeg-turbo/build.sh b/toolchains/common/packages/libjpeg-turbo/build.sh index 5551760..b5ce1dc 100755 --- a/toolchains/common/packages/libjpeg-turbo/build.sh +++ b/toolchains/common/packages/libjpeg-turbo/build.sh @@ -1,7 +1,5 @@ #! /bin/sh -# Call with --without-simd to avoid SIMD - PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) HELPERS_DIR=$PACKAGE_DIR/../.. . $HELPERS_DIR/functions.sh @@ -9,15 +7,12 @@ HELPERS_DIR=$PACKAGE_DIR/../.. do_make_bdir do_pkg_fetch libjpeg-turbo -# Rebuild configure script as it has been built on a machine without pkg-config -autoreconf -i -do_configure --without-turbojpeg "$@" + +# In Android the assembler is not properly detected and ends up being plain clang which breaks compilation +# Force it to CC +do_cmake -DENABLE_SHARED=0 -DWITH_TURBOJPEG=0 -DREQUIRE_SIMD=1 -DCMAKE_ASM_COMPILER="$CC" "$@" do_make -# Don't install binaries and doc -do_make install-libLTLIBRARIES \ - install-pkgconfigDATA \ - install-includeHEADERS \ - install-nodist_includeHEADERS +do_make install do_clean_bdir diff --git a/toolchains/devkitppc/packages/flac/patches/0001-Disable-fortify-as-toolchain-doesn-t-support-it.patch b/toolchains/devkitppc/packages/flac/patches/0001-Disable-fortify-as-toolchain-doesn-t-support-it.patch new file mode 100644 index 0000000..1fe9bbd --- /dev/null +++ b/toolchains/devkitppc/packages/flac/patches/0001-Disable-fortify-as-toolchain-doesn-t-support-it.patch @@ -0,0 +1,28 @@ +From 1859d5418ac5306c7ddcae21594eefa7a1f1d634 Mon Sep 17 00:00:00 2001 +From: Le Philousophe +Date: Sun, 10 Oct 2021 20:44:55 +0200 +Subject: [PATCH 1/2] Disable fortify as toolchain doesn't support it + +--- + configure.ac | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0228a124..c1d50b21 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -439,11 +439,6 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then + + XIPH_ADD_CFLAGS([-Wdeclaration-after-statement]) + +- dnl some distributions (such as Gentoo) have _FORTIFY_SOURCE always +- dnl enabled. We test for this situation in order to prevent polluting +- dnl the console with messages of macro redefinitions. +- AX_ADD_FORTIFY_SOURCE +- + AC_LANG_PUSH([C++]) + XIPH_ADD_CXXFLAGS([-Weffc++]) + AC_LANG_POP([C++]) +-- +2.32.0 + diff --git a/toolchains/devkitppc/packages/flac/patches/0002-Don-t-runtime-detect-CPU-toolchain-doesn-t-support-i.patch b/toolchains/devkitppc/packages/flac/patches/0002-Don-t-runtime-detect-CPU-toolchain-doesn-t-support-i.patch new file mode 100644 index 0000000..b83d1e2 --- /dev/null +++ b/toolchains/devkitppc/packages/flac/patches/0002-Don-t-runtime-detect-CPU-toolchain-doesn-t-support-i.patch @@ -0,0 +1,34 @@ +From b4f2dad8722798b8feaeaac0cda15d5184b022fc Mon Sep 17 00:00:00 2001 +From: Le Philousophe +Date: Sun, 10 Oct 2021 20:57:07 +0200 +Subject: [PATCH 2/2] Don't runtime detect CPU, toolchain doesn't support it + +--- + src/libFLAC/cpu.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/libFLAC/cpu.c b/src/libFLAC/cpu.c +index 64da9cbc..4de375ce 100644 +--- a/src/libFLAC/cpu.c ++++ b/src/libFLAC/cpu.c +@@ -53,7 +53,7 @@ + #define dfprintf(file, format, ...) + #endif + +-#if defined FLAC__CPU_PPC ++#if 0 && defined FLAC__CPU_PPC + #include + #endif + +@@ -236,7 +236,7 @@ x86_cpu_info (FLAC__CPUInfo *info) + static void + ppc_cpu_info (FLAC__CPUInfo *info) + { +-#if defined FLAC__CPU_PPC ++#if 0 && defined FLAC__CPU_PPC + #ifndef PPC_FEATURE2_ARCH_3_00 + #define PPC_FEATURE2_ARCH_3_00 0x00800000 + #endif +-- +2.32.0 + diff --git a/toolchains/devkitppc/packages/flac/patches/fix-fortify-source.patch b/toolchains/devkitppc/packages/flac/patches/fix-fortify-source.patch deleted file mode 100644 index d610c9b..0000000 --- a/toolchains/devkitppc/packages/flac/patches/fix-fortify-source.patch +++ /dev/null @@ -1,18 +0,0 @@ -commit 2c932128fea1b43342bcfcb1d7ea9da122ac7e23 (HEAD) -Author: Le Philousophe -Date: Sat Sep 21 22:25:58 2019 +0200 - - Don't use _FORTIFY_SOURCE when not needed - -diff --git a/configure.ac b/configure.ac -index 070ab357..4971c583 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -400,7 +400,6 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then - CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations - - XIPH_ADD_CFLAGS([-Wdeclaration-after-statement]) -- XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2]) - - AC_LANG_PUSH([C++]) - XIPH_ADD_CXXFLAGS([-Weffc++]) diff --git a/toolchains/iphone/Dockerfile.m4 b/toolchains/iphone/Dockerfile.m4 index 90a7275..86e8788 100644 --- a/toolchains/iphone/Dockerfile.m4 +++ b/toolchains/iphone/Dockerfile.m4 @@ -19,7 +19,8 @@ RUN apt-get update && \ liblzma-dev \ libxml2-dev \ libssl-dev \ - python \ + python3 \ + python3-setuptools \ uuid-dev \ zlib1g-dev \ && \ @@ -80,6 +81,13 @@ ENV \ def_pkg_config(`${PREFIX}') \ PATH=$PATH:${TARGET_DIR}/bin:${PREFIX}/bin +# Without a platform file CMake fails some tests because variables are not passed to child invocations +# Using a toolchain file seems to fix it +COPY iphone.platform ${TARGET_DIR}/ + +# Generate meson cross file for GLib +crossgen(darwin, aarch64) + # To have LLVM builtins local_package(compiler-rt) @@ -90,7 +98,7 @@ helpers_package(bzip2) helpers_package(libpng1.6) -helpers_package(libjpeg-turbo, --with-simd) +helpers_package(libjpeg-turbo, -DCMAKE_TOOLCHAIN_FILE=${TARGET_DIR}/iphone.platform) helpers_package(giflib) @@ -113,11 +121,10 @@ helpers_package(mpeg2dec) helpers_package(a52dec) # Force -miphoneos-version-min as it gets added by curl if not already defined -# In this case curl uses 10.8 -# Force DarwinSSL even if /System/Library/Frameworks/Security.framework doesn't exist +# In this case curl uses 10.8, this behaviour has been removed in curl 7.76.1 # Undo patch by Debian which makes use of specific linker flags COPY ./packages/curl lib-helpers/packages/curl -helpers_package(curl, --without-ssl --with-darwinssl, CFLAGS="-miphoneos-version-min=IPHONEOS_DEPLOYMENT_TARGET") +helpers_package(curl, --without-ssl --with-secure-transport, CFLAGS="-miphoneos-version-min=IPHONEOS_DEPLOYMENT_TARGET") helpers_package(freetype) @@ -127,5 +134,6 @@ helpers_package(fribidi) COPY ./packages/libsdl2-net lib-helpers/packages/libsdl2-net helpers_package(libsdl2-net) -# intl doesn't get linked with CoreFoundation in glib, force it here -helpers_package(fluidsynth, -DCMAKE_SYSTEM_NAME=Darwin -DLIB_SUFFIX=, LDFLAGS="-framework CoreFoundation") +# Lighten glib build by removing Objective C and Cocoa and fix intl detection +COPY packages/fluidsynth lib-helpers/packages/fluidsynth +helpers_package(fluidsynth, -DCMAKE_SYSTEM_NAME=Darwin -DLIB_SUFFIX=) diff --git a/toolchains/iphone/iphone.platform b/toolchains/iphone/iphone.platform new file mode 100644 index 0000000..8e95d66 --- /dev/null +++ b/toolchains/iphone/iphone.platform @@ -0,0 +1,4 @@ +SET(CMAKE_OSX_SYSROOT $ENV{PREFIX}/..) +SET(CMAKE_SYSTEM_NAME iOS) +SET(CMAKE_MACOSX_BUNDLE Off) +SET(CMAKE_SYSTEM_PROCESSOR aarch64) diff --git a/toolchains/iphone/packages/curl/patches/01_fix_compile_flags.patch b/toolchains/iphone/packages/curl/patches/00_fix_compile_flags.patch similarity index 80% rename from toolchains/iphone/packages/curl/patches/01_fix_compile_flags.patch rename to toolchains/iphone/packages/curl/patches/00_fix_compile_flags.patch index dad514c..e1130b6 100644 --- a/toolchains/iphone/packages/curl/patches/01_fix_compile_flags.patch +++ b/toolchains/iphone/packages/curl/patches/00_fix_compile_flags.patch @@ -1,7 +1,7 @@ -Index: curl-7.64.0/curl-config.in +Index: curl-7.74.0/curl-config.in =================================================================== ---- curl-7.64.0.orig/curl-config.in -+++ curl-7.64.0/curl-config.in +--- curl-7.74.0.orig/curl-config.in ++++ curl-7.74.0/curl-config.in @@ -163,7 +163,7 @@ while test $# -gt 0; do --static-libs) diff --git a/toolchains/iphone/packages/curl/patches/00_force_enable_darwinssl.patch b/toolchains/iphone/packages/curl/patches/00_force_enable_darwinssl.patch deleted file mode 100644 index 146c8fa..0000000 --- a/toolchains/iphone/packages/curl/patches/00_force_enable_darwinssl.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: curl-7.64.0/configure -=================================================================== ---- curl-7.64.0.orig/configure -+++ curl-7.64.0/configure -@@ -22121,7 +22121,7 @@ fi - $as_echo_n "checking whether to enable Apple OS native SSL/TLS... " >&6; } - if test -z "$ssl_backends" -o "x$OPT_DARWINSSL" != xno; then - if test "x$OPT_DARWINSSL" != "xno" && -- test -d "/System/Library/Frameworks/Security.framework"; then -+ true; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 - $as_echo "yes" >&6; } - diff --git a/toolchains/iphone/packages/curl/patches/02_fix_CVE-2021-22890.patch b/toolchains/iphone/packages/curl/patches/02_fix_CVE-2021-22890.patch deleted file mode 100644 index 4205336..0000000 --- a/toolchains/iphone/packages/curl/patches/02_fix_CVE-2021-22890.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c -index bb251cdb3..9451f3030 100644 ---- a/lib/vtls/darwinssl.c -+++ b/lib/vtls/darwinssl.c -@@ -1375,9 +1375,10 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, - const char * const ssl_cafile = SSL_CONN_CONFIG(CAfile); - const bool verifypeer = SSL_CONN_CONFIG(verifypeer); - char * const ssl_cert = SSL_SET_OPTION(cert); -- const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : -+ const bool isproxy = SSL_IS_PROXY(); -+ const char * const hostname = isproxy ? conn->http_proxy.host.name : - conn->host.name; -- const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; -+ const long int port = isproxy ? conn->port : conn->remote_port; - #ifdef ENABLE_IPV6 - struct in6_addr addr; - #else -@@ -1916,7 +1917,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, - size_t ssl_sessionid_len; - - Curl_ssl_sessionid_lock(conn); -- if(!Curl_ssl_getsessionid(conn, (void **)&ssl_sessionid, -+ if(!Curl_ssl_getsessionid(conn, isproxy, (void **)&ssl_sessionid, - &ssl_sessionid_len, sockindex)) { - /* we got a session id, use it! */ - err = SSLSetPeerID(BACKEND->ssl_ctx, ssl_sessionid, ssl_sessionid_len); -@@ -1944,7 +1945,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, - return CURLE_SSL_CONNECT_ERROR; - } - -- result = Curl_ssl_addsessionid(conn, ssl_sessionid, ssl_sessionid_len, -+ result = Curl_ssl_addsessionid(conn, isproxy, ssl_sessionid, ssl_sessionid_len, - sockindex); - Curl_ssl_sessionid_unlock(conn); - if(result) { diff --git a/toolchains/iphone/packages/fluidsynth/patches-glib/0001-meson-Fix-detection-of-static-libintl-on-macOS.patch b/toolchains/iphone/packages/fluidsynth/patches-glib/0001-meson-Fix-detection-of-static-libintl-on-macOS.patch new file mode 100644 index 0000000..06e1d1a --- /dev/null +++ b/toolchains/iphone/packages/fluidsynth/patches-glib/0001-meson-Fix-detection-of-static-libintl-on-macOS.patch @@ -0,0 +1,57 @@ +From ab3d89a74bcd29ef9d3a13bdb32dc5e1738434b3 Mon Sep 17 00:00:00 2001 +From: Jonas Hahnfeld +Date: Sun, 16 May 2021 11:58:26 +0200 +Subject: [PATCH 1/2] meson: Fix detection of static libintl on macOS + +If libintl is built statically on macOS, linking it requires passing +"-framework CoreFoundation" to satisfy symbol dependencies. Use the +available osx_ldflags already detected earlier in the process. +--- + meson.build | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/meson.build b/meson.build +index 740e46b86..7022e85ca 100644 +--- a/meson.build ++++ b/meson.build +@@ -2003,13 +2003,13 @@ endif + # FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible + # implementations. This could be extended if issues are found in some platforms. + libintl_deps = [] +-if cc.has_function('ngettext') ++if cc.has_function('ngettext', args : osx_ldflags) + have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset') + else + # First just find the bare library. + libintl = cc.find_library('intl', required : false) + # The bare library probably won't link without help if it's static. +- if libintl.found() and not cc.has_function('ngettext', dependencies : libintl) ++ if libintl.found() and not cc.has_function('ngettext', args : osx_ldflags, dependencies : libintl) + libintl_iconv = cc.find_library('iconv', required : false) + # libintl supports different threading APIs, which may not + # require additional flags, but it defaults to using pthreads if +@@ -2019,10 +2019,10 @@ else + # also defining the macros with the -pthread flag. + libintl_pthread = cc.find_library('pthread', required : false) + # Try linking with just libiconv. +- if libintl_iconv.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_iconv]) ++ if libintl_iconv.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv]) + libintl_deps += [libintl_iconv] + # Then also try linking with pthreads. +- elif libintl_iconv.found() and libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_iconv, libintl_pthread]) ++ elif libintl_iconv.found() and libintl_pthread.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv, libintl_pthread]) + libintl_deps += [libintl_iconv, libintl_pthread] + else + libintl = disabler() +@@ -2034,7 +2034,7 @@ else + have_bind_textdomain_codeset = true # proxy-libintl supports it + else + libintl_deps = [libintl] + libintl_deps +- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', ++ have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', args : osx_ldflags, + dependencies : libintl_deps) + endif + endif +-- +2.30.2 + diff --git a/toolchains/iphone/packages/fluidsynth/patches-glib/0002-Fix-intl-build-with-iOS.patch b/toolchains/iphone/packages/fluidsynth/patches-glib/0002-Fix-intl-build-with-iOS.patch new file mode 100644 index 0000000..75525a9 --- /dev/null +++ b/toolchains/iphone/packages/fluidsynth/patches-glib/0002-Fix-intl-build-with-iOS.patch @@ -0,0 +1,26 @@ +From 37d80b2670669424ba281f558f9ae2ad6a877ed5 Mon Sep 17 00:00:00 2001 +From: Le Philousophe +Date: Sun, 17 Oct 2021 16:04:14 +0200 +Subject: [PATCH 2/2] Fix intl build with iOS + +--- + meson.build | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/meson.build b/meson.build +index 7022e85ca..429352318 100644 +--- a/meson.build ++++ b/meson.build +@@ -766,6 +766,9 @@ if host_system == 'darwin' + # know which language flags it's going to use to link. Add to both languages + # for now. See https://github.com/mesonbuild/meson/issues/3585. + add_project_link_arguments(osx_ldflags, language : ['objc', 'c']) ++elif host_system == 'ios' ++ osx_ldflags += ['-Wl,-framework,CoreFoundation'] ++ add_project_link_arguments(osx_ldflags, language : ['c']) + endif + + # Check for futex(2) +-- +2.30.2 + diff --git a/toolchains/m4/android/packages_list.m4 b/toolchains/m4/android/packages_list.m4 index acbe634..bbfd1a2 100644 --- a/toolchains/m4/android/packages_list.m4 +++ b/toolchains/m4/android/packages_list.m4 @@ -5,7 +5,7 @@ android_package(zlib) helpers_package(libpng1.6) -helpers_package(libjpeg-turbo, --with-pic) +helpers_package(libjpeg-turbo, -DCMAKE_POSITION_INDEPENDENT_CODE=1) helpers_package(giflib) diff --git a/toolchains/m4/debian-toolchain-base.m4 b/toolchains/m4/debian-toolchain-base.m4 index dfc878d..a7d2d01 100644 --- a/toolchains/m4/debian-toolchain-base.m4 +++ b/toolchains/m4/debian-toolchain-base.m4 @@ -1,5 +1,5 @@ -m4_ifdef(`DEBIAN_RELEASE',,`m4_define(`DEBIAN_RELEASE',buster)') -m4_ifdef(`DEBIAN_VERSION',,`m4_define(`DEBIAN_VERSION',20210816)') +m4_ifdef(`DEBIAN_RELEASE',,`m4_define(`DEBIAN_RELEASE',bullseye)') +m4_ifdef(`DEBIAN_VERSION',,`m4_define(`DEBIAN_VERSION',20211011)') FROM toolchains/common AS helpers FROM debian:DEBIAN_RELEASE-DEBIAN_VERSION-slim m4_ifdef(`STAGE_IMAGE_NAME',AS STAGE_IMAGE_NAME,) diff --git a/toolchains/m4/macosx.m4 b/toolchains/m4/macosx.m4 index 38d88e8..aecf5a8 100644 --- a/toolchains/m4/macosx.m4 +++ b/toolchains/m4/macosx.m4 @@ -19,7 +19,8 @@ RUN apt-get update && \ liblzma-dev \ libxml2-dev \ libssl-dev \ - python \ + python3 \ + python3-setuptools \ uuid-dev \ zlib1g-dev \ && \ @@ -93,7 +94,8 @@ ENV \ PATH=$PATH:${TARGET_DIR}/bin:${TARGET_DIR}/SDK/MacOSX`'MACOSX_SDK_VERSION`'.sdk/usr/bin:${DESTDIR}/${PREFIX}/bin \ OSXCROSS_MP_INC=1 -# TODO: build won't be reproducible: we should stick to some version and compile it instead +# Generate meson cross file for GLib +crossgen(darwin, MACOSX_TARGET_ARCH) # zlib is provided in SDK but libpng uses ports one ports_package(zlib) @@ -138,6 +140,8 @@ common_package(libsdl2) ports_package(libsdl2_net) +# Lighten glib build by removing Objective C and Cocoa and fix intl detection +COPY --from=macosx-common /lib-helpers/packages/fluidsynth lib-helpers/packages/fluidsynth helpers_package(fluidsynth, -DCMAKE_SYSTEM_NAME=Darwin -DLIB_SUFFIX=) # Toolchain specific packages will go in the dedicated file now diff --git a/toolchains/macosx-common/packages/fluidsynth/patches-glib/0001-meson-Fix-detection-of-static-libintl-on-macOS.patch b/toolchains/macosx-common/packages/fluidsynth/patches-glib/0001-meson-Fix-detection-of-static-libintl-on-macOS.patch new file mode 100644 index 0000000..4291abd --- /dev/null +++ b/toolchains/macosx-common/packages/fluidsynth/patches-glib/0001-meson-Fix-detection-of-static-libintl-on-macOS.patch @@ -0,0 +1,57 @@ +From 5bd026544b9f687c1a2f2098323ed2dc5e5a5b8a Mon Sep 17 00:00:00 2001 +From: Jonas Hahnfeld +Date: Sun, 16 May 2021 11:58:26 +0200 +Subject: [PATCH 1/2] meson: Fix detection of static libintl on macOS + +If libintl is built statically on macOS, linking it requires passing +"-framework CoreFoundation" to satisfy symbol dependencies. Use the +available osx_ldflags already detected earlier in the process. +--- + meson.build | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/meson.build b/meson.build +index 740e46b86..7022e85ca 100644 +--- a/meson.build ++++ b/meson.build +@@ -2003,13 +2003,13 @@ endif + # FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible + # implementations. This could be extended if issues are found in some platforms. + libintl_deps = [] +-if cc.has_function('ngettext') ++if cc.has_function('ngettext', args : osx_ldflags) + have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset') + else + # First just find the bare library. + libintl = cc.find_library('intl', required : false) + # The bare library probably won't link without help if it's static. +- if libintl.found() and not cc.has_function('ngettext', dependencies : libintl) ++ if libintl.found() and not cc.has_function('ngettext', args : osx_ldflags, dependencies : libintl) + libintl_iconv = cc.find_library('iconv', required : false) + # libintl supports different threading APIs, which may not + # require additional flags, but it defaults to using pthreads if +@@ -2019,10 +2019,10 @@ else + # also defining the macros with the -pthread flag. + libintl_pthread = cc.find_library('pthread', required : false) + # Try linking with just libiconv. +- if libintl_iconv.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_iconv]) ++ if libintl_iconv.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv]) + libintl_deps += [libintl_iconv] + # Then also try linking with pthreads. +- elif libintl_iconv.found() and libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_iconv, libintl_pthread]) ++ elif libintl_iconv.found() and libintl_pthread.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv, libintl_pthread]) + libintl_deps += [libintl_iconv, libintl_pthread] + else + libintl = disabler() +@@ -2034,7 +2034,7 @@ else + have_bind_textdomain_codeset = true # proxy-libintl supports it + else + libintl_deps = [libintl] + libintl_deps +- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', ++ have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', args : osx_ldflags, + dependencies : libintl_deps) + endif + endif +-- +2.30.2 + diff --git a/toolchains/macosx-common/packages/fluidsynth/patches-glib/0002-Remove-need-of-ObjectiveC-and-deprecated-Carbon.patch b/toolchains/macosx-common/packages/fluidsynth/patches-glib/0002-Remove-need-of-ObjectiveC-and-deprecated-Carbon.patch new file mode 100644 index 0000000..0c3d48c --- /dev/null +++ b/toolchains/macosx-common/packages/fluidsynth/patches-glib/0002-Remove-need-of-ObjectiveC-and-deprecated-Carbon.patch @@ -0,0 +1,51 @@ +From ac479562962a3d155b2d080db53efe533274cb08 Mon Sep 17 00:00:00 2001 +From: Le Philousophe +Date: Sat, 16 Oct 2021 12:39:23 +0200 +Subject: [PATCH 2/2] Remove need of ObjectiveC and deprecated Carbon + +--- + meson.build | 11 +++-------- + 1 file changed, 3 insertions(+), 8 deletions(-) + +diff --git a/meson.build b/meson.build +index 7022e85ca..8d3bf08cc 100644 +--- a/meson.build ++++ b/meson.build +@@ -730,15 +730,10 @@ glib_have_os_x_9_or_later = false + glib_have_carbon = false + glib_have_cocoa = false + if host_system == 'darwin' +- add_languages('objc') +- objcc = meson.get_compiler('objc') +- + osx_ldflags += ['-Wl,-framework,CoreFoundation'] + + # Mac OS X Carbon support +- glib_have_carbon = objcc.compiles('''#include +- #include ''', +- name : 'Mac OS X Carbon support') ++ glib_have_carbon = false + + if glib_have_carbon + glib_conf.set('HAVE_CARBON', true) +@@ -751,7 +746,7 @@ if host_system == 'darwin' + endif + + # Mac OS X Cocoa support +- glib_have_cocoa = objcc.compiles('''#include ++ glib_have_cocoa = cc.compiles('''#include + #ifdef GNUSTEP_BASE_VERSION + #error "Detected GNUstep, not Cocoa" + #endif''', +@@ -765,7 +760,7 @@ if host_system == 'darwin' + # FIXME: libgio mix C and objC source files and there is no way to reliably + # know which language flags it's going to use to link. Add to both languages + # for now. See https://github.com/mesonbuild/meson/issues/3585. +- add_project_link_arguments(osx_ldflags, language : ['objc', 'c']) ++ add_project_link_arguments(osx_ldflags, language : ['c']) + endif + + # Check for futex(2) +-- +2.30.2 + diff --git a/toolchains/n64/packages/toolchain-mips64/patches-gcc/0003-Fix-gperf-code-for-modern-gcc.patch b/toolchains/n64/packages/toolchain-mips64/patches-gcc/0003-Fix-gperf-code-for-modern-gcc.patch new file mode 100644 index 0000000..52258a4 --- /dev/null +++ b/toolchains/n64/packages/toolchain-mips64/patches-gcc/0003-Fix-gperf-code-for-modern-gcc.patch @@ -0,0 +1,51 @@ +From 2730d8520ada759d1f92b5c1e1a7e2853644aca4 Mon Sep 17 00:00:00 2001 +From: Le Philousophe +Date: Mon, 11 Oct 2021 20:47:00 +0200 +Subject: [PATCH 3/3] Fix gperf code for modern gcc + +--- + gcc/cp/cfns.gperf | 3 --- + gcc/cp/cfns.h | 6 ------ + 2 files changed, 9 deletions(-) + +diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf +index c713eb0c2bd..30f7a39e1aa 100644 +--- a/gcc/cp/cfns.gperf ++++ b/gcc/cp/cfns.gperf +@@ -3,9 +3,6 @@ + __inline + #endif + static unsigned int hash (const char *, unsigned int); +-#ifdef __GNUC__ +-__inline +-#endif + const char * libc_name_p (const char *, unsigned int); + %} + %% +diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h +index e6d43d8acfb..cf3f243263b 100644 +--- a/gcc/cp/cfns.h ++++ b/gcc/cp/cfns.h +@@ -34,9 +34,6 @@ + __inline + #endif + static unsigned int hash (const char *, unsigned int); +-#ifdef __GNUC__ +-__inline +-#endif + const char * libc_name_p (const char *, unsigned int); + /* maximum key range = 391, duplicates = 0 */ + +@@ -105,9 +102,6 @@ hash (register const char *str, register unsigned int len) + return hval + asso_values[(unsigned char)str[len - 1]]; + } + +-#ifdef __GNUC__ +-__inline +-#endif + const char * + libc_name_p (register const char *str, register unsigned int len) + { +-- +2.32.0 + diff --git a/toolchains/opendingux/packages/flac/patches/0001-Fix-for-newer-Gettext-not-providing-the-macro.patch b/toolchains/opendingux/packages/flac/patches/0001-Fix-for-newer-Gettext-not-providing-the-macro.patch new file mode 100644 index 0000000..ebebc24 --- /dev/null +++ b/toolchains/opendingux/packages/flac/patches/0001-Fix-for-newer-Gettext-not-providing-the-macro.patch @@ -0,0 +1,42 @@ +From 2ad89eebba092c21377f8447e2192c123dbad4ad Mon Sep 17 00:00:00 2001 +From: Le Philousophe +Date: Sun, 10 Oct 2021 19:21:57 +0200 +Subject: [PATCH] Fix for newer Gettext not providing the macro + +--- + m4/codeset.m4 | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + create mode 100644 m4/codeset.m4 + +diff --git a/m4/codeset.m4 b/m4/codeset.m4 +new file mode 100644 +index 00000000..cf53d241 +--- /dev/null ++++ b/m4/codeset.m4 +@@ -0,0 +1,23 @@ ++# codeset.m4 serial 5 (gettext-0.18.2) ++dnl Copyright (C) 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++dnl From Bruno Haible. ++ ++AC_DEFUN([AM_LANGINFO_CODESET], ++[ ++ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], ++ [AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[#include ]], ++ [[char* cs = nl_langinfo(CODESET); return !cs;]])], ++ [am_cv_langinfo_codeset=yes], ++ [am_cv_langinfo_codeset=no]) ++ ]) ++ if test $am_cv_langinfo_codeset = yes; then ++ AC_DEFINE([HAVE_LANGINFO_CODESET], [1], ++ [Define if you have and nl_langinfo(CODESET).]) ++ fi ++]) +-- +2.32.0 + diff --git a/toolchains/openpandora/packages/flac/patches/0001-Fix-for-newer-Gettext-not-providing-the-macro.patch b/toolchains/openpandora/packages/flac/patches/0001-Fix-for-newer-Gettext-not-providing-the-macro.patch new file mode 100644 index 0000000..ebebc24 --- /dev/null +++ b/toolchains/openpandora/packages/flac/patches/0001-Fix-for-newer-Gettext-not-providing-the-macro.patch @@ -0,0 +1,42 @@ +From 2ad89eebba092c21377f8447e2192c123dbad4ad Mon Sep 17 00:00:00 2001 +From: Le Philousophe +Date: Sun, 10 Oct 2021 19:21:57 +0200 +Subject: [PATCH] Fix for newer Gettext not providing the macro + +--- + m4/codeset.m4 | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + create mode 100644 m4/codeset.m4 + +diff --git a/m4/codeset.m4 b/m4/codeset.m4 +new file mode 100644 +index 00000000..cf53d241 +--- /dev/null ++++ b/m4/codeset.m4 +@@ -0,0 +1,23 @@ ++# codeset.m4 serial 5 (gettext-0.18.2) ++dnl Copyright (C) 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++dnl From Bruno Haible. ++ ++AC_DEFUN([AM_LANGINFO_CODESET], ++[ ++ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], ++ [AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[#include ]], ++ [[char* cs = nl_langinfo(CODESET); return !cs;]])], ++ [am_cv_langinfo_codeset=yes], ++ [am_cv_langinfo_codeset=no]) ++ ]) ++ if test $am_cv_langinfo_codeset = yes; then ++ AC_DEFINE([HAVE_LANGINFO_CODESET], [1], ++ [Define if you have and nl_langinfo(CODESET).]) ++ fi ++]) +-- +2.32.0 + diff --git a/toolchains/openpandora/packages/flac/patches/remove-xmms.patch b/toolchains/openpandora/packages/flac/patches/remove-xmms.patch deleted file mode 100644 index e0fde54..0000000 --- a/toolchains/openpandora/packages/flac/patches/remove-xmms.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: flac-1.2.1/configure.in -=================================================================== ---- flac-1.2.1.orig/configure.in -+++ flac-1.2.1/configure.in -@@ -226,9 +226,9 @@ AC_HELP_STRING([--disable-xmms-plugin], - *) AC_MSG_ERROR(bad value ${enableval} for --enable-xmms-plugin) ;; - esac],[enable_xmms_plugin=true]) - if test "x$enable_xmms_plugin" != xfalse ; then -- AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - XMMS support will not be built])) -+ AC_MSG_ERROR(No XMMS support) - fi --AM_CONDITIONAL(FLaC__HAS_XMMS, test -n "$XMMS_INPUT_PLUGIN_DIR") -+AM_CONDITIONAL(FLaC__HAS_XMMS, false) - - dnl build FLAC++ or not - AC_ARG_ENABLE([cpplibs], diff --git a/toolchains/riscos/Dockerfile.m4 b/toolchains/riscos/Dockerfile.m4 index 89b46ae..74c3d68 100644 --- a/toolchains/riscos/Dockerfile.m4 +++ b/toolchains/riscos/Dockerfile.m4 @@ -69,7 +69,7 @@ helpers_package(zlib) helpers_package(libpng1.6) -helpers_package(libjpeg-turbo) +helpers_package(libjpeg-turbo, -DCMAKE_TOOLCHAIN_FILE="${GCCSDK_INSTALL_ENV}/toolchain-riscos.cmake" -DCMAKE_SYSTEM_PROCESSOR=arm) helpers_package(giflib) diff --git a/toolchains/vita/Dockerfile.m4 b/toolchains/vita/Dockerfile.m4 index cda7dc4..1d6650f 100644 --- a/toolchains/vita/Dockerfile.m4 +++ b/toolchains/vita/Dockerfile.m4 @@ -12,7 +12,7 @@ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ libc6-i386 \ lib32stdc++6 \ - lib32gcc1 \ + lib32gcc-s1 \ zip && \ rm -rf /var/lib/apt/lists/* diff --git a/toolchains/windows-9x/Dockerfile.m4 b/toolchains/windows-9x/Dockerfile.m4 index 7e39ece..bf17e2c 100644 --- a/toolchains/windows-9x/Dockerfile.m4 +++ b/toolchains/windows-9x/Dockerfile.m4 @@ -45,8 +45,8 @@ helpers_package(zlib) helpers_package(libpng1.6) -COPY packages/libjpeg-turbo lib-helpers/packages/libjpeg-turbo -helpers_package(libjpeg-turbo) +# Use x86 as PROCESSOR_ARCHITECTURE would return on Windows +helpers_package(libjpeg-turbo, -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=x86) helpers_package(giflib) diff --git a/toolchains/windows-9x/packages/libjpeg-turbo/patches/fix-size-max.patch b/toolchains/windows-9x/packages/libjpeg-turbo/patches/fix-size-max.patch deleted file mode 100644 index 17df8a2..0000000 --- a/toolchains/windows-9x/packages/libjpeg-turbo/patches/fix-size-max.patch +++ /dev/null @@ -1,43 +0,0 @@ -From c743009717878cb22a5434c798dae5d3879d6ca2 Mon Sep 17 00:00:00 2001 -From: Cameron Cawley -Date: Tue, 6 Mar 2018 22:10:14 +0000 -Subject: [PATCH] Fix build with older MinGW releases - -Some MinGW implementations need stdint.h in order to define SIZE_MAX. - -Regression caused by a09ba29a55b9a43d346421210d94370065eeaf53 and -not fully fixed by a0047bdea4d11dfeefb9ea797865b1a2ea0a665e. - -Closes #220 ---- - ChangeLog.md | 3 +++ - jmemmgr.c | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/ChangeLog.md b/ChangeLog.md -index 406c6db27..d6998d8cc 100644 ---- a/ChangeLog.md -+++ b/ChangeLog.md -@@ -11,6 +11,9 @@ actual security issues, should they arise in the future. - algorithm that caused incorrect dithering in the output image. This algorithm - now produces bitwise-identical results to the unmerged algorithms. - -+3. Fixed a build error when building with older MinGW releases (regression -+caused by 1.5.1[7].) -+ - - 1.5.3 - ===== -diff --git a/jmemmgr.c b/jmemmgr.c -index 8dfb633da..40621cd2b 100644 ---- a/jmemmgr.c -+++ b/jmemmgr.c -@@ -32,7 +32,7 @@ - #include "jinclude.h" - #include "jpeglib.h" - #include "jmemsys.h" /* import the system-dependent declarations */ --#ifndef _WIN32 -+#if !defined(_MSC_VER) || _MSC_VER > 1600 - #include - #endif - #include diff --git a/workers/dreamcast/Dockerfile.m4 b/workers/dreamcast/Dockerfile.m4 index 0d79d92..8e15026 100644 --- a/workers/dreamcast/Dockerfile.m4 +++ b/workers/dreamcast/Dockerfile.m4 @@ -13,7 +13,7 @@ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ libmpc3 \ libmpfr6 \ - libisl19 && \ + libisl23 && \ rm -rf /var/lib/apt/lists/* # Don't copy arm-eabi as we don't need it diff --git a/workers/m4/debian-builder-base.m4 b/workers/m4/debian-builder-base.m4 index 8f6f4a0..c86cfd4 100644 --- a/workers/m4/debian-builder-base.m4 +++ b/workers/m4/debian-builder-base.m4 @@ -1,5 +1,5 @@ -m4_ifdef(`DEBIAN_RELEASE',,`m4_define(`DEBIAN_RELEASE',buster)') -m4_ifdef(`DEBIAN_VERSION',,`m4_define(`DEBIAN_VERSION',20210816)') +m4_ifdef(`DEBIAN_RELEASE',,`m4_define(`DEBIAN_RELEASE',bullseye)') +m4_ifdef(`DEBIAN_VERSION',,`m4_define(`DEBIAN_VERSION',20211011)') m4_define(`BASE_DEBIAN',`')m4_dnl FROM debian:DEBIAN_RELEASE-DEBIAN_VERSION-slim USER root @@ -15,7 +15,8 @@ RUN apt-get update && \ make \ pandoc \ pkg-config \ - python \ + python3 \ + python-is-python3 \ xz-utils \ zip \ && \ diff --git a/workers/ps3/Dockerfile.m4 b/workers/ps3/Dockerfile.m4 index 7382fa3..23764c0 100644 --- a/workers/ps3/Dockerfile.m4 +++ b/workers/ps3/Dockerfile.m4 @@ -12,6 +12,7 @@ ENV PSL1GHT=$PS3DEV PREFIX=$PS3DEV/portlibs/ppu # That will be simpler when upgrading Debian and not having to adjust versions RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python \ libelf1 && \ rm -rf /var/lib/apt/lists/* diff --git a/workers/vita/Dockerfile.m4 b/workers/vita/Dockerfile.m4 index 98848fa..b76d793 100644 --- a/workers/vita/Dockerfile.m4 +++ b/workers/vita/Dockerfile.m4 @@ -11,7 +11,7 @@ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ libc6-i386 \ lib32stdc++6 \ - lib32gcc1 && \ + lib32gcc-s1 && \ rm -rf /var/lib/apt/lists/* COPY --from=toolchain $VITASDK $VITASDK/ diff --git a/workers/windows-9x/Dockerfile.m4 b/workers/windows-9x/Dockerfile.m4 index d12f304..e7bf975 100644 --- a/workers/windows-9x/Dockerfile.m4 +++ b/workers/windows-9x/Dockerfile.m4 @@ -12,7 +12,7 @@ ENV MINGW32=/opt/toolchains/mingw32 HOST=mingw32 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ dos2unix \ - libisl19 \ + libisl23 \ libmpc3 \ libmpfr6 \ nasm \