1 |
commit: 257d344317af170a10a0b7e5b49018704bb2a592 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 29 11:56:23 2017 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 29 12:59:56 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=257d3443 |
7 |
|
8 |
media-sound/jalv: Fix segfault w/ Qt5 plugins, run in background |
9 |
|
10 |
Gentoo-bug: 621708, 634030 |
11 |
Closes: https://bugs.gentoo.org/634030 |
12 |
Package-Manager: Portage-2.3.13, Repoman-2.3.4 |
13 |
|
14 |
media-sound/jalv/files/jalv-1.6.0-stdin.patch | 67 ++++++++++++++++++++++++ |
15 |
media-sound/jalv/files/jalv-1.6.0-suil-qt5.patch | 34 ++++++++++++ |
16 |
media-sound/jalv/jalv-1.6.0-r2.ebuild | 59 +++++++++++++++++++++ |
17 |
3 files changed, 160 insertions(+) |
18 |
|
19 |
diff --git a/media-sound/jalv/files/jalv-1.6.0-stdin.patch b/media-sound/jalv/files/jalv-1.6.0-stdin.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..953af7c5f3e |
22 |
--- /dev/null |
23 |
+++ b/media-sound/jalv/files/jalv-1.6.0-stdin.patch |
24 |
@@ -0,0 +1,67 @@ |
25 |
+From 3a46e861b5b8dbbacb8dd1cec9fa2c69a10b26e0 Mon Sep 17 00:00:00 2001 |
26 |
+From: David Robillard <d@××××××××.net> |
27 |
+Date: Sat, 18 Feb 2017 18:00:03 +0100 |
28 |
+Subject: Add jalv -i option to ignore stdin for background use |
29 |
+ |
30 |
+ |
31 |
+diff --git a/doc/jalv.1 b/doc/jalv.1 |
32 |
+index 6d93a72..000ed5a 100644 |
33 |
+--- a/doc/jalv.1 |
34 |
++++ b/doc/jalv.1 |
35 |
+@@ -17,6 +17,10 @@ Print the command line options. |
36 |
+ Print control output changes to stdout. |
37 |
+ |
38 |
+ .TP |
39 |
++\fB\-i\fR |
40 |
++Ignore input on stdin (for background use). |
41 |
++ |
42 |
++.TP |
43 |
+ \fB\-c SYM=VAL\fR |
44 |
+ Set control value (e.g. "vol=1.4"). |
45 |
+ |
46 |
+diff --git a/src/jalv_console.c b/src/jalv_console.c |
47 |
+index c0f369c..e0e114b 100644 |
48 |
+--- a/src/jalv_console.c |
49 |
++++ b/src/jalv_console.c |
50 |
+@@ -106,6 +106,8 @@ jalv_init(int* argc, char*** argv, JalvOptions* opts) |
51 |
+ opts->controls, (++n_controls + 1) * sizeof(char*)); |
52 |
+ opts->controls[n_controls - 1] = (*argv)[a]; |
53 |
+ opts->controls[n_controls] = NULL; |
54 |
++ } else if ((*argv)[a][1] == 'i') { |
55 |
++ opts->non_interactive = true; |
56 |
+ } else if ((*argv)[a][1] == 'd') { |
57 |
+ opts->dump = true; |
58 |
+ } else if ((*argv)[a][1] == 't') { |
59 |
+@@ -191,7 +193,7 @@ jalv_open_ui(Jalv* jalv) |
60 |
+ |
61 |
+ show_iface->hide(suil_instance_get_handle(jalv->ui_instance)); |
62 |
+ |
63 |
+- } else { |
64 |
++ } else if (!jalv->opts.non_interactive) { |
65 |
+ // Primitive command prompt for setting control values |
66 |
+ while (!zix_sem_try_wait(jalv->done)) { |
67 |
+ char line[128]; |
68 |
+@@ -202,6 +204,8 @@ jalv_open_ui(Jalv* jalv) |
69 |
+ break; |
70 |
+ } |
71 |
+ } |
72 |
++ } else { |
73 |
++ zix_sem_wait(jalv->done); |
74 |
+ } |
75 |
+ |
76 |
+ // Caller waits on the done sem, so increment it again to exit |
77 |
+diff --git a/src/jalv_internal.h b/src/jalv_internal.h |
78 |
+index 3a565ec..06f116a 100644 |
79 |
+--- a/src/jalv_internal.h |
80 |
++++ b/src/jalv_internal.h |
81 |
+@@ -172,6 +172,7 @@ typedef struct { |
82 |
+ int no_menu; ///< Hide menu iff true |
83 |
+ int show_ui; ///< Show non-embedded UI |
84 |
+ int print_controls; ///< Print control changes to stdout |
85 |
++ int non_interactive; ///< Do not listen for commands on stdin |
86 |
+ } JalvOptions; |
87 |
+ |
88 |
+ typedef struct { |
89 |
+-- |
90 |
+cgit v0.10.2 |
91 |
+ |
92 |
|
93 |
diff --git a/media-sound/jalv/files/jalv-1.6.0-suil-qt5.patch b/media-sound/jalv/files/jalv-1.6.0-suil-qt5.patch |
94 |
new file mode 100644 |
95 |
index 00000000000..a57447ce075 |
96 |
--- /dev/null |
97 |
+++ b/media-sound/jalv/files/jalv-1.6.0-suil-qt5.patch |
98 |
@@ -0,0 +1,34 @@ |
99 |
+From 4d22c6a53ff1dcb657ab1913f1b100e42db19bca Mon Sep 17 00:00:00 2001 |
100 |
+From: David Robillard <d@××××××××.net> |
101 |
+Date: Sat, 18 Mar 2017 12:00:11 +0100 |
102 |
+Subject: Use new suil init API to fix Qt5 plugin UIs |
103 |
+ |
104 |
+ |
105 |
+diff --git a/src/jalv.c b/src/jalv.c |
106 |
+index 78901ca..20f24e7 100644 |
107 |
+--- a/src/jalv.c |
108 |
++++ b/src/jalv.c |
109 |
+@@ -777,6 +777,7 @@ main(int argc, char** argv) |
110 |
+ jalv.bpm = 120.0f; |
111 |
+ jalv.control_in = (uint32_t)-1; |
112 |
+ |
113 |
++ suil_init(&argc, &argv, SUIL_ARG_NONE); |
114 |
+ if (jalv_init(&argc, &argv, &jalv.opts)) { |
115 |
+ return EXIT_FAILURE; |
116 |
+ } |
117 |
+diff --git a/wscript b/wscript |
118 |
+index 19f51bb..e2adc63 100644 |
119 |
+--- a/wscript |
120 |
++++ b/wscript |
121 |
+@@ -59,7 +59,7 @@ def configure(conf): |
122 |
+ autowaf.check_pkg(conf, 'sord-0', uselib_store='SORD', |
123 |
+ atleast_version='0.12.0', mandatory=True) |
124 |
+ autowaf.check_pkg(conf, 'suil-0', uselib_store='SUIL', |
125 |
+- atleast_version='0.6.0', mandatory=True) |
126 |
++ atleast_version='0.8.7', mandatory=True) |
127 |
+ autowaf.check_pkg(conf, 'sratom-0', uselib_store='SRATOM', |
128 |
+ atleast_version='0.6.0', mandatory=True) |
129 |
+ if Options.options.portaudio: |
130 |
+-- |
131 |
+cgit v0.10.2 |
132 |
+ |
133 |
|
134 |
diff --git a/media-sound/jalv/jalv-1.6.0-r2.ebuild b/media-sound/jalv/jalv-1.6.0-r2.ebuild |
135 |
new file mode 100644 |
136 |
index 00000000000..03cdffb688e |
137 |
--- /dev/null |
138 |
+++ b/media-sound/jalv/jalv-1.6.0-r2.ebuild |
139 |
@@ -0,0 +1,59 @@ |
140 |
+# Copyright 1999-2017 Gentoo Foundation |
141 |
+# Distributed under the terms of the GNU General Public License v2 |
142 |
+ |
143 |
+EAPI=6 |
144 |
+ |
145 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5} ) |
146 |
+PYTHON_REQ_USE='threads(+)' |
147 |
+ |
148 |
+inherit python-any-r1 qmake-utils waf-utils |
149 |
+ |
150 |
+DESCRIPTION="Simple but fully featured LV2 host for Jack" |
151 |
+HOMEPAGE="http://drobilla.net/software/jalv/" |
152 |
+SRC_URI="http://download.drobilla.net/${P}.tar.bz2" |
153 |
+ |
154 |
+LICENSE="ISC" |
155 |
+SLOT="0" |
156 |
+KEYWORDS="~amd64" |
157 |
+IUSE="gtk gtk2 gtkmm portaudio qt5" |
158 |
+ |
159 |
+RDEPEND=">=media-libs/lv2-1.6.0 |
160 |
+ >=media-libs/lilv-0.24.0 |
161 |
+ >=dev-libs/serd-0.14.0 |
162 |
+ >=dev-libs/sord-0.12.0 |
163 |
+ >=media-libs/suil-0.6.0 |
164 |
+ >=media-libs/sratom-0.6.0 |
165 |
+ gtk? ( >=x11-libs/gtk+-3.0.0:3 ) |
166 |
+ gtk2? ( >=x11-libs/gtk+-2.18.0:2 ) |
167 |
+ gtkmm? ( >=dev-cpp/gtkmm-2.20.0:2.4 ) |
168 |
+ portaudio? ( media-libs/portaudio ) |
169 |
+ !portaudio? ( virtual/jack ) |
170 |
+ qt5? ( |
171 |
+ dev-qt/qtcore:5 |
172 |
+ dev-qt/qtgui:5 |
173 |
+ dev-qt/qtwidgets:5 |
174 |
+ ) |
175 |
+" |
176 |
+DEPEND="${RDEPEND} |
177 |
+ ${PYTHON_DEPS} |
178 |
+ virtual/pkgconfig" |
179 |
+ |
180 |
+DOCS=( AUTHORS NEWS README ) |
181 |
+ |
182 |
+PATCHES=( |
183 |
+ "${FILESDIR}/${P}-qt-5.7.0.patch" |
184 |
+ "${FILESDIR}/${P}-stdin.patch" |
185 |
+ "${FILESDIR}/${P}-suil-qt5.patch" |
186 |
+) |
187 |
+ |
188 |
+src_configure() { |
189 |
+ use qt5 && export PATH="$(qt5_get_bindir):${PATH}" |
190 |
+ waf-utils_src_configure \ |
191 |
+ "--docdir=/usr/share/doc/${PF}" \ |
192 |
+ --no-qt4 \ |
193 |
+ $(use qt5 || echo --no-qt5) \ |
194 |
+ $(use gtk || echo --no-gtk3) \ |
195 |
+ $(use gtk2 || echo --no-gtk2) \ |
196 |
+ $(use gtkmm || echo --no-gtkmm) \ |
197 |
+ $(use portaudio && echo --portaudio) |
198 |
+} |