1 |
commit: 914958743f97e29ebdebc7a9cae1bc9fa50cae25 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 30 11:34:39 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 30 11:51:02 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91495874 |
7 |
|
8 |
media-libs/mlt: Add ruby25 support |
9 |
|
10 |
Package-Manager: Portage-2.3.67, Repoman-2.3.16 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
media-libs/mlt/mlt-6.16.0-r2.ebuild | 223 ++++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 223 insertions(+) |
15 |
|
16 |
diff --git a/media-libs/mlt/mlt-6.16.0-r2.ebuild b/media-libs/mlt/mlt-6.16.0-r2.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..1605afaedce |
19 |
--- /dev/null |
20 |
+++ b/media-libs/mlt/mlt-6.16.0-r2.ebuild |
21 |
@@ -0,0 +1,223 @@ |
22 |
+# Copyright 1999-2019 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+PYTHON_COMPAT=( python3_{6,7} ) |
28 |
+# this ebuild currently only supports installing ruby bindings for a single ruby version |
29 |
+# so USE_RUBY must contain only a single value (the latest stable) as the ebuild calls |
30 |
+# /usr/bin/${USE_RUBY} directly |
31 |
+USE_RUBY="ruby25" |
32 |
+inherit python-single-r1 qmake-utils ruby-single toolchain-funcs |
33 |
+ |
34 |
+DESCRIPTION="Open source multimedia framework for television broadcasting" |
35 |
+HOMEPAGE="https://www.mltframework.org/" |
36 |
+SRC_URI="https://github.com/mltframework/${PN}/releases/download/v${PV}/${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="GPL-3" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux" |
41 |
+IUSE="compressed-lumas cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 debug ffmpeg |
42 |
+fftw frei0r gtk jack kdenlive kernel_linux libav libsamplerate lua melt opencv opengl python |
43 |
+qt5 rtaudio ruby sdl vdpau vidstab xine xml" |
44 |
+# java perl php tcl |
45 |
+ |
46 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
47 |
+ |
48 |
+SWIG_DEPEND=">=dev-lang/swig-2.0" |
49 |
+# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 ) |
50 |
+# perl? ( ${SWIG_DEPEND} ) |
51 |
+# php? ( ${SWIG_DEPEND} ) |
52 |
+# tcl? ( ${SWIG_DEPEND} ) |
53 |
+BDEPEND=" |
54 |
+ virtual/pkgconfig |
55 |
+ compressed-lumas? ( virtual/imagemagick-tools[png] ) |
56 |
+ lua? ( ${SWIG_DEPEND} virtual/pkgconfig ) |
57 |
+ python? ( ${SWIG_DEPEND} ) |
58 |
+ ruby? ( ${SWIG_DEPEND} )" |
59 |
+#rtaudio will use OSS on non linux OSes |
60 |
+DEPEND=" |
61 |
+ >=media-libs/libebur128-1.2.2:= |
62 |
+ ffmpeg? ( |
63 |
+ libav? ( >=media-video/libav-12:0=[vdpau?] ) |
64 |
+ !libav? ( media-video/ffmpeg:0=[vdpau?,-flite] ) |
65 |
+ ) |
66 |
+ fftw? ( sci-libs/fftw:3.0= ) |
67 |
+ frei0r? ( media-plugins/frei0r-plugins ) |
68 |
+ gtk? ( |
69 |
+ media-libs/libexif |
70 |
+ x11-libs/gtk+:2 |
71 |
+ x11-libs/pango |
72 |
+ ) |
73 |
+ jack? ( |
74 |
+ >=dev-libs/libxml2-2.5 |
75 |
+ media-libs/ladspa-sdk |
76 |
+ virtual/jack |
77 |
+ ) |
78 |
+ libsamplerate? ( >=media-libs/libsamplerate-0.1.2 ) |
79 |
+ lua? ( >=dev-lang/lua-5.1.4-r4:= ) |
80 |
+ opencv? ( >=media-libs/opencv-3.2.0:= ) |
81 |
+ opengl? ( media-video/movit ) |
82 |
+ python? ( ${PYTHON_DEPS} ) |
83 |
+ qt5? ( |
84 |
+ dev-qt/qtcore:5 |
85 |
+ dev-qt/qtgui:5 |
86 |
+ dev-qt/qtsvg:5 |
87 |
+ dev-qt/qtwidgets:5 |
88 |
+ dev-qt/qtxml:5 |
89 |
+ media-libs/libexif |
90 |
+ x11-libs/libX11 |
91 |
+ ) |
92 |
+ rtaudio? ( |
93 |
+ >=media-libs/rtaudio-4.1.2 |
94 |
+ kernel_linux? ( media-libs/alsa-lib ) |
95 |
+ ) |
96 |
+ ruby? ( ${RUBY_DEPS} ) |
97 |
+ sdl? ( |
98 |
+ media-libs/libsdl2[X,opengl,video] |
99 |
+ media-libs/sdl2-image |
100 |
+ ) |
101 |
+ vidstab? ( media-libs/vidstab ) |
102 |
+ xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 ) |
103 |
+ xml? ( >=dev-libs/libxml2-2.5 )" |
104 |
+# java? ( >=virtual/jre-1.5 ) |
105 |
+# perl? ( dev-lang/perl ) |
106 |
+# php? ( dev-lang/php ) |
107 |
+# sox? ( media-sound/sox ) |
108 |
+# tcl? ( dev-lang/tcl:0= ) |
109 |
+RDEPEND="${DEPEND}" |
110 |
+ |
111 |
+DOCS=( AUTHORS ChangeLog NEWS README docs/{framework,melt,mlt{++,-xml}}.txt ) |
112 |
+ |
113 |
+PATCHES=( |
114 |
+ "${FILESDIR}"/${PN}-6.10.0-swig-underlinking.patch |
115 |
+ "${FILESDIR}"/${P}-mlt_consumer-race-condition.patch |
116 |
+ "${FILESDIR}"/${P}-rotoscoping-interpolation.patch |
117 |
+ "${FILESDIR}"/${P}-crop-filter.patch |
118 |
+ "${FILESDIR}"/${P}-consumer_multi-does-not-correctly-handle-in-point.patch |
119 |
+ "${FILESDIR}"/${P}-bad-aspect-ratio-resulting-in-black.patch |
120 |
+) |
121 |
+ |
122 |
+pkg_setup() { |
123 |
+ use python && python-single-r1_pkg_setup |
124 |
+} |
125 |
+ |
126 |
+src_prepare() { |
127 |
+ default |
128 |
+ |
129 |
+ # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873 |
130 |
+ for x in python lua; do |
131 |
+ sed -i "/mlt.so/s: -lmlt++ :& ${CFLAGS} ${LDFLAGS} :" src/swig/$x/build || die |
132 |
+ done |
133 |
+ |
134 |
+ sed -i -e "s/env ruby/${USE_RUBY}/" src/swig/ruby/* || die |
135 |
+ |
136 |
+ # fix python3 include dir |
137 |
+ sed -i -e 's/python{}.{}/python{}.{}m/' src/swig/python/build || die |
138 |
+} |
139 |
+ |
140 |
+src_configure() { |
141 |
+ tc-export CC CXX |
142 |
+ |
143 |
+ local myconf=( |
144 |
+ --enable-gpl |
145 |
+ --enable-gpl3 |
146 |
+ --enable-motion-est |
147 |
+ --target-arch=$(tc-arch) |
148 |
+ --disable-kde |
149 |
+ --disable-sdl |
150 |
+ --disable-swfdec |
151 |
+ $(use_enable debug) |
152 |
+ $(use_enable cpu_flags_x86_sse sse) |
153 |
+ $(use_enable cpu_flags_x86_sse2 sse2) |
154 |
+ $(use_enable ffmpeg avformat) |
155 |
+ $(use_enable fftw plus) |
156 |
+ $(use_enable frei0r) |
157 |
+ $(use_enable gtk gtk2) |
158 |
+ $(use_enable jack jackrack) |
159 |
+ $(use_enable kdenlive) |
160 |
+ $(use_enable libsamplerate resample) |
161 |
+ $(use_enable melt) |
162 |
+ $(use_enable opencv) |
163 |
+ $(use_enable opengl) |
164 |
+ $(use_enable qt5 qt) |
165 |
+ $(use_enable rtaudio) |
166 |
+ $(use_enable sdl sdl2) |
167 |
+ $(use_enable vidstab vid.stab ) |
168 |
+ $(use_enable xine) |
169 |
+ $(use_enable xml) |
170 |
+ --disable-sox |
171 |
+ ) |
172 |
+ #$(use_enable sox) FIXME |
173 |
+ |
174 |
+ use compressed-lumas && myconf+=( --luma-compress ) |
175 |
+ use ffmpeg && myconf+=( --avformat-swscale ) |
176 |
+ use vdpau && myconf+=( --avformat-vdpau ) |
177 |
+ |
178 |
+ if use qt5 ; then |
179 |
+ myconf+=( |
180 |
+ --qt-includedir=$(qt5_get_headerdir) |
181 |
+ --qt-libdir=$(qt5_get_libdir) |
182 |
+ ) |
183 |
+ fi |
184 |
+ |
185 |
+ if use amd64 || use x86 ; then |
186 |
+ myconf+=( $(use_enable cpu_flags_x86_mmx mmx) ) |
187 |
+ else |
188 |
+ myconf+=( --disable-mmx ) |
189 |
+ fi |
190 |
+ |
191 |
+ if ! use melt ; then |
192 |
+ sed -i -e "s;src/melt;;" Makefile || die |
193 |
+ fi |
194 |
+ |
195 |
+ # TODO: add swig language bindings |
196 |
+ # see also https://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover |
197 |
+ |
198 |
+ local swig_lang=() |
199 |
+ # TODO: java perl php tcl |
200 |
+ for i in lua python ruby ; do |
201 |
+ use $i && swig_lang+=( $i ) |
202 |
+ done |
203 |
+ [[ -z "${swig_lang}" ]] && swig_lang=( none ) |
204 |
+ |
205 |
+ econf "${myconf[@]}" --swig-languages="${swig_lang[*]}" |
206 |
+ |
207 |
+ sed -i -e s/^OPT/#OPT/ config.mak || die |
208 |
+} |
209 |
+ |
210 |
+src_install() { |
211 |
+ default |
212 |
+ |
213 |
+ dodir /usr/share/${PN} |
214 |
+ insinto /usr/share/${PN} |
215 |
+ doins -r demo |
216 |
+ |
217 |
+ docinto swig |
218 |
+ |
219 |
+ # Install SWIG bindings |
220 |
+ if use lua; then |
221 |
+ cd "${S}"/src/swig/lua || die |
222 |
+ exeinto $(pkg-config --variable INSTALL_CMOD lua) |
223 |
+ doexe mlt.so |
224 |
+ dodoc play.lua |
225 |
+ fi |
226 |
+ |
227 |
+ if use python; then |
228 |
+ cd "${S}"/src/swig/python || die |
229 |
+ insinto $(python_get_sitedir) |
230 |
+ doins mlt.py |
231 |
+ exeinto $(python_get_sitedir) |
232 |
+ doexe _mlt.so |
233 |
+ dodoc play.py |
234 |
+ python_optimize |
235 |
+ fi |
236 |
+ |
237 |
+ if use ruby; then |
238 |
+ cd "${S}"/src/swig/ruby || die |
239 |
+ exeinto $("${EPREFIX}"/usr/bin/${USE_RUBY} -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]') |
240 |
+ doexe mlt.so |
241 |
+ dodoc play.rb thumbs.rb |
242 |
+ fi |
243 |
+ # TODO: java perl php tcl |
244 |
+} |