[gentoo-commits] repo/gentoo:master commit in: kde-apps/minuet/, kde-apps/minuet/files/

2020-01-21 Thread Andreas Sturmlechner
commit: afe1c44bbcd8a8f3b2acbca599a156808b5dd842
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Tue Jan 21 15:48:04 2020 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Tue Jan 21 15:50:18 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afe1c44b

kde-apps/minuet: Backport fix for fluidsynth-2 API support

See also: https://phabricator.kde.org/D26558
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../minuet/files/minuet-19.08.3-fluidsynth-2.patch | 94 ++
 kde-apps/minuet/minuet-19.08.3-r1.ebuild   | 33 
 kde-apps/minuet/minuet-19.12.1-r1.ebuild   | 34 
 3 files changed, 161 insertions(+)

diff --git a/kde-apps/minuet/files/minuet-19.08.3-fluidsynth-2.patch 
b/kde-apps/minuet/files/minuet-19.08.3-fluidsynth-2.patch
new file mode 100644
index 000..9bb3c5bad1b
--- /dev/null
+++ b/kde-apps/minuet/files/minuet-19.08.3-fluidsynth-2.patch
@@ -0,0 +1,94 @@
+From d707ab85c60d68e0310559df4608d86680cc811a Mon Sep 17 00:00:00 2001
+From: Tom Moebert 
+Date: Sat, 18 Jan 2020 00:26:30 +0100
+Subject: Port to fluidsynth 2.0.0 API
+
+Summary:
+This includes necessary adaptations for fluidsynth 2.0. All changes are 
backward-compatible to fluidsynth 1.1. For details, see:
+
+http://www.fluidsynth.org/api/index.html#NewIn2_0_0
+
+Reviewers: #minuet
+
+Subscribers: asturmlechner, aacid, kde-edu
+
+Tags: #minuet, #kde_edu
+
+Differential Revision: https://phabricator.kde.org/D26558
+---
+ .../fluidsynthsoundcontroller.cpp  | 22 ++
+ .../fluidsynthsoundcontroller.h|  1 +
+ 2 files changed, 19 insertions(+), 4 deletions(-)
+
+diff --git 
a/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp 
b/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp
+index 67e6826..7252914 100644
+--- a/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp
 b/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp
+@@ -34,13 +34,14 @@ 
FluidSynthSoundController::FluidSynthSoundController(QObject *parent)
+ : Minuet::ISoundController(parent),
+   m_audioDriver(0),
+   m_sequencer(0),
+-  m_song(0)
++  m_song(0),
++  m_unregisteringEvent(0)
+ {
+ m_tempo = 60;
+ 
+ m_settings = new_fluid_settings();
+-fluid_settings_setstr(m_settings, "synth.reverb.active", "no");
+-fluid_settings_setstr(m_settings, "synth.chorus.active", "no");
++fluid_settings_setint(m_settings, "synth.reverb.active", 0);
++fluid_settings_setint(m_settings, "synth.chorus.active", 0);
+ 
+ m_synth = new_fluid_synth(m_settings);
+ 
+@@ -55,6 +56,9 @@ FluidSynthSoundController::FluidSynthSoundController(QObject 
*parent)
+ if (fluid_res == FLUID_FAILED)
+ qCritical() << "Error when loading soundfont!";
+ 
++m_unregisteringEvent = new_fluid_event();
++fluid_event_set_source(m_unregisteringEvent, -1);
++
+ resetEngine();
+ }
+ 
+@@ -63,6 +67,7 @@ FluidSynthSoundController::~FluidSynthSoundController()
+ deleteEngine();
+ if (m_synth) delete_fluid_synth(m_synth);
+ if (m_settings) delete_fluid_settings(m_settings);
++if (m_unregisteringEvent) delete_fluid_event(m_unregisteringEvent);
+ }
+ 
+ void FluidSynthSoundController::setPitch(qint8 pitch)
+@@ -240,7 +245,16 @@ void FluidSynthSoundController::resetEngine()
+ 
+ void FluidSynthSoundController::deleteEngine()
+ {
+-if (m_sequencer) delete_fluid_sequencer(m_sequencer);
++if (m_sequencer) {
++#if FLUIDSYNTH_VERSION_MAJOR >= 2
++// explicit client unregistering required
++fluid_sequencer_unregister_client(m_sequencer, m_callbackSeqID);
++fluid_event_set_dest(m_unregisteringEvent, m_synthSeqID);
++fluid_event_unregistering(m_unregisteringEvent);
++fluid_sequencer_send_now(m_sequencer, m_unregisteringEvent);
++#endif
++delete_fluid_sequencer(m_sequencer);
++}
+ if (m_audioDriver) delete_fluid_audio_driver(m_audioDriver);
+ }
+ 
+diff --git a/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.h 
b/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.h
+index afad46b..ed111c2 100644
+--- a/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.h
 b/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.h
