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/
Date: Fri, 16 Apr 2021 22:02:07
Message-Id: 1618610514.26b5987874537c38c7638f69703d248de813e4cc.asturm@gentoo
1 commit: 26b5987874537c38c7638f69703d248de813e4cc
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 16 21:02:58 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 16 22:01:54 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26b59878
7
8 media-libs/mlt: 6.26.1 version bump
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 media-libs/mlt/Manifest | 1 +
14 media-libs/mlt/mlt-6.26.1.ebuild | 231 +++++++++++++++++++++++++++++++++++++++
15 2 files changed, 232 insertions(+)
16
17 diff --git a/media-libs/mlt/Manifest b/media-libs/mlt/Manifest
18 index 4c18582faf9..5009420ad28 100644
19 --- a/media-libs/mlt/Manifest
20 +++ b/media-libs/mlt/Manifest
21 @@ -1,2 +1,3 @@
22 DIST mlt-6.24.0.tar.gz 1351427 BLAKE2B ea645f0fc6822c0fe3012ac4833062dcddff9859e35fc41aacd929c2dc0c80b49bb83b7714d234e0bcad9a4e300534e8637b1e6927c99cb84e9ce2959e619a7b SHA512 c9533191aad7be894152e305a4ce3f8c1dbd652ea887774866c74aed4794eae90bd15b0b9a070e6fc22f2979e210af6ca1a2c937adcc3b0be5d39ba900df6229
23 DIST mlt-6.26.0.tar.gz 1365958 BLAKE2B d40f8d655fe8c469a69ba462dfb633308763e894e7a24805b69831457bb03dbc97864b54b0ed8f65fb00cc4178b74e0cd8ca69d88c83039fdfc3b8b7d6d35724 SHA512 89e938faa6382da761020094f5fa6722b87494fac343566603c608dd0111314617cd2a3777ea23d0befe26d5be6d3bf3cf4aceb7554849b7cd9658d0682e1fc6
24 +DIST mlt-6.26.1.tar.gz 1366022 BLAKE2B f5b7e733090ae60cb55556893775ab4a68847705e215b85c90d901d72022f5b57c08122cd8c08c1ba51b71eedc5341adaaad2ad002af76724a2d2cf6a7379974 SHA512 6a3ef572cddee48c3089b19b2920de84936aa913a3f35b6f06e4bece2dc7a5a168daecfbaa8111c799b5316f967c37b09d485c000a4eba69af4f7ee3dc8db9e4
25
26 diff --git a/media-libs/mlt/mlt-6.26.1.ebuild b/media-libs/mlt/mlt-6.26.1.ebuild
27 new file mode 100644
28 index 00000000000..1f6ac4939d8
29 --- /dev/null
30 +++ b/media-libs/mlt/mlt-6.26.1.ebuild
31 @@ -0,0 +1,231 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +LUA_COMPAT=( lua5-{1..4} luajit )
38 +PYTHON_COMPAT=( python3_{7,8,9} )
39 +inherit lua python-single-r1 qmake-utils toolchain-funcs
40 +
41 +DESCRIPTION="Open source multimedia framework for television broadcasting"
42 +HOMEPAGE="https://www.mltframework.org/"
43 +SRC_URI="https://github.com/mltframework/${PN}/releases/download/v${PV}/${P}.tar.gz"
44 +
45 +LICENSE="GPL-3"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
48 +IUSE="compressed-lumas cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 debug
49 +ffmpeg fftw frei0r gtk jack kernel_linux libsamplerate lua opencv opengl python
50 +qt5 rtaudio rubberband sdl vdpau vidstab xine xml"
51 +# java perl php tcl
52 +
53 +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )
54 + python? ( ${PYTHON_REQUIRED_USE} )"
55 +
56 +SWIG_DEPEND=">=dev-lang/swig-2.0"
57 +# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 )
58 +# perl? ( ${SWIG_DEPEND} )
59 +# php? ( ${SWIG_DEPEND} )
60 +# tcl? ( ${SWIG_DEPEND} )
61 +# ruby? ( ${SWIG_DEPEND} )
62 +BDEPEND="
63 + virtual/pkgconfig
64 + compressed-lumas? ( virtual/imagemagick-tools[png] )
65 + lua? ( ${SWIG_DEPEND} virtual/pkgconfig )
66 + python? ( ${SWIG_DEPEND} )
67 +"
68 +#rtaudio will use OSS on non linux OSes
69 +DEPEND="
70 + >=media-libs/libebur128-1.2.2:=
71 + ffmpeg? ( media-video/ffmpeg:0=[vdpau?,-flite] )
72 + fftw? ( sci-libs/fftw:3.0= )
73 + frei0r? ( media-plugins/frei0r-plugins )
74 + gtk? (
75 + media-libs/libexif
76 + x11-libs/pango
77 + )
78 + jack? (
79 + >=dev-libs/libxml2-2.5
80 + media-libs/ladspa-sdk
81 + virtual/jack
82 + )
83 + libsamplerate? ( >=media-libs/libsamplerate-0.1.2 )
84 + lua? ( ${LUA_DEPS} )
85 + opencv? ( >=media-libs/opencv-3.2.0:= )
86 + opengl? ( media-video/movit )
87 + python? ( ${PYTHON_DEPS} )
88 + qt5? (
89 + dev-qt/qtcore:5
90 + dev-qt/qtgui:5
91 + dev-qt/qtsvg:5
92 + dev-qt/qtwidgets:5
93 + dev-qt/qtxml:5
94 + media-libs/libexif
95 + x11-libs/libX11
96 + )
97 + rtaudio? (
98 + >=media-libs/rtaudio-4.1.2
99 + kernel_linux? ( media-libs/alsa-lib )
100 + )
101 + rubberband? ( media-libs/rubberband )
102 + sdl? (
103 + media-libs/libsdl2[X,opengl,video]
104 + media-libs/sdl2-image
105 + )
106 + vidstab? ( media-libs/vidstab )
107 + xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 )
108 + xml? ( >=dev-libs/libxml2-2.5 )"
109 +# java? ( >=virtual/jre-1.5 )
110 +# perl? ( dev-lang/perl )
111 +# php? ( dev-lang/php )
112 +# ruby? ( ${RUBY_DEPS} )
113 +# sox? ( media-sound/sox )
114 +# tcl? ( dev-lang/tcl:0= )
115 +RDEPEND="${DEPEND}"
116 +
117 +DOCS=( AUTHORS NEWS README docs/{framework,melt,mlt{++,-xml}}.txt )
118 +
119 +PATCHES=(
120 + "${FILESDIR}"/${PN}-6.10.0-swig-underlinking.patch
121 + "${FILESDIR}"/${PN}-6.22.1-no_lua_bdepend.patch
122 +)
123 +
124 +pkg_setup() {
125 + use python && python-single-r1_pkg_setup
126 +}
127 +
128 +src_prepare() {
129 + default
130 +
131 + # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873
132 + for x in python lua; do
133 + sed -i "/mlt.so/s/ -lmlt++ /& ${CFLAGS} ${LDFLAGS} /" src/swig/$x/build || die
134 + done
135 +
136 + use python && python_fix_shebang src/swig/python
137 +}
138 +
139 +src_configure() {
140 + tc-export CC CXX
141 +
142 + local myconf=(
143 + --enable-gpl
144 + --enable-gpl3
145 + --enable-kdenlive
146 + --enable-melt
147 + --enable-motion-est
148 + --target-arch=$(tc-arch)
149 + --disable-gtk2
150 + --disable-kde
151 + --disable-sdl
152 + --disable-swfdec
153 + $(use_enable debug)
154 + $(use_enable cpu_flags_x86_sse sse)
155 + $(use_enable cpu_flags_x86_sse2 sse2)
156 + $(use_enable ffmpeg avformat)
157 + $(use_enable fftw plus)
158 + $(use_enable frei0r)
159 + $(use_enable gtk gdk)
160 + $(use_enable jack jackrack)
161 + $(use_enable libsamplerate resample)
162 + $(use_enable opencv)
163 + $(use_enable opengl)
164 + $(use_enable qt5 qt)
165 + $(use_enable rtaudio)
166 + $(use_enable rubberband)
167 + $(use_enable sdl sdl2)
168 + $(use_enable vidstab vid.stab)
169 + $(use_enable xine)
170 + $(use_enable xml)
171 + --disable-sox
172 + )
173 + #$(use_enable sox) FIXME
174 +
175 + use compressed-lumas && myconf+=( --luma-compress )
176 + use ffmpeg && myconf+=( --avformat-swscale )
177 + use vdpau && myconf+=( --avformat-vdpau )
178 +
179 + if use qt5 ; then
180 + myconf+=(
181 + --qt-includedir=$(qt5_get_headerdir)
182 + --qt-libdir=$(qt5_get_libdir)
183 + )
184 + fi
185 +
186 + if use amd64 || use x86 ; then
187 + myconf+=( $(use_enable cpu_flags_x86_mmx mmx) )
188 + else
189 + myconf+=( --disable-mmx )
190 + fi
191 +
192 + # TODO: add swig language bindings
193 + # see also https://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover
194 +
195 + local swig_lang=()
196 + # not done: java perl php ruby tcl
197 + # handled separately: lua
198 + for i in python; do
199 + use $i && swig_lang+=( $i )
200 + done
201 + [[ -z "${swig_lang}" ]] && swig_lang=( none )
202 +
203 + econf "${myconf[@]}" --swig-languages="${swig_lang[*]}"
204 +
205 + sed -i -e s/^OPT/#OPT/ config.mak || die
206 +}
207 +
208 +src_compile() {
209 + default
210 +
211 + if use lua; then
212 + # Only copy sources now to avoid unnecessary rebuilds
213 + lua_copy_sources
214 +
215 + lua_compile() {
216 + pushd "${BUILD_DIR}"/src/swig/lua > /dev/null || die
217 +
218 + sed -i -e "s| mlt_wrap.cxx| $(lua_get_CFLAGS) mlt_wrap.cxx|" build || die
219 + ./build
220 +
221 + popd > /dev/null || die
222 + }
223 + lua_foreach_impl lua_compile
224 + fi
225 +}
226 +
227 +src_install() {
228 + default
229 +
230 + insinto /usr/share/${PN}
231 + doins -r demo
232 +
233 + #
234 + # Install SWIG bindings
235 + #
236 +
237 + docinto swig
238 +
239 + if use lua; then
240 + lua_install() {
241 + pushd "${BUILD_DIR}"/src/swig/lua > /dev/null || die
242 +
243 + exeinto "$(lua_get_cmod_dir)"
244 + doexe mlt.so
245 +
246 + popd > /dev/null || die
247 + }
248 + lua_foreach_impl lua_install
249 +
250 + dodoc "${S}"/src/swig/lua/play.lua
251 + fi
252 +
253 + if use python; then
254 + cd "${S}"/src/swig/python || die
255 + python_domodule mlt.py _mlt.so
256 + chmod +x "${D}$(python_get_sitedir)/_mlt.so" || die
257 + dodoc play.py
258 + python_optimize
259 + fi
260 +
261 + # not done: java perl php ruby tcl
262 +}