From ef30526658b3b95111f9244b07ca07344960fdbb Mon Sep 17 00:00:00 2001 From: driver1998 Date: Wed, 28 Aug 2019 05:48:58 +0800 Subject: [PATCH] [fluidsynth] add Windows ARM support (#7837) * [fluidsynth] add Windows ARM support * [fluidysnth] use target architecture instead of triplet --- ports/fluidsynth/CONTROL | 4 +-- ports/fluidsynth/force-x86-gentables.patch | 34 ++++++++++++++++++++++ ports/fluidsynth/portfile.cmake | 3 +- 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 ports/fluidsynth/force-x86-gentables.patch diff --git a/ports/fluidsynth/CONTROL b/ports/fluidsynth/CONTROL index fc79995bc..4532fa60e 100644 --- a/ports/fluidsynth/CONTROL +++ b/ports/fluidsynth/CONTROL @@ -1,4 +1,4 @@ Source: fluidsynth -Version: 2.0.5 +Version: 2.0.5-1 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. -Build-Depends: glib \ No newline at end of file +Build-Depends: glib diff --git a/ports/fluidsynth/force-x86-gentables.patch b/ports/fluidsynth/force-x86-gentables.patch new file mode 100644 index 000000000..d477ebd36 --- /dev/null +++ b/ports/fluidsynth/force-x86-gentables.patch @@ -0,0 +1,34 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index f731632..226f408 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -368,10 +368,23 @@ endif ( MACOSX_FRAMEWORK ) + # ******* Auto Generated Lookup Tables ****** + + include(ExternalProject) +-ExternalProject_Add(gentables +- DOWNLOAD_COMMAND "" +- SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables +- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables +- INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/" +-) ++if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) ++ ExternalProject_Add(gentables ++ DOWNLOAD_COMMAND "" ++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables ++ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables ++ CONFIGURE_COMMAND ++ "${CMAKE_COMMAND}" "${CMAKE_CURRENT_SOURCE_DIR}/gentables" -G "${CMAKE_GENERATOR}" -A Win32 -B "${CMAKE_CURRENT_BINARY_DIR}/gentables" ++ BUILD_COMMAND ++ "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/gentables" ++ INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/" ++ ) ++else() ++ ExternalProject_Add(gentables ++ DOWNLOAD_COMMAND "" ++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables ++ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables ++ INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/" ++ ) ++endif() + add_dependencies(libfluidsynth-OBJ gentables) diff --git a/ports/fluidsynth/portfile.cmake b/ports/fluidsynth/portfile.cmake index 5060faa8e..3427180a3 100644 --- a/ports/fluidsynth/portfile.cmake +++ b/ports/fluidsynth/portfile.cmake @@ -7,11 +7,12 @@ vcpkg_from_github( REF v2.0.5 SHA512 5344ac889d2927dc2465bae40096d756a9bf9b1100e287ba0621c55ffc76f9cb8fa763f6bc832d701cd0ad2997965cf344f58ae4b3dd445eb3491e3659c093d9 HEAD_REF master + PATCHES + force-x86-gentables.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -Denable-pkgconfig=0 )