Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fluidsynth] Update to 2.2.8, improvements #25951

Merged
merged 5 commits into from
Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion ports/fluidsynth/fix-dependencies.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ index e4ea71c..df37028 100644
- pkg_check_modules ( GLIB REQUIRED glib-2.0>=2.6.5 gthread-2.0>=2.6.5 )
+ pkg_check_modules ( GLIB IMPORTED_TARGET REQUIRED glib-2.0>=2.6.5 gthread-2.0>=2.6.5 )
list( APPEND PC_REQUIRES_PRIV "glib-2.0" "gthread-2.0")
+ set(GLIB_LIBRARIES PkgConfig::GLIB)
+ set(GLIB_LIBRARIES PkgConfig::GLIB) # To carry libs with absolute paths, https://gitlab.kitware.com/cmake/cmake/-/issues/16154

if ( GLIB_glib-2.0_VERSION AND GLIB_glib-2.0_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!" )
@@ -865,6 +866,7 @@ endif ()
if ( CMAKE_VERSION VERSION_EQUAL "3.12.0" OR CMAKE_VERSION VERSION_GREATER "3.12.0" )
# retrieve all the private libs we depend on
get_target_property ( LIBS_PRIVATE libfluidsynth INTERFACE_LINK_LIBRARIES)
+ list(FILTER LIBS_PRIVATE EXCLUDE REGEX "^PkgConfig::") # already in 'Requires.private'
# make a copy
set ( LIBS_PRIVATE_WITH_PATH ${LIBS_PRIVATE} )

Original file line number Diff line number Diff line change
@@ -1,43 +1,51 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e913cb2..570207e 100644
index 2803ca8..49f3505 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -268,6 +268,9 @@ generate_product_version(
)
endif ( WIN32 )

+find_program(GENTABLES make_tables REQUIRED)
+execute_process(COMMAND ${GENTABLES} "${CMAKE_BINARY_DIR}/")
+
add_library ( libfluidsynth-OBJ OBJECT
${config_SOURCES}
${fluid_alsa_SOURCES}
@@ -413,6 +416,7 @@ else ( MACOSX_FRAMEWORK )
@@ -419,6 +419,10 @@ else ( MACOSX_FRAMEWORK )
install ( FILES ${public_main_HEADER} DESTINATION ${INCLUDE_INSTALL_DIR} )
endif ( MACOSX_FRAMEWORK )

+if (0)
+option(VCPKG_BUILD_MAKE_TABLES "Build `make_tables`" OFF)
+if(VCPKG_BUILD_MAKE_TABLES)
+ add_subdirectory(gentables)
+elseif(0)
# ******* Auto Generated Lookup Tables ******

include(ExternalProject)
@@ -435,3 +439,4 @@ ExternalProject_Add(gentables
@@ -440,4 +444,11 @@ ExternalProject_Add(gentables
"${CMAKE_COMMAND}" --build "${GENTAB_BDIR}"
INSTALL_COMMAND ${GENTAB_BDIR}/make_tables.exe "${CMAKE_BINARY_DIR}/"
)
add_dependencies(libfluidsynth-OBJ gentables)
+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 638f299..e834e34 100644
index 638f299..19dd9e6 100644
--- a/src/gentables/CMakeLists.txt
+++ b/src/gentables/CMakeLists.txt
@@ -15,7 +15,6 @@ project (gentables C)
@@ -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
-set ( CMAKE_EXECUTABLE_SUFFIX ".exe" )

@@ -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})
@@ -34,3 +33,5 @@ if ( WIN32 )
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
+endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../)

@@ -34,3 +36,5 @@ if ( WIN32 )
else ( WIN32 )
target_link_libraries (make_tables "m")
endif ()
Expand Down
34 changes: 10 additions & 24 deletions ports/fluidsynth/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,38 +1,22 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO FluidSynth/fluidsynth
REF 8b00644751578ba67b709a827cbe5133d849d339 #v2.2.6
SHA512 37361c6fdbb54eba78e59f03c9ca702129f0fb522721dfb4e744fdc9a8721e665728fa5606bc68c2fb2ce971b4829cfc472f0a7cd72ce3fe14b3a335b098f7ec
REF v2.2.8
SHA512 8173f2d368a214cf1eb7faae2f6326db43fb094ec9c83e652f953290c3f29c34ebd0b92cbb439bea8d814d3a7e4f9dc0c18c648df1d414989d5d8b4700c79535
HEAD_REF master
PATCHES
fix-dependencies.patch
separate-gentables.patch
gentables.patch
)

if ("buildtools" IN_LIST FEATURES)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/src/gentables"
LOGFILE_BASE configure-tools
)

vcpkg_cmake_build(
LOGFILE_BASE install-tools
TARGET install
)

vcpkg_copy_tools(TOOL_NAMES make_tables AUTO_CLEAN)

vcpkg_add_to_path(APPEND "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
endif()

vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
buildtools VCPKG_BUILD_MAKE_TABLES
sndfile enable-libsndfile
)

set(feature_list dbus jack libinstpatch midishare opensles oboe oss sdl2 pulseaudio readline lash systemd dart)
vcpkg_list(SET FEATURE_OPTIONS)
foreach(_feature IN LISTS feature_list)
list(APPEND FEATURE_OPTIONS -Denable-${_feature}:BOOL=OFF)
endforeach()
Expand All @@ -54,12 +38,11 @@ list(APPEND FEATURE_OPTIONS -DCOREMIDI_FOUND=${VCPKG_TARGET_IS_OSX})
list(APPEND FEATURE_OPTIONS -Denable-alsa=${VCPKG_TARGET_IS_LINUX})
list(APPEND FEATURE_OPTIONS -DALSA_FOUND=${VCPKG_TARGET_IS_LINUX})

vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}")

vcpkg_find_acquire_program(PKGCONFIG)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DVCPKG_HOST_TRIPLET=${HOST_TRIPLET}"
${FEATURE_OPTIONS}
-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}
-DLIB_INSTALL_DIR=lib
Expand All @@ -76,8 +59,11 @@ vcpkg_cmake_configure(
vcpkg_cmake_install()
vcpkg_fixup_pkgconfig()

# Copy fluidsynth.exe to tools dir
vcpkg_copy_tools(TOOL_NAMES fluidsynth AUTO_CLEAN)
set(tools fluidsynth)
if("buildtools" IN_LIST FEATURES)
list(APPEND tools make_tables)
endif()
vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN)

# Remove unnecessary files
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
Expand Down
4 changes: 2 additions & 2 deletions ports/fluidsynth/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "fluidsynth",
"version": "2.2.6",
"port-version": 2,
"version": "2.2.8",
"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",
Expand All @@ -13,6 +12,7 @@
{
"name": "fluidsynth",
"host": true,
"default-features": false,
"features": [
"buildtools"
]
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2305,8 +2305,8 @@
"port-version": 2
},
"fluidsynth": {
"baseline": "2.2.6",
"port-version": 2
"baseline": "2.2.8",
"port-version": 0
},
"fmem": {
"baseline": "c-libs-2ccee3d2fb",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/fluidsynth.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c9629205f0ca376ee2139ec80c48229f5723eecf",
"version": "2.2.8",
"port-version": 0
},
{
"git-tree": "ad0fa73283950f13ecfff01deb0688c30a57c330",
"version": "2.2.6",
Expand Down