From 1980629ae50119734502c6e5928fbf82c325cac7 Mon Sep 17 00:00:00 2001 From: Ghabry <1331889+Ghabry@users.noreply.github.com> Date: Fri, 9 Jan 2026 18:38:08 +0000 Subject: [PATCH 1/5] Update libraries --- shared/packages.ini | 20 ++++++++++---------- shared/packages.sh | 34 +++++++++++++++++----------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/shared/packages.ini b/shared/packages.ini index 0c91a1d3..1a533a3f 100644 --- a/shared/packages.ini +++ b/shared/packages.ini @@ -2,13 +2,13 @@ directory = "${section}-${version}" [zlib] -version = 1.3.1 +version = 1.3.1.2 url = "https://zlib.net/fossils/zlib-${version}.tar.gz" arguments = "-DZLIB_BUILD_EXAMPLES=OFF" anitya_id = 5303 [libpng] -version = 1.6.50 +version = 1.6.53 url = "https://download.sourceforge.net/libpng/libpng-${version}.tar.xz" arguments = "-DPNG_SHARED=OFF -DPNG_TOOLS=OFF -DPNG_TESTS=OFF" anitya_id = 1705 @@ -20,7 +20,7 @@ arguments = "-DFT_DISABLE_BZIP2=ON -DFT_DISABLE_BROTLI=ON" anitya_id = 854 [harfbuzz] -version = 12.1.0 +version = 12.3.0 url = "https://github.com/harfbuzz/harfbuzz/releases/download/${version}/harfbuzz-${version}.tar.xz" arguments = "-Dfreetype=enabled -Dicu=disabled -Dtests=disabled -Dutilities=disabled" # TODO disable subset anitya_id = 1299 @@ -57,7 +57,7 @@ version = 820fb3237ea81af44c9cc468c8b4e20128e3e5ad url = "https://gitlab.xiph.org/xiph/tremor/-/archive/${version}/tremor-${version}.tar.bz2" [mpg123] -version = 1.33.3 +version = 1.33.4 url = "https://www.mpg123.de/download/mpg123-${version}.tar.bz2" arguments = "--with-cpu=generic --disable-fifo --disable-ipv6 --disable-network --disable-int-quality --with-default-audio=dummy --with-optimization=2 @@ -96,7 +96,7 @@ arguments = "-DWANT_PLAYER=OFF -DWANT_STATIC=ON" anitya_id = 9179 [opus] -version = 1.5.2 +version = 1.6 url = "https://downloads.xiph.org/releases/opus/opus-${version}.tar.gz" arguments = "-DOPUS_DISABLE_INTRINSICS=ON" anitya_id = 11081 @@ -108,7 +108,7 @@ arguments = "--disable-http --disable-examples" anitya_id = 10353 [fluidsynth] -version = 2.4.6 +version = 2.5.2 url = "https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v${version}.tar.gz" arguments = "-DLIB_SUFFIX=''" anitya_id = 10437 @@ -126,7 +126,7 @@ arguments = "-DJSON_BuildTests=OFF" anitya_id = 11152 [fmt] -version = 12.0.0 +version = 12.1.0 url = "https://github.com/fmtlib/fmt/releases/download/${version}/fmt-${version}.zip" arguments = "-DFMT_DOC=OFF -DFMT_TEST=OFF" anitya_id = 11526 @@ -143,8 +143,8 @@ url = "https://github.com/fragglet/lhasa/releases/download/v${version}/lhasa-${v anitya_id = 14822 [ICU] -version_major = 77 -version_minor = 1 +version_major = 78 +version_minor = 2 version = ${version_major}-${version_minor} version_src = ${version_major}_${version_minor} url = "https://github.com/unicode-org/icu/releases/download/release-${version}/icu4c-${version_src}-src.tgz" @@ -165,7 +165,7 @@ url = https://ci.easyrpg.org/job/icudata/lastSuccessfulBuild/artifact/icudata${v files = "icudt*.dat" [SDL2] -version = 2.32.6 +version = 2.32.10 url = "https://libsdl.org/release/SDL2-${version}.tar.gz" anitya_id = 4779 diff --git a/shared/packages.sh b/shared/packages.sh index 0aff40b5..5f9c20d9 100644 --- a/shared/packages.sh +++ b/shared/packages.sh @@ -5,21 +5,21 @@ ####################################### -ZLIB_URL="https://zlib.net/fossils/zlib-1.3.1.tar.gz" +ZLIB_URL="https://zlib.net/fossils/zlib-1.3.1.2.tar.gz" ZLIB_ARGS="-DZLIB_BUILD_EXAMPLES=OFF" -ZLIB_DIR="zlib-1.3.1" +ZLIB_DIR="zlib-1.3.1.2" -LIBPNG_URL="https://download.sourceforge.net/libpng/libpng-1.6.50.tar.xz" +LIBPNG_URL="https://download.sourceforge.net/libpng/libpng-1.6.53.tar.xz" LIBPNG_ARGS="-DPNG_SHARED=OFF -DPNG_TOOLS=OFF -DPNG_TESTS=OFF" -LIBPNG_DIR="libpng-1.6.50" +LIBPNG_DIR="libpng-1.6.53" FREETYPE_URL="https://download.savannah.gnu.org/releases/freetype/freetype-2.14.1.tar.xz" FREETYPE_ARGS="-DFT_DISABLE_BZIP2=ON -DFT_DISABLE_BROTLI=ON" FREETYPE_DIR="freetype-2.14.1" -HARFBUZZ_URL="https://github.com/harfbuzz/harfbuzz/releases/download/12.1.0/harfbuzz-12.1.0.tar.xz" +HARFBUZZ_URL="https://github.com/harfbuzz/harfbuzz/releases/download/12.3.0/harfbuzz-12.3.0.tar.xz" HARFBUZZ_ARGS="-Dfreetype=enabled -Dicu=disabled -Dtests=disabled -Dutilities=disabled" # TODO disable subset -HARFBUZZ_DIR="harfbuzz-12.1.0" +HARFBUZZ_DIR="harfbuzz-12.3.0" PIXMAN_URL="https://cairographics.org/releases/pixman-0.46.4.tar.gz" PIXMAN_ARGS="-Dtests=disabled -Ddemos=disabled -Dlibpng=disabled" @@ -39,11 +39,11 @@ LIBVORBIS_DIR="libvorbis-1.3.7" TREMOR_URL="https://gitlab.xiph.org/xiph/tremor/-/archive/820fb3237ea81af44c9cc468c8b4e20128e3e5ad/tremor-820fb3237ea81af44c9cc468c8b4e20128e3e5ad.tar.bz2" TREMOR_DIR="tremor-820fb3237ea81af44c9cc468c8b4e20128e3e5ad" -MPG123_URL="https://www.mpg123.de/download/mpg123-1.33.3.tar.bz2" +MPG123_URL="https://www.mpg123.de/download/mpg123-1.33.4.tar.bz2" MPG123_ARGS="--with-cpu=generic --disable-fifo --disable-ipv6 --disable-network \ --disable-int-quality --with-default-audio=dummy --with-optimization=2 \ --disable-components --enable-libmpg123" -MPG123_DIR="mpg123-1.33.3" +MPG123_DIR="mpg123-1.33.4" LIBSNDFILE_URL="https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2.tar.xz" LIBSNDFILE_ARGS="--disable-alsa --disable-sqlite --disable-full-suite --disable-external-libs --disable-mpeg" @@ -65,17 +65,17 @@ WILDMIDI_URL="https://github.com/Mindwerks/wildmidi/archive/wildmidi-0.4.6.tar.g WILDMIDI_DIR="wildmidi-wildmidi-0.4.6" WILDMIDI_ARGS="-DWANT_PLAYER=OFF -DWANT_STATIC=ON" -OPUS_URL="https://downloads.xiph.org/releases/opus/opus-1.5.2.tar.gz" +OPUS_URL="https://downloads.xiph.org/releases/opus/opus-1.6.tar.gz" OPUS_ARGS="-DOPUS_DISABLE_INTRINSICS=ON" -OPUS_DIR="opus-1.5.2" +OPUS_DIR="opus-1.6" OPUSFILE_URL="https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-0.12.tar.gz" OPUSFILE_ARGS="--disable-http --disable-examples" OPUSFILE_DIR="opusfile-0.12" -FLUIDSYNTH_URL="https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.4.6.tar.gz" +FLUIDSYNTH_URL="https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.5.2.tar.gz" FLUIDSYNTH_ARGS="-DLIB_SUFFIX=''" -FLUIDSYNTH_DIR="fluidsynth-2.4.6" +FLUIDSYNTH_DIR="fluidsynth-2.5.2" FLUIDLITE_URL="https://github.com/divideconcept/FluidLite/archive/4a01cf1c67419e71da971d209f2855bbf4f3bab8.zip" FLUIDLITE_ARGS="-DFLUIDLITE_BUILD_STATIC=ON -DFLUIDLITE_BUILD_SHARED=OFF" @@ -85,9 +85,9 @@ NLOHMANNJSON_URL="https://github.com/nlohmann/json/archive/v3.12.0.tar.gz" NLOHMANNJSON_DIR="json-3.12.0" NLOHMANNJSON_ARGS="-DJSON_BuildTests=OFF" -FMT_URL="https://github.com/fmtlib/fmt/releases/download/12.0.0/fmt-12.0.0.zip" +FMT_URL="https://github.com/fmtlib/fmt/releases/download/12.1.0/fmt-12.1.0.zip" FMT_ARGS="-DFMT_DOC=OFF -DFMT_TEST=OFF" -FMT_DIR="fmt-12.0.0" +FMT_DIR="fmt-12.1.0" INIH_URL="https://github.com/benhoyt/inih/archive/refs/tags/r62.tar.gz" INIH_DIR="inih-r62" @@ -95,7 +95,7 @@ INIH_DIR="inih-r62" LHASA_URL="https://github.com/fragglet/lhasa/releases/download/v0.5.0/lhasa-0.5.0.tar.gz" LHASA_DIR="lhasa-0.5.0" -ICU_URL="https://github.com/unicode-org/icu/releases/download/release-77-1/icu4c-77_1-src.tgz" +ICU_URL="https://github.com/unicode-org/icu/releases/download/release-78-2/icu4c-78_2-src.tgz" ICU_DIR="icu" ICU_ARGS="--enable-strict=no --disable-tests --disable-samples \ --disable-dyload --disable-extras --disable-icuio \ @@ -105,8 +105,8 @@ ICU_ARGS="--enable-strict=no --disable-tests --disable-samples \ ICUDATA_URL=https://ci.easyrpg.org/job/icudata/lastSuccessfulBuild/artifact/icudata77_all.tar.gz ICUDATA_FILES="icudt*.dat" -SDL2_URL="https://libsdl.org/release/SDL2-2.32.6.tar.gz" -SDL2_DIR="SDL2-2.32.6" +SDL2_URL="https://libsdl.org/release/SDL2-2.32.10.tar.gz" +SDL2_DIR="SDL2-2.32.10" # 3.18.0, only needed for lmu2png tool FREEIMAGE_URL="https://github.com/carstene1ns/freeimage-easyrpg/archive/d82954e4adcb6c1b223bd3cb2e953b6bbf54dfcd.zip" From 544603c21e586427eca326b4d467202949f37230 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Sat, 10 Jan 2026 12:36:10 +0100 Subject: [PATCH 2/5] zlib & ICU updates zlib: Ignore 4th digit as is only for internal audit ICU: They use a sane version scheme now (_ -> .) --- shared/packages.ini | 18 +++++++++--------- shared/packages.sh | 8 ++++---- shared/updater.py | 4 +--- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/shared/packages.ini b/shared/packages.ini index 1a533a3f..764b5c49 100644 --- a/shared/packages.ini +++ b/shared/packages.ini @@ -2,7 +2,10 @@ directory = "${section}-${version}" [zlib] -version = 1.3.1.2 +version_major = 1 +version_minor = 3 +version_patch = 1 +version = ${version_major}.${version_minor}.${version_patch} url = "https://zlib.net/fossils/zlib-${version}.tar.gz" arguments = "-DZLIB_BUILD_EXAMPLES=OFF" anitya_id = 5303 @@ -143,11 +146,8 @@ url = "https://github.com/fragglet/lhasa/releases/download/v${version}/lhasa-${v anitya_id = 14822 [ICU] -version_major = 78 -version_minor = 2 -version = ${version_major}-${version_minor} -version_src = ${version_major}_${version_minor} -url = "https://github.com/unicode-org/icu/releases/download/release-${version}/icu4c-${version_src}-src.tgz" +version = 78.2 +url = "https://github.com/unicode-org/icu/releases/download/release-${version}/icu4c-${version}-sources.tgz" directory = "icu" arguments = "--enable-strict=no --disable-tests --disable-samples --disable-dyload --disable-extras --disable-icuio @@ -156,13 +156,13 @@ arguments = "--enable-strict=no --disable-tests --disable-samples anitya_id = 379847 [icudata] -version_major = 77 -version_minor = 1 -version = ${version_major}-${version_minor} +version_major = 78 +version = ${version_major} _ini_comment = empty on purpose, otherwise polluted by default section directory = url = https://ci.easyrpg.org/job/icudata/lastSuccessfulBuild/artifact/icudata${version_major}_all.tar.gz files = "icudt*.dat" +anitya_id = 379847 [SDL2] version = 2.32.10 diff --git a/shared/packages.sh b/shared/packages.sh index 5f9c20d9..1273afba 100644 --- a/shared/packages.sh +++ b/shared/packages.sh @@ -5,9 +5,9 @@ ####################################### -ZLIB_URL="https://zlib.net/fossils/zlib-1.3.1.2.tar.gz" +ZLIB_URL="https://zlib.net/fossils/zlib-1.3.1.tar.gz" ZLIB_ARGS="-DZLIB_BUILD_EXAMPLES=OFF" -ZLIB_DIR="zlib-1.3.1.2" +ZLIB_DIR="zlib-1.3.1" LIBPNG_URL="https://download.sourceforge.net/libpng/libpng-1.6.53.tar.xz" LIBPNG_ARGS="-DPNG_SHARED=OFF -DPNG_TOOLS=OFF -DPNG_TESTS=OFF" @@ -95,14 +95,14 @@ INIH_DIR="inih-r62" LHASA_URL="https://github.com/fragglet/lhasa/releases/download/v0.5.0/lhasa-0.5.0.tar.gz" LHASA_DIR="lhasa-0.5.0" -ICU_URL="https://github.com/unicode-org/icu/releases/download/release-78-2/icu4c-78_2-src.tgz" +ICU_URL="https://github.com/unicode-org/icu/releases/download/release-78.2/icu4c-78.2-sources.tgz" ICU_DIR="icu" ICU_ARGS="--enable-strict=no --disable-tests --disable-samples \ --disable-dyload --disable-extras --disable-icuio \ --with-data-packaging=static --disable-layout --disable-layoutex \ --enable-draft=no" -ICUDATA_URL=https://ci.easyrpg.org/job/icudata/lastSuccessfulBuild/artifact/icudata77_all.tar.gz +ICUDATA_URL=https://ci.easyrpg.org/job/icudata/lastSuccessfulBuild/artifact/icudata78_all.tar.gz ICUDATA_FILES="icudt*.dat" SDL2_URL="https://libsdl.org/release/SDL2-2.32.10.tar.gz" diff --git a/shared/updater.py b/shared/updater.py index 17eaba99..69d5dae2 100755 --- a/shared/updater.py +++ b/shared/updater.py @@ -62,9 +62,7 @@ def query_anitya(id): comma = ", " # check for special handling if cp.has_option(lib, "version_major"): - v = ver.split(".") # expat - if v[0] == ver: - v = ver.split("-") # ICU + v = ver.split(".") # expat, zlib cp.set(lib, "version_major", v[0]) if cp.has_option(lib, "version_minor"): cp.set(lib, "version_minor", v[1]) From 4d573ef3f25ae40d7017d5d122bdce41b2eda6fc Mon Sep 17 00:00:00 2001 From: Ghabry Date: Sat, 10 Jan 2026 12:51:09 +0100 Subject: [PATCH 3/5] fluidsynth: Migrate to 2.5 Does not require the no-glib patch anymore as can be built with a cpp11 or a embedded API --- android/2_build_toolchain.sh | 2 +- emscripten/2_build_toolchain.sh | 2 +- ios/2_build_toolchain.sh | 2 +- linux-static/2_build_toolchain.sh | 2 +- macos/2_build_toolchain.sh | 2 +- shared/common.sh | 10 - shared/fluidsynth-no-deps.patch | 86 ----- shared/fluidsynth-no-glib.patch | 531 ------------------------------ shared/fluidsynth-update-patch.sh | 24 -- shared/packages.ini | 2 +- shared/packages.sh | 2 +- switch/2_build_toolchain.sh | 2 +- tvos/2_build_toolchain.sh | 2 +- wiiu/2_build_toolchain.sh | 2 +- 14 files changed, 10 insertions(+), 661 deletions(-) delete mode 100644 shared/fluidsynth-no-deps.patch delete mode 100644 shared/fluidsynth-no-glib.patch delete mode 100755 shared/fluidsynth-update-patch.sh diff --git a/android/2_build_toolchain.sh b/android/2_build_toolchain.sh index 6e299a79..0df104dc 100755 --- a/android/2_build_toolchain.sh +++ b/android/2_build_toolchain.sh @@ -115,7 +115,7 @@ function build() { install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS install_lib_cmake $OPUS_DIR $OPUS_ARGS install_lib $OPUSFILE_DIR $OPUSFILE_ARGS - install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS + install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -Dosal=cpp11 install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS install_lib_meson $INIH_DIR $INIH_ARGS install_lib $LHASA_DIR $LHASA_ARGS diff --git a/emscripten/2_build_toolchain.sh b/emscripten/2_build_toolchain.sh index 6fca1a54..755a796c 100755 --- a/emscripten/2_build_toolchain.sh +++ b/emscripten/2_build_toolchain.sh @@ -111,7 +111,7 @@ install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS #install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS install_lib_cmake $OPUS_DIR $OPUS_ARGS -DOPUS_STACK_PROTECTOR=OFF install_lib $OPUSFILE_DIR $OPUSFILE_ARGS -install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS +install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -Dosal=embedded install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS install_lib_meson $INIH_DIR $INIH_ARGS #install_lib $LHASA_DIR $LHASA_ARGS diff --git a/ios/2_build_toolchain.sh b/ios/2_build_toolchain.sh index 9eb29fcb..c4be64e1 100755 --- a/ios/2_build_toolchain.sh +++ b/ios/2_build_toolchain.sh @@ -76,7 +76,7 @@ function build() { install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS install_lib_cmake $OPUS_DIR $OPUS_ARGS install_lib $OPUSFILE_DIR $OPUSFILE_ARGS - install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -DCMAKE_MACOSX_BUNDLE=OFF + install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -Dosal=cpp11 -DCMAKE_MACOSX_BUNDLE=OFF install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS install_lib_meson $INIH_DIR $INIH_ARGS install_lib $LHASA_DIR $LHASA_ARGS diff --git a/linux-static/2_build_toolchain.sh b/linux-static/2_build_toolchain.sh index 6ba186bf..7147fd82 100755 --- a/linux-static/2_build_toolchain.sh +++ b/linux-static/2_build_toolchain.sh @@ -59,7 +59,7 @@ install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS install_lib_cmake $OPUS_DIR $OPUS_ARGS install_lib $OPUSFILE_DIR $OPUSFILE_ARGS -install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS +install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -Dosal=cpp11 install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS install_lib_meson $INIH_DIR $INIH_ARGS install_lib $LHASA_DIR $LHASA_ARGS diff --git a/macos/2_build_toolchain.sh b/macos/2_build_toolchain.sh index b2bf1793..0ea4958e 100755 --- a/macos/2_build_toolchain.sh +++ b/macos/2_build_toolchain.sh @@ -76,7 +76,7 @@ function build() { install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS install_lib_cmake $OPUS_DIR $OPUS_ARGS install_lib $OPUSFILE_DIR $OPUSFILE_ARGS - install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS + install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -Dosal=cpp11 install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS install_lib_meson $INIH_DIR $INIH_ARGS install_lib $LHASA_DIR $LHASA_ARGS diff --git a/shared/common.sh b/shared/common.sh index f32865fb..cfd01e26 100644 --- a/shared/common.sh +++ b/shared/common.sh @@ -380,16 +380,6 @@ function patches_common { ) fi - # FluidSynth: Shim glib and disable all optional features - if [ -d "$FLUIDSYNTH_DIR" ]; then - verbosemsg "fluidsynth" - - (cd $FLUIDSYNTH_DIR - patch -Np1 < $_SCRIPT_DIR/fluidsynth-no-glib.patch - patch -Np1 < $_SCRIPT_DIR/fluidsynth-no-deps.patch - ) - fi - # nlohmann json: Install pkgconfig/cmake into lib (share is deleted by us) if [ -d "$NLOHMANNJSON_DIR" ]; then verbosemsg "nlohmann_json" diff --git a/shared/fluidsynth-no-deps.patch b/shared/fluidsynth-no-deps.patch deleted file mode 100644 index e9e5828c..00000000 --- a/shared/fluidsynth-no-deps.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 2ea138dfcb72e765a24fc205798d0b2dfa5c5a3a Mon Sep 17 00:00:00 2001 -From: Ghabry -Date: Fri, 17 Mar 2023 14:02:43 +0100 -Subject: [PATCH 2/2] Disable most features - ---- - CMakeLists.txt | 54 +++++++++++++++++++++++++------------------------- - 1 file changed, 27 insertions(+), 27 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9c655a7..9259e38 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -76,42 +76,42 @@ option ( enable-trap-on-fpe "enable SIGFPE trap on Floating Point Exceptions" of - option ( enable-ubsan "compile and link against UBSan (for debugging fluidsynth internals)" off ) - - # Options enabled by default --option ( enable-alsa "compile ALSA support (if it is available)" on ) --option ( enable-aufile "compile support for sound file output" on ) --option ( BUILD_SHARED_LIBS "Build a shared object or DLL" on ) --option ( enable-dbus "compile DBUS support (if it is available)" on ) --option ( enable-ipv6 "enable IPv6 support at the cost of disabling IPv4" on ) --option ( enable-jack "compile JACK support (if it is available)" on ) --option ( enable-ladspa "enable LADSPA effect units" on ) --option ( enable-libinstpatch "use libinstpatch (if available) to load DLS and GIG files" on ) --option ( enable-libsndfile "compile libsndfile support (if it is available)" on ) --option ( enable-midishare "compile MidiShare support (if it is available)" on ) -+option ( enable-alsa "compile ALSA support (if it is available)" off ) -+option ( enable-aufile "compile support for sound file output" off ) -+option ( BUILD_SHARED_LIBS "Build a shared object or DLL" off ) -+option ( enable-dbus "compile DBUS support (if it is available)" off ) -+option ( enable-ipv6 "enable IPv6 support at the cost of disabling IPv4" off ) -+option ( enable-jack "compile JACK support (if it is available)" off ) -+option ( enable-ladspa "enable LADSPA effect units" off ) -+option ( enable-libinstpatch "use libinstpatch (if available) to load DLS and GIG files" off ) -+option ( enable-libsndfile "compile libsndfile support (if it is available)" off ) -+option ( enable-midishare "compile MidiShare support (if it is available)" off ) - option ( enable-opensles "compile OpenSLES support (if it is available)" off ) - option ( enable-oboe "compile Oboe support (requires OpenSLES and/or AAudio)" off ) --option ( enable-network "enable network support (requires BSD sockets)" on ) --option ( enable-oss "compile OSS support (if it is available)" on ) --option ( enable-dsound "compile DirectSound support (if it is available)" on ) --option ( enable-wasapi "compile Windows WASAPI support (if it is available)" on ) --option ( enable-waveout "compile Windows WaveOut support (if it is available)" on ) --option ( enable-winmidi "compile Windows MIDI support (if it is available)" on ) -+option ( enable-network "enable network support (requires BSD sockets)" off ) -+option ( enable-oss "compile OSS support (if it is available)" off ) -+option ( enable-dsound "compile DirectSound support (if it is available)" off ) -+option ( enable-wasapi "compile Windows WASAPI support (if it is available)" off ) -+option ( enable-waveout "compile Windows WaveOut support (if it is available)" off ) -+option ( enable-winmidi "compile Windows MIDI support (if it is available)" off ) - option ( enable-sdl2 "compile SDL2 audio support (if it is available)" off ) --option ( enable-sdl3 "compile SDL3 audio support (if it is available)" on ) --option ( enable-pulseaudio "compile PulseAudio support (if it is available)" on ) --option ( enable-pipewire "compile PipeWire support (if it is available)" on ) --option ( enable-readline "compile readline lib line editing (if it is available)" on ) --option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" on ) --option ( enable-openmp "enable OpenMP support (parallelization of soundfont decoding, vectorization of voice mixing, etc.)" on ) --option ( enable-unicode "enable UNICODE build for Windows" on ) -+option ( enable-sdl3 "compile SDL3 audio support (if it is available)" off ) -+option ( enable-pulseaudio "compile PulseAudio support (if it is available)" off ) -+option ( enable-pipewire "compile PipeWire support (if it is available)" off ) -+option ( enable-readline "compile readline lib line editing (if it is available)" off ) -+option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" off ) -+option ( enable-openmp "enable OpenMP support (parallelization of soundfont decoding, vectorization of voice mixing, etc.)" off ) -+option ( enable-unicode "enable UNICODE build for Windows" off ) - - # Platform specific options - if ( CMAKE_SYSTEM MATCHES "Linux" ) -- option ( enable-systemd "compile systemd support (if it is available)" on ) -+ option ( enable-systemd "compile systemd support (if it is available)" off ) - endif ( CMAKE_SYSTEM MATCHES "Linux" ) - - if ( CMAKE_SYSTEM MATCHES "Darwin" ) -- option ( enable-coreaudio "compile CoreAudio support (if it is available)" on ) -- option ( enable-coremidi "compile CoreMIDI support (if it is available)" on ) -- option ( enable-framework "create a Mac OSX style FluidSynth.framework" on ) -+ option ( enable-coreaudio "compile CoreAudio support (if it is available)" off ) -+ option ( enable-coremidi "compile CoreMIDI support (if it is available)" off ) -+ option ( enable-framework "create a Mac OSX style FluidSynth.framework" off ) - endif ( CMAKE_SYSTEM MATCHES "Darwin" ) - - if ( CMAKE_SYSTEM MATCHES "OS2" ) --- -2.49.0 - diff --git a/shared/fluidsynth-no-glib.patch b/shared/fluidsynth-no-glib.patch deleted file mode 100644 index 919df3ab..00000000 --- a/shared/fluidsynth-no-glib.patch +++ /dev/null @@ -1,531 +0,0 @@ -From ef44302fb67f131ad7814ad699d71b56173d7f69 Mon Sep 17 00:00:00 2001 -From: Ghabry -Date: Fri, 17 Mar 2023 14:00:45 +0100 -Subject: [PATCH 1/2] Shim glib - ---- - CMakeLists.txt | 4 +- - FluidSynthConfig.cmake.in | 2 +- - src/CMakeLists.txt | 3 +- - src/bindings/fluid_cmd.c | 3 + - src/glib_shim.c | 12 ++++ - src/glib_shim.h | 95 ++++++++++++++++++++++++++++++++ - src/rvoice/fluid_rvoice_mixer.c | 10 ---- - src/sfloader/fluid_defsfont.c | 5 -- - src/sfloader/fluid_samplecache.c | 2 + - src/sfloader/fluid_sffile.c | 6 +- - src/synth/fluid_synth.c | 16 +++--- - src/synth/fluid_synth.h | 2 +- - src/utils/fluid_sys.c | 9 ++- - src/utils/fluid_sys.h | 8 +-- - src/utils/fluidsynth_priv.h | 2 +- - 15 files changed, 143 insertions(+), 36 deletions(-) - create mode 100644 src/glib_shim.c - create mode 100644 src/glib_shim.h - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e9f9b95..9c655a7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -536,8 +536,8 @@ if ( CMAKE_VERSION VERSION_GREATER_EQUAL 3.15 AND VCPKG_TOOLCHAIN ) - endif () - - # Mandatory libraries: glib and gthread --find_package ( GLib2 ${GLIB2_MINUMUM_VERSION} REQUIRED ) --list( APPEND PC_REQUIRES_PRIV "glib-2.0" "gthread-2.0") -+# find_package ( GLib2 ${GLIB2_MINUMUM_VERSION} REQUIRED ) -+# list( APPEND PC_REQUIRES_PRIV "glib-2.0" "gthread-2.0") - - if ( GLib2_VERSION AND GLib2_VERSION VERSION_LESS "2.26.0" ) - message ( WARNING "Your version of glib is very old. This may cause problems with fluidsynth's sample cache on Windows. Consider updating to glib 2.26 or newer!" ) -diff --git a/FluidSynthConfig.cmake.in b/FluidSynthConfig.cmake.in -index d2e0c5e..683d10c 100644 ---- a/FluidSynthConfig.cmake.in -+++ b/FluidSynthConfig.cmake.in -@@ -73,7 +73,7 @@ if(NOT FLUIDSYNTH_IS_SHARED) - endif() - - if(NOT TARGET GLib2::glib-2 OR NOT TARGET GLib2::gthread-2) -- find_dependency(GLib2 @GLIB2_MINUMUM_VERSION@) -+ #find_dependency(GLib2 @GLIB2_MINUMUM_VERSION@) - endif() - - # Optional dependencies -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 02270ab..06d4c21 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -112,6 +112,7 @@ endif ( OBOE_SUPPORT ) - set ( config_SOURCES ${FluidSynth_BINARY_DIR}/config.h ) - - set ( libfluidsynth_SOURCES -+ glib_shim.c - utils/fluid_conv.c - utils/fluid_conv.h - utils/fluid_hash.c -@@ -367,7 +368,7 @@ if ( TARGET OpenMP::OpenMP_C AND HAVE_OPENMP ) - target_link_libraries ( libfluidsynth-OBJ PUBLIC OpenMP::OpenMP_C ) - endif() - --target_link_libraries ( libfluidsynth-OBJ PUBLIC GLib2::glib-2 GLib2::gthread-2 ) -+# target_link_libraries ( libfluidsynth-OBJ PUBLIC GLib2::glib-2 GLib2::gthread-2 ) - - if ( TARGET SndFile::sndfile AND LIBSNDFILE_SUPPORT ) - target_link_libraries ( libfluidsynth-OBJ PUBLIC SndFile::sndfile ) -diff --git a/src/bindings/fluid_cmd.c b/src/bindings/fluid_cmd.c -index 461ada6..1012132 100644 ---- a/src/bindings/fluid_cmd.c -+++ b/src/bindings/fluid_cmd.c -@@ -433,6 +433,8 @@ static const fluid_cmd_t fluid_commands[] = - int - fluid_command(fluid_cmd_handler_t *handler, const char *cmd, fluid_ostream_t out) - { -+ return 0; -+#if 0 - int result, num_tokens = 0; - char **tokens = NULL; - -@@ -451,6 +453,7 @@ fluid_command(fluid_cmd_handler_t *handler, const char *cmd, fluid_ostream_t out - fluid_strfreev(tokens); - - return result; -+#endif - } - - /** -diff --git a/src/glib_shim.c b/src/glib_shim.c -new file mode 100644 -index 0000000..40b8b56 ---- /dev/null -+++ b/src/glib_shim.c -@@ -0,0 +1,12 @@ -+#include "glib_shim.h" -+ -+int g_atomic_int_dec_and_test(int* _pi) { -+ *_pi -= 1; -+ return (_pi == 0); -+} -+ -+int g_atomic_int_add(int* _pi, int _add) { -+ int tmp = *_pi; -+ *_pi += _add; -+ return tmp; -+} -diff --git a/src/glib_shim.h b/src/glib_shim.h -new file mode 100644 -index 0000000..08582e3 ---- /dev/null -+++ b/src/glib_shim.h -@@ -0,0 +1,95 @@ -+#ifndef GLIB_SHIM_H -+#define GLIB_SHIM_H -+ -+#define GLIB_MAJOR_VERSION 3 -+#define GLIB_MINOR_VERSION 0 -+#define GLIB_MICRO_VERISON 0 -+ -+#define GLIB_CHECK_VERSION(major,minor,micro) \ -+ (GLIB_MAJOR_VERSION > (major) || \ -+ (GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION > (minor)) || \ -+ (GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION == (minor) && \ -+ GLIB_MICRO_VERSION >= (micro))) -+ -+typedef int GMutex; -+typedef int GRecMutex; -+typedef int GThread; -+typedef int GCond; -+typedef int GStatBuf; -+typedef int GTimeVal; -+typedef void* gpointer; -+typedef int GError; -+ -+#ifdef WORDS_BIGENDIAN -+#define G_BIG_ENDIAN WORDS_BIGENDIAN -+#define G_BYTE_ORDER WORDS_BIGENDIAN -+#else -+#define G_BYTE_ORDER 0 -+#define G_BIG_ENDIAN 1 -+#endif -+ -+#ifdef WORDS_BIGENDIAN -+#define GINT32_FROM_LE(x) ((x >> 24) | ((x<<8) & 0x00FF0000) | ((x>>8) & 0x0000FF00) | (x << 24)) -+#define GINT16_FROM_LE(x) ((x >> 8) | (x << 8)) -+#else -+#define GINT32_FROM_LE(x) ((x)) -+#define GINT16_FROM_LE(x) ((x)) -+#endif -+ -+#define G_LIKELY -+#define G_UNLIKELY -+ -+#ifndef TRUE -+#define TRUE 1 -+#define FALSE 0 -+#endif -+ -+#define g_mutex_init(x) -+#define g_mutex_clear(x) -+#define g_mutex_lock(x) -+#define g_mutex_unlock(x) -+ -+#define g_rec_mutex_init(x) -+#define g_rec_mutex_clear(x) -+#define g_rec_mutex_lock(x) -+#define g_rec_mutex_unlock(x) -+ -+#define g_new(type, len) ( NULL ) -+#define g_free(obj) -+ -+#define g_atomic_int_inc(_pi) ( *_pi += 1 ) -+#define g_atomic_int_get(_pi) ( *_pi ) -+#define g_atomic_int_set(_pi, _val) ( *_pi = _val ) -+int g_atomic_int_dec_and_test(int* _pi); -+#define g_atomic_int_compare_and_exchange(_pi, _old, _new) ( 1 ) -+int g_atomic_int_add(int* _pi, int _add); -+#define g_atomic_pointer_get(_pp) ( _pp ) -+#define g_atomic_pointer_set(_pp, val) ( _pp = val ) -+#define g_atomic_pointer_compare_and_exchange(_pp, _expected, _desired) (1) -+ -+#define g_cond_init(x) -+#define g_cond_signal(x) -+#define g_cond_broadcast(x) -+#define g_cond_clear(x) -+#define g_cond_wait(x, y) -+ -+#define g_stat(a, b) ( 0 ) -+ -+#define g_assert(a) -+ -+#define G_FILE_TEST_IS_REGULAR 0 -+#define G_FILE_TEST_EXISTS 1 -+#define g_file_test(a, b) ( FALSE ) -+ -+#define g_usleep(x) -+ -+#define g_thread_try_new(a, b, c, d) ( NULL ) -+#define g_clear_error(e) ( *err = 0 ) -+#define g_thread_unref(t) -+#define g_thread_join(t) -+ -+#define g_shim_alloca(size) _alloca((size)) -+#define g_newa(struct_type, n_structs) \ -+ ((struct_type *)g_shim_alloca(sizeof(struct_type) * (size_t)(n_structs))) -+ -+#endif -diff --git a/src/rvoice/fluid_rvoice_mixer.c b/src/rvoice/fluid_rvoice_mixer.c -index 3274855..0d5cf3d 100644 ---- a/src/rvoice/fluid_rvoice_mixer.c -+++ b/src/rvoice/fluid_rvoice_mixer.c -@@ -478,7 +478,6 @@ fluid_rvoice_buffers_mix(fluid_rvoice_buffers_t *buffers, - else - { - // here goes the vectorizable loop -- #pragma omp simd aligned(dsp_buf,buf:FLUID_DEFAULT_ALIGNMENT) - for(dsp_i = 0; dsp_i < FLUID_BUFSIZE; dsp_i++) - { - // We cannot simply increment current_amp by amp_incr during every iteration, as this would create a dependency and prevent vectorization. -@@ -489,7 +488,6 @@ fluid_rvoice_buffers_mix(fluid_rvoice_buffers_t *buffers, - if(target_amp > 0) - { - /* Note, that this loop could be unrolled by FLUID_BUFSIZE elements */ -- #pragma omp simd aligned(dsp_buf,buf:FLUID_DEFAULT_ALIGNMENT) - for(dsp_i = FLUID_BUFSIZE; dsp_i < sample_count; dsp_i++) - { - // Index by blocks (not by samples) to let the compiler know that we always start accessing -@@ -1413,8 +1411,6 @@ fluid_mixer_buffers_mix(fluid_mixer_buffers_t *dst, fluid_mixer_buffers_t *src, - - for(i = 0; i < minbuf; i++) - { -- #pragma omp simd aligned(base_dst,base_src:FLUID_DEFAULT_ALIGNMENT) -- - for(j = 0; j < scount; j++) - { - int dsp_i = i * FLUID_MIXER_MAX_BUFFERS_DEFAULT * FLUID_BUFSIZE + j; -@@ -1427,8 +1423,6 @@ fluid_mixer_buffers_mix(fluid_mixer_buffers_t *dst, fluid_mixer_buffers_t *src, - - for(i = 0; i < minbuf; i++) - { -- #pragma omp simd aligned(base_dst,base_src:FLUID_DEFAULT_ALIGNMENT) -- - for(j = 0; j < scount; j++) - { - int dsp_i = i * FLUID_MIXER_MAX_BUFFERS_DEFAULT * FLUID_BUFSIZE + j; -@@ -1448,8 +1442,6 @@ fluid_mixer_buffers_mix(fluid_mixer_buffers_t *dst, fluid_mixer_buffers_t *src, - - for(i = 0; i < minbuf; i++) - { -- #pragma omp simd aligned(base_dst,base_src:FLUID_DEFAULT_ALIGNMENT) -- - for(j = 0; j < scount; j++) - { - int dsp_i = i * FLUID_MIXER_MAX_BUFFERS_DEFAULT * FLUID_BUFSIZE + j; -@@ -1462,8 +1454,6 @@ fluid_mixer_buffers_mix(fluid_mixer_buffers_t *dst, fluid_mixer_buffers_t *src, - - for(i = 0; i < minbuf; i++) - { -- #pragma omp simd aligned(base_dst,base_src:FLUID_DEFAULT_ALIGNMENT) -- - for(j = 0; j < scount; j++) - { - int dsp_i = i * FLUID_MIXER_MAX_BUFFERS_DEFAULT * FLUID_BUFSIZE + j; -diff --git a/src/sfloader/fluid_defsfont.c b/src/sfloader/fluid_defsfont.c -index 69619c8..9ca418e 100644 ---- a/src/sfloader/fluid_defsfont.c -+++ b/src/sfloader/fluid_defsfont.c -@@ -379,8 +379,6 @@ int fluid_defsfont_load_all_sampledata(fluid_defsfont_t *defsfont, SFData *sfdat - } - } - -- #pragma omp parallel -- #pragma omp single - for(list = defsfont->sample; list; list = fluid_list_next(list)) - { - sample = fluid_list_get(list); -@@ -389,11 +387,9 @@ int fluid_defsfont_load_all_sampledata(fluid_defsfont_t *defsfont, SFData *sfdat - { - /* SF3 samples get loaded individually, as most (or all) of them are in Ogg Vorbis format - * anyway */ -- #pragma omp task firstprivate(sample,sfdata,defsfont) shared(sample_parsing_result, invalid_loops_were_sanitized) default(none) - { - if(fluid_defsfont_load_sampledata(defsfont, sfdata, sample) == FLUID_FAILED) - { -- #pragma omp critical - { - FLUID_LOG(FLUID_ERR, "Failed to load sample '%s'", sample->name); - sample_parsing_result = FLUID_FAILED; -@@ -415,7 +411,6 @@ int fluid_defsfont_load_all_sampledata(fluid_defsfont_t *defsfont, SFData *sfdat - } - else - { -- #pragma omp task firstprivate(sample, defsfont) shared(invalid_loops_were_sanitized) default(none) - { - int modified; - /* Data pointers of SF2 samples point to large sample data block loaded above */ -diff --git a/src/sfloader/fluid_samplecache.c b/src/sfloader/fluid_samplecache.c -index 6e268da..fce84b9 100644 ---- a/src/sfloader/fluid_samplecache.c -+++ b/src/sfloader/fluid_samplecache.c -@@ -282,6 +282,7 @@ static fluid_samplecache_entry_t *get_samplecache_entry(SFData *sf, - - static int fluid_get_file_modification_time(char *filename, time_t *modification_time) - { -+#if 0 - fluid_stat_buf_t buf; - - if(fluid_stat(filename, &buf)) -@@ -290,6 +291,7 @@ static int fluid_get_file_modification_time(char *filename, time_t *modification - } - - *modification_time = buf.st_mtime; -+#endif - return FLUID_OK; - } - -diff --git a/src/sfloader/fluid_sffile.c b/src/sfloader/fluid_sffile.c -index 21535c9..ee3aa0b 100644 ---- a/src/sfloader/fluid_sffile.c -+++ b/src/sfloader/fluid_sffile.c -@@ -2258,10 +2258,14 @@ static int fluid_sffile_read_wav(SFData *sf, unsigned int start, unsigned int en - if(FLUID_IS_BIG_ENDIAN) - { - unsigned int i; -+ unsigned short data; - - for(i = 0; i < num_samples; i++) - { -- loaded_data[i] = FLUID_LE16TOH(loaded_data[i]); -+ data = loaded_data[i]; -+ data = (data >> 8) | (data << 8); -+ //loaded_data[i] = FLUID_LE16TOH(loaded_data[i]); -+ loaded_data[i] = data; - } - } - -diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c -index f6beb07..cea4254 100644 ---- a/src/synth/fluid_synth.c -+++ b/src/synth/fluid_synth.c -@@ -652,8 +652,9 @@ new_fluid_synth(fluid_settings_t *settings) - double sample_rate_min, sample_rate_max; - - /* initialize all the conversion tables and other stuff */ -- if(fluid_atomic_int_compare_and_exchange(&fluid_synth_initialized, 0, 1)) -+ if(fluid_synth_initialized == 0) - { -+ fluid_synth_initialized = 1; - fluid_synth_init(); - } - -@@ -832,7 +833,7 @@ new_fluid_synth(fluid_settings_t *settings) - - fluid_atomic_int_set(&synth->ticks_since_start, 0); - synth->tuning = NULL; -- fluid_private_init(synth->tuning_iter); -+ synth->tuning_iter = 0; - - /* Initialize multi-core variables if multiple cores enabled */ - if(synth->cores > 1) -@@ -1219,7 +1220,7 @@ delete_fluid_synth(fluid_synth_t *synth) - FLUID_FREE(synth->tuning); - } - -- fluid_private_free(synth->tuning_iter); -+ synth->tuning_iter = 0; - - #ifdef LADSPA - /* Release the LADSPA effects unit */ -@@ -7474,7 +7475,7 @@ fluid_synth_tuning_iteration_start(fluid_synth_t *synth) - { - fluid_return_if_fail(synth != NULL); - fluid_synth_api_enter(synth); -- fluid_private_set(synth->tuning_iter, FLUID_INT_TO_POINTER(0)); -+ synth->tuning_iter = 0; - fluid_synth_api_exit(synth); - } - -@@ -7497,7 +7498,7 @@ fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog) - fluid_synth_api_enter(synth); - - /* Current tuning iteration stored as: bank << 8 | program */ -- pval = fluid_private_get(synth->tuning_iter); -+ pval = &synth->tuning_iter; - p = FLUID_POINTER_TO_INT(pval); - b = (p >> 8) & 0xFF; - p &= 0xFF; -@@ -7526,12 +7527,11 @@ fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog) - - if(p < 127) - { -- fluid_private_set(synth->tuning_iter, -- FLUID_INT_TO_POINTER(b << 8 | (p + 1))); -+ synth->tuning_iter = (b << 8 | (p + 1)); - } - else - { -- fluid_private_set(synth->tuning_iter, FLUID_INT_TO_POINTER((b + 1) << 8)); -+ synth->tuning_iter = ((b + 1) << 8); - } - - FLUID_API_RETURN(1); -diff --git a/src/synth/fluid_synth.h b/src/synth/fluid_synth.h -index 262bdec..f925537 100644 ---- a/src/synth/fluid_synth.h -+++ b/src/synth/fluid_synth.h -@@ -158,7 +158,7 @@ struct _fluid_synth_t - fluid_atomic_float_t cpu_load; /**< CPU load in percent (CPU time required / audio synthesized time * 100) */ - - fluid_tuning_t ***tuning; /**< 128 banks of 128 programs for the tunings */ -- fluid_private_t tuning_iter; /**< Tuning iterators per each thread */ -+ int tuning_iter; /**< Tuning iterators per each thread */ - - fluid_sample_timer_t *sample_timers; /**< List of timers triggered before a block is processed */ - unsigned int min_note_length_ticks; /**< If note-offs are triggered just after a note-on, they will be delayed */ -diff --git a/src/utils/fluid_sys.c b/src/utils/fluid_sys.c -index 9b45d58..50cbe61 100644 ---- a/src/utils/fluid_sys.c -+++ b/src/utils/fluid_sys.c -@@ -33,7 +33,7 @@ - #if HAVE_PTHREAD_H && !defined(_WIN32) - // Do not include pthread on windows. It includes winsock.h, which collides with ws2tcpip.h from fluid_sys.h - // It isn't need on Windows anyway. --#include -+//#include - #endif - - /* WIN32 HACK - Flag used to differentiate between a file descriptor and a socket. -@@ -411,6 +411,8 @@ unsigned int fluid_curtime(void) - double - fluid_utime(void) - { -+ return 0.0; -+#if 0 - double utime; - - #if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 28 -@@ -445,6 +447,7 @@ fluid_utime(void) - #endif - - return utime; -+#endif - } - - -@@ -477,6 +480,7 @@ fluid_thread_self_set_prio(int prio_level) - void - fluid_thread_self_set_prio(int prio_level) - { -+#if 0 - struct sched_param priority; - - if(prio_level > 0) -@@ -501,6 +505,7 @@ fluid_thread_self_set_prio(int prio_level) - #endif - FLUID_LOG(FLUID_WARN, "Failed to set thread to high priority"); - } -+#endif - } - - #ifdef FPE_CHECK -@@ -1041,7 +1046,7 @@ new_fluid_thread(const char *name, fluid_thread_func_t func, void *data, int pri - fluid_thread_info_t *info = NULL; - GError *err = NULL; - -- g_return_val_if_fail(func != NULL, NULL); -+ fluid_return_val_if_fail(func != NULL, NULL); - - #if OLD_GLIB_THREAD_API - -diff --git a/src/utils/fluid_sys.h b/src/utils/fluid_sys.h -index f491254..1521c4c 100644 ---- a/src/utils/fluid_sys.h -+++ b/src/utils/fluid_sys.h -@@ -175,7 +175,7 @@ typedef gintptr intptr_t; - #include - #endif - --#include -+#include "glib_shim.h" - - #ifdef __cplusplus - extern "C" { -@@ -187,7 +187,7 @@ extern "C" { - * @param err Pointer to a GError to access the message field of. - * @return Message string - */ --#define fluid_gerror_message(err) ((err) ? err->message : "No error details") -+#define fluid_gerror_message(err) ("No error details") - - #if defined(_WIN32) || defined(__CYGWIN__) - char* fluid_get_windows_error(void); -@@ -340,13 +340,13 @@ delete_fluid_cond(fluid_cond_t *cond) - } - - /* Thread private data */ -- -+#if 0 - typedef GPrivate fluid_private_t; - #define fluid_private_init(_priv) memset (&_priv, 0, sizeof (_priv)) - #define fluid_private_free(_priv) - #define fluid_private_get(_priv) g_private_get(&(_priv)) - #define fluid_private_set(_priv, _data) g_private_set(&(_priv), _data) -- -+#endif - #else - - /* glib prior to 2.32 */ -diff --git a/src/utils/fluidsynth_priv.h b/src/utils/fluidsynth_priv.h -index 67e97ab..9dcfbb7 100644 ---- a/src/utils/fluidsynth_priv.h -+++ b/src/utils/fluidsynth_priv.h -@@ -31,7 +31,7 @@ - - #include "config.h" - --#include -+#include "glib_shim.h" - - #if HAVE_STDLIB_H - #include // malloc, free --- -2.49.0 - diff --git a/shared/fluidsynth-update-patch.sh b/shared/fluidsynth-update-patch.sh deleted file mode 100755 index bcd1e350..00000000 --- a/shared/fluidsynth-update-patch.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -set -e - -git clone -b no-glib https://github.com/ghabry/fluidsynth --depth=3 - -pushd fluidsynth - -git format-patch -2 HEAD - -sed -i 's/From: Ghabry.*/From: Ghabry/' 000*.patch - -cp 0001-Shim-glib.patch ../fluidsynth-no-glib.patch -cp 0002-Disable-most-features.patch ../fluidsynth-no-deps.patch - -cp 0001-Shim-glib.patch ../../windows/fluidsynth-easyrpg/fluidsynth-no-glib.patch -cp 0002-Disable-most-features.patch ../../windows/fluidsynth-easyrpg/fluidsynth-no-deps.patch - -popd - -rm -rf fluidsynth - -echo "Fluidsynth patches updated." -echo "Do not forget to manually update the vcpkg portfile" diff --git a/shared/packages.ini b/shared/packages.ini index 764b5c49..91b7e13b 100644 --- a/shared/packages.ini +++ b/shared/packages.ini @@ -113,7 +113,7 @@ anitya_id = 10353 [fluidsynth] version = 2.5.2 url = "https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v${version}.tar.gz" -arguments = "-DLIB_SUFFIX=''" +arguments = "-DLIB_SUFFIX='' -Denable-alsa=OFF -Denable-aufile=OFF -Denable-dbus=OFF -Denable-ipv6=OFF -Denable-jack=OFF -Denable-ladspa=OFF -Denable-libinstpatch=OFF -Denable-libsndfile=OFF -Denable-midishare=OFF -Denable-network=OFF -Denable-oss=OFF -Denable-dsound=OFF -Denable-wasapi=OFF -Denable-waveout=OFF -Denable-winmidi=OFF -Denable-sdl3=OFF -Denable-pulseaudio=OFF -Denable-pipewire=OFF -Denable-readline=OFF -Denable-threads=OFF -Denable-openmp=OFF -Denable-unicode=OFF -Denable-native-dls=OFF" anitya_id = 10437 [FluidLite] diff --git a/shared/packages.sh b/shared/packages.sh index 1273afba..0f576755 100644 --- a/shared/packages.sh +++ b/shared/packages.sh @@ -74,7 +74,7 @@ OPUSFILE_ARGS="--disable-http --disable-examples" OPUSFILE_DIR="opusfile-0.12" FLUIDSYNTH_URL="https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.5.2.tar.gz" -FLUIDSYNTH_ARGS="-DLIB_SUFFIX=''" +FLUIDSYNTH_ARGS="-DLIB_SUFFIX='' -Denable-alsa=OFF -Denable-aufile=OFF -Denable-dbus=OFF -Denable-ipv6=OFF -Denable-jack=OFF -Denable-ladspa=OFF -Denable-libinstpatch=OFF -Denable-libsndfile=OFF -Denable-midishare=OFF -Denable-network=OFF -Denable-oss=OFF -Denable-dsound=OFF -Denable-wasapi=OFF -Denable-waveout=OFF -Denable-winmidi=OFF -Denable-sdl3=OFF -Denable-pulseaudio=OFF -Denable-pipewire=OFF -Denable-readline=OFF -Denable-threads=OFF -Denable-openmp=OFF -Denable-unicode=OFF -Denable-native-dls=OFF" FLUIDSYNTH_DIR="fluidsynth-2.5.2" FLUIDLITE_URL="https://github.com/divideconcept/FluidLite/archive/4a01cf1c67419e71da971d209f2855bbf4f3bab8.zip" diff --git a/switch/2_build_toolchain.sh b/switch/2_build_toolchain.sh index 3ff1ef44..667fd421 100755 --- a/switch/2_build_toolchain.sh +++ b/switch/2_build_toolchain.sh @@ -91,7 +91,7 @@ install_lib_cmake $LIBSAMPLERATE_DIR $LIBSAMPLERATE_ARGS install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS install_lib_cmake $OPUS_DIR $OPUS_ARGS install_lib $OPUSFILE_DIR $OPUSFILE_ARGS -install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS +install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -Dosal=embedded install_lib_meson $INIH_DIR $INIH_ARGS install_lib $LHASA_DIR $LHASA_ARGS install_lib_cmake $FMT_DIR $FMT_ARGS diff --git a/tvos/2_build_toolchain.sh b/tvos/2_build_toolchain.sh index 4a4e723f..386b10f2 100755 --- a/tvos/2_build_toolchain.sh +++ b/tvos/2_build_toolchain.sh @@ -76,7 +76,7 @@ function build() { install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS install_lib_cmake $OPUS_DIR $OPUS_ARGS install_lib $OPUSFILE_DIR $OPUSFILE_ARGS - install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -DCMAKE_MACOSX_BUNDLE=OFF + install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -Dosal=cpp11 -DCMAKE_MACOSX_BUNDLE=OFF install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS install_lib_meson $INIH_DIR $INIH_ARGS install_lib $LHASA_DIR $LHASA_ARGS diff --git a/wiiu/2_build_toolchain.sh b/wiiu/2_build_toolchain.sh index eaa386ae..55396bcd 100755 --- a/wiiu/2_build_toolchain.sh +++ b/wiiu/2_build_toolchain.sh @@ -97,7 +97,7 @@ install_lib $LIBVORBIS_DIR $LIBVORBIS_ARGS install_lib $MPG123_DIR $MPG123_ARGS install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS -install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS +install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -Dosal=embedded install_lib_cmake $OPUS_DIR $OPUS_ARGS install_lib $OPUSFILE_DIR $OPUSFILE_ARGS install_lib_meson $INIH_DIR $INIH_ARGS From f72cb467364be4863b86bdf365436baeefd88813 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Sat, 10 Jan 2026 13:07:20 +0100 Subject: [PATCH 4/5] ICU: Adapt no-mutex patch to ICU 78 --- shared/extra/icu-no-mutex.patch | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/shared/extra/icu-no-mutex.patch b/shared/extra/icu-no-mutex.patch index cb82354f..75a6224e 100644 --- a/shared/extra/icu-no-mutex.patch +++ b/shared/extra/icu-no-mutex.patch @@ -1,6 +1,6 @@ -diff -Naur icu-orig/source/common/umutex.cpp icu/source/common/umutex.cpp ---- icu-orig/source/common/umutex.cpp 2024-09-01 18:41:49.755849773 +0200 -+++ icu/source/common/umutex.cpp 2024-09-01 18:42:05.278763995 +0200 +diff '--color=auto' -Naur icu-orig/source/common/umutex.cpp icu/source/common/umutex.cpp +--- icu-orig/source/common/umutex.cpp 2026-01-10 13:01:30.482645434 +0100 ++++ icu/source/common/umutex.cpp 2026-01-10 13:02:25.470686875 +0100 @@ -44,20 +44,25 @@ *************************************************************************************************/ @@ -90,37 +90,31 @@ diff -Naur icu-orig/source/common/umutex.cpp icu/source/common/umutex.cpp U_NAMESPACE_END diff '--color=auto' -Naur icu-orig/source/common/umutex.h icu/source/common/umutex.h ---- icu-orig/source/common/umutex.h 2024-09-01 18:41:49.732517070 +0200 -+++ icu/source/common/umutex.h 2024-09-01 18:42:05.278763995 +0200 -@@ -227,15 +227,22 @@ +--- icu-orig/source/common/umutex.h 2026-01-10 13:01:30.439842550 +0100 ++++ icu/source/common/umutex.h 2026-01-10 13:05:18.460584542 +0100 +@@ -213,15 +213,18 @@ // requirements for C++ BasicLockable, allows UMutex to work with std::lock_guard - void lock() { + U_COMMON_API void lock() { +#if 0 std::mutex *m = fMutex.load(std::memory_order_acquire); if (m == nullptr) { m = getMutex(); } m->lock(); -+#endif -+ } -+ void unlock() { -+#if 0 -+ fMutex.load(std::memory_order_relaxed)->unlock(); +#endif } -- void unlock() { fMutex.load(std::memory_order_relaxed)->unlock(); } +- U_COMMON_API void unlock() { fMutex.load(std::memory_order_relaxed)->unlock(); } ++ U_COMMON_API void unlock() { } - static void cleanup(); + U_COMMON_API static void cleanup(); private: +#if 0 alignas(std::mutex) char fStorage[sizeof(std::mutex)] {}; std::atomic fMutex { nullptr }; -@@ -250,6 +257,7 @@ +@@ -236,6 +239,7 @@ * be nullptr. */ std::mutex *getMutex(); +#endif }; - - From f610dbbc5d7f8a08557e241cedde0bce1a5abed4 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Sat, 10 Jan 2026 14:23:27 +0100 Subject: [PATCH 5/5] Build fixes --- android/2_build_toolchain.sh | 2 +- tvos/2_build_toolchain.sh | 2 +- wiiu/2_build_toolchain.sh | 5 ----- wiiu/fluidsynth-no-pthread.patch | 20 -------------------- 4 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 wiiu/fluidsynth-no-pthread.patch diff --git a/android/2_build_toolchain.sh b/android/2_build_toolchain.sh index 0df104dc..19436964 100755 --- a/android/2_build_toolchain.sh +++ b/android/2_build_toolchain.sh @@ -115,7 +115,7 @@ function build() { install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS install_lib_cmake $OPUS_DIR $OPUS_ARGS install_lib $OPUSFILE_DIR $OPUSFILE_ARGS - install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -Dosal=cpp11 + install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -Dosal=cpp11 -DANDROID_ABI=21 install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS install_lib_meson $INIH_DIR $INIH_ARGS install_lib $LHASA_DIR $LHASA_ARGS diff --git a/tvos/2_build_toolchain.sh b/tvos/2_build_toolchain.sh index 386b10f2..da95a6db 100755 --- a/tvos/2_build_toolchain.sh +++ b/tvos/2_build_toolchain.sh @@ -76,7 +76,7 @@ function build() { install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS install_lib_cmake $OPUS_DIR $OPUS_ARGS install_lib $OPUSFILE_DIR $OPUSFILE_ARGS - install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -Dosal=cpp11 -DCMAKE_MACOSX_BUNDLE=OFF + install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -Dosal=embedded -DCMAKE_MACOSX_BUNDLE=OFF install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS install_lib_meson $INIH_DIR $INIH_ARGS install_lib $LHASA_DIR $LHASA_ARGS diff --git a/wiiu/2_build_toolchain.sh b/wiiu/2_build_toolchain.sh index 55396bcd..27e57b24 100755 --- a/wiiu/2_build_toolchain.sh +++ b/wiiu/2_build_toolchain.sh @@ -41,11 +41,6 @@ if [ ! -f .patches-applied ]; then patch -Np1 < $SCRIPT_DIR/../shared/extra/lhasa.patch ) - verbosemsg "fluidsynth" - (cd $FLUIDSYNTH_DIR - patch -Np1 < $SCRIPT_DIR/fluidsynth-no-pthread.patch - ) - verbosemsg "ICU" # Do not write objects, but source files perl -pi -e 's|#ifndef U_DISABLE_OBJ_CODE.*|#if 0 // U_DISABLE_OBJ_CODE|' icu/source/tools/toolutil/pkg_genc.h diff --git a/wiiu/fluidsynth-no-pthread.patch b/wiiu/fluidsynth-no-pthread.patch deleted file mode 100644 index f60ae150..00000000 --- a/wiiu/fluidsynth-no-pthread.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -Naur fluidsynth-2.4.1-orig/CMakeLists.txt fluidsynth-2.4.1/CMakeLists.txt ---- fluidsynth-2.4.1-orig/CMakeLists.txt 2024-12-01 14:27:38.000000000 +0100 -+++ fluidsynth-2.4.1/CMakeLists.txt 2024-12-21 21:34:58.813955060 +0100 -@@ -355,14 +355,14 @@ - endif ( WIN32 ) - - # Check for threads and math --find_package ( Threads REQUIRED ) -+#find_package ( Threads REQUIRED ) - - find_library ( HAS_LIBM NAMES "m" ) - if ( HAS_LIBM ) - set ( MATH_LIBRARY "m" ) - endif ( HAS_LIBM ) - --set ( LIBFLUID_LIBS ${MATH_LIBRARY} Threads::Threads ) -+set ( LIBFLUID_LIBS ${MATH_LIBRARY} ) - - # IBM OS/2 - unset ( DART_SUPPORT CACHE )