Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/
Date: Mon, 30 Nov 2015 12:01:00
Message-Id: 1448884846.3e1ba0100e72717cd1ad841961e00eda3b6a0a19.aballier@gentoo
1 commit: 3e1ba0100e72717cd1ad841961e00eda3b6a0a19
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 30 12:00:35 2015 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 30 12:00:46 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e1ba010
7
8 media-video/ffmpeg: bump to 2.8.3
9
10 Package-Manager: portage-2.2.26
11 Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
12
13 media-video/ffmpeg/Manifest | 1 +
14 media-video/ffmpeg/ffmpeg-2.8.3.ebuild | 456 +++++++++++++++++++++++++++++++++
15 2 files changed, 457 insertions(+)
16
17 diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
18 index 8eb4930..e6688a6 100644
19 --- a/media-video/ffmpeg/Manifest
20 +++ b/media-video/ffmpeg/Manifest
21 @@ -3,3 +3,4 @@ DIST ffmpeg-2.6.4.tar.bz2 7811925 SHA256 184f49e6b359426c398ad6c67d89abd36255837
22 DIST ffmpeg-2.7.2.tar.bz2 8157217 SHA256 7ceb7550ad628c526fa6c9ff23fdfb687a62f54d90c4a730998d8c2b417b9ef2 SHA512 cce58c63ae14dcbd3bdc4758af8427e18ac589f8bd4f2701e54b5e0e61669d5aab212e5829feb67a0fd33bc52b2d64adff93729c0696c44a0f6064a0752433dd WHIRLPOOL dd286393427b89be266ad2b122138dab578843d16bdf9b989b9546734f489c8c5c3d1ab0443ff5039b440a8430802ffe24f0fc38553688ec80984a1cce2ba2a3
23 DIST ffmpeg-2.8.1.tar.bz2 8564488 SHA256 e2ed5ab28dee1af94336739173eb0019afc21a54e38a96f4e3208e94a07866e2 SHA512 5c493f1eb84dd916f12a709a77ca0317a03ce88caaa1ee5e06b4e03c60ef4520ba58c8972841de25dcadb0da42e88592e6a87c3aca18dba62e246256c33fcf91 WHIRLPOOL f0f26375960dff80055fe257b63f11a1cc598bef9450d0da4a619bfc61ba6df185ea0dcf9c566810c7917159bb193d30a1009051c5b32ea1d746b289c782b8aa
24 DIST ffmpeg-2.8.2.tar.bz2 8573586 SHA256 830ec647f7ad774fc0caf17ba47774bf5dee7a89cbd65894f364a87ba3ad21b2 SHA512 15c1c09d7d4bb8cc7babff4c782e4bf6621ed86d6b02bffb5468bdcd294a1144bf56a8a758d2801200bb89c26ce8f5a086d818affb473364424f94f701cbf749 WHIRLPOOL 83ae9a00cba7bc906672f55d796b044d3f4baad9a56804f6482e7c27b9f526d1364dfddaa22ef32b921e5dcd0158222897935544a34c1d1e7c3b9d681067d2e0
25 +DIST ffmpeg-2.8.3.tar.bz2 8576798 SHA256 1bcf993a71839bb4a37eaa0c51daf315932b6dad6089f672294545cc51a5caf6 SHA512 aadfab7db84b85cbfe44a5c7b47e447a1711c3d78fa195f30d3f6644e95842c8d484172e4c98f75cbae5d3783f4dd2972a892123d9a9ff90be32db20b0dc8aa6 WHIRLPOOL c004fe02f300772b439ae070538d4ef4c5c514dd8a080de8e1a560597e79607b709319072f6120c35722481bc11f30077cc74a64800e390a7c5fabe82ded1718
26
27 diff --git a/media-video/ffmpeg/ffmpeg-2.8.3.ebuild b/media-video/ffmpeg/ffmpeg-2.8.3.ebuild
28 new file mode 100644
29 index 0000000..2603f85
30 --- /dev/null
31 +++ b/media-video/ffmpeg/ffmpeg-2.8.3.ebuild
32 @@ -0,0 +1,456 @@
33 +# Copyright 1999-2015 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI="5"
38 +
39 +# Subslot: libavutil major.libavcodec major.libavformat major
40 +# Since FFmpeg ships several libraries, subslot is kind of limited here.
41 +# Most consumers will use those three libraries, if a "less used" library
42 +# changes its soname, consumers will have to be rebuilt the old way
43 +# (preserve-libs).
44 +# If, for example, a package does not link to libavformat and only libavformat
45 +# changes its ABI then this package will be rebuilt needlessly. Hence, such a
46 +# package is free _not_ to := depend on FFmpeg but I would strongly encourage
47 +# doing so since such a case is unlikely.
48 +FFMPEG_SUBSLOT=54.56.56
49 +
50 +SCM=""
51 +if [ "${PV#9999}" != "${PV}" ] ; then
52 + SCM="git-2"
53 + EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git"
54 +fi
55 +
56 +inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
57 +
58 +DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec"
59 +HOMEPAGE="http://ffmpeg.org/"
60 +if [ "${PV#9999}" != "${PV}" ] ; then
61 + SRC_URI=""
62 +elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
63 + SRC_URI="mirror://gentoo/${P}.tar.bz2"
64 +else # Release
65 + SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2"
66 +fi
67 +FFMPEG_REVISION="${PV#*_p}"
68 +
69 +SLOT="0/${FFMPEG_SUBSLOT}"
70 +LICENSE="
71 + !gpl? ( LGPL-2.1 )
72 + gpl? ( GPL-2 )
73 + amr? (
74 + gpl? ( GPL-3 )
75 + !gpl? ( LGPL-3 )
76 + )
77 + encode? (
78 + aac? (
79 + gpl? ( GPL-3 )
80 + !gpl? ( LGPL-3 )
81 + )
82 + amrenc? (
83 + gpl? ( GPL-3 )
84 + !gpl? ( LGPL-3 )
85 + )
86 + )
87 + samba? ( GPL-3 )
88 +"
89 +if [ "${PV#9999}" = "${PV}" ] ; then
90 + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
91 +fi
92 +
93 +# Options to use as use_enable in the foo[:bar] form.
94 +# This will feed configure with $(use_enable foo bar)
95 +# or $(use_enable foo foo) if no :bar is set.
96 +# foo is added to IUSE.
97 +FFMPEG_FLAG_MAP=(
98 + +bzip2:bzlib cpudetection:runtime-cpudetect debug doc gnutls +gpl
99 + +hardcoded-tables +iconv lzma +network openssl +postproc
100 + samba:libsmbclient sdl:ffplay sdl vaapi vdpau X:xlib xcb:libxcb
101 + xcb:libxcb-shm xcb:libxcb-xfixes +zlib
102 + # libavdevice options
103 + cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal
104 + opengl
105 + # indevs
106 + libv4l:libv4l2 pulseaudio:libpulse
107 + # decoders
108 + amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac
109 + jpeg2k:libopenjpeg bluray:libbluray celt:libcelt gme:libgme gsm:libgsm
110 + modplug:libmodplug opus:libopus quvi:libquvi librtmp ssh:libssh
111 + schroedinger:libschroedinger speex:libspeex vorbis:libvorbis vpx:libvpx
112 + zvbi:libzvbi
113 + # libavfilter options
114 + bs2b:libbs2b flite:libflite frei0r fribidi:libfribidi fontconfig ladspa
115 + libass truetype:libfreetype
116 + # libswresample options
117 + libsoxr
118 + # Threads; we only support pthread for now but ffmpeg supports more
119 + +threads:pthreads
120 +)
121 +
122 +# Same as above but for encoders, i.e. they do something only with USE=encode.
123 +FFMPEG_ENCODER_FLAG_MAP=(
124 + aac:libvo-aacenc amrenc:libvo-amrwbenc mp3:libmp3lame
125 + aacplus:libaacplus faac:libfaac snappy:libsnappy theora:libtheora
126 + twolame:libtwolame wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265
127 + xvid:libxvid
128 +)
129 +
130 +IUSE="
131 + alsa +encode examples jack libressl oss pic static-libs test v4l
132 + ${FFMPEG_FLAG_MAP[@]%:*}
133 + ${FFMPEG_ENCODER_FLAG_MAP[@]%:*}
134 +"
135 +
136 +# Strings for CPU features in the useflag[:configure_option] form
137 +# if :configure_option isn't set, it will use 'useflag' as configure option
138 +ARM_CPU_FEATURES=( armv5te armv6 armv6t2 neon armvfp:vfp )
139 +MIPS_CPU_FEATURES=( mipsdspr1 mipsdspr2 mipsfpu )
140 +PPC_CPU_FEATURES=( altivec )
141 +X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop )
142 +X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} )
143 +X86_CPU_REQUIRED_USE="
144 + cpu_flags_x86_avx2? ( cpu_flags_x86_avx )
145 + cpu_flags_x86_fma4? ( cpu_flags_x86_avx )
146 + cpu_flags_x86_fma3? ( cpu_flags_x86_avx )
147 + cpu_flags_x86_xop? ( cpu_flags_x86_avx )
148 + cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 )
149 + cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 )
150 + cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
151 + cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
152 + cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
153 + cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
154 + cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
155 + cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx )
156 + cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow )
157 + cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
158 +"
159 +
160 +IUSE="${IUSE}
161 + ${ARM_CPU_FEATURES[@]%:*}
162 + ${MIPS_CPU_FEATURES[@]%:*}
163 + ${PPC_CPU_FEATURES[@]%:*}
164 + ${X86_CPU_FEATURES[@]%:*}
165 +"
166 +
167 +CPU_REQUIRED_USE="
168 + ${X86_CPU_REQUIRED_USE}
169 +"
170 +
171 +# "$(tc-arch):XXX" form where XXX_CPU_FEATURES are the cpu features that apply to
172 +# $(tc-arch).
173 +CPU_FEATURES_MAP="
174 + arm:ARM
175 + arm64:ARM
176 + mips:MIPS
177 + ppc:PPC
178 + ppc64:PPC
179 + x86:X86
180 + amd64:X86
181 +"
182 +
183 +FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher )
184 +IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
185 +
186 +RDEPEND="
187 + alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
188 + amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
189 + bluray? ( >=media-libs/libbluray-0.3.0-r1[${MULTILIB_USEDEP}] )
190 + bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
191 + bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
192 + cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
193 + celt? ( >=media-libs/celt-0.11.1-r1[${MULTILIB_USEDEP}] )
194 + encode? (
195 + aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
196 + aacplus? ( >=media-libs/libaacplus-2.0.2-r1[${MULTILIB_USEDEP}] )
197 + amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
198 + faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
199 + mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
200 + snappy? ( >=app-arch/snappy-1.1.2-r1[${MULTILIB_USEDEP}] )
201 + theora? (
202 + >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
203 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
204 + )
205 + twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
206 + wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
207 + webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
208 + x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
209 + x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] )
210 + xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
211 + )
212 + fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
213 + flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
214 + fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
215 + frei0r? ( media-plugins/frei0r-plugins )
216 + fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
217 + gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
218 + gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
219 + gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
220 + iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
221 + iec61883? (
222 + >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
223 + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
224 + >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
225 + )
226 + ieee1394? (
227 + >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
228 + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
229 + )
230 + jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
231 + jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
232 + libass? ( >=media-libs/libass-0.10.2[${MULTILIB_USEDEP}] )
233 + libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
234 + libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
235 + libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
236 + lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
237 + modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
238 + openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
239 + opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] )
240 + openssl? (
241 + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
242 + libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
243 + )
244 + opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
245 + pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
246 + quvi? ( media-libs/libquvi:0.4[${MULTILIB_USEDEP}] )
247 + librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
248 + samba? ( >=net-fs/samba-3.6.23-r1[${MULTILIB_USEDEP}] )
249 + schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
250 + sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
251 + speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
252 + ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] )
253 + truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
254 + vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
255 + vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
256 + vorbis? (
257 + >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
258 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
259 + )
260 + vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] )
261 + X? (
262 + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
263 + >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
264 + !xcb? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] )
265 + >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
266 + )
267 + xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] )
268 + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
269 + zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
270 + !media-video/qt-faststart
271 + postproc? ( !media-libs/libpostproc )
272 +"
273 +
274 +DEPEND="${RDEPEND}
275 + >=sys-devel/make-3.81
276 + doc? ( app-text/texi2html )
277 + fontconfig? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
278 + gnutls? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
279 + ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
280 + ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
281 + libv4l? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
282 + cpu_flags_x86_mmx? ( >=dev-lang/yasm-1.2 )
283 + librtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
284 + schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
285 + test? ( net-misc/wget sys-devel/bc )
286 + truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
287 + v4l? ( sys-kernel/linux-headers )
288 +"
289 +
290 +RDEPEND="${RDEPEND}
291 + abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
292 + !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
293 +
294 +# Code requiring FFmpeg to be built under gpl license
295 +GPL_REQUIRED_USE="
296 + postproc? ( gpl )
297 + frei0r? ( gpl )
298 + cdio? ( gpl )
299 + samba? ( gpl )
300 + zvbi? ( gpl )
301 + encode? (
302 + x264? ( gpl )
303 + x265? ( gpl )
304 + xvid? ( gpl )
305 + X? ( !xcb? ( gpl ) )
306 + )
307 +"
308 +REQUIRED_USE="
309 + libv4l? ( v4l )
310 + fftools_cws2fws? ( zlib )
311 + test? ( encode )
312 + ${GPL_REQUIRED_USE}
313 + ${CPU_REQUIRED_USE}"
314 +RESTRICT="
315 + encode? ( faac? ( bindist ) aacplus? ( bindist ) )
316 + gpl? ( openssl? ( bindist ) fdk? ( bindist ) )
317 +"
318 +
319 +S=${WORKDIR}/${P/_/-}
320 +
321 +MULTILIB_WRAPPED_HEADERS=(
322 + /usr/include/libavutil/avconfig.h
323 +)
324 +
325 +src_prepare() {
326 + if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
327 + export revision=git-N-${FFMPEG_REVISION}
328 + fi
329 + epatch "${FILESDIR}/libvpx15.patch"
330 + epatch_user
331 +}
332 +
333 +multilib_src_configure() {
334 + local myconf=( ${EXTRA_FFMPEG_CONF} )
335 +
336 + local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
337 + use openssl && use gpl && myconf+=( --enable-nonfree )
338 + use samba && myconf+=( --enable-version3 )
339 +
340 + # Encoders
341 + if use encode ; then
342 + ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
343 +
344 + # Licensing.
345 + if use aac || use amrenc ; then
346 + myconf+=( --enable-version3 )
347 + fi
348 + if use aacplus || use faac ; then
349 + myconf+=( --enable-nonfree )
350 + fi
351 + else
352 + myconf+=( --disable-encoders )
353 + fi
354 +
355 + # Indevs
356 + use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 )
357 + for i in alsa oss jack ; do
358 + use ${i} || myconf+=( --disable-indev=${i} )
359 + done
360 + use xcb || ffuse+=( X:x11grab )
361 +
362 + # Outdevs
363 + for i in alsa oss sdl ; do
364 + use ${i} || myconf+=( --disable-outdev=${i} )
365 + done
366 +
367 + # Decoders
368 + use amr && myconf+=( --enable-version3 )
369 + use fdk && use gpl && myconf+=( --enable-nonfree )
370 +
371 + for i in "${ffuse[@]#+}" ; do
372 + myconf+=( $(use_enable ${i%:*} ${i#*:}) )
373 + done
374 +
375 + # (temporarily) disable non-multilib deps
376 + if ! multilib_is_native_abi; then
377 + for i in frei0r ; do
378 + myconf+=( --disable-${i} )
379 + done
380 + fi
381 +
382 + # CPU features
383 + for i in ${CPU_FEATURES_MAP} ; do
384 + if [ "$(tc-arch)" = "${i%:*}" ] ; then
385 + local var="${i#*:}_CPU_FEATURES[@]"
386 + for j in ${!var} ; do
387 + use ${j%:*} || myconf+=( --disable-${j#*:} )
388 + done
389 + fi
390 + done
391 +
392 + if use pic ; then
393 + myconf+=( --enable-pic )
394 + # disable asm code if PIC is required
395 + # as the provided asm decidedly is not PIC for x86.
396 + [[ ${ABI} == x86 ]] && myconf+=( --disable-asm )
397 + fi
398 + [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004
399 +
400 + # Try to get cpu type based on CFLAGS.
401 + # Bug #172723
402 + # We need to do this so that features of that CPU will be better used
403 + # If they contain an unknown CPU it will not hurt since ffmpeg's configure
404 + # will just ignore it.
405 + for i in $(get-flag mcpu) $(get-flag march) $(get-flag mtune) ; do
406 + [[ ${i} = native ]] && i="host" # bug #273421
407 + myconf+=( --cpu=${i} )
408 + break
409 + done
410 +
411 + # Mandatory configuration
412 + myconf=(
413 + --enable-avfilter
414 + --enable-avresample
415 + --disable-stripping
416 + "${myconf[@]}"
417 + )
418 +
419 + # cross compile support
420 + if tc-is-cross-compiler ; then
421 + myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
422 + case ${CHOST} in
423 + *freebsd*)
424 + myconf+=( --target-os=freebsd )
425 + ;;
426 + mingw32*)
427 + myconf+=( --target-os=mingw32 )
428 + ;;
429 + *linux*)
430 + myconf+=( --target-os=linux )
431 + ;;
432 + esac
433 + fi
434 +
435 + set -- "${S}/configure" \
436 + --prefix="${EPREFIX}/usr" \
437 + --libdir="${EPREFIX}/usr/$(get_libdir)" \
438 + --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
439 + --mandir="${EPREFIX}/usr/share/man" \
440 + --enable-shared \
441 + --cc="$(tc-getCC)" \
442 + --cxx="$(tc-getCXX)" \
443 + --ar="$(tc-getAR)" \
444 + --optflags=" " \
445 + $(use_enable static-libs static) \
446 + "${myconf[@]}"
447 + echo "${@}"
448 + "${@}" || die
449 +}
450 +
451 +multilib_src_compile() {
452 + emake V=1
453 +
454 + if multilib_is_native_abi; then
455 + for i in "${FFTOOLS[@]}" ; do
456 + if use fftools_${i} ; then
457 + emake V=1 tools/${i}
458 + fi
459 + done
460 + fi
461 +}
462 +
463 +multilib_src_install() {
464 + emake V=1 DESTDIR="${D}" install install-man
465 +
466 + if multilib_is_native_abi; then
467 + for i in "${FFTOOLS[@]}" ; do
468 + if use fftools_${i} ; then
469 + dobin tools/${i}
470 + fi
471 + done
472 + fi
473 +}
474 +
475 +multilib_src_install_all() {
476 + dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
477 + [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
478 + use doc && dohtml -r doc/*
479 + if use examples ; then
480 + dodoc -r doc/examples
481 + docompress -x /usr/share/doc/${PF}/examples
482 + fi
483 +}
484 +
485 +multilib_src_test() {
486 + LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil:${BUILD_DIR}/libavresample" \
487 + emake V=1 fate
488 +}