[fluidsynth] update fluidsynth to version 2.5.0 (#47846)

Co-authored-by: shermp <14854761+shermp@users.noreply.github.com>
This commit is contained in:
Kai Pastor 2025-10-17 20:00:41 +02:00 committed by GitHub
parent 8e16865b45
commit 750c82ca53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 43 additions and 95 deletions

View File

@ -0,0 +1,13 @@
diff --git a/FluidSynthConfig.cmake.in b/FluidSynthConfig.cmake.in
index e6e9840..5831f9a 100644
--- a/FluidSynthConfig.cmake.in
+++ b/FluidSynthConfig.cmake.in
@@ -74,7 +74,7 @@ if(NOT FLUIDSYNTH_IS_SHARED)
find_dependency(Threads)
endif()
- if(FLUIDSYNTH_SUPPORT_GLIB AND NOT TARGET GLib2::glib-2 OR NOT TARGET GLib2::gthread-2)
+ if(FLUIDSYNTH_SUPPORT_GLIB AND (NOT TARGET GLib2::glib-2 OR NOT TARGET GLib2::gthread-2))
find_dependency(GLib2 @GLIB2_MINUMUM_VERSION@)
endif()

View File

@ -1,51 +0,0 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e86a6429..9240e091 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -538,6 +538,9 @@ install(EXPORT FluidSynthTargets
# ******* Auto Generated Lookup Tables ******
+if(VCPKG_BUILD_MAKE_TABLES)
+ add_subdirectory(gentables)
+elseif(0)
include(ExternalProject)
set (GENTAB_SDIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables)
@@ -557,4 +560,11 @@ ExternalProject_Add(gentables
"${CMAKE_COMMAND}" --build "${GENTAB_BDIR}"
INSTALL_COMMAND ${GENTAB_BDIR}/make_tables.exe "${FluidSynth_BINARY_DIR}/"
)
+endif()
+if(TARGET make_tables AND NOT CMAKE_CROSSCOMPILING)
+ set(GENTABLES make_tables)
+else()
+ find_program(GENTABLES make_tables REQUIRED)
+endif()
+add_custom_target(gentables COMMAND "${GENTABLES}" "${CMAKE_BINARY_DIR}/")
add_dependencies(libfluidsynth-OBJ gentables)
diff --git a/src/gentables/CMakeLists.txt b/src/gentables/CMakeLists.txt
index 9cb69f2b..c393a670 100644
--- a/src/gentables/CMakeLists.txt
+++ b/src/gentables/CMakeLists.txt
@@ -12,6 +12,7 @@ unset(ENV{LDFLAGS})
project (gentables C)
+if (0)
set ( CMAKE_BUILD_TYPE Debug )
# hardcode ".exe" as suffix to the binary, else in case of cross-platform cross-compiling the calling cmake will not know the suffix used here and fail to find the binary
@@ -20,6 +21,7 @@ set ( CMAKE_EXECUTABLE_SUFFIX ".exe" )
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
+endif()
# Add the executable that generates the table
add_executable( make_tables
@@ -34,3 +36,4 @@ if ( WIN32 )
else ( WIN32 )
target_link_libraries (make_tables "m")
endif ()
+install(TARGETS make_tables DESTINATION bin)

View File

@ -1,12 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 604e6b0..e315df5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -748,6 +748,7 @@ endif ( enable-midishare )
unset ( OPENSLES_SUPPORT CACHE )
if ( enable-opensles )
find_package( OpenSLES )
+ list ( APPEND PC_LIBS_PRIV "-lOpenSLES" )
set ( OPENSLES_SUPPORT ${OpenSLES_FOUND} )
endif ( enable-opensles )

View File

@ -2,11 +2,10 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO FluidSynth/fluidsynth
REF "v${VERSION}"
SHA512 2d5424d80234742be45f1c7cdf696182c96b684232bb92b079edf270d726c5d1292c5fc42c8b580ae1a89642ad7b536245977928bbeecedd94443f6e1f47d5fd
SHA512 8f326db4049b3241c7a0472aa5db8c715dcfc0a1ce9c5fda492bf84e6c17e27a2298131a58a51e275797259a434e59bfe3f53d85358f903652dca8de753a3376
HEAD_REF master
PATCHES
gentables.patch
pkgconfig-opensles.diff
cmake-config-glib.diff
)
# Do not use or install FindSndFileLegacy.cmake and its deps
file(REMOVE
@ -22,9 +21,9 @@ file(REMOVE
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
buildtools VCPKG_BUILD_MAKE_TABLES
sndfile enable-libsndfile
pulseaudio enable-pulseaudio
libinstpatch enable-libinstpatch
sndfile enable-libsndfile
pulseaudio enable-pulseaudio
)
# enable platform-specific features, force the build to fail if the required libraries are not found,
@ -35,7 +34,7 @@ set(LINUX_OPTIONS enable-alsa ALSA_FOUND)
set(ANDROID_OPTIONS enable-opensles OpenSLES_FOUND)
set(IGNORED_OPTIONS enable-coverage enable-dbus enable-floats enable-fpe-check enable-framework enable-jack
enable-libinstpatch enable-midishare enable-oboe enable-openmp enable-oss enable-pipewire enable-portaudio
enable-profiling enable-readline enable-sdl2 enable-sdl3 enable-systemd enable-trap-on-fpe enable-ubsan)
enable-profiling enable-readline enable-sdl3 enable-systemd enable-trap-on-fpe enable-ubsan)
if(VCPKG_TARGET_IS_WINDOWS)
set(OPTIONS_TO_ENABLE ${WINDOWS_OPTIONS})
@ -63,14 +62,13 @@ vcpkg_find_acquire_program(PKGCONFIG)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DVCPKG_HOST_TRIPLET=${HOST_TRIPLET}"
${FEATURE_OPTIONS}
${ENABLED_OPTIONS}
${DISABLED_OPTIONS}
"-Dosal=cpp11"
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
MAYBE_UNUSED_VARIABLES
${OPTIONS_TO_DISABLE}
VCPKG_BUILD_MAKE_TABLES
enable-coverage
enable-framework
enable-ubsan
@ -81,11 +79,7 @@ vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fluidsynth)
vcpkg_fixup_pkgconfig()
set(tools fluidsynth)
if("buildtools" IN_LIST FEATURES)
list(APPEND tools make_tables)
endif()
vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN)
vcpkg_copy_tools(TOOL_NAMES fluidsynth AUTO_CLEAN)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"

