-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
BillyONeal
merged 21 commits into
microsoft:master
from
NancyLi1013:dev/Nancy/update-fluidsynth
Dec 29, 2021
Merged
[fluidsynth] Update to 2.2.4 #20978
Changes from 7 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
fd7eadb
[fluidsynth] Update to 2.2.3
f1ab155
Update patch
8d6a7bd
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
d1b8640
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
57e8fcc
EOL
f836ded
Change tool as a new feature
5801485
version
0595879
Remove code about CMAKE_EXECUTABLE_SUFFIX to fix linux build
3e9e582
version
5562fe9
update to 2.2.4, cleanup baseline, add supports keyword
1e91767
version
125fcf5
Fix osx build
c7ade25
version
9dd30b8
restore FEATURE_OPTIONS
dd0436b
version
c706660
Apply suggestions
0dba61c
version
9a24d66
Restore add_to_path in host triplet
d7d40f5
version
4f81fd7
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal 6dc53fc
Preserve log files for the build of make_tables.
BillyONeal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
|
||
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
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 withvcpkg_cmake_install
currently.There was a problem hiding this comment.
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.There was a problem hiding this comment.
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.There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 supportLOGFILE_BASE
.