+@@ -63,6 +63,7 @@ private:
+ fluid_audio_driver_t *m_audioDriver;
+ fluid_sequencer_t *m_sequencer;
+ fluid_synth_t *m_synth;
++fluid_event_t *m_unregisteringEvent;
+ 
+ short m_synthSeqID;
+ short m_callbackSeqID;
+-- 
+cgit v1.1

diff --git a/kde-apps/minuet/minuet-19.08.3-r1.ebuild 
b/kde-apps/minuet/minuet-19.08.3-r1.ebuild
new file mode 100644
index 000..85d2f878f17
--- /dev/null
+++ b/kde-apps/minuet/minuet-19.08.3-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU 

[gentoo-commits] repo/gentoo:master commit in: kde-apps/minuet/, kde-apps/minuet/files/

2019-08-12 Thread Andreas Sturmlechner
commit: dcf75bf661a92c64f92e1a608935289784ea1fab
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Mon Aug 12 16:16:20 2019 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Mon Aug 12 16:24:58 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcf75bf6

kde-apps/minuet: Fix missing header with Frameworks 5.61

Closes: https://bugs.gentoo.org/692000
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../files/minuet-19.04.3-missing-header.patch  | 23 ++
 kde-apps/minuet/minuet-19.04.3.ebuild  |  2 ++
 2 files changed, 25 insertions(+)

diff --git a/kde-apps/minuet/files/minuet-19.04.3-missing-header.patch 
b/kde-apps/minuet/files/minuet-19.04.3-missing-header.patch
new file mode 100644
index 000..9524f4f3564
--- /dev/null
+++ b/kde-apps/minuet/files/minuet-19.04.3-missing-header.patch
@@ -0,0 +1,23 @@
+From 0ed28414428a6e19017ae7c5605ca09aaf0debea Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid 
+Date: Wed, 17 Jul 2019 22:56:58 +0200
+Subject: Fix build on CI
+
+---
+ src/app/plugincontroller.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/app/plugincontroller.h b/src/app/plugincontroller.h
+index 19c6c89..3acd1d4 100644
+--- a/src/app/plugincontroller.h
 b/src/app/plugincontroller.h
+@@ -27,6 +27,7 @@
+ 
+ #ifndef Q_OS_ANDROID
+ #include 
++#include 
+ #endif
+ 
+ namespace Minuet
+-- 
+cgit v1.1

diff --git a/kde-apps/minuet/minuet-19.04.3.ebuild 
b/kde-apps/minuet/minuet-19.04.3.ebuild
index f64a0819e81..5b8c1fa2e8d 100644
--- a/kde-apps/minuet/minuet-19.04.3.ebuild
+++ b/kde-apps/minuet/minuet-19.04.3.ebuild
@@ -25,3 +25,5 @@ DEPEND="
media-sound/fluidsynth:=
 "
 RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-missing-header.patch" )