View File

@ -1,25 +1,15 @@
{
"name": "fluidsynth",
"version": "2.4.6",
"port-version": 1,
"version": "2.5.0",
"description": "FluidSynth reads and handles MIDI events from the MIDI input device. It is the software analogue of a MIDI synthesizer. FluidSynth can also play midifiles using a Soundfont.",
"homepage": "https://github.com/FluidSynth/fluidsynth",
"license": "LGPL-2.1-or-later",
"supports": "!xbox",
"supports": "!(uwp | xbox)",
"dependencies": [
{
"name": "alsa",
"platform": "linux"
},
{
"name": "fluidsynth",
"host": true,
"default-features": false,
"features": [
"buildtools"
]
},
"glib",
{
"name": "vcpkg-cmake",
"host": true
@ -30,8 +20,11 @@
}
],
"features": {
"buildtools": {
"description": "Build tools gentables"
"libinstpatch": {
"description": "Use libinstpatch for DLS support. Required if C++17 is not available",
"dependencies": [
"glib"
]
},
"pulseaudio": {
"description": "Build with PulseAudio support",

View File

@ -819,7 +819,6 @@ flashlight-text[kenlm]:arm64-uwp = cascade
flashlight-text[kenlm]:arm64-windows = cascade
flashlight-text[kenlm]:x64-uwp = cascade
fluidsynth[pulseaudio](android | osx | windows) = cascade
fluidsynth(uwp) = cascade
folly[liburing]:arm64-osx = cascade
folly[liburing]:x64-windows = cascade
folly[liburing]:x64-windows-static = cascade

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.30)
project(fluidsynth-test C)
project(fluidsynth-test LANGUAGES C CXX)
find_package(FluidSynth CONFIG REQUIRED)
@ -11,3 +11,4 @@ pkg_check_modules(fluidsynth_pc fluidsynth REQUIRED IMPORTED_TARGET)
add_executable(main-pkconfig main.c)
target_link_libraries(main-pkconfig PRIVATE PkgConfig::fluidsynth_pc)
set_target_properties(main-pkconfig PROPERTIES LINKER_LANGUAGE CXX)

View File

@ -34,6 +34,12 @@
"sndfile"
],
"platform": "!xbox"
},
{
"name": "fluidsynth",
"features": [
"libinstpatch"
]
}
]
}

View File

@ -3001,8 +3001,8 @@
"port-version": 0
},
"fluidsynth": {
"baseline": "2.4.6",
"port-version": 1
"baseline": "2.5.0",
"port-version": 0
},
"flux": {
"baseline": "0.4.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8f35607c07ccf2153e0db6314ec91aa1ab4a92fe",
"version": "2.5.0",
"port-version": 0
},
{
"git-tree": "62a2092769a82d7302564639bca90f3ac03b17aa",
"version": "2.4.6",