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.4 #20978

Merged
merged 21 commits into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from 7 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
38 changes: 0 additions & 38 deletions ports/fluidsynth/force-x86-gentables.patch

This file was deleted.

43 changes: 30 additions & 13 deletions ports/fluidsynth/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,42 +1,59 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO FluidSynth/fluidsynth
REF 90a6c52e1c347d1c4283b0de9f860ed2fbc413bc #v2.2.1
SHA512 311a078e95204baf9b348fb8c83370003982fad59553de945437fec7647c9237dd4382f9f8f70080ed472745c66fe528764cd898581d628ab4422427c3d58b3a
REF 926581851ed1a095ef5b8659f77b38272d57e624 #v2.2.3
SHA512 df30a3df20ba4c1c3f248e718c47856761004b5a63285e55e46bc1a3dd61b0b2d4b0b1139d0edf64135de68d6592f84bcf5308c76a9774415769b8d3aa682a7a
HEAD_REF master
PATCHES
force-x86-gentables.patch
PATCHES separate-gentables.patch
)

if ("buildtools" IN_LIST FEATURES)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/src/gentables"
)

vcpkg_cmake_install()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logs from this config and install stage will be overwritten by the regular build stage. This is a problem when a failure in the second stage is caused by an unnoticed misbehaviour in the first stage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a better way, log_base is not an options with vcpkg_cmake_install currently.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option A) split port.
Option B) patch build system.

Considering that you want to add the tool to the PATH and run i, I don't understand how it can work in a cross build without splitting.

Copy link
Contributor

@JackBoosY JackBoosY Dec 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dg0yt Tool gentables is only used in this port, so split it to a new port isn't a good idea.
For option B, such a big change is not worth it.
In the cross build. it will prepend the host path to environment PATH so cmake will find the host tool first.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@strega-nil and I discussed this and agree 1 port has better "ergonomics" but also that dropping the logs is problematic. The right thing is probably to add disambiguator flags to vcpkg_cmake_xxx so that they don't stomp on each other in situations like this. @dg0yt How would you feel about merging this as is and starting a new PR immediately following which adds that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that I don't need to open that can of worms; we can call the existing vcpkg_cmake_build which does support LOGFILE_BASE.


vcpkg_copy_tools(TOOL_NAMES make_tables AUTO_CLEAN)

vcpkg_add_to_path(PREPEND "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
endif()

set(feature_list dbus jack libinstpatch libsndfile midishare opensles oboe oss sdl2 pulseaudio readline lash alsa systemd coreaudio coremidi dart)
set(FEATURE_OPTIONS)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
foreach(_feature IN LISTS feature_list)
list(APPEND FEATURE_OPTIONS -Denable-${_feature}:BOOL=OFF)
endforeach()

if (NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}")
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
endif()

vcpkg_find_acquire_program(PKGCONFIG)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}
-DLIB_INSTALL_DIR=lib
OPTIONS_DEBUG
-Denable-debug:BOOL=ON
MAYBE_UNUSED_VARIABLES
enable-coreaudio
enable-coremidi
enable-dart
)

vcpkg_install_cmake()
vcpkg_cmake_install()

# Copy fluidsynth.exe to tools dir
vcpkg_copy_tools(TOOL_NAMES fluidsynth AUTO_CLEAN)

# Remove unnecessary files
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
38 changes: 38 additions & 0 deletions ports/fluidsynth/separate-gentables.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e913cb2..570207e 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 )
install ( FILES ${public_main_HEADER} DESTINATION ${INCLUDE_INSTALL_DIR} )
endif ( MACOSX_FRAMEWORK )

+if (0)
# ******* Auto Generated Lookup Tables ******

include(ExternalProject)
@@ -435,3 +439,4 @@ ExternalProject_Add(gentables
INSTALL_COMMAND ${GENTAB_BDIR}/make_tables.exe "${CMAKE_BINARY_DIR}/"
)
add_dependencies(libfluidsynth-OBJ gentables)
+endif()
diff --git a/src/gentables/CMakeLists.txt b/src/gentables/CMakeLists.txt
index 638f299..333afcb 100644
--- a/src/gentables/CMakeLists.txt
+++ b/src/gentables/CMakeLists.txt
@@ -34,3 +34,5 @@ if ( WIN32 )
else ( WIN32 )
target_link_libraries (make_tables "m")
endif ()
+
+install(TARGETS make_tables DESTINATION bin)
\ No newline at end of file
23 changes: 19 additions & 4 deletions ports/fluidsynth/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
{
"name": "fluidsynth",
"version": "2.2.1",
"port-version": 1,
"version": "2.2.3",
"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",
"dependencies": [
"glib"
]
{
"name": "fluidsynth",
"host": true,
"features": [
"buildtools"
]
},
"glib",
{
"name": "vcpkg-cmake",
"host": true
}
],
"features": {
"buildtools": {
"description": "Build tools gentables"
}
}
}
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2197,8 +2197,8 @@
"port-version": 2
},
"fluidsynth": {
"baseline": "2.2.1",
"port-version": 1
"baseline": "2.2.3",
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
"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": "85f82b9007ed0e8d1584a0a5d50af3624392183c",
"version": "2.2.3",
"port-version": 0
},
{
"git-tree": "d9e09f93f0880db415faf7f65f4dd483a5b2882a",
"version": "2.2.1",
Expand Down