diff --git a/recipes-misc/recipes-multimedia/amsynth/amsynth_1.7.0.bb b/recipes-misc/recipes-multimedia/amsynth/amsynth_1.8.0.bb similarity index 73% rename from recipes-misc/recipes-multimedia/amsynth/amsynth_1.7.0.bb rename to recipes-misc/recipes-multimedia/amsynth/amsynth_1.8.0.bb index 00adb2bb..46270805 100644 --- a/recipes-misc/recipes-multimedia/amsynth/amsynth_1.7.0.bb +++ b/recipes-misc/recipes-multimedia/amsynth/amsynth_1.8.0.bb @@ -6,18 +6,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=67b604758dd265c185ce36fcf76a889d" inherit autotools pkgconfig gtk-icon-cache gettext DEPENDS += " \ - gtk+ gtkmm \ + gtk+ \ intltool-native \ " SRC_URI = " \ https://github.com/${BPN}/${BPN}/releases/download/release-${PV}/${BPN}-${PV}.tar.bz2 \ - file://0001-Preset-return-reference-to-mName.patch \ - file://0002-dssi-report-presets-correctly.patch \ - file://0003-dssi-fix-preset-selection.patch \ + file://0001-Fix-installing-of-appdata.patch \ " -SRC_URI[md5sum] = "4856f582caed59fca79dfe3ca4597938" -SRC_URI[sha256sum] = "08ec3fdc56b5eec89abed67d356458652ac5ebac2971aff4a147b9f8bcaa6169" +SRC_URI[md5sum] = "54eaabc55d90ece5675b3cb3c2dc732d" +SRC_URI[sha256sum] = "d05363b654752494c4b6a404d80d70d27857db5ec9ca398eebcf6c5b466d6668" PACKAGECONFIG ??= "alsa dssi jack sndfile lv2" @@ -29,6 +27,7 @@ PACKAGECONFIG[sndfile] = "--with-sndfile,--without-sndfile,libsndfile1" PACKAGECONFIG[lv2] = "--with-lv2,--without-lv2,lv2" FILES_${PN} += " \ + ${datadir}/appdata \ ${libdir}/dssi \ ${libdir}/lv2 \ ${libdir}/vst \ diff --git a/recipes-misc/recipes-multimedia/amsynth/files/0001-Fix-installing-of-appdata.patch b/recipes-misc/recipes-multimedia/amsynth/files/0001-Fix-installing-of-appdata.patch new file mode 100644 index 00000000..eba89ba5 --- /dev/null +++ b/recipes-misc/recipes-multimedia/amsynth/files/0001-Fix-installing-of-appdata.patch @@ -0,0 +1,39 @@ +From 1a254a5bef5260ccad5c0a3d4fdb1b1d284c17f6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sat, 12 Aug 2017 13:01:24 +0200 +Subject: [PATCH] Fix installing of appdata +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Without this there are several *.metainfo.xml.in files. + +Stolen from fedora [1] + +[1] https://src.fedoraproject.org/rpms/amsynth/blob/master/f/amsynth.fixMetainfo.patch + +Signed-off-by: Andreas Müller + +Upstream-Status: Submitted [2] + +[2] https://github.com/amsynth/amsynth/pull/105 +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 2d1277a..3bb320a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -296,7 +296,7 @@ appdata_in_files = data/amsynth.appdata.xml.in + appdata_in_files += data/dssi-amsynth-plugin.metainfo.xml.in + appdata_in_files += data/lv2-amsynth-plugin.metainfo.xml.in + appdata_in_files += data/vst-amsynth-plugin.metainfo.xml.in +-appdata_DATA = $(appdata_in_files:.appdata.xml.in=.appdata.xml) ++appdata_DATA = $(appdata_in_files:.xml.in=.xml) + @INTLTOOL_XML_RULE@ + + EXTRA_DIST += $(appdata_in_files) +-- +2.9.4 + diff --git a/recipes-misc/recipes-multimedia/amsynth/files/0001-Preset-return-reference-to-mName.patch b/recipes-misc/recipes-multimedia/amsynth/files/0001-Preset-return-reference-to-mName.patch deleted file mode 100644 index ca93c357..00000000 --- a/recipes-misc/recipes-multimedia/amsynth/files/0001-Preset-return-reference-to-mName.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 2bb9e40bde1ab9e03bf276bbaa1a8047f6b1265d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Thu, 5 Jan 2017 02:02:49 +0100 -Subject: [PATCH 1/3] Preset: return reference to mName -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Otherwise we get temporary objects with non deterministic lifetime. Errors -caused are e.g mangled names in dssi get_program. Not easy to debug believe -me! - -Upstream-Status: Applied [1] - -https://github.com/amsynth/amsynth/pull/56 - -Signed-off-by: Andreas Müller ---- - src/Preset.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Preset.h b/src/Preset.h -index ad98b07..7b7f631 100644 ---- a/src/Preset.h -+++ b/src/Preset.h -@@ -39,7 +39,7 @@ public: - - bool isEqual (const Preset &); - -- const std::string getName () const { return mName; } -+ const std::string& getName () const { return mName; } - void setName (const std::string name) { mName = name; } - - Parameter& getParameter (const std::string name); --- -2.5.5 - diff --git a/recipes-misc/recipes-multimedia/amsynth/files/0002-dssi-report-presets-correctly.patch b/recipes-misc/recipes-multimedia/amsynth/files/0002-dssi-report-presets-correctly.patch deleted file mode 100644 index 76c3b5e9..00000000 --- a/recipes-misc/recipes-multimedia/amsynth/files/0002-dssi-report-presets-correctly.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 19094e40a72e88fdef5d68f8354c9bea51145b75 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Thu, 5 Jan 2017 02:24:51 +0100 -Subject: [PATCH 2/3] dssi: report presets correctly -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Applied [1] - -https://github.com/amsynth/amsynth/pull/57 - -Signed-off-by: Andreas Müller ---- - src/dssi.cpp | 29 ++++++++++++++++++++++------- - 1 file changed, 22 insertions(+), 7 deletions(-) - -diff --git a/src/dssi.cpp b/src/dssi.cpp -index 4647ba0..0d5528c 100644 ---- a/src/dssi.cpp -+++ b/src/dssi.cpp -@@ -21,9 +21,11 @@ - - #include "midi.h" - #include "Preset.h" -+#include "PresetController.h" - #include "Synthesizer.h" - - #include -+#include - #include - #include - #include -@@ -42,6 +44,8 @@ - - static LADSPA_Descriptor * s_ladspaDescriptor = NULL; - static DSSI_Descriptor * s_dssiDescriptor = NULL; -+static PresetController * s_presetController = NULL; -+static unsigned long s_lastBankGet = ULONG_MAX; - - #define MIDI_BUFFER_SIZE 4096 - -@@ -106,19 +110,24 @@ static void cleanup (LADSPA_Handle instance) - - static const DSSI_Program_Descriptor *get_program(LADSPA_Handle Instance, unsigned long Index) - { -- amsynth_wrapper * a = (amsynth_wrapper *) Instance; -- - static DSSI_Program_Descriptor descriptor; - memset(&descriptor, 0, sizeof(descriptor)); - -- if (Index < 128) { -- descriptor.Bank = 0; -- descriptor.Program = Index; -- descriptor.Name = a->synth->getPresetName(Index); -+ descriptor.Program = Index % PresetController::kNumPresets; -+ descriptor.Bank = Index / PresetController::kNumPresets; -+ -+ const std::vector banks = PresetController::getPresetBanks(); -+ if (descriptor.Bank < banks.size()) -+ { -+ if (descriptor.Bank != s_lastBankGet) { -+ s_presetController->loadPresets(banks[descriptor.Bank].file_path.c_str()); -+ s_lastBankGet = descriptor.Bank; -+ } -+ descriptor.Name = s_presetController->getPreset(descriptor.Program).getName().c_str(); - TRACE_ARGS("%d %d %s", descriptor.Bank, descriptor.Program, descriptor.Name); - return &descriptor; - } -- -+ - return NULL; - } - -@@ -227,6 +236,7 @@ static void run (LADSPA_Handle instance, unsigned long sample_count) - - void __attribute__ ((constructor)) my_init () - { -+ s_presetController = new PresetController; - const char **port_names; - LADSPA_PortDescriptor *port_descriptors; - LADSPA_PortRangeHint *port_range_hints; -@@ -340,4 +350,9 @@ void __attribute__ ((destructor)) my_fini () - { - free (s_dssiDescriptor); - } -+ if (s_presetController) -+ { -+ delete s_presetController; -+ } -+ - } --- -2.5.5 - diff --git a/recipes-misc/recipes-multimedia/amsynth/files/0003-dssi-fix-preset-selection.patch b/recipes-misc/recipes-multimedia/amsynth/files/0003-dssi-fix-preset-selection.patch deleted file mode 100644 index 5379e818..00000000 --- a/recipes-misc/recipes-multimedia/amsynth/files/0003-dssi-fix-preset-selection.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 7c4d3532bd5540d403f4d477beb473f0948c9e32 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Thu, 5 Jan 2017 11:45:38 +0100 -Subject: [PATCH 3/3] dssi: fix preset selection -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Applied [1] - -https://github.com/amsynth/amsynth/pull/57 - -Signed-off-by: Andreas Müller ---- - src/dssi.cpp | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/dssi.cpp b/src/dssi.cpp -index 0d5528c..f063a64 100644 ---- a/src/dssi.cpp -+++ b/src/dssi.cpp -@@ -137,7 +137,10 @@ static void select_program(LADSPA_Handle Instance, unsigned long Bank, unsigned - - TRACE_ARGS("Bank = %d Index = %d", Bank, Index); - -- if (Bank == 0 && Index < 128) { -+ const std::vector banks = PresetController::getPresetBanks(); -+ -+ if (Bank < banks.size() && Index < PresetController::kNumPresets) { -+ s_presetController->loadPresets(banks[Bank].file_path.c_str()); - a->synth->setPresetNumber(Index); - // now update DSSI host's view of the parameters - for (unsigned i = 0; i < kAmsynthParameterCount; i++) { --- -2.5.5 -