1 |
commit: 0cbedddea510010caa0597b963d8add093ef7c71 |
2 |
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 28 20:50:22 2017 +0000 |
4 |
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 28 20:50:30 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cbeddde |
7 |
|
8 |
media-libs/mlt: Add glibc-2.26 compatibility patches. |
9 |
|
10 |
Revision bump since headers have to be modified. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/635088 |
13 |
Package-Manager: Portage-2.3.13, Repoman-2.3.4 |
14 |
|
15 |
media-libs/mlt/files/mlt-6.4.1-glibc226-1.patch | 40 +++++ |
16 |
media-libs/mlt/files/mlt-6.4.1-glibc226-2.patch | 22 +++ |
17 |
media-libs/mlt/mlt-6.4.1-r4.ebuild | 224 ++++++++++++++++++++++++ |
18 |
3 files changed, 286 insertions(+) |
19 |
|
20 |
diff --git a/media-libs/mlt/files/mlt-6.4.1-glibc226-1.patch b/media-libs/mlt/files/mlt-6.4.1-glibc226-1.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..2f486939d8f |
23 |
--- /dev/null |
24 |
+++ b/media-libs/mlt/files/mlt-6.4.1-glibc226-1.patch |
25 |
@@ -0,0 +1,40 @@ |
26 |
+From 2125e3955a0d0be61571cf43b674f74b4b93c6f8 Mon Sep 17 00:00:00 2001 |
27 |
+From: Dan Dennedy <dan@×××××××.org> |
28 |
+Date: Sat, 26 Aug 2017 18:31:47 -0700 |
29 |
+Subject: [PATCH] Fix #248 xlocale.h was removed in glibc 2.26. |
30 |
+MIME-Version: 1.0 |
31 |
+Content-Type: text/plain; charset=UTF-8 |
32 |
+Content-Transfer-Encoding: 8bit |
33 |
+ |
34 |
+Reported by schnitzeltony on Andreas Müller. |
35 |
+Patch by Dave Plater. |
36 |
+--- |
37 |
+ src/framework/mlt_property.h | 8 ++++++-- |
38 |
+ 1 file changed, 6 insertions(+), 2 deletions(-) |
39 |
+ |
40 |
+diff --git a/src/framework/mlt_property.h b/src/framework/mlt_property.h |
41 |
+index 404d513f..043f530b 100644 |
42 |
+--- a/src/framework/mlt_property.h |
43 |
++++ b/src/framework/mlt_property.h |
44 |
+@@ -3,7 +3,7 @@ |
45 |
+ * \brief Property class declaration |
46 |
+ * \see mlt_property_s |
47 |
+ * |
48 |
+- * Copyright (C) 2003-2014 Meltytech, LLC |
49 |
++ * Copyright (C) 2003-2017 Meltytech, LLC |
50 |
+ * |
51 |
+ * This library is free software; you can redistribute it and/or |
52 |
+ * modify it under the terms of the GNU Lesser General Public |
53 |
+@@ -31,7 +31,11 @@ |
54 |
+ #endif |
55 |
+ |
56 |
+ #if defined(__GLIBC__) || defined(__APPLE__) || (__FreeBSD_version >= 900506) |
57 |
+-#include <xlocale.h> |
58 |
++# if GLIBC_MINOR >= 26 && !defined(APPLE) |
59 |
++# include <locale.h> |
60 |
++# else |
61 |
++# include <xlocale.h> |
62 |
++# endif |
63 |
+ #else |
64 |
+ typedef char* locale_t; |
65 |
+ #endif |
66 |
|
67 |
diff --git a/media-libs/mlt/files/mlt-6.4.1-glibc226-2.patch b/media-libs/mlt/files/mlt-6.4.1-glibc226-2.patch |
68 |
new file mode 100644 |
69 |
index 00000000000..d992ee32e06 |
70 |
--- /dev/null |
71 |
+++ b/media-libs/mlt/files/mlt-6.4.1-glibc226-2.patch |
72 |
@@ -0,0 +1,22 @@ |
73 |
+From fbf6a5187776f2f392cf258935ff49e4c0e87024 Mon Sep 17 00:00:00 2001 |
74 |
+From: Dan Dennedy <dan@×××××××.org> |
75 |
+Date: Wed, 30 Aug 2017 09:08:16 -0700 |
76 |
+Subject: [PATCH] Fix glib test macros to include locale.h. |
77 |
+ |
78 |
+--- |
79 |
+ src/framework/mlt_property.h | 2 +- |
80 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
81 |
+ |
82 |
+diff --git a/src/framework/mlt_property.h b/src/framework/mlt_property.h |
83 |
+index 043f530b..3ecebd67 100644 |
84 |
+--- a/src/framework/mlt_property.h |
85 |
++++ b/src/framework/mlt_property.h |
86 |
+@@ -31,7 +31,7 @@ |
87 |
+ #endif |
88 |
+ |
89 |
+ #if defined(__GLIBC__) || defined(__APPLE__) || (__FreeBSD_version >= 900506) |
90 |
+-# if GLIBC_MINOR >= 26 && !defined(APPLE) |
91 |
++# if __GLIBC_MINOR__ >= 26 && !defined(__APPLE__) |
92 |
+ # include <locale.h> |
93 |
+ # else |
94 |
+ # include <xlocale.h> |
95 |
|
96 |
diff --git a/media-libs/mlt/mlt-6.4.1-r4.ebuild b/media-libs/mlt/mlt-6.4.1-r4.ebuild |
97 |
new file mode 100644 |
98 |
index 00000000000..f644ac3bb1f |
99 |
--- /dev/null |
100 |
+++ b/media-libs/mlt/mlt-6.4.1-r4.ebuild |
101 |
@@ -0,0 +1,224 @@ |
102 |
+# Copyright 1999-2017 Gentoo Foundation |
103 |
+# Distributed under the terms of the GNU General Public License v2 |
104 |
+ |
105 |
+EAPI=6 |
106 |
+PYTHON_COMPAT=( python2_7 ) |
107 |
+# this ebuild currently only supports installing ruby bindings for a single ruby version |
108 |
+# so USE_RUBY must contain only a single value (the latest stable) as the ebuild calls |
109 |
+# /usr/bin/${USE_RUBY} directly |
110 |
+USE_RUBY="ruby22" |
111 |
+inherit eutils flag-o-matic multilib python-single-r1 ruby-single toolchain-funcs |
112 |
+ |
113 |
+DESCRIPTION="Open source multimedia framework for television broadcasting" |
114 |
+HOMEPAGE="https://www.mltframework.org/" |
115 |
+SRC_URI="https://github.com/mltframework/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
116 |
+ |
117 |
+LICENSE="GPL-3" |
118 |
+SLOT="0" |
119 |
+KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" |
120 |
+IUSE="compressed-lumas cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 debug ffmpeg fftw frei0r |
121 |
+gtk jack kdenlive libav libsamplerate lua melt opencv opengl python qt5 rtaudio ruby sdl vdpau xine xml" |
122 |
+# java perl php tcl vidstab |
123 |
+IUSE="${IUSE} kernel_linux" |
124 |
+ |
125 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
126 |
+ |
127 |
+#rtaudio will use OSS on non linux OSes |
128 |
+COMMON_DEPEND=" |
129 |
+ >=media-libs/libebur128-1.2.2 |
130 |
+ ffmpeg? ( |
131 |
+ libav? ( media-video/libav:0=[vdpau?] ) |
132 |
+ !libav? ( media-video/ffmpeg:0=[vdpau?] ) |
133 |
+ ) |
134 |
+ fftw? ( sci-libs/fftw:3.0= ) |
135 |
+ frei0r? ( media-plugins/frei0r-plugins ) |
136 |
+ gtk? ( |
137 |
+ media-libs/libexif |
138 |
+ x11-libs/gtk+:2 |
139 |
+ x11-libs/pango |
140 |
+ ) |
141 |
+ jack? ( |
142 |
+ >=dev-libs/libxml2-2.5 |
143 |
+ media-libs/ladspa-sdk |
144 |
+ >=media-sound/jack-audio-connection-kit-0.121.3 |
145 |
+ ) |
146 |
+ libsamplerate? ( >=media-libs/libsamplerate-0.1.2 ) |
147 |
+ lua? ( >=dev-lang/lua-5.1.4-r4:= ) |
148 |
+ opencv? ( >=media-libs/opencv-3.1.0:= ) |
149 |
+ opengl? ( media-video/movit ) |
150 |
+ python? ( ${PYTHON_DEPS} ) |
151 |
+ qt5? ( |
152 |
+ dev-qt/qtcore:5 |
153 |
+ dev-qt/qtgui:5 |
154 |
+ dev-qt/qtsvg:5 |
155 |
+ dev-qt/qtwidgets:5 |
156 |
+ dev-qt/qtxml:5 |
157 |
+ media-libs/libexif |
158 |
+ x11-libs/libX11 |
159 |
+ opengl? ( dev-qt/qtopengl:5 ) |
160 |
+ ) |
161 |
+ rtaudio? ( |
162 |
+ media-libs/rtaudio |
163 |
+ kernel_linux? ( media-libs/alsa-lib ) |
164 |
+ ) |
165 |
+ ruby? ( ${RUBY_DEPS} ) |
166 |
+ sdl? ( |
167 |
+ >=media-libs/libsdl-1.2.10[X,opengl,video] |
168 |
+ >=media-libs/sdl-image-1.2.4 |
169 |
+ ) |
170 |
+ xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 ) |
171 |
+ xml? ( >=dev-libs/libxml2-2.5 )" |
172 |
+# java? ( >=virtual/jre-1.5 ) |
173 |
+# perl? ( dev-lang/perl ) |
174 |
+# php? ( dev-lang/php ) |
175 |
+# sox? ( media-sound/sox ) |
176 |
+# tcl? ( dev-lang/tcl:0= ) |
177 |
+# vidstab? ( media-libs/libvidstab ) |
178 |
+SWIG_DEPEND=">=dev-lang/swig-2.0" |
179 |
+DEPEND="${COMMON_DEPEND} |
180 |
+ virtual/pkgconfig |
181 |
+ compressed-lumas? ( virtual/imagemagick-tools[png] ) |
182 |
+ lua? ( ${SWIG_DEPEND} virtual/pkgconfig ) |
183 |
+ python? ( ${SWIG_DEPEND} ) |
184 |
+ ruby? ( ${SWIG_DEPEND} )" |
185 |
+# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 ) |
186 |
+# perl? ( ${SWIG_DEPEND} ) |
187 |
+# php? ( ${SWIG_DEPEND} ) |
188 |
+# tcl? ( ${SWIG_DEPEND} ) |
189 |
+RDEPEND="${COMMON_DEPEND} |
190 |
+ !media-libs/mlt++ |
191 |
+" |
192 |
+ |
193 |
+PATCHES=( |
194 |
+ "${FILESDIR}"/${PN}-6.2.0-ruby-link.patch |
195 |
+ "${FILESDIR}"/${P}-libebur128-unbundle.patch |
196 |
+ "${FILESDIR}"/${P}-opencv-3.3.patch |
197 |
+ "${FILESDIR}"/${P}-glibc226-1.patch |
198 |
+ "${FILESDIR}"/${P}-glibc226-2.patch |
199 |
+) |
200 |
+ |
201 |
+pkg_setup() { |
202 |
+ use python && python-single-r1_pkg_setup |
203 |
+} |
204 |
+ |
205 |
+src_prepare() { |
206 |
+ default |
207 |
+ |
208 |
+ # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873 |
209 |
+ for x in python lua; do |
210 |
+ sed -i "/mlt.so/s: -lmlt++ :& ${CFLAGS} ${LDFLAGS} :" src/swig/$x/build || die |
211 |
+ done |
212 |
+ sed -i "/^LDFLAGS/s: += :& ${LDFLAGS} :" src/swig/ruby/build || die |
213 |
+ |
214 |
+ sed -i -e "s/env ruby/${USE_RUBY}/" src/swig/ruby/* || die |
215 |
+} |
216 |
+ |
217 |
+src_configure() { |
218 |
+ tc-export CC CXX |
219 |
+ |
220 |
+ # bug 589848 |
221 |
+ append-cxxflags -std=c++11 |
222 |
+ |
223 |
+ local myconf="--enable-gpl |
224 |
+ --enable-gpl3 |
225 |
+ --enable-motion-est |
226 |
+ --target-arch=$(tc-arch) |
227 |
+ --disable-kde |
228 |
+ --disable-swfdec |
229 |
+ $(use_enable debug) |
230 |
+ $(use compressed-lumas && echo ' --luma-compress') |
231 |
+ $(use_enable cpu_flags_x86_sse sse) |
232 |
+ $(use_enable cpu_flags_x86_sse2 sse2) |
233 |
+ $(use_enable gtk gtk2) |
234 |
+ $(use_enable sdl) |
235 |
+ $(use_enable jack jackrack) |
236 |
+ $(use_enable ffmpeg avformat) |
237 |
+ $(use ffmpeg && echo ' --avformat-swscale') |
238 |
+ $(use_enable fftw plus) |
239 |
+ $(use_enable frei0r) |
240 |
+ $(use_enable melt) |
241 |
+ $(use_enable opencv) |
242 |
+ $(use_enable opengl) |
243 |
+ $(use_enable libsamplerate resample) |
244 |
+ $(use_enable rtaudio) |
245 |
+ $(use vdpau && echo ' --avformat-vdpau') |
246 |
+ $(use_enable xml) |
247 |
+ $(use_enable xine) |
248 |
+ $(use_enable kdenlive) |
249 |
+ --disable-sox" |
250 |
+ #$(use_enable sox) FIXME |
251 |
+ |
252 |
+ if use qt5 ; then |
253 |
+ myconf+=" --enable-qt |
254 |
+ --qt-includedir=$(pkg-config Qt5Core --variable=includedir) |
255 |
+ --qt-libdir=$(pkg-config Qt5Core --variable=libdir)" |
256 |
+ else |
257 |
+ myconf+=" --disable-qt" |
258 |
+ fi |
259 |
+ |
260 |
+ if use x86 || use amd64 ; then |
261 |
+ myconf+=" $(use_enable cpu_flags_x86_mmx mmx)" |
262 |
+ else |
263 |
+ myconf+=" --disable-mmx" |
264 |
+ fi |
265 |
+ |
266 |
+ if ! use melt; then |
267 |
+ sed -i -e "s;src/melt;;" Makefile || die |
268 |
+ fi |
269 |
+ |
270 |
+ # TODO: add swig language bindings |
271 |
+ # see also https://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover |
272 |
+ |
273 |
+ local swig_lang |
274 |
+ # TODO: java perl php tcl |
275 |
+ for i in lua python ruby ; do |
276 |
+ use $i && swig_lang="${swig_lang} $i" |
277 |
+ done |
278 |
+ [ -z "${swig_lang}" ] && swig_lang="none" |
279 |
+ |
280 |
+ econf ${myconf} --swig-languages="${swig_lang}" |
281 |
+ |
282 |
+ sed -i -e s/^OPT/#OPT/ "${S}/config.mak" || die |
283 |
+ if use qt5 ; then |
284 |
+ if ! use opengl ; then |
285 |
+ sed -i -e "/^USE_QT_OPENGL/ s/^/#/" "${S}/src/modules/qt/config.mak" || die |
286 |
+ fi |
287 |
+ fi |
288 |
+} |
289 |
+ |
290 |
+src_install() { |
291 |
+ emake DESTDIR="${D}" install |
292 |
+ dodoc AUTHORS ChangeLog NEWS README docs/*.txt |
293 |
+ |
294 |
+ dodir /usr/share/${PN} |
295 |
+ insinto /usr/share/${PN} |
296 |
+ doins -r demo |
297 |
+ |
298 |
+ docinto swig |
299 |
+ |
300 |
+ # Install SWIG bindings |
301 |
+ if use lua; then |
302 |
+ cd "${S}"/src/swig/lua || die |
303 |
+ exeinto $(pkg-config --variable INSTALL_CMOD lua) |
304 |
+ doexe mlt.so |
305 |
+ dodoc play.lua |
306 |
+ fi |
307 |
+ |
308 |
+ if use python; then |
309 |
+ cd "${S}"/src/swig/python || die |
310 |
+ insinto $(python_get_sitedir) |
311 |
+ doins mlt.py |
312 |
+ exeinto $(python_get_sitedir) |
313 |
+ doexe _mlt.so |
314 |
+ dodoc play.py |
315 |
+ python_optimize |
316 |
+ fi |
317 |
+ |
318 |
+ if use ruby; then |
319 |
+ cd "${S}"/src/swig/ruby || die |
320 |
+ exeinto $("${EPREFIX}"/usr/bin/${USE_RUBY} -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]') |
321 |
+ doexe mlt.so |
322 |
+ dodoc play.rb thumbs.rb |
323 |
+ fi |
324 |
+ # TODO: java perl php tcl |
325 |
+} |