From 849bcb04db6015831394b6797f7e7c65da9ca59d Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 8 Sep 2018 20:44:11 +0200 Subject: [PATCH] Patch fluidsynth to not build audio or midi drivers --- data/linux/build-deps.sh | 4 ++ data/macos/build-deps.sh | 5 +- .../fluidsynth-skip-drivers-build.patch | 60 +++++++++++++++++++ data/windows/build-deps.sh | 4 ++ 4 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 data/patches/fluidsynth-skip-drivers-build.patch diff --git a/data/linux/build-deps.sh b/data/linux/build-deps.sh index 4288ee328..2f2988325 100755 --- a/data/linux/build-deps.sh +++ b/data/linux/build-deps.sh @@ -234,6 +234,10 @@ fi if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then cd fluidsynth-${FLUIDSYNTH_VERSION} + if [ ! -f patched ]; then + patch -p1 -i ../../patches/fluidsynth-skip-drivers-build.patch + touch patched + fi sed -i "s/3.0.2/2.8.0/" CMakeLists.txt sed -i 's/_init_lib_suffix "64"/_init_lib_suffix ""/' CMakeLists.txt cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PREFIX} -DBUILD_SHARED_LIBS=OFF \ diff --git a/data/macos/build-deps.sh b/data/macos/build-deps.sh index 480315210..f2765a30d 100755 --- a/data/macos/build-deps.sh +++ b/data/macos/build-deps.sh @@ -239,7 +239,6 @@ if [ ! -f glib-${GLIB_VERSION}/build-done ]; then cd glib-${GLIB_VERSION} if [ ! -f patched ]; then patch -p1 -i ../patches/glib_skip-gettext.patch - # sed -i "s|po docs|po|" Makefile.in rm m4macros/glib-gettext.m4 touch patched fi @@ -267,6 +266,10 @@ fi if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then cd fluidsynth-${FLUIDSYNTH_VERSION} + if [ ! -f patched ]; then + patch -p1 -i ../../patches/fluidsynth-skip-drivers-build.patch + touch patched + fi sed -i -e 's/_init_lib_suffix "64"/_init_lib_suffix ""/' CMakeLists.txt /opt/local/bin/cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PREFIX} -DBUILD_SHARED_LIBS=OFF \ -Denable-debug=OFF -Denable-profiling=OFF -Denable-ladspa=OFF -Denable-fpe-check=OFF -Denable-portaudio=OFF \ diff --git a/data/patches/fluidsynth-skip-drivers-build.patch b/data/patches/fluidsynth-skip-drivers-build.patch new file mode 100644 index 000000000..2e433268f --- /dev/null +++ b/data/patches/fluidsynth-skip-drivers-build.patch @@ -0,0 +1,60 @@ +--- fluidsynth-static-1.1.11.orig/src/CMakeLists.txt ++++ fluidsynth-static-1.1.11/src/CMakeLists.txt +@@ -175,11 +175,6 @@ set ( libfluidsynth_SOURCES + midi/fluid_midi_router.h + midi/fluid_seqbind.c + midi/fluid_seq.c +- drivers/fluid_adriver.c +- drivers/fluid_adriver.h +- drivers/fluid_mdriver.c +- drivers/fluid_mdriver.h +- drivers/fluid_aufile.c + bindings/fluid_cmd.c + bindings/fluid_cmd.h + bindings/fluid_filerenderer.c +@@ -335,32 +330,14 @@ target_link_libraries ( libfluidsynth + ${LIBFLUID_LIBS} + ) + +-# ************ CLI program ************ +- +-set ( fluidsynth_SOURCES fluidsynth.c ) +- +-add_executable ( fluidsynth +- ${fluidsynth_SOURCES} +-) +- +-if ( FLUID_CPPFLAGS ) +- set_target_properties ( fluidsynth +- PROPERTIES COMPILE_FLAGS ${FLUID_CPPFLAGS} ) +-endif ( FLUID_CPPFLAGS ) +- +-target_link_libraries ( fluidsynth +- libfluidsynth +- ${FLUID_LIBS} +-) +- + if ( MACOSX_FRAMEWORK ) +- install ( TARGETS fluidsynth libfluidsynth ++ install ( TARGETS libfluidsynth + RUNTIME DESTINATION ${BIN_INSTALL_DIR} + FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR} + ARCHIVE DESTINATION ${FRAMEWORK_INSTALL_DIR} + ) + else ( MACOSX_FRAMEWORK ) +- install ( TARGETS fluidsynth libfluidsynth ++ install ( TARGETS libfluidsynth + RUNTIME DESTINATION ${BIN_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} +--- fluidsynth-static-1.1.11.orig/src/utils/fluid_settings.c ++++ fluidsynth-static-1.1.11/src/utils/fluid_settings.c +@@ -297,8 +297,6 @@ fluid_settings_init(fluid_settings_t* se + fluid_shell_settings(settings); + fluid_player_settings(settings); + fluid_file_renderer_settings(settings); +- fluid_audio_driver_settings(settings); +- fluid_midi_driver_settings(settings); + } + + static int diff --git a/data/windows/build-deps.sh b/data/windows/build-deps.sh index 59c81070c..186a644be 100755 --- a/data/windows/build-deps.sh +++ b/data/windows/build-deps.sh @@ -277,6 +277,10 @@ fi if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then cd fluidsynth-${FLUIDSYNTH_VERSION} + if [ ! -f patched ]; then + patch -p1 -i ../../patches/fluidsynth-skip-drivers-build.patch + touch patched + fi cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PREFIX} -DBUILD_SHARED_LIBS=OFF \ -Denable-debug=OFF -Denable-profiling=OFF -Denable-ladspa=OFF -Denable-fpe-check=OFF -Denable-portaudio=OFF \ -Denable-trap-on-fpe=OFF -Denable-aufile=OFF -Denable-dbus=OFF -Denable-ipv6=OFF -Denable-jack=OFF \