Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/minuet/, kde-apps/minuet/files/
Date: Tue, 21 Jan 2020 16:29:26
Message-Id: 1579621818.afe1c44bbcd8a8f3b2acbca599a156808b5dd842.asturm@gentoo
1 commit: afe1c44bbcd8a8f3b2acbca599a156808b5dd842
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 21 15:48:04 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 21 15:50:18 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afe1c44b
7
8 kde-apps/minuet: Backport fix for fluidsynth-2 API support
9
10 See also: https://phabricator.kde.org/D26558
11 Package-Manager: Portage-2.3.84, Repoman-2.3.20
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 .../minuet/files/minuet-19.08.3-fluidsynth-2.patch | 94 ++++++++++++++++++++++
15 kde-apps/minuet/minuet-19.08.3-r1.ebuild | 33 ++++++++
16 kde-apps/minuet/minuet-19.12.1-r1.ebuild | 34 ++++++++
17 3 files changed, 161 insertions(+)
18
19 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
20 new file mode 100644
21 index 00000000000..9bb3c5bad1b
22 --- /dev/null
23 +++ b/kde-apps/minuet/files/minuet-19.08.3-fluidsynth-2.patch
24 @@ -0,0 +1,94 @@
25 +From d707ab85c60d68e0310559df4608d86680cc811a Mon Sep 17 00:00:00 2001
26 +From: Tom Moebert <tom.mbrt@××××××××××.com>
27 +Date: Sat, 18 Jan 2020 00:26:30 +0100
28 +Subject: Port to fluidsynth 2.0.0 API
29 +
30 +Summary:
31 +This includes necessary adaptations for fluidsynth 2.0. All changes are backward-compatible to fluidsynth 1.1. For details, see:
32 +
33 +http://www.fluidsynth.org/api/index.html#NewIn2_0_0
34 +
35 +Reviewers: #minuet
36 +
37 +Subscribers: asturmlechner, aacid, kde-edu
38 +
39 +Tags: #minuet, #kde_edu
40 +
41 +Differential Revision: https://phabricator.kde.org/D26558
42 +---
43 + .../fluidsynthsoundcontroller.cpp | 22 ++++++++++++++++++----
44 + .../fluidsynthsoundcontroller.h | 1 +
45 + 2 files changed, 19 insertions(+), 4 deletions(-)
46 +
47 +diff --git a/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp b/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp
48 +index 67e6826..7252914 100644
49 +--- a/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp
50 ++++ b/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp
51 +@@ -34,13 +34,14 @@ FluidSynthSoundController::FluidSynthSoundController(QObject *parent)
52 + : Minuet::ISoundController(parent),
53 + m_audioDriver(0),
54 + m_sequencer(0),
55 +- m_song(0)
56 ++ m_song(0),
57 ++ m_unregisteringEvent(0)
58 + {
59 + m_tempo = 60;
60 +
61 + m_settings = new_fluid_settings();
62 +- fluid_settings_setstr(m_settings, "synth.reverb.active", "no");
63 +- fluid_settings_setstr(m_settings, "synth.chorus.active", "no");
64 ++ fluid_settings_setint(m_settings, "synth.reverb.active", 0);
65 ++ fluid_settings_setint(m_settings, "synth.chorus.active", 0);
66 +
67 + m_synth = new_fluid_synth(m_settings);
68 +
69 +@@ -55,6 +56,9 @@ FluidSynthSoundController::FluidSynthSoundController(QObject *parent)
70 + if (fluid_res == FLUID_FAILED)
71 + qCritical() << "Error when loading soundfont!";
72 +
73 ++ m_unregisteringEvent = new_fluid_event();
74 ++ fluid_event_set_source(m_unregisteringEvent, -1);
75 ++
76 + resetEngine();
77 + }
78 +
79 +@@ -63,6 +67,7 @@ FluidSynthSoundController::~FluidSynthSoundController()
80 + deleteEngine();
81 + if (m_synth) delete_fluid_synth(m_synth);
82 + if (m_settings) delete_fluid_settings(m_settings);
83 ++ if (m_unregisteringEvent) delete_fluid_event(m_unregisteringEvent);
84 + }
85 +
86 + void FluidSynthSoundController::setPitch(qint8 pitch)
87 +@@ -240,7 +245,16 @@ void FluidSynthSoundController::resetEngine()
88 +
89 + void FluidSynthSoundController::deleteEngine()
90 + {
91 +- if (m_sequencer) delete_fluid_sequencer(m_sequencer);
92 ++ if (m_sequencer) {
93 ++#if FLUIDSYNTH_VERSION_MAJOR >= 2
94 ++ // explicit client unregistering required
95 ++ fluid_sequencer_unregister_client(m_sequencer, m_callbackSeqID);
96 ++ fluid_event_set_dest(m_unregisteringEvent, m_synthSeqID);
97 ++ fluid_event_unregistering(m_unregisteringEvent);
98 ++ fluid_sequencer_send_now(m_sequencer, m_unregisteringEvent);
99 ++#endif
100 ++ delete_fluid_sequencer(m_sequencer);
101 ++ }
102 + if (m_audioDriver) delete_fluid_audio_driver(m_audioDriver);
103 + }
104 +
105 +diff --git a/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.h b/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.h
106 +index afad46b..ed111c2 100644
107 +--- a/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.h
108 ++++ b/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.h
109 +@@ -63,6 +63,7 @@ private:
110 + fluid_audio_driver_t *m_audioDriver;
111 + fluid_sequencer_t *m_sequencer;
112 + fluid_synth_t *m_synth;
113 ++ fluid_event_t *m_unregisteringEvent;
114 +
115 + short m_synthSeqID;
116 + short m_callbackSeqID;
117 +--
118 +cgit v1.1
119
120 diff --git a/kde-apps/minuet/minuet-19.08.3-r1.ebuild b/kde-apps/minuet/minuet-19.08.3-r1.ebuild
121 new file mode 100644
122 index 00000000000..85d2f878f17
123 --- /dev/null
124 +++ b/kde-apps/minuet/minuet-19.08.3-r1.ebuild
125 @@ -0,0 +1,33 @@
126 +# Copyright 1999-2020 Gentoo Authors
127 +# Distributed under the terms of the GNU General Public License v2
128 +
129 +EAPI=7
130 +
131 +ECM_HANDBOOK="forceoptional"
132 +KFMIN=5.60.0
133 +QTMIN=5.12.3
134 +inherit ecm kde.org
135 +
136 +DESCRIPTION="Music Education software by KDE"
137 +HOMEPAGE="https://minuet.kde.org/"
138 +LICENSE="GPL-2" # TODO: CHECK
139 +SLOT="5"
140 +KEYWORDS="~amd64 ~arm64 ~x86"
141 +IUSE=""
142 +
143 +BDEPEND="
144 + virtual/pkgconfig
145 +"
146 +DEPEND="
147 + >=kde-frameworks/kcoreaddons-${KFMIN}:5
148 + >=kde-frameworks/kcrash-${KFMIN}:5
149 + >=kde-frameworks/ki18n-${KFMIN}:5
150 + >=dev-qt/qtdeclarative-${QTMIN}:5
151 + >=dev-qt/qtgui-${QTMIN}:5
152 + >=dev-qt/qtsvg-${QTMIN}:5
153 + >=dev-qt/qtquickcontrols2-${QTMIN}:5
154 + media-sound/fluidsynth:=
155 +"
156 +RDEPEND="${DEPEND}"
157 +
158 +PATCHES=( "${FILESDIR}/${P}-fluidsynth-2.patch" )
159
160 diff --git a/kde-apps/minuet/minuet-19.12.1-r1.ebuild b/kde-apps/minuet/minuet-19.12.1-r1.ebuild
161 new file mode 100644
162 index 00000000000..98fa208cc5c
163 --- /dev/null
164 +++ b/kde-apps/minuet/minuet-19.12.1-r1.ebuild
165 @@ -0,0 +1,34 @@
166 +# Copyright 1999-2020 Gentoo Authors
167 +# Distributed under the terms of the GNU General Public License v2
168 +
169 +EAPI=7
170 +
171 +ECM_HANDBOOK="forceoptional"
172 +KFMIN=5.63.0
173 +QTMIN=5.12.3
174 +inherit ecm kde.org
175 +
176 +DESCRIPTION="Music Education software by KDE"
177 +HOMEPAGE="https://minuet.kde.org/"
178 +
179 +LICENSE="GPL-2" # TODO: CHECK
180 +SLOT="5"
181 +KEYWORDS="~amd64 ~arm64 ~x86"
182 +IUSE=""
183 +
184 +BDEPEND="
185 + virtual/pkgconfig
186 +"
187 +DEPEND="
188 + >=kde-frameworks/kcoreaddons-${KFMIN}:5
189 + >=kde-frameworks/kcrash-${KFMIN}:5
190 + >=kde-frameworks/ki18n-${KFMIN}:5
191 + >=dev-qt/qtdeclarative-${QTMIN}:5
192 + >=dev-qt/qtgui-${QTMIN}:5
193 + >=dev-qt/qtsvg-${QTMIN}:5
194 + >=dev-qt/qtquickcontrols2-${QTMIN}:5
195 + media-sound/fluidsynth:=
196 +"
197 +RDEPEND="${DEPEND}"
198 +
199 +PATCHES=( "${FILESDIR}/${PN}-19.08.3-fluidsynth-2.patch" )