diff --git a/ports/fluidsynth/cmake-config-glib.diff b/ports/fluidsynth/cmake-config-glib.diff new file mode 100644 index 0000000000..77e1f6a53b --- /dev/null +++ b/ports/fluidsynth/cmake-config-glib.diff @@ -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() + diff --git a/ports/fluidsynth/gentables.patch b/ports/fluidsynth/gentables.patch deleted file mode 100644 index 6faa5f8c5a..0000000000 --- a/ports/fluidsynth/gentables.patch +++ /dev/null @@ -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) diff --git a/ports/fluidsynth/pkgconfig-opensles.diff b/ports/fluidsynth/pkgconfig-opensles.diff deleted file mode 100644 index c5f7b1fe59..0000000000 --- a/ports/fluidsynth/pkgconfig-opensles.diff +++ /dev/null @@ -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 ) - diff --git a/ports/fluidsynth/portfile.cmake b/ports/fluidsynth/portfile.cmake index 24bf5858e1..80620f82c6 100644 --- a/ports/fluidsynth/portfile.cmake +++ b/ports/fluidsynth/portfile.cmake @@ -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" diff --git a/ports/fluidsynth/vcpkg.json b/ports/fluidsynth/vcpkg.json index 9dbaf28af3..802efecc8f 100644 --- a/ports/fluidsynth/vcpkg.json +++ b/ports/fluidsynth/vcpkg.json @@ -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", diff --git a/scripts/ci.feature.baseline.txt b/scripts/ci.feature.baseline.txt index 5a247f8c8a..d0f69f8e92 100644 --- a/scripts/ci.feature.baseline.txt +++ b/scripts/ci.feature.baseline.txt @@ -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 diff --git a/scripts/test_ports/vcpkg-ci-fluidsynth/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-fluidsynth/project/CMakeLists.txt index 5de268e051..d62d080170 100644 --- a/scripts/test_ports/vcpkg-ci-fluidsynth/project/CMakeLists.txt +++ b/scripts/test_ports/vcpkg-ci-fluidsynth/project/CMakeLists.txt @@ -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) diff --git a/scripts/test_ports/vcpkg-ci-fluidsynth/vcpkg.json b/scripts/test_ports/vcpkg-ci-fluidsynth/vcpkg.json index be05ac61bb..b9cca1bb1a 100644 --- a/scripts/test_ports/vcpkg-ci-fluidsynth/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-fluidsynth/vcpkg.json @@ -34,6 +34,12 @@ "sndfile" ], "platform": "!xbox" + }, + { + "name": "fluidsynth", + "features": [ + "libinstpatch" + ] } ] } diff --git a/versions/baseline.json b/versions/baseline.json index 3ceba15059..f3477c22f2 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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", diff --git a/versions/f-/fluidsynth.json b/versions/f-/fluidsynth.json index 506fc59180..91d0a6366d 100644 --- a/versions/f-/fluidsynth.json +++ b/versions/f-/fluidsynth.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8f35607c07ccf2153e0db6314ec91aa1ab4a92fe", + "version": "2.5.0", + "port-version": 0 + }, { "git-tree": "62a2092769a82d7302564639bca90f3ac03b17aa", "version": "2.4.6",