Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mlt/
Date: Sat, 03 Jun 2017 15:01:29
Message-Id: 1496502074.f43edfb4610dcffccc82da8919906cc41b7fa370.kensington@gentoo
1 commit: f43edfb4610dcffccc82da8919906cc41b7fa370
2 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 3 15:00:23 2017 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 3 15:01:14 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f43edfb4
7
8 media-libs/mlt: revision bump moving to ruby 2.2
9
10 Gentoo-bug: 620386
11 Package-Manager: Portage-2.3.5, Repoman-2.3.2
12
13 media-libs/mlt/mlt-6.4.1-r2.ebuild | 211 +++++++++++++++++++++++++++++++++++++
14 1 file changed, 211 insertions(+)
15
16 diff --git a/media-libs/mlt/mlt-6.4.1-r2.ebuild b/media-libs/mlt/mlt-6.4.1-r2.ebuild
17 new file mode 100644
18 index 00000000000..693c5e6e0d1
19 --- /dev/null
20 +++ b/media-libs/mlt/mlt-6.4.1-r2.ebuild
21 @@ -0,0 +1,211 @@
22 +# Copyright 1999-2017 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +PYTHON_COMPAT=( python2_7 )
27 +# this ebuild currently only supports installing ruby bindings for a single ruby version
28 +# so USE_RUBY must contain only a single value (the latest stable) as the ebuild calls
29 +# /usr/bin/${USE_RUBY} directly
30 +USE_RUBY="ruby22"
31 +inherit eutils flag-o-matic multilib python-single-r1 ruby-single toolchain-funcs
32 +
33 +DESCRIPTION="Open source multimedia framework for television broadcasting"
34 +HOMEPAGE="http://www.mltframework.org/"
35 +SRC_URI="https://github.com/mltframework/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
36 +
37 +LICENSE="GPL-3"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
40 +IUSE="compressed-lumas debug ffmpeg fftw frei0r gtk jack kdenlive libav libsamplerate melt opencv opengl
41 +cpu_flags_x86_mmx qt5 rtaudio sdl cpu_flags_x86_sse cpu_flags_x86_sse2 xine xml lua python ruby vdpau"
42 +# java perl php tcl vidstab
43 +IUSE="${IUSE} kernel_linux"
44 +
45 +#rtaudio will use OSS on non linux OSes
46 +COMMON_DEPEND="
47 + ffmpeg? (
48 + libav? ( media-video/libav:0=[vdpau?] )
49 + !libav? ( media-video/ffmpeg:0=[vdpau?] )
50 + )
51 + xml? ( >=dev-libs/libxml2-2.5 )
52 + sdl? ( >=media-libs/libsdl-1.2.10[X,opengl,video]
53 + >=media-libs/sdl-image-1.2.4 )
54 + libsamplerate? ( >=media-libs/libsamplerate-0.1.2 )
55 + jack? ( >=media-sound/jack-audio-connection-kit-0.121.3
56 + media-libs/ladspa-sdk
57 + >=dev-libs/libxml2-2.5 )
58 + fftw? ( sci-libs/fftw:3.0= )
59 + frei0r? ( media-plugins/frei0r-plugins )
60 + gtk? ( x11-libs/gtk+:2
61 + media-libs/libexif
62 + x11-libs/pango )
63 + opencv? ( >=media-libs/opencv-3.1.0:= )
64 + opengl? ( media-video/movit )
65 + rtaudio? (
66 + media-libs/rtaudio
67 + kernel_linux? ( media-libs/alsa-lib )
68 + )
69 + xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 )
70 + qt5? (
71 + dev-qt/qtcore:5
72 + dev-qt/qtgui:5
73 + dev-qt/qtsvg:5
74 + dev-qt/qtwidgets:5
75 + dev-qt/qtxml:5
76 + media-libs/libexif
77 + x11-libs/libX11
78 + opengl? ( dev-qt/qtopengl:5 )
79 + )
80 + lua? ( >=dev-lang/lua-5.1.4-r4:= )
81 + python? ( ${PYTHON_DEPS} )
82 + ruby? ( ${RUBY_DEPS} )"
83 +# sox? ( media-sound/sox )
84 +# java? ( >=virtual/jre-1.5 )
85 +# perl? ( dev-lang/perl )
86 +# php? ( dev-lang/php )
87 +# tcl? ( dev-lang/tcl:0= )
88 +# vidstab? ( media-libs/libvidstab )
89 +SWIG_DEPEND=">=dev-lang/swig-2.0"
90 +DEPEND="${COMMON_DEPEND}
91 + virtual/pkgconfig
92 + compressed-lumas? ( virtual/imagemagick-tools[png] )
93 + lua? ( ${SWIG_DEPEND} virtual/pkgconfig )
94 + python? ( ${SWIG_DEPEND} )
95 + ruby? ( ${SWIG_DEPEND} )"
96 +# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 )
97 +# perl? ( ${SWIG_DEPEND} )
98 +# php? ( ${SWIG_DEPEND} )
99 +# tcl? ( ${SWIG_DEPEND} )
100 +RDEPEND="${COMMON_DEPEND}
101 + !media-libs/mlt++
102 +"
103 +
104 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
105 +
106 +pkg_setup() {
107 + use python && python-single-r1_pkg_setup
108 +}
109 +
110 +src_prepare() {
111 + epatch "${FILESDIR}"/${PN}-6.2.0-ruby-link.patch
112 +
113 + # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873
114 + for x in python lua; do
115 + sed -i "/mlt.so/s: -lmlt++ :& ${CFLAGS} ${LDFLAGS} :" src/swig/$x/build || die
116 + done
117 + sed -i "/^LDFLAGS/s: += :& ${LDFLAGS} :" src/swig/ruby/build || die
118 +
119 + sed -i -e "s/env ruby/${USE_RUBY}/" src/swig/ruby/* || die
120 +
121 + default
122 +}
123 +
124 +src_configure() {
125 + tc-export CC CXX
126 +
127 + # bug 589848
128 + append-cxxflags -std=c++11
129 +
130 + local myconf="--enable-gpl
131 + --enable-gpl3
132 + --enable-motion-est
133 + --target-arch=$(tc-arch)
134 + --disable-kde
135 + --disable-swfdec
136 + $(use_enable debug)
137 + $(use compressed-lumas && echo ' --luma-compress')
138 + $(use_enable cpu_flags_x86_sse sse)
139 + $(use_enable cpu_flags_x86_sse2 sse2)
140 + $(use_enable gtk gtk2)
141 + $(use_enable sdl)
142 + $(use_enable jack jackrack)
143 + $(use_enable ffmpeg avformat)
144 + $(use ffmpeg && echo ' --avformat-swscale')
145 + $(use_enable fftw plus)
146 + $(use_enable frei0r)
147 + $(use_enable melt)
148 + $(use_enable opencv)
149 + $(use_enable opengl)
150 + $(use_enable libsamplerate resample)
151 + $(use_enable rtaudio)
152 + $(use vdpau && echo ' --avformat-vdpau')
153 + $(use_enable xml)
154 + $(use_enable xine)
155 + $(use_enable kdenlive)
156 + --disable-sox"
157 + #$(use_enable sox) FIXME
158 +
159 + if use qt5 ; then
160 + myconf+=" --enable-qt
161 + --qt-includedir=$(pkg-config Qt5Core --variable=includedir)
162 + --qt-libdir=$(pkg-config Qt5Core --variable=libdir)"
163 + else
164 + myconf+=" --disable-qt"
165 + fi
166 +
167 + if use x86 || use amd64 ; then
168 + myconf+=" $(use_enable cpu_flags_x86_mmx mmx)"
169 + else
170 + myconf+=" --disable-mmx"
171 + fi
172 +
173 + if ! use melt; then
174 + sed -i -e "s;src/melt;;" Makefile || die
175 + fi
176 +
177 + # TODO: add swig language bindings
178 + # see also http://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover
179 +
180 + local swig_lang
181 + # TODO: java perl php tcl
182 + for i in lua python ruby ; do
183 + use $i && swig_lang="${swig_lang} $i"
184 + done
185 + [ -z "${swig_lang}" ] && swig_lang="none"
186 +
187 + econf ${myconf} --swig-languages="${swig_lang}"
188 +
189 + sed -i -e s/^OPT/#OPT/ "${S}/config.mak" || die
190 + if use qt5 ; then
191 + if ! use opengl ; then
192 + sed -i -e "/^USE_QT_OPENGL/ s/^/#/" "${S}/src/modules/qt/config.mak" || die
193 + fi
194 + fi
195 +}
196 +
197 +src_install() {
198 + emake DESTDIR="${D}" install
199 + dodoc AUTHORS ChangeLog NEWS README docs/*.txt
200 +
201 + dodir /usr/share/${PN}
202 + insinto /usr/share/${PN}
203 + doins -r demo
204 +
205 + docinto swig
206 +
207 + # Install SWIG bindings
208 + if use lua; then
209 + cd "${S}"/src/swig/lua || die
210 + exeinto $(pkg-config --variable INSTALL_CMOD lua)
211 + doexe mlt.so
212 + dodoc play.lua
213 + fi
214 +
215 + if use python; then
216 + cd "${S}"/src/swig/python || die
217 + insinto $(python_get_sitedir)
218 + doins mlt.py
219 + exeinto $(python_get_sitedir)
220 + doexe _mlt.so
221 + dodoc play.py
222 + python_optimize
223 + fi
224 +
225 + if use ruby; then
226 + cd "${S}"/src/swig/ruby || die
227 + exeinto $("${EPREFIX}"/usr/bin/${USE_RUBY} -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')
228 + doexe mlt.so
229 + dodoc play.rb thumbs.rb
230 + fi
231 + # TODO: java perl php tcl
232 +}