1 |
commit: e84f14e28a5ae1de520a518da5ce6abbcfe9a0f1 |
2 |
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 26 16:09:26 2020 +0000 |
4 |
Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 26 16:09:26 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e84f14e2 |
7 |
|
8 |
media-plugins/gst-plugins-lv2: fix gcc10 build |
9 |
|
10 |
Closes: https://bugs.gentoo.org/716008 |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
12 |
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org> |
13 |
|
14 |
.../gst-plugins-lv2/files/patch-1.16.2-gcc10.patch | 606 +++++++++++++++++++++ |
15 |
...6.2.ebuild => gst-plugins-lv2-1.16.2-r1.ebuild} | 4 + |
16 |
2 files changed, 610 insertions(+) |
17 |
|
18 |
diff --git a/media-plugins/gst-plugins-lv2/files/patch-1.16.2-gcc10.patch b/media-plugins/gst-plugins-lv2/files/patch-1.16.2-gcc10.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..cdfa976d056 |
21 |
--- /dev/null |
22 |
+++ b/media-plugins/gst-plugins-lv2/files/patch-1.16.2-gcc10.patch |
23 |
@@ -0,0 +1,606 @@ |
24 |
+Bug: https://bugs.gentoo.org/716008 |
25 |
+ |
26 |
+--- a/ext/lv2/gstlv2.c |
27 |
++++ b/ext/lv2/gstlv2.c |
28 |
+@@ -69,6 +69,38 @@ |
29 |
+ #error "Unsupported OS" |
30 |
+ #endif |
31 |
+ |
32 |
++LilvWorld *gst_lv2_world_node = NULL; |
33 |
++LilvNode *gst_lv2_audio_node = NULL; |
34 |
++LilvNode *gst_lv2_control_node = NULL; |
35 |
++LilvNode *gst_lv2_cv_node = NULL; |
36 |
++LilvNode *gst_lv2_event_node = NULL; |
37 |
++LilvNode *gst_lv2_input_node = NULL; |
38 |
++LilvNode *gst_lv2_output_node = NULL; |
39 |
++LilvNode *gst_lv2_preset_node = NULL; |
40 |
++LilvNode *gst_lv2_state_iface_node = NULL; |
41 |
++LilvNode *gst_lv2_state_uri_node = NULL; |
42 |
++ |
43 |
++LilvNode *gst_lv2_integer_prop_node = NULL; |
44 |
++LilvNode *gst_lv2_toggled_prop_node = NULL; |
45 |
++LilvNode *gst_lv2_designation_pred_node = NULL; |
46 |
++LilvNode *gst_lv2_in_place_broken_pred_node = NULL; |
47 |
++LilvNode *gst_lv2_optional_pred_node = NULL; |
48 |
++LilvNode *gst_lv2_group_pred_node = NULL; |
49 |
++LilvNode *gst_lv2_supports_event_pred_node = NULL; |
50 |
++LilvNode *gst_lv2_label_pred_node = NULL; |
51 |
++ |
52 |
++LilvNode *gst_lv2_center_role_node = NULL; |
53 |
++LilvNode *gst_lv2_left_role_node = NULL; |
54 |
++LilvNode *gst_lv2_right_role_node = NULL; |
55 |
++LilvNode *gst_lv2_rear_center_role_node = NULL; |
56 |
++LilvNode *gst_lv2_rear_left_role_node = NULL; |
57 |
++LilvNode *gst_lv2_rear_right_role_node = NULL; |
58 |
++LilvNode *gst_lv2_lfe_role_node = NULL; |
59 |
++LilvNode *gst_lv2_center_left_role_node = NULL; |
60 |
++LilvNode *gst_lv2_center_right_role_node = NULL; |
61 |
++LilvNode *gst_lv2_side_left_role_node = NULL; |
62 |
++LilvNode *gst_lv2_side_right_role_node = NULL; |
63 |
++ |
64 |
+ GstStructure *lv2_meta_all = NULL; |
65 |
+ |
66 |
+ static void |
67 |
+@@ -98,9 +130,11 @@ |
68 |
+ for (i = 0; i < lilv_plugin_get_num_ports (lv2plugin); i++) { |
69 |
+ const LilvPort *port = lilv_plugin_get_port_by_index (lv2plugin, i); |
70 |
+ |
71 |
+- if (lilv_port_is_a (lv2plugin, port, audio_class)) { |
72 |
+- const gboolean is_input = lilv_port_is_a (lv2plugin, port, input_class); |
73 |
+- LilvNodes *lv2group = lilv_port_get (lv2plugin, port, group_pred); |
74 |
++ if (lilv_port_is_a (lv2plugin, port, gst_lv2_audio_node)) { |
75 |
++ const gboolean is_input = |
76 |
++ lilv_port_is_a (lv2plugin, port, gst_lv2_input_node); |
77 |
++ LilvNodes *lv2group = |
78 |
++ lilv_port_get (lv2plugin, port, gst_lv2_group_pred_node); |
79 |
+ |
80 |
+ if (lv2group) { |
81 |
+ const gchar *uri = lilv_node_as_uri (lv2group); |
82 |
+@@ -116,8 +150,8 @@ |
83 |
+ (*audio_in)++; |
84 |
+ else |
85 |
+ (*audio_out)++; |
86 |
+- } else if (lilv_port_is_a (lv2plugin, port, control_class) || |
87 |
+- lilv_port_is_a (lv2plugin, port, cv_class)) { |
88 |
++ } else if (lilv_port_is_a (lv2plugin, port, gst_lv2_control_node) || |
89 |
++ lilv_port_is_a (lv2plugin, port, gst_lv2_cv_node)) { |
90 |
+ (*control)++; |
91 |
+ } |
92 |
+ } |
93 |
+@@ -130,7 +164,7 @@ |
94 |
+ { |
95 |
+ guint audio_in, audio_out, control; |
96 |
+ LilvIter *i; |
97 |
+- const LilvPlugins *plugins = lilv_world_get_all_plugins (world); |
98 |
++ const LilvPlugins *plugins = lilv_world_get_all_plugins (gst_lv2_world_node); |
99 |
+ |
100 |
+ for (i = lilv_plugins_begin (plugins); !lilv_plugins_is_end (plugins, i); |
101 |
+ i = lilv_plugins_next (plugins, i)) { |
102 |
+@@ -187,8 +221,9 @@ |
103 |
+ } |
104 |
+ |
105 |
+ /* check supported extensions */ |
106 |
+- can_do_presets = lilv_plugin_has_extension_data (lv2plugin, state_iface) |
107 |
+- || lilv_plugin_has_feature (lv2plugin, state_uri) |
108 |
++ can_do_presets = |
109 |
++ lilv_plugin_has_extension_data (lv2plugin, gst_lv2_state_iface_node) |
110 |
++ || lilv_plugin_has_feature (lv2plugin, gst_lv2_state_uri_node) |
111 |
+ || (control > 0); |
112 |
+ GST_INFO ("plugin %s can%s do presets", type_name, |
113 |
+ (can_do_presets ? "" : "'t")); |
114 |
+@@ -224,8 +259,8 @@ |
115 |
+ GST_DEBUG_CATEGORY_INIT (lv2_debug, "lv2", |
116 |
+ GST_DEBUG_FG_GREEN | GST_DEBUG_BG_BLACK | GST_DEBUG_BOLD, "LV2"); |
117 |
+ |
118 |
+- world = lilv_world_new (); |
119 |
+- lilv_world_load_all (world); |
120 |
++ gst_lv2_world_node = lilv_world_new (); |
121 |
++ lilv_world_load_all (gst_lv2_world_node); |
122 |
+ gst_lv2_host_init (); |
123 |
+ |
124 |
+ /* have been added after lilv-0.22.0, which is the last release */ |
125 |
+@@ -236,37 +271,57 @@ |
126 |
+ #define LILV_URI_CV_PORT "http://lv2plug.in/ns/lv2core#CVPort" |
127 |
+ #endif |
128 |
+ |
129 |
+- atom_class = lilv_new_uri (world, LILV_URI_ATOM_PORT); |
130 |
+- audio_class = lilv_new_uri (world, LILV_URI_AUDIO_PORT); |
131 |
+- control_class = lilv_new_uri (world, LILV_URI_CONTROL_PORT); |
132 |
+- cv_class = lilv_new_uri (world, LILV_URI_CV_PORT); |
133 |
+- event_class = lilv_new_uri (world, LILV_URI_EVENT_PORT); |
134 |
+- input_class = lilv_new_uri (world, LILV_URI_INPUT_PORT); |
135 |
+- output_class = lilv_new_uri (world, LILV_URI_OUTPUT_PORT); |
136 |
+- preset_class = lilv_new_uri (world, LV2_PRESETS__Preset); |
137 |
+- state_iface = lilv_new_uri (world, LV2_STATE__interface); |
138 |
+- state_uri = lilv_new_uri (world, LV2_STATE_URI); |
139 |
+- |
140 |
+- integer_prop = lilv_new_uri (world, LV2_CORE__integer); |
141 |
+- toggled_prop = lilv_new_uri (world, LV2_CORE__toggled); |
142 |
+- designation_pred = lilv_new_uri (world, LV2_CORE__designation); |
143 |
+- in_place_broken_pred = lilv_new_uri (world, LV2_CORE__inPlaceBroken); |
144 |
+- optional_pred = lilv_new_uri (world, LV2_CORE__optionalFeature); |
145 |
+- group_pred = lilv_new_uri (world, LV2_PORT_GROUPS__group); |
146 |
+- supports_event_pred = lilv_new_uri (world, LV2_EVENT__supportsEvent); |
147 |
+- label_pred = lilv_new_uri (world, LILV_NS_RDFS "label"); |
148 |
+- |
149 |
+- center_role = lilv_new_uri (world, LV2_PORT_GROUPS__center); |
150 |
+- left_role = lilv_new_uri (world, LV2_PORT_GROUPS__left); |
151 |
+- right_role = lilv_new_uri (world, LV2_PORT_GROUPS__right); |
152 |
+- rear_center_role = lilv_new_uri (world, LV2_PORT_GROUPS__rearCenter); |
153 |
+- rear_left_role = lilv_new_uri (world, LV2_PORT_GROUPS__rearLeft); |
154 |
+- rear_right_role = lilv_new_uri (world, LV2_PORT_GROUPS__rearLeft); |
155 |
+- lfe_role = lilv_new_uri (world, LV2_PORT_GROUPS__lowFrequencyEffects); |
156 |
+- center_left_role = lilv_new_uri (world, LV2_PORT_GROUPS__centerLeft); |
157 |
+- center_right_role = lilv_new_uri (world, LV2_PORT_GROUPS__centerRight); |
158 |
+- side_left_role = lilv_new_uri (world, LV2_PORT_GROUPS__sideLeft); |
159 |
+- side_right_role = lilv_new_uri (world, LV2_PORT_GROUPS__sideRight); |
160 |
++ gst_lv2_audio_node = lilv_new_uri (gst_lv2_world_node, LILV_URI_AUDIO_PORT); |
161 |
++ gst_lv2_control_node = |
162 |
++ lilv_new_uri (gst_lv2_world_node, LILV_URI_CONTROL_PORT); |
163 |
++ gst_lv2_cv_node = lilv_new_uri (gst_lv2_world_node, LILV_URI_CV_PORT); |
164 |
++ gst_lv2_event_node = lilv_new_uri (gst_lv2_world_node, LILV_URI_EVENT_PORT); |
165 |
++ gst_lv2_input_node = lilv_new_uri (gst_lv2_world_node, LILV_URI_INPUT_PORT); |
166 |
++ gst_lv2_output_node = lilv_new_uri (gst_lv2_world_node, LILV_URI_OUTPUT_PORT); |
167 |
++ gst_lv2_preset_node = lilv_new_uri (gst_lv2_world_node, LV2_PRESETS__Preset); |
168 |
++ gst_lv2_state_iface_node = |
169 |
++ lilv_new_uri (gst_lv2_world_node, LV2_STATE__interface); |
170 |
++ gst_lv2_state_uri_node = lilv_new_uri (gst_lv2_world_node, LV2_STATE_URI); |
171 |
++ |
172 |
++ gst_lv2_integer_prop_node = |
173 |
++ lilv_new_uri (gst_lv2_world_node, LV2_CORE__integer); |
174 |
++ gst_lv2_toggled_prop_node = |
175 |
++ lilv_new_uri (gst_lv2_world_node, LV2_CORE__toggled); |
176 |
++ gst_lv2_designation_pred_node = |
177 |
++ lilv_new_uri (gst_lv2_world_node, LV2_CORE__designation); |
178 |
++ gst_lv2_in_place_broken_pred_node = |
179 |
++ lilv_new_uri (gst_lv2_world_node, LV2_CORE__inPlaceBroken); |
180 |
++ gst_lv2_optional_pred_node = |
181 |
++ lilv_new_uri (gst_lv2_world_node, LV2_CORE__optionalFeature); |
182 |
++ gst_lv2_group_pred_node = |
183 |
++ lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__group); |
184 |
++ gst_lv2_supports_event_pred_node = |
185 |
++ lilv_new_uri (gst_lv2_world_node, LV2_EVENT__supportsEvent); |
186 |
++ gst_lv2_label_pred_node = |
187 |
++ lilv_new_uri (gst_lv2_world_node, LILV_NS_RDFS "label"); |
188 |
++ |
189 |
++ gst_lv2_center_role_node = |
190 |
++ lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__center); |
191 |
++ gst_lv2_left_role_node = |
192 |
++ lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__left); |
193 |
++ gst_lv2_right_role_node = |
194 |
++ lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__right); |
195 |
++ gst_lv2_rear_center_role_node = |
196 |
++ lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__rearCenter); |
197 |
++ gst_lv2_rear_left_role_node = |
198 |
++ lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__rearLeft); |
199 |
++ gst_lv2_rear_right_role_node = |
200 |
++ lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__rearRight); |
201 |
++ gst_lv2_lfe_role_node = |
202 |
++ lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__lowFrequencyEffects); |
203 |
++ gst_lv2_center_left_role_node = |
204 |
++ lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__centerLeft); |
205 |
++ gst_lv2_center_right_role_node = |
206 |
++ lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__centerRight); |
207 |
++ gst_lv2_side_left_role_node = |
208 |
++ lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__sideLeft); |
209 |
++ gst_lv2_side_right_role_node = |
210 |
++ lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__sideRight); |
211 |
+ |
212 |
+ gst_plugin_add_dependency_simple (plugin, |
213 |
+ "LV2_PATH:" GST_LV2_ENVVARS, GST_LV2_DEFAULT_PATH, NULL, |
214 |
+@@ -323,39 +378,38 @@ |
215 |
+ #endif |
216 |
+ static void plugin_cleanup (GstPlugin * plugin) |
217 |
+ { |
218 |
+- lilv_node_free (atom_class); |
219 |
+- lilv_node_free (audio_class); |
220 |
+- lilv_node_free (control_class); |
221 |
+- lilv_node_free (cv_class); |
222 |
+- lilv_node_free (event_class); |
223 |
+- lilv_node_free (input_class); |
224 |
+- lilv_node_free (output_class); |
225 |
+- lilv_node_free (preset_class); |
226 |
+- lilv_node_free (state_iface); |
227 |
+- lilv_node_free (state_uri); |
228 |
+- |
229 |
+- lilv_node_free (integer_prop); |
230 |
+- lilv_node_free (toggled_prop); |
231 |
+- lilv_node_free (designation_pred); |
232 |
+- lilv_node_free (in_place_broken_pred); |
233 |
+- lilv_node_free (optional_pred); |
234 |
+- lilv_node_free (group_pred); |
235 |
+- lilv_node_free (supports_event_pred); |
236 |
+- lilv_node_free (label_pred); |
237 |
+- |
238 |
+- lilv_node_free (center_role); |
239 |
+- lilv_node_free (left_role); |
240 |
+- lilv_node_free (right_role); |
241 |
+- lilv_node_free (rear_center_role); |
242 |
+- lilv_node_free (rear_left_role); |
243 |
+- lilv_node_free (rear_right_role); |
244 |
+- lilv_node_free (lfe_role); |
245 |
+- lilv_node_free (center_left_role); |
246 |
+- lilv_node_free (center_right_role); |
247 |
+- lilv_node_free (side_left_role); |
248 |
+- lilv_node_free (side_right_role); |
249 |
++ lilv_node_free (gst_lv2_audio_node); |
250 |
++ lilv_node_free (gst_lv2_control_node); |
251 |
++ lilv_node_free (gst_lv2_cv_node); |
252 |
++ lilv_node_free (gst_lv2_event_node); |
253 |
++ lilv_node_free (gst_lv2_input_node); |
254 |
++ lilv_node_free (gst_lv2_output_node); |
255 |
++ lilv_node_free (gst_lv2_preset_node); |
256 |
++ lilv_node_free (gst_lv2_state_iface_node); |
257 |
++ lilv_node_free (gst_lv2_state_uri_node); |
258 |
++ |
259 |
++ lilv_node_free (gst_lv2_integer_prop_node); |
260 |
++ lilv_node_free (gst_lv2_toggled_prop_node); |
261 |
++ lilv_node_free (gst_lv2_designation_pred_node); |
262 |
++ lilv_node_free (gst_lv2_in_place_broken_pred_node); |
263 |
++ lilv_node_free (gst_lv2_optional_pred_node); |
264 |
++ lilv_node_free (gst_lv2_group_pred_node); |
265 |
++ lilv_node_free (gst_lv2_supports_event_pred_node); |
266 |
++ lilv_node_free (gst_lv2_label_pred_node); |
267 |
++ |
268 |
++ lilv_node_free (gst_lv2_center_role_node); |
269 |
++ lilv_node_free (gst_lv2_left_role_node); |
270 |
++ lilv_node_free (gst_lv2_right_role_node); |
271 |
++ lilv_node_free (gst_lv2_rear_center_role_node); |
272 |
++ lilv_node_free (gst_lv2_rear_left_role_node); |
273 |
++ lilv_node_free (gst_lv2_rear_right_role_node); |
274 |
++ lilv_node_free (gst_lv2_lfe_role_node); |
275 |
++ lilv_node_free (gst_lv2_center_left_role_node); |
276 |
++ lilv_node_free (gst_lv2_center_right_role_node); |
277 |
++ lilv_node_free (gst_lv2_side_left_role_node); |
278 |
++ lilv_node_free (gst_lv2_side_right_role_node); |
279 |
+ |
280 |
+- lilv_world_free (world); |
281 |
++ lilv_world_free (gst_lv2_world_node); |
282 |
+ } |
283 |
+ |
284 |
+ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, |
285 |
+--- a/ext/lv2/gstlv2filter.c |
286 |
++++ b/ext/lv2/gstlv2filter.c |
287 |
+@@ -183,37 +183,37 @@ |
288 |
+ gst_lv2_filter_role_to_position (LilvNode * role) |
289 |
+ { |
290 |
+ /* Front. Mono and left/right are mututally exclusive */ |
291 |
+- if (lilv_node_equals (role, center_role)) { |
292 |
++ if (lilv_node_equals (role, gst_lv2_center_role_node)) { |
293 |
+ |
294 |
+ return GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER; |
295 |
+- } else if (lilv_node_equals (role, left_role)) { |
296 |
++ } else if (lilv_node_equals (role, gst_lv2_left_role_node)) { |
297 |
+ return GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT; |
298 |
+- } else if (lilv_node_equals (role, right_role)) { |
299 |
++ } else if (lilv_node_equals (role, gst_lv2_right_role_node)) { |
300 |
+ return GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT; |
301 |
+ |
302 |
+ /* Rear. Left/right and center are mututally exclusive */ |
303 |
+- } else if (lilv_node_equals (role, rear_center_role)) { |
304 |
++ } else if (lilv_node_equals (role, gst_lv2_rear_center_role_node)) { |
305 |
+ return GST_AUDIO_CHANNEL_POSITION_REAR_CENTER; |
306 |
+- } else if (lilv_node_equals (role, rear_left_role)) { |
307 |
++ } else if (lilv_node_equals (role, gst_lv2_rear_left_role_node)) { |
308 |
+ return GST_AUDIO_CHANNEL_POSITION_REAR_LEFT; |
309 |
+- } else if (lilv_node_equals (role, rear_right_role)) { |
310 |
++ } else if (lilv_node_equals (role, gst_lv2_rear_right_role_node)) { |
311 |
+ return GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT; |
312 |
+ |
313 |
+ /* Subwoofer/low-frequency-effects */ |
314 |
+- } else if (lilv_node_equals (role, lfe_role)) { |
315 |
++ } else if (lilv_node_equals (role, gst_lv2_lfe_role_node)) { |
316 |
+ return GST_AUDIO_CHANNEL_POSITION_LFE1; |
317 |
+ |
318 |
+ /* Center front speakers. Center and left/right_of_center |
319 |
+ * are mutually exclusive */ |
320 |
+- } else if (lilv_node_equals (role, center_left_role)) { |
321 |
++ } else if (lilv_node_equals (role, gst_lv2_center_left_role_node)) { |
322 |
+ return GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER; |
323 |
+- } else if (lilv_node_equals (role, center_right_role)) { |
324 |
++ } else if (lilv_node_equals (role, gst_lv2_center_right_role_node)) { |
325 |
+ return GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER; |
326 |
+ |
327 |
+ /* sides */ |
328 |
+- } else if (lilv_node_equals (role, side_left_role)) { |
329 |
++ } else if (lilv_node_equals (role, gst_lv2_side_left_role_node)) { |
330 |
+ return GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT; |
331 |
+- } else if (lilv_node_equals (role, side_right_role)) { |
332 |
++ } else if (lilv_node_equals (role, gst_lv2_side_right_role_node)) { |
333 |
+ return GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT; |
334 |
+ } |
335 |
+ |
336 |
+@@ -531,7 +531,8 @@ |
337 |
+ { |
338 |
+ gst_lv2_init (&self->lv2, &klass->lv2); |
339 |
+ |
340 |
+- if (!lilv_plugin_has_feature (klass->lv2.plugin, in_place_broken_pred)) |
341 |
++ if (!lilv_plugin_has_feature (klass->lv2.plugin, |
342 |
++ gst_lv2_in_place_broken_pred_node)) |
343 |
+ gst_base_transform_set_in_place (GST_BASE_TRANSFORM (self), TRUE); |
344 |
+ } |
345 |
+ |
346 |
+--- a/ext/lv2/gstlv2.h |
347 |
++++ b/ext/lv2/gstlv2.h |
348 |
+@@ -28,40 +28,39 @@ |
349 |
+ |
350 |
+ #include "gstlv2utils.h" |
351 |
+ |
352 |
+-LilvWorld *world; |
353 |
+-LilvNode *atom_class; |
354 |
+-LilvNode *audio_class; |
355 |
+-LilvNode *control_class; |
356 |
+-LilvNode *cv_class; |
357 |
+-LilvNode *event_class; |
358 |
+-LilvNode *input_class; |
359 |
+-LilvNode *output_class; |
360 |
+-LilvNode *preset_class; |
361 |
+-LilvNode *state_iface; |
362 |
+-LilvNode *state_uri; |
363 |
+- |
364 |
+-LilvNode *integer_prop; |
365 |
+-LilvNode *toggled_prop; |
366 |
+-LilvNode *designation_pred; |
367 |
+-LilvNode *in_place_broken_pred; |
368 |
+-LilvNode *optional_pred; |
369 |
+-LilvNode *group_pred; |
370 |
+-LilvNode *supports_event_pred; |
371 |
+-LilvNode *label_pred; |
372 |
+- |
373 |
+-LilvNode *center_role; |
374 |
+-LilvNode *left_role; |
375 |
+-LilvNode *right_role; |
376 |
+-LilvNode *rear_center_role; |
377 |
+-LilvNode *rear_left_role; |
378 |
+-LilvNode *rear_right_role; |
379 |
+-LilvNode *lfe_role; |
380 |
+-LilvNode *center_left_role; |
381 |
+-LilvNode *center_right_role; |
382 |
+-LilvNode *side_left_role; |
383 |
+-LilvNode *side_right_role; |
384 |
++G_GNUC_INTERNAL extern LilvWorld *gst_lv2_world_node; |
385 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_audio_node; |
386 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_control_node; |
387 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_cv_node; |
388 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_event_node; |
389 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_input_node; |
390 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_output_node; |
391 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_preset_node; |
392 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_state_iface_node; |
393 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_state_uri_node; |
394 |
++ |
395 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_integer_prop_node; |
396 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_toggled_prop_node; |
397 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_designation_pred_node; |
398 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_in_place_broken_pred_node; |
399 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_optional_pred_node; |
400 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_group_pred_node; |
401 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_supports_event_pred_node; |
402 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_label_pred_node; |
403 |
++ |
404 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_center_role_node; |
405 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_left_role_node; |
406 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_right_role_node; |
407 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_rear_center_role_node; |
408 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_rear_left_role_node; |
409 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_rear_right_role_node; |
410 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_lfe_role_node; |
411 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_center_left_role_node; |
412 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_center_right_role_node; |
413 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_side_left_role_node; |
414 |
++G_GNUC_INTERNAL extern LilvNode *gst_lv2_side_right_role_node; |
415 |
+ |
416 |
+-GstStructure *lv2_meta_all; |
417 |
++G_GNUC_INTERNAL extern GstStructure *lv2_meta_all; |
418 |
+ |
419 |
+ void gst_lv2_filter_register_element (GstPlugin *plugin, |
420 |
+ GstStructure * lv2_meta); |
421 |
+--- a/ext/lv2/gstlv2utils.c |
422 |
++++ b/ext/lv2/gstlv2utils.c |
423 |
+@@ -173,7 +173,9 @@ |
424 |
+ if (!lv2->presets) { |
425 |
+ LilvNodes *presets; |
426 |
+ |
427 |
+- if ((presets = lilv_plugin_get_related (lv2->klass->plugin, preset_class))) { |
428 |
++ if ((presets = |
429 |
++ lilv_plugin_get_related (lv2->klass->plugin, |
430 |
++ gst_lv2_preset_node))) { |
431 |
+ LilvIter *j; |
432 |
+ |
433 |
+ lv2->presets = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, |
434 |
+@@ -184,8 +186,10 @@ |
435 |
+ const LilvNode *preset = lilv_nodes_get (presets, j); |
436 |
+ LilvNodes *titles; |
437 |
+ |
438 |
+- lilv_world_load_resource (world, preset); |
439 |
+- titles = lilv_world_find_nodes (world, preset, label_pred, NULL); |
440 |
++ lilv_world_load_resource (gst_lv2_world_node, preset); |
441 |
++ titles = |
442 |
++ lilv_world_find_nodes (gst_lv2_world_node, preset, |
443 |
++ gst_lv2_label_pred_node, NULL); |
444 |
+ if (titles) { |
445 |
+ const LilvNode *title = lilv_nodes_get_first (titles); |
446 |
+ g_hash_table_insert (lv2->presets, |
447 |
+@@ -249,7 +253,8 @@ |
448 |
+ gst_lv2_load_preset (GstLV2 * lv2, GstObject * obj, const gchar * name) |
449 |
+ { |
450 |
+ LilvNode *preset = g_hash_table_lookup (lv2->presets, name); |
451 |
+- LilvState *state = lilv_state_new_from_world (world, &lv2_map, preset); |
452 |
++ LilvState *state = |
453 |
++ lilv_state_new_from_world (gst_lv2_world_node, &lv2_map, preset); |
454 |
+ gpointer user_data[] = { lv2->klass, obj }; |
455 |
+ |
456 |
+ GST_INFO_OBJECT (obj, "loading preset <%s>", lilv_node_as_string (preset)); |
457 |
+@@ -291,7 +296,7 @@ |
458 |
+ gpointer user_data[] = { lv2->klass, obj }; |
459 |
+ LilvState *state; |
460 |
+ LilvNode *bundle_dir; |
461 |
+- const LilvNode *state_uri; |
462 |
++ const LilvNode *gst_lv2_state_uri_node; |
463 |
+ LilvInstance *instance = lv2->instance; |
464 |
+ gboolean res; |
465 |
+ #ifndef HAVE_LILV_0_22 |
466 |
+@@ -319,27 +324,27 @@ |
467 |
+ |
468 |
+ lilv_state_set_label (state, name); |
469 |
+ |
470 |
+- res = lilv_state_save (world, &lv2_map, &lv2_unmap, state, /*uri */ NULL, dir, |
471 |
+- filename) != 0; |
472 |
++ res = lilv_state_save (gst_lv2_world_node, &lv2_map, &lv2_unmap, state, /*uri */ |
473 |
++ NULL, dir, filename) != 0; |
474 |
+ |
475 |
+- /* reload bundle into the world */ |
476 |
+- bundle_dir = lilv_new_file_uri (world, NULL, dir); |
477 |
+- lilv_world_unload_bundle (world, bundle_dir); |
478 |
+- lilv_world_load_bundle (world, bundle_dir); |
479 |
++ /* reload bundle into the gst_lv2_world_node */ |
480 |
++ bundle_dir = lilv_new_file_uri (gst_lv2_world_node, NULL, dir); |
481 |
++ lilv_world_unload_bundle (gst_lv2_world_node, bundle_dir); |
482 |
++ lilv_world_load_bundle (gst_lv2_world_node, bundle_dir); |
483 |
+ lilv_node_free (bundle_dir); |
484 |
+ |
485 |
+ #ifdef HAVE_LILV_0_22 |
486 |
+- state_uri = lilv_state_get_uri (state); |
487 |
++ gst_lv2_state_uri_node = lilv_state_get_uri (state); |
488 |
+ #else |
489 |
+ filepath = g_build_filename (dir, filename, NULL); |
490 |
+- state_uri = lilv_new_uri (world, filepath); |
491 |
++ gst_lv2_state_uri_node = lilv_new_uri (gst_lv2_world_node, filepath); |
492 |
+ g_free (filepath); |
493 |
+ #endif |
494 |
+- lilv_world_load_resource (world, state_uri); |
495 |
++ lilv_world_load_resource (gst_lv2_world_node, gst_lv2_state_uri_node); |
496 |
+ g_hash_table_insert (lv2->presets, g_strdup (name), |
497 |
+- lilv_node_duplicate (state_uri)); |
498 |
++ lilv_node_duplicate (gst_lv2_state_uri_node)); |
499 |
+ #ifndef HAVE_LILV_0_22 |
500 |
+- lilv_node_free ((LilvNode *) state_uri); |
501 |
++ lilv_node_free ((LilvNode *) gst_lv2_state_uri_node); |
502 |
+ #endif |
503 |
+ |
504 |
+ lilv_state_free (state); |
505 |
+@@ -370,10 +375,11 @@ |
506 |
+ { |
507 |
+ #ifdef HAVE_LILV_0_22 |
508 |
+ LilvNode *preset = g_hash_table_lookup (lv2->presets, name); |
509 |
+- LilvState *state = lilv_state_new_from_world (world, &lv2_map, preset); |
510 |
++ LilvState *state = |
511 |
++ lilv_state_new_from_world (gst_lv2_world_node, &lv2_map, preset); |
512 |
+ |
513 |
+- lilv_world_unload_resource (world, lilv_state_get_uri (state)); |
514 |
+- lilv_state_delete (world, state); |
515 |
++ lilv_world_unload_resource (gst_lv2_world_node, lilv_state_get_uri (state)); |
516 |
++ lilv_state_delete (gst_lv2_world_node, state); |
517 |
+ lilv_state_free (state); |
518 |
+ #endif |
519 |
+ g_hash_table_remove (lv2->presets, name); |
520 |
+@@ -620,13 +626,13 @@ |
521 |
+ lilv_node_as_string (lilv_plugin_get_uri (lv2plugin)), name, nick); |
522 |
+ |
523 |
+ perms = G_PARAM_READABLE; |
524 |
+- if (lilv_port_is_a (lv2plugin, port, input_class)) |
525 |
++ if (lilv_port_is_a (lv2plugin, port, gst_lv2_input_node)) |
526 |
+ perms |= G_PARAM_WRITABLE | G_PARAM_CONSTRUCT; |
527 |
+- if (lilv_port_is_a (lv2plugin, port, control_class) || |
528 |
+- lilv_port_is_a (lv2plugin, port, cv_class)) |
529 |
++ if (lilv_port_is_a (lv2plugin, port, gst_lv2_control_node) || |
530 |
++ lilv_port_is_a (lv2plugin, port, gst_lv2_cv_node)) |
531 |
+ perms |= GST_PARAM_CONTROLLABLE; |
532 |
+ |
533 |
+- if (lilv_port_has_property (lv2plugin, port, toggled_prop)) { |
534 |
++ if (lilv_port_has_property (lv2plugin, port, gst_lv2_toggled_prop_node)) { |
535 |
+ ret = g_param_spec_boolean (name, nick, nick, FALSE, perms); |
536 |
+ goto done; |
537 |
+ } |
538 |
+@@ -722,7 +728,8 @@ |
539 |
+ |
540 |
+ if (enum_type != G_TYPE_INVALID) { |
541 |
+ ret = g_param_spec_enum (name, nick, nick, enum_type, def, perms); |
542 |
+- } else if (lilv_port_has_property (lv2plugin, port, integer_prop)) |
543 |
++ } else if (lilv_port_has_property (lv2plugin, port, |
544 |
++ gst_lv2_integer_prop_node)) |
545 |
+ ret = g_param_spec_int (name, nick, nick, lower, upper, def, perms); |
546 |
+ else |
547 |
+ ret = g_param_spec_float (name, nick, nick, lower, upper, def, perms); |
548 |
+@@ -814,14 +821,14 @@ |
549 |
+ GstStructure *lv2_meta = g_value_get_boxed (value); |
550 |
+ const LilvPlugin *lv2plugin; |
551 |
+ guint j, in_pad_index = 0, out_pad_index = 0; |
552 |
+- const LilvPlugins *plugins = lilv_world_get_all_plugins (world); |
553 |
++ const LilvPlugins *plugins = lilv_world_get_all_plugins (gst_lv2_world_node); |
554 |
+ LilvNode *plugin_uri; |
555 |
+ const gchar *element_uri; |
556 |
+ |
557 |
+ GST_DEBUG ("LV2 initializing class"); |
558 |
+ |
559 |
+ element_uri = gst_structure_get_string (lv2_meta, "element-uri"); |
560 |
+- plugin_uri = lilv_new_uri (world, element_uri); |
561 |
++ plugin_uri = lilv_new_uri (gst_lv2_world_node, element_uri); |
562 |
+ g_assert (plugin_uri); |
563 |
+ lv2plugin = lilv_plugins_get_by_uri (plugins, plugin_uri); |
564 |
+ g_assert (lv2plugin); |
565 |
+@@ -838,11 +845,13 @@ |
566 |
+ /* find ports and groups */ |
567 |
+ for (j = 0; j < lilv_plugin_get_num_ports (lv2plugin); j++) { |
568 |
+ const LilvPort *port = lilv_plugin_get_port_by_index (lv2plugin, j); |
569 |
+- const gboolean is_input = lilv_port_is_a (lv2plugin, port, input_class); |
570 |
++ const gboolean is_input = |
571 |
++ lilv_port_is_a (lv2plugin, port, gst_lv2_input_node); |
572 |
+ const gboolean is_optional = lilv_port_has_property (lv2plugin, port, |
573 |
+- optional_pred); |
574 |
++ gst_lv2_optional_pred_node); |
575 |
+ GstLV2Port desc = { j, GST_LV2_PORT_AUDIO, -1, }; |
576 |
+- LilvNodes *lv2group = lilv_port_get (lv2plugin, port, group_pred); |
577 |
++ LilvNodes *lv2group = |
578 |
++ lilv_port_get (lv2plugin, port, gst_lv2_group_pred_node); |
579 |
+ /* FIXME Handle channels positionning |
580 |
+ * GstAudioChannelPosition position = GST_AUDIO_CHANNEL_POSITION_INVALID; */ |
581 |
+ |
582 |
+@@ -860,7 +869,7 @@ |
583 |
+ |
584 |
+ /* FIXME Handle channels positionning |
585 |
+ position = GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT; |
586 |
+- sub_values = lilv_port_get_value (lv2plugin, port, designation_pred); |
587 |
++ sub_values = lilv_port_get_value (lv2plugin, port, gst_lv2_designation_pred_node); |
588 |
+ if (lilv_nodes_size (sub_values) > 0) { |
589 |
+ LilvNode *role = lilv_nodes_get_at (sub_values, 0); |
590 |
+ position = gst_lv2_filter_role_to_position (role); |
591 |
+@@ -875,7 +884,7 @@ |
592 |
+ } else { |
593 |
+ /* port is not part of a group, or it is part of a group but that group |
594 |
+ * is illegal so we just ignore it */ |
595 |
+- if (lilv_port_is_a (lv2plugin, port, audio_class)) { |
596 |
++ if (lilv_port_is_a (lv2plugin, port, gst_lv2_audio_node)) { |
597 |
+ if (is_input) { |
598 |
+ desc.pad = in_pad_index++; |
599 |
+ g_array_append_val (lv2_class->in_group.ports, desc); |
600 |
+@@ -883,7 +892,7 @@ |
601 |
+ desc.pad = out_pad_index++; |
602 |
+ g_array_append_val (lv2_class->out_group.ports, desc); |
603 |
+ } |
604 |
+- } else if (lilv_port_is_a (lv2plugin, port, control_class)) { |
605 |
++ } else if (lilv_port_is_a (lv2plugin, port, gst_lv2_control_node)) { |
606 |
+ desc.type = GST_LV2_PORT_CONTROL; |
607 |
+ if (is_input) { |
608 |
+ lv2_class->num_control_in++; |
609 |
+@@ -892,7 +901,7 @@ |
610 |
+ lv2_class->num_control_out++; |
611 |
+ g_array_append_val (lv2_class->control_out_ports, desc); |
612 |
+ } |
613 |
+- } else if (lilv_port_is_a (lv2plugin, port, cv_class)) { |
614 |
++ } else if (lilv_port_is_a (lv2plugin, port, gst_lv2_cv_node)) { |
615 |
+ desc.type = GST_LV2_PORT_CV; |
616 |
+ if (is_input) { |
617 |
+ lv2_class->num_cv_in++; |
618 |
+@@ -901,9 +910,9 @@ |
619 |
+ lv2_class->num_cv_out++; |
620 |
+ g_array_append_val (lv2_class->control_out_ports, desc); |
621 |
+ } |
622 |
+- } else if (lilv_port_is_a (lv2plugin, port, event_class)) { |
623 |
++ } else if (lilv_port_is_a (lv2plugin, port, gst_lv2_event_node)) { |
624 |
+ LilvNodes *supported = lilv_port_get_value (lv2plugin, port, |
625 |
+- supports_event_pred); |
626 |
++ gst_lv2_supports_event_pred_node); |
627 |
+ |
628 |
+ GST_INFO ("%s: unhandled event port %d: %s, optional=%d, input=%d", |
629 |
+ element_uri, j, |
630 |
|
631 |
diff --git a/media-plugins/gst-plugins-lv2/gst-plugins-lv2-1.16.2.ebuild b/media-plugins/gst-plugins-lv2/gst-plugins-lv2-1.16.2-r1.ebuild |
632 |
similarity index 87% |
633 |
rename from media-plugins/gst-plugins-lv2/gst-plugins-lv2-1.16.2.ebuild |
634 |
rename to media-plugins/gst-plugins-lv2/gst-plugins-lv2-1.16.2-r1.ebuild |
635 |
index 433610f3ec3..1e32320eb48 100644 |
636 |
--- a/media-plugins/gst-plugins-lv2/gst-plugins-lv2-1.16.2.ebuild |
637 |
+++ b/media-plugins/gst-plugins-lv2/gst-plugins-lv2-1.16.2-r1.ebuild |
638 |
@@ -15,3 +15,7 @@ RDEPEND=" |
639 |
>=media-libs/lilv-0.24.2-r2[${MULTILIB_USEDEP}] |
640 |
" |
641 |
DEPEND="${RDEPEND}" |
642 |
+ |
643 |
+PATCHES=( |
644 |
+ "${FILESDIR}/patch-1.16.2-gcc10.patch" |
645 |
+) |