1 |
commit: c0e8cee00a6112a277fe44bdfbe897e904a3c490 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 29 17:28:13 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 29 21:33:46 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0e8cee0 |
7 |
|
8 |
media-libs/mlt: python3, use qmake-utils, various fixes |
9 |
|
10 |
Add missing media-libs/libebur128 slot op |
11 |
|
12 |
Package-Manager: Portage-2.3.67, Repoman-2.3.16 |
13 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
14 |
|
15 |
....16.0-bad-aspect-ratio-resulting-in-black.patch | 56 ++++++ |
16 |
..._multi-does-not-correctly-handle-in-point.patch | 22 ++ |
17 |
media-libs/mlt/files/mlt-6.16.0-crop-filter.patch | 31 +++ |
18 |
.../mlt-6.16.0-mlt_consumer-race-condition.patch | 30 +++ |
19 |
.../mlt-6.16.0-rotoscoping-interpolation.patch | 22 ++ |
20 |
media-libs/mlt/mlt-6.16.0-r1.ebuild | 223 +++++++++++++++++++++ |
21 |
6 files changed, 384 insertions(+) |
22 |
|
23 |
diff --git a/media-libs/mlt/files/mlt-6.16.0-bad-aspect-ratio-resulting-in-black.patch b/media-libs/mlt/files/mlt-6.16.0-bad-aspect-ratio-resulting-in-black.patch |
24 |
new file mode 100644 |
25 |
index 00000000000..c2bc1946a81 |
26 |
--- /dev/null |
27 |
+++ b/media-libs/mlt/files/mlt-6.16.0-bad-aspect-ratio-resulting-in-black.patch |
28 |
@@ -0,0 +1,56 @@ |
29 |
+From f0628d1fe7f61a267f1adad8824b9a2083e3376a Mon Sep 17 00:00:00 2001 |
30 |
+From: Dan Dennedy <dan@×××××××.org> |
31 |
+Date: Fri, 31 May 2019 19:03:32 -0700 |
32 |
+Subject: [PATCH] Fix #453 bad aspect ratio computed resulting in black. |
33 |
+ |
34 |
+This occured when the s, width, or height properties are supplied with |
35 |
+no "aspect." |
36 |
+--- |
37 |
+ src/modules/avformat/consumer_avformat.c | 34 +++++++++++++----------- |
38 |
+ 1 file changed, 18 insertions(+), 16 deletions(-) |
39 |
+ |
40 |
+diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c |
41 |
+index 738f5a972..dd2719997 100644 |
42 |
+--- a/src/modules/avformat/consumer_avformat.c |
43 |
++++ b/src/modules/avformat/consumer_avformat.c |
44 |
+@@ -271,22 +271,24 @@ mlt_consumer consumer_avformat_init( mlt_profile profile, char *arg ) |
45 |
+ static void recompute_aspect_ratio( mlt_properties properties ) |
46 |
+ { |
47 |
+ double ar = mlt_properties_get_double( properties, "aspect" ); |
48 |
+- AVRational rational = av_d2q( ar, 255 ); |
49 |
+- int width = mlt_properties_get_int( properties, "width" ); |
50 |
+- int height = mlt_properties_get_int( properties, "height" ); |
51 |
+- |
52 |
+- // Update the profile and properties as well since this is an alias |
53 |
+- // for mlt properties that correspond to profile settings |
54 |
+- mlt_properties_set_int( properties, "display_aspect_num", rational.num ); |
55 |
+- mlt_properties_set_int( properties, "display_aspect_den", rational.den ); |
56 |
+- |
57 |
+- // Now compute the sample aspect ratio |
58 |
+- rational = av_d2q( ar * height / FFMAX(width, 1), 255 ); |
59 |
+- |
60 |
+- // Update the profile and properties as well since this is an alias |
61 |
+- // for mlt properties that correspond to profile settings |
62 |
+- mlt_properties_set_int( properties, "sample_aspect_num", rational.num ); |
63 |
+- mlt_properties_set_int( properties, "sample_aspect_den", rational.den ); |
64 |
++ if (ar > 0.0) { |
65 |
++ AVRational rational = av_d2q( ar, 255 ); |
66 |
++ int width = mlt_properties_get_int( properties, "width" ); |
67 |
++ int height = mlt_properties_get_int( properties, "height" ); |
68 |
++ |
69 |
++ // Update the profile and properties as well since this is an alias |
70 |
++ // for mlt properties that correspond to profile settings |
71 |
++ mlt_properties_set_int( properties, "display_aspect_num", rational.num ); |
72 |
++ mlt_properties_set_int( properties, "display_aspect_den", rational.den ); |
73 |
++ |
74 |
++ // Now compute the sample aspect ratio |
75 |
++ rational = av_d2q( ar * height / FFMAX(width, 1), 255 ); |
76 |
++ |
77 |
++ // Update the profile and properties as well since this is an alias |
78 |
++ // for mlt properties that correspond to profile settings |
79 |
++ mlt_properties_set_int( properties, "sample_aspect_num", rational.num ); |
80 |
++ mlt_properties_set_int( properties, "sample_aspect_den", rational.den ); |
81 |
++ } |
82 |
+ } |
83 |
+ |
84 |
+ static void color_trc_from_colorspace( mlt_properties properties ) |
85 |
|
86 |
diff --git a/media-libs/mlt/files/mlt-6.16.0-consumer_multi-does-not-correctly-handle-in-point.patch b/media-libs/mlt/files/mlt-6.16.0-consumer_multi-does-not-correctly-handle-in-point.patch |
87 |
new file mode 100644 |
88 |
index 00000000000..946d06ae357 |
89 |
--- /dev/null |
90 |
+++ b/media-libs/mlt/files/mlt-6.16.0-consumer_multi-does-not-correctly-handle-in-point.patch |
91 |
@@ -0,0 +1,22 @@ |
92 |
+From 434dbcf62048cc1220c425c2adc77697b4d40ffb Mon Sep 17 00:00:00 2001 |
93 |
+From: Jean-Baptiste Mardelle <jb@××××××××.org> |
94 |
+Date: Mon, 10 Jun 2019 18:18:44 +0200 |
95 |
+Subject: [PATCH] Fix multi consumer doesn't correctly handle in point |
96 |
+ |
97 |
+--- |
98 |
+ src/modules/core/consumer_multi.c | 2 +- |
99 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
100 |
+ |
101 |
+diff --git a/src/modules/core/consumer_multi.c b/src/modules/core/consumer_multi.c |
102 |
+index 4bb16ddf5..d9b5fbc0f 100644 |
103 |
+--- a/src/modules/core/consumer_multi.c |
104 |
++++ b/src/modules/core/consumer_multi.c |
105 |
+@@ -304,7 +304,7 @@ static void foreach_consumer_start( mlt_consumer consumer ) |
106 |
+ if ( nested ) |
107 |
+ { |
108 |
+ mlt_properties nested_props = MLT_CONSUMER_PROPERTIES(nested); |
109 |
+- mlt_properties_set_position( nested_props, "_multi_position", 0 ); |
110 |
++ mlt_properties_set_position( nested_props, "_multi_position", mlt_properties_get_position( properties, "in" ) ); |
111 |
+ mlt_properties_set_data( nested_props, "_multi_audio", NULL, 0, NULL, NULL ); |
112 |
+ mlt_properties_set_int( nested_props, "_multi_samples", 0 ); |
113 |
+ mlt_consumer_start( nested ); |
114 |
|
115 |
diff --git a/media-libs/mlt/files/mlt-6.16.0-crop-filter.patch b/media-libs/mlt/files/mlt-6.16.0-crop-filter.patch |
116 |
new file mode 100644 |
117 |
index 00000000000..d42da685bdb |
118 |
--- /dev/null |
119 |
+++ b/media-libs/mlt/files/mlt-6.16.0-crop-filter.patch |
120 |
@@ -0,0 +1,31 @@ |
121 |
+From f6225b7f4cd5e9b6011ca79c3849dc9e286a7acb Mon Sep 17 00:00:00 2001 |
122 |
+From: Dan Dennedy <dan@×××××××.org> |
123 |
+Date: Mon, 13 May 2019 11:44:13 -0700 |
124 |
+Subject: [PATCH] Fix crop filter not working with color producer. |
125 |
+ |
126 |
+Fixes https://github.com/mltframework/shotcut/issues/737 |
127 |
+--- |
128 |
+ src/modules/core/producer_colour.c | 4 +++- |
129 |
+ 1 file changed, 3 insertions(+), 1 deletion(-) |
130 |
+ |
131 |
+diff --git a/src/modules/core/producer_colour.c b/src/modules/core/producer_colour.c |
132 |
+index e1cfe5284..67d36dfb2 100644 |
133 |
+--- a/src/modules/core/producer_colour.c |
134 |
++++ b/src/modules/core/producer_colour.c |
135 |
+@@ -1,6 +1,6 @@ |
136 |
+ /* |
137 |
+ * producer_colour.c |
138 |
+- * Copyright (C) 2003-2018 Meltytech, LLC |
139 |
++ * Copyright (C) 2003-2019 Meltytech, LLC |
140 |
+ * |
141 |
+ * This library is free software; you can redistribute it and/or |
142 |
+ * modify it under the terms of the GNU Lesser General Public |
143 |
+@@ -248,6 +248,8 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i |
144 |
+ mlt_properties_set_int( properties, "progressive", 1 ); |
145 |
+ mlt_profile profile = mlt_service_profile( MLT_PRODUCER_SERVICE( producer ) ); |
146 |
+ mlt_properties_set_double( properties, "aspect_ratio", mlt_profile_sar( profile ) ); |
147 |
++ mlt_properties_set_int( properties, "meta.media.width", profile->width ); |
148 |
++ mlt_properties_set_int( properties, "meta.media.height", profile->height ); |
149 |
+ |
150 |
+ // colour is an alias for resource |
151 |
+ if ( mlt_properties_get( producer_props, "colour" ) != NULL ) |
152 |
|
153 |
diff --git a/media-libs/mlt/files/mlt-6.16.0-mlt_consumer-race-condition.patch b/media-libs/mlt/files/mlt-6.16.0-mlt_consumer-race-condition.patch |
154 |
new file mode 100644 |
155 |
index 00000000000..7fd1c577541 |
156 |
--- /dev/null |
157 |
+++ b/media-libs/mlt/files/mlt-6.16.0-mlt_consumer-race-condition.patch |
158 |
@@ -0,0 +1,30 @@ |
159 |
+From 9b89b781b9d06181c8d486605ed4c2b3089d64d6 Mon Sep 17 00:00:00 2001 |
160 |
+From: alcinos <nicolas.carion@××××××××.fr> |
161 |
+Date: Wed, 1 May 2019 23:50:41 +0200 |
162 |
+Subject: [PATCH] Fix race in mlt_consumer |
163 |
+ |
164 |
+--- |
165 |
+ src/framework/mlt_consumer.c | 3 ++- |
166 |
+ 1 file changed, 2 insertions(+), 1 deletion(-) |
167 |
+ |
168 |
+diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c |
169 |
+index 491bc5e99..0e36bde3c 100644 |
170 |
+--- a/src/framework/mlt_consumer.c |
171 |
++++ b/src/framework/mlt_consumer.c |
172 |
+@@ -31,6 +31,7 @@ |
173 |
+ #include <string.h> |
174 |
+ #include <stdlib.h> |
175 |
+ #include <sys/time.h> |
176 |
++#include <stdatomic.h> |
177 |
+ |
178 |
+ /** Define this if you want an automatic deinterlace (if necessary) when the |
179 |
+ * consumer's producer is not running at normal speed. |
180 |
+@@ -65,7 +66,7 @@ typedef struct |
181 |
+ double fps; |
182 |
+ int channels; |
183 |
+ int frequency; |
184 |
+- int speed; |
185 |
++ atomic_int speed; |
186 |
+ /* additional fields added for the parallel work queue */ |
187 |
+ mlt_deque worker_threads; |
188 |
+ pthread_mutex_t done_mutex; |
189 |
|
190 |
diff --git a/media-libs/mlt/files/mlt-6.16.0-rotoscoping-interpolation.patch b/media-libs/mlt/files/mlt-6.16.0-rotoscoping-interpolation.patch |
191 |
new file mode 100644 |
192 |
index 00000000000..935a2d13f61 |
193 |
--- /dev/null |
194 |
+++ b/media-libs/mlt/files/mlt-6.16.0-rotoscoping-interpolation.patch |
195 |
@@ -0,0 +1,22 @@ |
196 |
+From ddf6983b4aaaf662944b84103dd4412aff45a428 Mon Sep 17 00:00:00 2001 |
197 |
+From: alcinos <nicolas.carion@××××××××.fr> |
198 |
+Date: Fri, 10 May 2019 23:20:22 +0200 |
199 |
+Subject: [PATCH] Fix interpolation in rotoscoping filter |
200 |
+ |
201 |
+--- |
202 |
+ src/modules/plusgpl/filter_rotoscoping.c | 2 +- |
203 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
204 |
+ |
205 |
+diff --git a/src/modules/plusgpl/filter_rotoscoping.c b/src/modules/plusgpl/filter_rotoscoping.c |
206 |
+index 0667929cd..70e3a093b 100644 |
207 |
+--- a/src/modules/plusgpl/filter_rotoscoping.c |
208 |
++++ b/src/modules/plusgpl/filter_rotoscoping.c |
209 |
+@@ -572,7 +572,7 @@ static mlt_frame filter_process( mlt_filter filter, mlt_frame frame ) |
210 |
+ int c2 = json2BCurves( keyframe, &p2 ); |
211 |
+ |
212 |
+ // range 0-1 |
213 |
+- double position = ( time - pos1 ) / (double)( pos2 - pos1 + 1 ); |
214 |
++ double position = ( time - pos1 ) / (double)( pos2 - pos1 ); |
215 |
+ |
216 |
+ count = MIN( c1, c2 ); // additional points are ignored |
217 |
+ points = mlt_pool_alloc( count * sizeof( BPointF ) ); |
218 |
|
219 |
diff --git a/media-libs/mlt/mlt-6.16.0-r1.ebuild b/media-libs/mlt/mlt-6.16.0-r1.ebuild |
220 |
new file mode 100644 |
221 |
index 00000000000..7520d72f6a7 |
222 |
--- /dev/null |
223 |
+++ b/media-libs/mlt/mlt-6.16.0-r1.ebuild |
224 |
@@ -0,0 +1,223 @@ |
225 |
+# Copyright 1999-2019 Gentoo Authors |
226 |
+# Distributed under the terms of the GNU General Public License v2 |
227 |
+ |
228 |
+EAPI=7 |
229 |
+ |
230 |
+PYTHON_COMPAT=( python3_{6,7} ) |
231 |
+# this ebuild currently only supports installing ruby bindings for a single ruby version |
232 |
+# so USE_RUBY must contain only a single value (the latest stable) as the ebuild calls |
233 |
+# /usr/bin/${USE_RUBY} directly |
234 |
+USE_RUBY="ruby24" |
235 |
+inherit python-single-r1 qmake-utils ruby-single toolchain-funcs |
236 |
+ |
237 |
+DESCRIPTION="Open source multimedia framework for television broadcasting" |
238 |
+HOMEPAGE="https://www.mltframework.org/" |
239 |
+SRC_URI="https://github.com/mltframework/${PN}/releases/download/v${PV}/${P}.tar.gz" |
240 |
+ |
241 |
+LICENSE="GPL-3" |
242 |
+SLOT="0" |
243 |
+KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux" |
244 |
+IUSE="compressed-lumas cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 debug ffmpeg |
245 |
+fftw frei0r gtk jack kdenlive kernel_linux libav libsamplerate lua melt opencv opengl python |
246 |
+qt5 rtaudio ruby sdl vdpau vidstab xine xml" |
247 |
+# java perl php tcl |
248 |
+ |
249 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
250 |
+ |
251 |
+SWIG_DEPEND=">=dev-lang/swig-2.0" |
252 |
+# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 ) |
253 |
+# perl? ( ${SWIG_DEPEND} ) |
254 |
+# php? ( ${SWIG_DEPEND} ) |
255 |
+# tcl? ( ${SWIG_DEPEND} ) |
256 |
+BDEPEND=" |
257 |
+ virtual/pkgconfig |
258 |
+ compressed-lumas? ( virtual/imagemagick-tools[png] ) |
259 |
+ lua? ( ${SWIG_DEPEND} virtual/pkgconfig ) |
260 |
+ python? ( ${SWIG_DEPEND} ) |
261 |
+ ruby? ( ${SWIG_DEPEND} )" |
262 |
+#rtaudio will use OSS on non linux OSes |
263 |
+DEPEND=" |
264 |
+ >=media-libs/libebur128-1.2.2:= |
265 |
+ ffmpeg? ( |
266 |
+ libav? ( >=media-video/libav-12:0=[vdpau?] ) |
267 |
+ !libav? ( media-video/ffmpeg:0=[vdpau?] ) |
268 |
+ ) |
269 |
+ fftw? ( sci-libs/fftw:3.0= ) |
270 |
+ frei0r? ( media-plugins/frei0r-plugins ) |
271 |
+ gtk? ( |
272 |
+ media-libs/libexif |
273 |
+ x11-libs/gtk+:2 |
274 |
+ x11-libs/pango |
275 |
+ ) |
276 |
+ jack? ( |
277 |
+ >=dev-libs/libxml2-2.5 |
278 |
+ media-libs/ladspa-sdk |
279 |
+ virtual/jack |
280 |
+ ) |
281 |
+ libsamplerate? ( >=media-libs/libsamplerate-0.1.2 ) |
282 |
+ lua? ( >=dev-lang/lua-5.1.4-r4:= ) |
283 |
+ opencv? ( >=media-libs/opencv-3.2.0:= ) |
284 |
+ opengl? ( media-video/movit ) |
285 |
+ python? ( ${PYTHON_DEPS} ) |
286 |
+ qt5? ( |
287 |
+ dev-qt/qtcore:5 |
288 |
+ dev-qt/qtgui:5 |
289 |
+ dev-qt/qtsvg:5 |
290 |
+ dev-qt/qtwidgets:5 |
291 |
+ dev-qt/qtxml:5 |
292 |
+ media-libs/libexif |
293 |
+ x11-libs/libX11 |
294 |
+ ) |
295 |
+ rtaudio? ( |
296 |
+ >=media-libs/rtaudio-4.1.2 |
297 |
+ kernel_linux? ( media-libs/alsa-lib ) |
298 |
+ ) |
299 |
+ ruby? ( ${RUBY_DEPS} ) |
300 |
+ sdl? ( |
301 |
+ media-libs/libsdl2[X,opengl,video] |
302 |
+ media-libs/sdl2-image |
303 |
+ ) |
304 |
+ vidstab? ( media-libs/vidstab ) |
305 |
+ xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 ) |
306 |
+ xml? ( >=dev-libs/libxml2-2.5 )" |
307 |
+# java? ( >=virtual/jre-1.5 ) |
308 |
+# perl? ( dev-lang/perl ) |
309 |
+# php? ( dev-lang/php ) |
310 |
+# sox? ( media-sound/sox ) |
311 |
+# tcl? ( dev-lang/tcl:0= ) |
312 |
+RDEPEND="${DEPEND}" |
313 |
+ |
314 |
+DOCS=( AUTHORS ChangeLog NEWS README docs/{framework,melt,mlt{++,-xml}}.txt ) |
315 |
+ |
316 |
+PATCHES=( |
317 |
+ "${FILESDIR}"/${PN}-6.10.0-swig-underlinking.patch |
318 |
+ "${FILESDIR}"/${P}-mlt_consumer-race-condition.patch |
319 |
+ "${FILESDIR}"/${P}-rotoscoping-interpolation.patch |
320 |
+ "${FILESDIR}"/${P}-crop-filter.patch |
321 |
+ "${FILESDIR}"/${P}-consumer_multi-does-not-correctly-handle-in-point.patch |
322 |
+ "${FILESDIR}"/${P}-bad-aspect-ratio-resulting-in-black.patch |
323 |
+) |
324 |
+ |
325 |
+pkg_setup() { |
326 |
+ use python && python-single-r1_pkg_setup |
327 |
+} |
328 |
+ |
329 |
+src_prepare() { |
330 |
+ default |
331 |
+ |
332 |
+ # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873 |
333 |
+ for x in python lua; do |
334 |
+ sed -i "/mlt.so/s: -lmlt++ :& ${CFLAGS} ${LDFLAGS} :" src/swig/$x/build || die |
335 |
+ done |
336 |
+ |
337 |
+ sed -i -e "s/env ruby/${USE_RUBY}/" src/swig/ruby/* || die |
338 |
+ |
339 |
+ # fix python3 include dir |
340 |
+ sed -i -e 's/python{}.{}/python{}.{}m/' src/swig/python/build || die |
341 |
+} |
342 |
+ |
343 |
+src_configure() { |
344 |
+ tc-export CC CXX |
345 |
+ |
346 |
+ local myconf=( |
347 |
+ --enable-gpl |
348 |
+ --enable-gpl3 |
349 |
+ --enable-motion-est |
350 |
+ --target-arch=$(tc-arch) |
351 |
+ --disable-kde |
352 |
+ --disable-sdl |
353 |
+ --disable-swfdec |
354 |
+ $(use_enable debug) |
355 |
+ $(use_enable cpu_flags_x86_sse sse) |
356 |
+ $(use_enable cpu_flags_x86_sse2 sse2) |
357 |
+ $(use_enable ffmpeg avformat) |
358 |
+ $(use_enable fftw plus) |
359 |
+ $(use_enable frei0r) |
360 |
+ $(use_enable gtk gtk2) |
361 |
+ $(use_enable jack jackrack) |
362 |
+ $(use_enable kdenlive) |
363 |
+ $(use_enable libsamplerate resample) |
364 |
+ $(use_enable melt) |
365 |
+ $(use_enable opencv) |
366 |
+ $(use_enable opengl) |
367 |
+ $(use_enable qt5 qt) |
368 |
+ $(use_enable rtaudio) |
369 |
+ $(use_enable sdl sdl2) |
370 |
+ $(use_enable vidstab vid.stab ) |
371 |
+ $(use_enable xine) |
372 |
+ $(use_enable xml) |
373 |
+ --disable-sox |
374 |
+ ) |
375 |
+ #$(use_enable sox) FIXME |
376 |
+ |
377 |
+ use compressed-lumas && myconf+=( --luma-compress ) |
378 |
+ use ffmpeg && myconf+=( --avformat-swscale ) |
379 |
+ use vdpau && myconf+=( --avformat-vdpau ) |
380 |
+ |
381 |
+ if use qt5 ; then |
382 |
+ myconf+=( |
383 |
+ --qt-includedir=$(qt5_get_headerdir) |
384 |
+ --qt-libdir=$(qt5_get_libdir) |
385 |
+ ) |
386 |
+ fi |
387 |
+ |
388 |
+ if use amd64 || use x86 ; then |
389 |
+ myconf+=( $(use_enable cpu_flags_x86_mmx mmx) ) |
390 |
+ else |
391 |
+ myconf+=( --disable-mmx ) |
392 |
+ fi |
393 |
+ |
394 |
+ if ! use melt ; then |
395 |
+ sed -i -e "s;src/melt;;" Makefile || die |
396 |
+ fi |
397 |
+ |
398 |
+ # TODO: add swig language bindings |
399 |
+ # see also https://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover |
400 |
+ |
401 |
+ local swig_lang=() |
402 |
+ # TODO: java perl php tcl |
403 |
+ for i in lua python ruby ; do |
404 |
+ use $i && swig_lang+=( $i ) |
405 |
+ done |
406 |
+ [[ -z "${swig_lang}" ]] && swig_lang=( none ) |
407 |
+ |
408 |
+ econf "${myconf[@]}" --swig-languages="${swig_lang[@]}" |
409 |
+ |
410 |
+ sed -i -e s/^OPT/#OPT/ config.mak || die |
411 |
+} |
412 |
+ |
413 |
+src_install() { |
414 |
+ default |
415 |
+ |
416 |
+ dodir /usr/share/${PN} |
417 |
+ insinto /usr/share/${PN} |
418 |
+ doins -r demo |
419 |
+ |
420 |
+ docinto swig |
421 |
+ |
422 |
+ # Install SWIG bindings |
423 |
+ if use lua; then |
424 |
+ cd "${S}"/src/swig/lua || die |
425 |
+ exeinto $(pkg-config --variable INSTALL_CMOD lua) |
426 |
+ doexe mlt.so |
427 |
+ dodoc play.lua |
428 |
+ fi |
429 |
+ |
430 |
+ if use python; then |
431 |
+ cd "${S}"/src/swig/python || die |
432 |
+ insinto $(python_get_sitedir) |
433 |
+ doins mlt.py |
434 |
+ exeinto $(python_get_sitedir) |
435 |
+ doexe _mlt.so |
436 |
+ dodoc play.py |
437 |
+ python_optimize |
438 |
+ fi |
439 |
+ |
440 |
+ if use ruby; then |
441 |
+ cd "${S}"/src/swig/ruby || die |
442 |
+ exeinto $("${EPREFIX}"/usr/bin/${USE_RUBY} -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]') |
443 |
+ doexe mlt.so |
444 |
+ dodoc play.rb thumbs.rb |
445 |
+ fi |
446 |
+ # TODO: java perl php tcl |
447 |
+} |