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