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: Tue, 29 Mar 2016 14:19:48
Message-Id: 1459261167.a37239953955665d97acf413734afff74340287a.aballier@gentoo
1 commit: a37239953955665d97acf413734afff74340287a
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 29 13:40:05 2016 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 29 14:19:27 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3723995
7
8 media-video/ffmpeg: bump to 3.0.1
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-3.0.1.ebuild | 462 +++++++++++++++++++++++++++++++++
15 2 files changed, 463 insertions(+)
16
17 diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
18 index 922a8f2..966ce28 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-3.0.1.tar.bz2 8879122 SHA256 f7f7052c120f494dd501f96becff9b5a4ae10cfbde97bc2f1e9f0fd6613a4984 SHA512 417ceba9ca3e179ee0c3c4fead7c55f4b6f074bc156516dd61dae0bee0f8f7b2fe79c06c7aa7a748fecba48b8ff96cc4c24d395a833064f1962698ac5fd5a9ad WHIRLPOOL cbb28a851b6df518ae06d89b021a9363183c8b7c59a53125038fd7b32b4954dc1852edd35dde1d05c535631e13512652dea07e75d60b13992ee3653902ecfe9c
24 DIST ffmpeg-3.0.tar.bz2 8879514 SHA256 f19ff77a2f7f736a41dd1499eef4784bf3cb7461f07c13a268164823590113c0 SHA512 0128ab248dbc8134054ef58dccb1316971b7abdb52c593e2d2be7fadea2aa5a07afecbc330dbc7a088fb4559e1d0a5cf42d51ae7f957155a45b73ee516f13071 WHIRLPOOL 5872023db97df3d4f1b42eb0a988cfe9f9fcc423df07d8bad2f7eaab910dcbfd3d4bc1071506a919ac491eeacaa40736c6a1c4d0d0cda61c4c4c048760a56ddf
25
26 diff --git a/media-video/ffmpeg/ffmpeg-3.0.1.ebuild b/media-video/ffmpeg/ffmpeg-3.0.1.ebuild
27 new file mode 100644
28 index 0000000..fd5dd6f
29 --- /dev/null
30 +++ b/media-video/ffmpeg/ffmpeg-3.0.1.ebuild
31 @@ -0,0 +1,462 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=6
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=55.57.57
48 +
49 +SCM=""
50 +if [ "${PV#9999}" != "${PV}" ] ; then
51 + SCM="git-r3"
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 + gmp? (
77 + gpl? ( GPL-3 )
78 + !gpl? ( LGPL-3 )
79 + )
80 + encode? (
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="~amd64 ~mips ~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 gcrypt gnutls gmp
98 + +gpl +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 dcadec:libdcadec fdk:libfdk-aac
108 + jpeg2k:libopenjpeg bluray:libbluray celt:libcelt gme:libgme gsm:libgsm
109 + mmal modplug:libmodplug opus:libopus libilbc librtmp ssh:libssh
110 + schroedinger:libschroedinger speex:libspeex vorbis:libvorbis vpx:libvpx
111 + zvbi:libzvbi
112 + # libavfilter options
113 + bs2b:libbs2b chromaprint flite:libflite frei0r fribidi:libfribidi
114 + fontconfig ladspa libass truetype:libfreetype rubberband:librubberband
115 + zimg:libzimg
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 + amrenc:libvo-amrwbenc mp3:libmp3lame
125 + faac:libfaac kvazaar:libkvazaar nvenc:nvenc
126 + openh264:libopenh264 snappy:libsnappy theora:libtheora twolame:libtwolame
127 + wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265 xvid:libxvid
128 +)
129 +
130 +IUSE="
131 + alsa doc +encode jack 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 aes:aesni 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_aes? ( cpu_flags_x86_sse4_2 )
150 + cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 )
151 + cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
152 + cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
153 + cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
154 + cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
155 + cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
156 + cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx )
157 + cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow )
158 + cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
159 +"
160 +
161 +IUSE="${IUSE}
162 + ${ARM_CPU_FEATURES[@]%:*}
163 + ${MIPS_CPU_FEATURES[@]%:*}
164 + ${PPC_CPU_FEATURES[@]%:*}
165 + ${X86_CPU_FEATURES[@]%:*}
166 +"
167 +
168 +CPU_REQUIRED_USE="
169 + ${X86_CPU_REQUIRED_USE}
170 +"
171 +
172 +# "$(tc-arch):XXX" form where XXX_CPU_FEATURES are the cpu features that apply to
173 +# $(tc-arch).
174 +CPU_FEATURES_MAP="
175 + arm:ARM
176 + arm64:ARM
177 + mips:MIPS
178 + ppc:PPC
179 + ppc64:PPC
180 + x86:X86
181 + amd64:X86
182 +"
183 +
184 +FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher )
185 +IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
186 +
187 +RDEPEND="
188 + alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
189 + amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
190 + bluray? ( >=media-libs/libbluray-0.3.0-r1[${MULTILIB_USEDEP}] )
191 + bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
192 + bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
193 + cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
194 + celt? ( >=media-libs/celt-0.11.1-r1[${MULTILIB_USEDEP}] )
195 + chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] )
196 + dcadec? ( media-sound/dcadec[${MULTILIB_USEDEP}] )
197 + encode? (
198 + amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
199 + faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
200 + kvazaar? ( media-libs/kvazaar[${MULTILIB_USEDEP}] )
201 + mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
202 + nvenc? ( media-video/nvidia_video_sdk )
203 + openh264? ( >=media-libs/openh264-1.4.0-r1[${MULTILIB_USEDEP}] )
204 + snappy? ( >=app-arch/snappy-1.1.2-r1[${MULTILIB_USEDEP}] )
205 + theora? (
206 + >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
207 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
208 + )
209 + twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
210 + wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
211 + webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
212 + x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
213 + x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] )
214 + xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
215 + )
216 + fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
217 + flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
218 + fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
219 + frei0r? ( media-plugins/frei0r-plugins )
220 + fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
221 + gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] )
222 + gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
223 + gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] )
224 + gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
225 + gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
226 + iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
227 + iec61883? (
228 + >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
229 + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
230 + >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
231 + )
232 + ieee1394? (
233 + >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
234 + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
235 + )
236 + jack? ( virtual/jack[${MULTILIB_USEDEP}] )
237 + jpeg2k? ( >=media-libs/openjpeg-2:2[${MULTILIB_USEDEP}] )
238 + libass? ( >=media-libs/libass-0.10.2[${MULTILIB_USEDEP}] )
239 + libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
240 + libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] )
241 + libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
242 + libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
243 + lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
244 + mmal? ( media-libs/raspberrypi-userland )
245 + modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
246 + openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
247 + opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] )
248 + openssl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
249 + opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
250 + pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
251 + librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
252 + rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] )
253 + samba? ( >=net-fs/samba-3.6.23-r1[${MULTILIB_USEDEP}] )
254 + schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
255 + sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
256 + speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
257 + ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] )
258 + truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
259 + vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
260 + vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
261 + vorbis? (
262 + >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
263 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
264 + )
265 + vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] )
266 + X? (
267 + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
268 + >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
269 + !xcb? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] )
270 + >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
271 + )
272 + xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] )
273 + zimg? ( media-libs/zimg[${MULTILIB_USEDEP}] )
274 + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
275 + zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
276 + !media-video/qt-faststart
277 + postproc? ( !media-libs/libpostproc )
278 +"
279 +
280 +DEPEND="${RDEPEND}
281 + >=sys-devel/make-3.81
282 + doc? ( sys-apps/texinfo )
283 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
284 + ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
285 + cpu_flags_x86_mmx? ( >=dev-lang/yasm-1.2 )
286 + test? ( net-misc/wget sys-devel/bc )
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 + 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 ) nvenc? ( 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 + default
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 amrenc ; then
344 + myconf+=( --enable-version3 )
345 + fi
346 + if use faac || use nvenc ; 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 gmp && myconf+=( --enable-version3 )
368 + use fdk && use gpl && myconf+=( --enable-nonfree )
369 +
370 + for i in "${ffuse[@]#+}" ; do
371 + myconf+=( $(use_enable ${i%:*} ${i#*:}) )
372 + done
373 +
374 + # (temporarily) disable non-multilib deps
375 + if ! multilib_is_native_abi; then
376 + for i in frei0r ; do
377 + myconf+=( --disable-${i} )
378 + done
379 + fi
380 +
381 + # CPU features
382 + for i in ${CPU_FEATURES_MAP} ; do
383 + if [ "$(tc-arch)" = "${i%:*}" ] ; then
384 + local var="${i#*:}_CPU_FEATURES[@]"
385 + for j in ${!var} ; do
386 + use ${j%:*} || myconf+=( --disable-${j#*:} )
387 + done
388 + fi
389 + done
390 +
391 + if use pic ; then
392 + myconf+=( --enable-pic )
393 + # disable asm code if PIC is required
394 + # as the provided asm decidedly is not PIC for x86.
395 + [[ ${ABI} == x86 ]] && myconf+=( --disable-asm )
396 + fi
397 + [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004
398 +
399 + # Try to get cpu type based on CFLAGS.
400 + # Bug #172723
401 + # We need to do this so that features of that CPU will be better used
402 + # If they contain an unknown CPU it will not hurt since ffmpeg's configure
403 + # will just ignore it.
404 + for i in $(get-flag mcpu) $(get-flag march) ; do
405 + [[ ${i} = native ]] && i="host" # bug #273421
406 + myconf+=( --cpu=${i} )
407 + break
408 + done
409 +
410 + # LTO support, bug #566282
411 + is-flagq "-flto*" && myconf+=( "--enable-lto" )
412 +
413 + # Mandatory configuration
414 + myconf=(
415 + --enable-avfilter
416 + --enable-avresample
417 + --disable-stripping
418 + "${myconf[@]}"
419 + )
420 +
421 + # cross compile support
422 + if tc-is-cross-compiler ; then
423 + myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
424 + case ${CHOST} in
425 + *freebsd*)
426 + myconf+=( --target-os=freebsd )
427 + ;;
428 + mingw32*)
429 + myconf+=( --target-os=mingw32 )
430 + ;;
431 + *linux*)
432 + myconf+=( --target-os=linux )
433 + ;;
434 + esac
435 + fi
436 +
437 + # doc
438 + myconf+=(
439 + $(multilib_native_use_enable doc)
440 + $(multilib_native_use_enable doc htmlpages)
441 + $(multilib_native_enable manpages)
442 + )
443 +
444 + set -- "${S}/configure" \
445 + --prefix="${EPREFIX}/usr" \
446 + --libdir="${EPREFIX}/usr/$(get_libdir)" \
447 + --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
448 + --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
449 + --mandir="${EPREFIX}/usr/share/man" \
450 + --enable-shared \
451 + --cc="$(tc-getCC)" \
452 + --cxx="$(tc-getCXX)" \
453 + --ar="$(tc-getAR)" \
454 + --optflags="${CFLAGS}" \
455 + $(use_enable static-libs static) \
456 + "${myconf[@]}"
457 + echo "${@}"
458 + "${@}" || die
459 +}
460 +
461 +multilib_src_compile() {
462 + emake V=1
463 +
464 + if multilib_is_native_abi; then
465 + for i in "${FFTOOLS[@]}" ; do
466 + if use fftools_${i} ; then
467 + emake V=1 tools/${i}
468 + fi
469 + done
470 + fi
471 +}
472 +
473 +multilib_src_install() {
474 + emake V=1 DESTDIR="${D}" install install-doc
475 +
476 + if multilib_is_native_abi; then
477 + for i in "${FFTOOLS[@]}" ; do
478 + if use fftools_${i} ; then
479 + dobin tools/${i}
480 + fi
481 + done
482 + fi
483 +}
484 +
485 +multilib_src_install_all() {
486 + dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
487 + [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
488 +}
489 +
490 +multilib_src_test() {
491 + 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" \
492 + emake V=1 fate
493 +}