package/fluidsynth: needs dynamic library
PATCH v2 1/2 package/fluidsynth: needs dynamic library
applications, such as mpd, fail to build statically with fluidsynth because fluidsynth does not fill Libs.Private in their pkg-config file
Because fluidsynth is a cmake-package with many dependencies, it is not easy to fix so just add a dynamic library dependency.
Here is an extract of src/CMakeLists.txt that gives the list of fluidsynth possible dependencies:
target_link_libraries ( libfluidsynth
${GLIB_LIBRARIES}
${GMODULE_LIBRARIES}
${LASH_LIBRARIES}
${JACK_LIBRARIES}
${ALSA_LIBRARIES}
${PULSE_LIBRARIES}
${PORTAUDIO_LIBRARIES}
${LIBSNDFILE_LIBRARIES}
${SDL2_LIBRARIES}
${DBUS_LIBRARIES}
${READLINE_LIBS}
${DART_LIBS}
${COREAUDIO_LIBS}
${COREMIDI_LIBS}
${WINDOWS_LIBS}
${MidiShare_LIBS}
${OpenSLES_LIBS}
${OBOE_LIBS}
${LIBFLUID_LIBS}
${LIBINSTPATCH_LIBRARIES}
)
Fixes:
- http://autobuild.buildroot.org/results/ec9dd2903359b9bf6b15c8cb69e732f8cb6c4d39
---
Changes v1 -> v2 (after review of Yann E. Morin):
- Propagate to BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FLUIDSYNTH
- Add the list of dependencies in the commit message
package/fluidsynth/Config.in | 6 ++++-- package/gstreamer1/gst1-plugins-bad/Config.in | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
package/fluidsynth/Config.in +4 -2
@@ -3,6 +3,7 @@ config BR2_PACKAGE_FLUIDSYNTH depends on BR2_USE_WCHAR # libglib2 depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 depends on BR2_USE_MMU # libglib2 + depends on !BR2_STATIC_LIBS select BR2_PACKAGE_LIBGLIB2 help FluidSynth is a real-time software synthesizer based on the
@@ -115,6 +116,7 @@ config BR2_PACKAGE_FLUIDSYNTH_READLINE endif # BR2_PACKAGE_FLUIDSYNTH -comment "fluidsynth needs a toolchain w/ threads, wchar" +comment "fluidsynth needs a toolchain w/ threads, wchar, dynamic library" depends on BR2_USE_MMU - depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS
package/gstreamer1/gst1-plugins-bad/Config.in +4 -2
@@ -395,6 +395,7 @@ comment "fdk-aac needs a toolchain w/ C++" config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FLUIDSYNTH bool "fluidsynth" + depends on !BR2_STATIC_LIBS # fluidsynth depends on BR2_USE_WCHAR # fluidsynth depends on BR2_TOOLCHAIN_HAS_THREADS # fluidsynth depends on BR2_USE_MMU # fluidsynth
@@ -402,9 +403,10 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FLUIDSYNTH help Fluidsynth MIDI decoder plugin -comment "fluidsynth needs a toolchain w/ threads, wchar" +comment "fluidsynth needs a toolchain w/ threads, wchar, dynamic library" depends on BR2_USE_MMU - depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GL bool "gl"
Signature · 1 line
2.27.0
PATCH v2 2/2 package/mpd: add fluidsynth optional dependency
fluidsynth is an optional dependency of mpd since version 0.18.5 and
https://github.com/MusicPlayerDaemon/MPD/commit/727c6226597fb710239b14e7985d97ec6b53f0ee
It is enabled by default
--- package/mpd/Config.in | 10 ++++++++++ package/mpd/mpd.mk | 7 +++++++ 2 files changed, 17 insertions(+)
package/mpd/Config.in +10 -0
@@ -114,6 +114,16 @@ config BR2_PACKAGE_MPD_FLAC Enable flac input/streaming support. Select this if you want to play back FLAC files. +config BR2_PACKAGE_MPD_FLUIDSYNTH + bool "fluidsynth" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_FLUIDSYNTH + help + Enable fluidsynth MIDI decoder support. + +comment "fluidsynth support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + config BR2_PACKAGE_MPD_LIBSNDFILE bool "libsndfile" select BR2_PACKAGE_LIBSNDFILE
package/mpd/mpd.mk +7 -0
@@ -97,6 +97,13 @@ else MPD_CONF_OPTS += -Dflac=disabled endif +ifeq ($(BR2_PACKAGE_MPD_FLUIDSYNTH),y) +MPD_DEPENDENCIES += fluidsynth +MPD_CONF_OPTS += -Dfluidsynth=enabled +else +MPD_CONF_OPTS += -Dfluidsynth=disabled +endif + ifeq ($(BR2_PACKAGE_MPD_HTTPD_OUTPUT),y) MPD_CONF_OPTS += -Dhttpd=true else
Signature · 1 line
2.27.0