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: Fri, 26 Aug 2016 16:59:25
Message-Id: 1472230739.8b38e9d937174499aca0d4aeeb403a314a671d1a.aballier@gentoo
1 commit: 8b38e9d937174499aca0d4aeeb403a314a671d1a
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 26 12:30:30 2016 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 26 16:58:59 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b38e9d9
7
8 media-video/ffmpeg: bump to 3.1.3
9
10 Package-Manager: portage-2.3.0
11
12 media-video/ffmpeg/Manifest | 1 +
13 media-video/ffmpeg/ffmpeg-3.1.3.ebuild | 462 +++++++++++++++++++++++++++++++++
14 2 files changed, 463 insertions(+)
15
16 diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
17 index a128aa2..44ac6d4 100644
18 --- a/media-video/ffmpeg/Manifest
19 +++ b/media-video/ffmpeg/Manifest
20 @@ -4,3 +4,4 @@ DIST ffmpeg-3.0.1.tar.bz2 8879122 SHA256 f7f7052c120f494dd501f96becff9b5a4ae10cf
21 DIST ffmpeg-3.0.2.tar.bz2 8883140 SHA256 30e3c77c2f4c358ed087869455a7496cbd7753a5e1b98d20ba49c1004009fd36 SHA512 67697334899b57efd6cfaebca1bb7450635034af34daae1caf77c57239116a7d2854eef3da967d3d1be4b89f346c79e970dc221543ab6181088172460807bc91 WHIRLPOOL f8aab8adb24a420bd6435454a84bc4a8e5068dea82a8282b4037470a9c9131f41d476dea0fdd9b659e9f91f2a835b19cc2bd9d70aa81bcbe861ec32ce954903a
22 DIST ffmpeg-3.1.1.tar.bz2 9327512 SHA256 a5bca50a90a37b983eaa17c483a387189175f37ca678ae7e51d43e7610b4b3b4 SHA512 b5b4b2d518affa708b05f72201d5ac20446c88b5fb4dd8586cdc29d1132c678be94898e4f5ad27bef4ac987557305838133f45e94ff55d65f22a76f4f312888a WHIRLPOOL cb4cd3505a3b35f41023f6a87e3d724eed14e9c6e786bdc84d9e9c5c24d37ec0590ab130858107cd05c0522ceedd8e2d899b05a58d7cc52e384faaffe805dc13
23 DIST ffmpeg-3.1.2.tar.bz2 9331621 SHA256 62eb8d810b93c1ffc23739c0824a91eabfe5e7be81fab34ce740736a110b70f7 SHA512 c12985310043aab49af5985fa0a6d6cbcd698bb1495066d6b262f449cd90943b072efa7eb3158b48bf3f96c80f06d68ca790271a5fd445d941333a8f540555bf WHIRLPOOL 1373de966e5fa5503b7b53ceaff99dce1c3d4b37f3c617aa520f8e7bc1d5b2f4c3453e37d96fbfb4af8628df797f56476f826fce05c241ce3ef19d20f5dedfe8
24 +DIST ffmpeg-3.1.3.tar.bz2 9333069 SHA256 58bc89c65dd114d874efbf76f76368d03b5e407f0a3f42d5b40801c280968a38 SHA512 2c17414b11ea54bc5360e54651daa1c21c4138da86a13900214c5f0209305c6315f9ee81deedffae90f61b2684295e9050a87b3c64d34193ee1695f5ae1a7d96 WHIRLPOOL b60f3a7d97a63ce201e744a9213437621dbcff6a216dc09ff9b863f0a2ca672b177f9d61a809f84393af711cd1cfe91c08b9d14b2d2a6c36b32294351b3bace8
25
26 diff --git a/media-video/ffmpeg/ffmpeg-3.1.3.ebuild b/media-video/ffmpeg/ffmpeg-3.1.3.ebuild
27 new file mode 100644
28 index 00000000..19db1ed
29 --- /dev/null
30 +++ b/media-video/ffmpeg/ffmpeg-3.1.3.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="~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 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 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 ebur128:libebur128 flite:libflite frei0r
114 + fribidi:libfribidi fontconfig ladspa libass truetype:libfreetype
115 + rubberband:librubberband 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 + ebur128? ( >=media-libs/libebur128-1.1.0[${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 ) )
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 ; 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 +}