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