Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mlt/, media-libs/mlt/files/
Date: Mon, 05 Oct 2020 11:22:11
Message-Id: 1601895917.9ee1bd73f11a8835af749dd130ce362f77fc6d75.asturm@gentoo
1 commit: 9ee1bd73f11a8835af749dd130ce362f77fc6d75
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 5 11:01:52 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 5 11:05:17 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ee1bd73
7
8 media-libs/mlt: Fix regression in 6.22 with multiple affine filters
9
10 Package-Manager: Portage-3.0.8, Repoman-3.0.1
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 ...-fix-regression-w-multiple-affine-filters.patch | 23 +++
14 media-libs/mlt/mlt-6.22.1-r1.ebuild | 201 +++++++++++++++++++++
15 2 files changed, 224 insertions(+)
16
17 diff --git a/media-libs/mlt/files/mlt-6.22.1-fix-regression-w-multiple-affine-filters.patch b/media-libs/mlt/files/mlt-6.22.1-fix-regression-w-multiple-affine-filters.patch
18 new file mode 100644
19 index 00000000000..d60976c1185
20 --- /dev/null
21 +++ b/media-libs/mlt/files/mlt-6.22.1-fix-regression-w-multiple-affine-filters.patch
22 @@ -0,0 +1,23 @@
23 +From 8b778aaee121c6b381bd570c2b6f526989866f8e Mon Sep 17 00:00:00 2001
24 +From: Dan Dennedy <dan@×××××××.org>
25 +Date: Fri, 11 Sep 2020 21:24:24 -0700
26 +Subject: [PATCH] fix regression in 2c354d6e with multiple affine filters
27 +
28 +See #9 in https://forum.shotcut.org/t/v20-09-beta-is-now-available-to-
29 +test/20766/31
30 +---
31 + src/modules/plus/transition_affine.c | 1 +
32 + 1 file changed, 1 insertion(+)
33 +
34 +diff --git a/src/modules/plus/transition_affine.c b/src/modules/plus/transition_affine.c
35 +index 63bbaa1df..b1147c8c6 100644
36 +--- a/src/modules/plus/transition_affine.c
37 ++++ b/src/modules/plus/transition_affine.c
38 +@@ -564,6 +564,7 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
39 + b_height = result.h;
40 + // Set the rescale interpolation to match the frame
41 + mlt_properties_set( b_props, "rescale.interp", mlt_properties_get( a_props, "rescale.interp" ) );
42 ++ mlt_properties_set_int( b_props, "distort", 1 );
43 + } else if (scale_width != 1.0 || scale_height != 1.0) {
44 + // Scale request of b frame image to consumer scale maintaining its aspect ratio.
45 + b_height = *height;
46
47 diff --git a/media-libs/mlt/mlt-6.22.1-r1.ebuild b/media-libs/mlt/mlt-6.22.1-r1.ebuild
48 new file mode 100644
49 index 00000000000..a4919469eaa
50 --- /dev/null
51 +++ b/media-libs/mlt/mlt-6.22.1-r1.ebuild
52 @@ -0,0 +1,201 @@
53 +# Copyright 1999-2020 Gentoo Authors
54 +# Distributed under the terms of the GNU General Public License v2
55 +
56 +EAPI=7
57 +
58 +PYTHON_COMPAT=( python3_{6,7,8,9} )
59 +inherit python-single-r1 qmake-utils toolchain-funcs
60 +
61 +DESCRIPTION="Open source multimedia framework for television broadcasting"
62 +HOMEPAGE="https://www.mltframework.org/"
63 +SRC_URI="https://github.com/mltframework/${PN}/releases/download/v${PV}/${P}.tar.gz"
64 +
65 +LICENSE="GPL-3"
66 +SLOT="0"
67 +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
68 +IUSE="compressed-lumas cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 debug ffmpeg
69 +fftw frei0r gtk jack kdenlive kernel_linux libsamplerate lua melt opencv opengl python
70 +qt5 rtaudio sdl vdpau vidstab xine xml"
71 +# java perl php tcl
72 +
73 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
74 +
75 +SWIG_DEPEND=">=dev-lang/swig-2.0"
76 +# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 )
77 +# perl? ( ${SWIG_DEPEND} )
78 +# php? ( ${SWIG_DEPEND} )
79 +# tcl? ( ${SWIG_DEPEND} )
80 +# ruby? ( ${SWIG_DEPEND} )
81 +BDEPEND="
82 + virtual/pkgconfig
83 + compressed-lumas? ( virtual/imagemagick-tools[png] )
84 + lua? ( ${SWIG_DEPEND} virtual/pkgconfig )
85 + python? ( ${SWIG_DEPEND} )
86 +"
87 +#rtaudio will use OSS on non linux OSes
88 +DEPEND="
89 + >=media-libs/libebur128-1.2.2:=
90 + ffmpeg? ( media-video/ffmpeg:0=[vdpau?,-flite] )
91 + fftw? ( sci-libs/fftw:3.0= )
92 + frei0r? ( media-plugins/frei0r-plugins )
93 + gtk? (
94 + media-libs/libexif
95 + x11-libs/pango
96 + )
97 + jack? (
98 + >=dev-libs/libxml2-2.5
99 + media-libs/ladspa-sdk
100 + virtual/jack
101 + )
102 + libsamplerate? ( >=media-libs/libsamplerate-0.1.2 )
103 + lua? ( >=dev-lang/lua-5.1.4-r4:= )
104 + opencv? ( >=media-libs/opencv-3.2.0:= )
105 + opengl? ( media-video/movit )
106 + python? ( ${PYTHON_DEPS} )
107 + qt5? (
108 + dev-qt/qtcore:5
109 + dev-qt/qtgui:5
110 + dev-qt/qtsvg:5
111 + dev-qt/qtwidgets:5
112 + dev-qt/qtxml:5
113 + media-libs/libexif
114 + x11-libs/libX11
115 + )
116 + rtaudio? (
117 + >=media-libs/rtaudio-4.1.2
118 + kernel_linux? ( media-libs/alsa-lib )
119 + )
120 + sdl? (
121 + media-libs/libsdl2[X,opengl,video]
122 + media-libs/sdl2-image
123 + )
124 + vidstab? ( media-libs/vidstab )
125 + xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 )
126 + xml? ( >=dev-libs/libxml2-2.5 )"
127 +# java? ( >=virtual/jre-1.5 )
128 +# perl? ( dev-lang/perl )
129 +# php? ( dev-lang/php )
130 +# ruby? ( ${RUBY_DEPS} )
131 +# sox? ( media-sound/sox )
132 +# tcl? ( dev-lang/tcl:0= )
133 +RDEPEND="${DEPEND}"
134 +
135 +DOCS=( AUTHORS NEWS README docs/{framework,melt,mlt{++,-xml}}.txt )
136 +
137 +PATCHES=(
138 + "${FILESDIR}"/${PN}-6.10.0-swig-underlinking.patch
139 + "${FILESDIR}"/${P}-fix-regression-w-multiple-affine-filters.patch
140 +)
141 +
142 +pkg_setup() {
143 + use python && python-single-r1_pkg_setup
144 +}
145 +
146 +src_prepare() {
147 + default
148 +
149 + # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873
150 + for x in python lua; do
151 + sed -i "/mlt.so/s/ -lmlt++ /& ${CFLAGS} ${LDFLAGS} /" src/swig/$x/build || die
152 + done
153 +
154 + use python && python_fix_shebang src/swig/python
155 +}
156 +
157 +src_configure() {
158 + tc-export CC CXX
159 +
160 + local myconf=(
161 + --enable-gpl
162 + --enable-gpl3
163 + --enable-motion-est
164 + --target-arch=$(tc-arch)
165 + --disable-gtk2
166 + --disable-kde
167 + --disable-sdl
168 + --disable-swfdec
169 + $(use_enable debug)
170 + $(use_enable cpu_flags_x86_sse sse)
171 + $(use_enable cpu_flags_x86_sse2 sse2)
172 + $(use_enable ffmpeg avformat)
173 + $(use_enable fftw plus)
174 + $(use_enable frei0r)
175 + $(use_enable gtk gdk)
176 + $(use_enable jack jackrack)
177 + $(use_enable kdenlive)
178 + $(use_enable libsamplerate resample)
179 + $(use_enable melt)
180 + $(use_enable opencv)
181 + $(use_enable opengl)
182 + $(use_enable qt5 qt)
183 + $(use_enable rtaudio)
184 + $(use_enable sdl sdl2)
185 + $(use_enable vidstab vid.stab )
186 + $(use_enable xine)
187 + $(use_enable xml)
188 + --disable-sox
189 + )
190 + #$(use_enable sox) FIXME
191 +
192 + use compressed-lumas && myconf+=( --luma-compress )
193 + use ffmpeg && myconf+=( --avformat-swscale )
194 + use vdpau && myconf+=( --avformat-vdpau )
195 +
196 + if use qt5 ; then
197 + myconf+=(
198 + --qt-includedir=$(qt5_get_headerdir)
199 + --qt-libdir=$(qt5_get_libdir)
200 + )
201 + fi
202 +
203 + if use amd64 || use x86 ; then
204 + myconf+=( $(use_enable cpu_flags_x86_mmx mmx) )
205 + else
206 + myconf+=( --disable-mmx )
207 + fi
208 +
209 + if ! use melt ; then
210 + sed -i -e "s;src/melt;;" Makefile || die
211 + fi
212 +
213 + # TODO: add swig language bindings
214 + # see also https://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover
215 +
216 + local swig_lang=()
217 + # not done: java perl php ruby tcl
218 + for i in lua python ; do
219 + use $i && swig_lang+=( $i )
220 + done
221 + [[ -z "${swig_lang}" ]] && swig_lang=( none )
222 +
223 + econf "${myconf[@]}" --swig-languages="${swig_lang[*]}"
224 +
225 + sed -i -e s/^OPT/#OPT/ config.mak || die
226 +}
227 +
228 +src_install() {
229 + default
230 +
231 + insinto /usr/share/${PN}
232 + doins -r demo
233 +
234 + docinto swig
235 +
236 + # Install SWIG bindings
237 + if use lua; then
238 + cd "${S}"/src/swig/lua || die
239 + exeinto $(pkg-config --variable INSTALL_CMOD lua)
240 + doexe mlt.so
241 + dodoc play.lua
242 + fi
243 +
244 + if use python; then
245 + cd "${S}"/src/swig/python || die
246 + python_domodule mlt.py _mlt.so
247 + chmod +x "${D}$(python_get_sitedir)/_mlt.so" || die
248 + dodoc play.py
249 + python_optimize
250 + fi
251 +
252 + # not done: java perl php ruby tcl
253 +}