diff --git a/0001-Fix-build-with-fluidsynth-2.x.patch b/0001-Fix-build-with-fluidsynth-2.x.patch new file mode 100644 index 0000000..db44630 --- /dev/null +++ b/0001-Fix-build-with-fluidsynth-2.x.patch @@ -0,0 +1,135 @@ +From 3ac7cbf1a712c3f4db7a34a6d3b46dc9a43172d3 Mon Sep 17 00:00:00 2001 +From: Peter Michael Green +Date: Thu, 19 Dec 2019 01:38:18 +0000 +Subject: [PATCH] Fix build with fluidsynth 2.x + +--- + src/gst/fluidsynth/fluidsynth.c | 44 +++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 42 insertions(+), 2 deletions(-) + +diff --git a/src/gst/fluidsynth/fluidsynth.c b/src/gst/fluidsynth/fluidsynth.c +index 0d954f8e..ec598dc4 100644 +--- a/src/gst/fluidsynth/fluidsynth.c ++++ b/src/gst/fluidsynth/fluidsynth.c +@@ -132,25 +132,41 @@ G_DEFINE_TYPE (GstBtFluidSynth, gstbt_fluid_synth, GSTBT_TYPE_AUDIO_SYNTH); + //-- fluid_synth log handler + + static void ++#if FLUIDSYNTH_VERSION_MAJOR < 2 + gstbt_fluid_synth_error_log_function (int level, char *message, void *data) ++#else ++gstbt_fluid_synth_error_log_function (int level, const char *message, void *data) ++#endif + { + GST_ERROR ("%s", message); + } + + static void ++#if FLUIDSYNTH_VERSION_MAJOR < 2 + gstbt_fluid_synth_warning_log_function (int level, char *message, void *data) ++#else ++gstbt_fluid_synth_warning_log_function (int level, const char *message, void *data) ++#endif + { + GST_WARNING ("%s", message); + } + + static void ++#if FLUIDSYNTH_VERSION_MAJOR < 2 + gstbt_fluid_synth_info_log_function (int level, char *message, void *data) ++#else ++gstbt_fluid_synth_info_log_function (int level, const char *message, void *data) ++#endif + { + GST_INFO ("%s", message); + } + + static void ++#if FLUIDSYNTH_VERSION_MAJOR < 2 + gstbt_fluid_synth_debug_log_function (int level, char *message, void *data) ++#else ++gstbt_fluid_synth_debug_log_function (int level, const char *message, void *data) ++#endif + { + GST_DEBUG ("%s", message); + } +@@ -212,7 +228,11 @@ typedef struct + + /* for counting the number of FluidSynth settings properties */ + static void ++#if FLUIDSYNTH_VERSION_MAJOR < 2 + settings_foreach_count (void *data, char *name, int type) ++#else ++settings_foreach_count (void *data, const char *name, int type) ++#endif + { + int *count = (int *) data; + *count = *count + 1; +@@ -220,7 +240,11 @@ settings_foreach_count (void *data, char *name, int type) + + /* add each FluidSynth setting as a GObject property */ + static void ++#if FLUIDSYNTH_VERSION_MAJOR < 2 + settings_foreach_func (void *data, char *name, int type) ++#else ++settings_foreach_func (void *data, const char *name, int type) ++#endif + { + ForeachBag *bag = (ForeachBag *) data; + GParamSpec *spec; +@@ -231,18 +255,30 @@ settings_foreach_func (void *data, char *name, int type) + switch (type) { + case FLUID_NUM_TYPE: + fluid_settings_getnum_range (bag->settings, name, &dmin, &dmax); ++#if FLUIDSYNTH_VERSION_MAJOR < 2 + ddef = fluid_settings_getnum_default (bag->settings, name); ++#else ++ if (fluid_settings_getnum_default (bag->settings, name, &ddef) != FLUID_OK) ddef = 0; ++#endif + spec = g_param_spec_double (name, name, name, dmin, dmax, ddef, + G_PARAM_READWRITE); + break; + case FLUID_INT_TYPE: + fluid_settings_getint_range (bag->settings, name, &imin, &imax); ++#if FLUIDSYNTH_VERSION_MAJOR < 2 + idef = fluid_settings_getint_default (bag->settings, name); ++#else ++ if (fluid_settings_getint_default (bag->settings, name, &idef) != FLUID_OK) idef = 0; ++#endif + spec = g_param_spec_int (name, name, name, imin, imax, idef, + G_PARAM_READWRITE); + break; + case FLUID_STR_TYPE: +- defstr = fluid_settings_getstr_default (bag->settings, name); ++#if FLUIDSYNTH_VERSION_MAJOR < 2 ++ fluid_settings_getstr_default (bag->settings, name); ++#else ++ if (fluid_settings_getstr_default (bag->settings, name,&defstr) != FLUID_OK) defstr = 0; ++#endif + spec = g_param_spec_string (name, name, name, defstr, G_PARAM_READWRITE); + break; + case FLUID_SET_TYPE: +@@ -724,7 +760,11 @@ gstbt_fluid_synth_init (GstBtFluidSynth * src) + new_fluid_midi_router (src->settings, + fluid_synth_handle_midi_event, src->fluid); + if (src->midi_router) { ++#if FLUIDSYNTH_VERSION_MAJOR < 2 + src->cmd_handler = new_fluid_cmd_handler (src->fluid); ++#else ++ src->cmd_handler = new_fluid_cmd_handler (src->fluid,NULL); ++#endif + if (src->cmd_handler) { + src->midi = new_fluid_midi_driver (src->settings, + fluid_midi_router_handle_midi_event, (void *) (src->midi_router)); +@@ -886,7 +926,7 @@ gstbt_fluid_synth_class_init (GstBtFluidSynthClass * klass) + g_param_spec_enum ("chorus-waveform", "Chorus waveform", + "Chorus waveform type", + CHORUS_WAVEFORM_TYPE, +- FLUID_CHORUS_DEFAULT_TYPE, ++ FLUID_CHORUS_MOD_SINE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + gst_element_class_set_static_metadata (element_class, +-- +2.16.4 + diff --git a/buzztrax-0.10.2+git20191028.tar.gz b/buzztrax-0.10.2+git20191028.tar.gz deleted file mode 100644 index a9bc736..0000000 --- a/buzztrax-0.10.2+git20191028.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ce77b2ce4401f54d6e265eaae14fe14a415928077d17b776f7919f29ce0e8b28 -size 3365555 diff --git a/buzztrax-0.10.2+git20191209.tar.gz b/buzztrax-0.10.2+git20191209.tar.gz new file mode 100644 index 0000000..8f208b1 --- /dev/null +++ b/buzztrax-0.10.2+git20191209.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66a1cdb0397d62cc6f2b4eaa72c88f4de1b0c755e6c86db4954d8860ee9dfb69 +size 3366593 diff --git a/buzztrax.changes b/buzztrax.changes index 4e02a4b..4e10696 100644 --- a/buzztrax.changes +++ b/buzztrax.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Dec 19 12:06:53 UTC 2019 - Dave Plater + +- Update to git snapshot 0.10.2+git20191209 +- Add patch from debian 0001-Fix-build-with-fluidsynth-2.x.patch +- Upstream changes: + *More synth pannning. Add more module ideas. + ------------------------------------------------------------------- Tue Nov 26 09:21:42 UTC 2019 - Dave Plater diff --git a/buzztrax.spec b/buzztrax.spec index be93108..cdb5176 100644 --- a/buzztrax.spec +++ b/buzztrax.spec @@ -16,7 +16,7 @@ # -%define rev e08d73311d45b8bd73cbbd1fe95bc95b5ad52d2f +%define rev 1f57d1b6ff55dd3d574f92039bb06a768d613d67 %define relver 0.11.0 %define gir gobject-introspection-1.0 @@ -31,7 +31,7 @@ %define glib_version 2.32.0 %define gst_version 1.2.0 Name: buzztrax -Version: 0.10.2+git20191028 +Version: 0.10.2+git20191209 Release: 0 Summary: A music studio inspired by Buzz License: GPL-2.0-or-later @@ -41,6 +41,7 @@ Source0: https://github.com/Buzztrax/buzztrax/archive//%{rev}.tar.gz#/%{n #http://files.buzztrax.org/releases/%%{name}-%%{version}.tar.gz Source1: autogen.sh Source2: COPYING-DOCS +Patch0: 0001-Fix-build-with-fluidsynth-2.x.patch BuildRequires: automake >= 1.13 BuildRequires: desktop-file-utils BuildRequires: fdupes @@ -57,10 +58,7 @@ BuildRequires: pkgconfig(%{gir}) BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(cairo) BuildRequires: pkgconfig(clutter-gtk-1.0) -#Doesn't build with fluidsynth 2 yet -%if 0%{?suse_version} <= 1500 BuildRequires: pkgconfig(fluidsynth) -%endif BuildRequires: pkgconfig(gdk-x11-3.0) BuildRequires: pkgconfig(gio-2.0) >= %{glib_version} BuildRequires: pkgconfig(glib-2.0) >= %{glib_version} @@ -207,7 +205,10 @@ This package contains buzztrax plugins %prep %setup -q -n %{name}-%{rev} -%autopatch -p1 +# Patch causes fluidsynth1 build failure. +%if 0%{?suse_version} > 1500 +%patch0 -p1 +%endif # Rpmlint complains that COPYING-DOCS is outdated cp -v %{SOURCE2} . cp -v %{SOURCE1} .