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.eebe6d0b4d0f20c8d9ef67f938ffe8674886a7c9.aballier@gentoo
1 commit: eebe6d0b4d0f20c8d9ef67f938ffe8674886a7c9
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 30 12:56:38 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=eebe6d0b
7
8 media-video/ffmpeg: bump to 3.0.2
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.2.ebuild | 462 +++++++++++++++++++++++++++++++++
15 2 files changed, 463 insertions(+)
16
17 diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
18 index 91df101..76c2ea0 100644
19 --- a/media-video/ffmpeg/Manifest
20 +++ b/media-video/ffmpeg/Manifest
21 @@ -1,3 +1,4 @@
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 +DIST ffmpeg-3.0.2.tar.bz2 8883140 SHA256 30e3c77c2f4c358ed087869455a7496cbd7753a5e1b98d20ba49c1004009fd36 SHA512 67697334899b57efd6cfaebca1bb7450635034af34daae1caf77c57239116a7d2854eef3da967d3d1be4b89f346c79e970dc221543ab6181088172460807bc91 WHIRLPOOL f8aab8adb24a420bd6435454a84bc4a8e5068dea82a8282b4037470a9c9131f41d476dea0fdd9b659e9f91f2a835b19cc2bd9d70aa81bcbe861ec32ce954903a
26
27 diff --git a/media-video/ffmpeg/ffmpeg-3.0.2.ebuild b/media-video/ffmpeg/ffmpeg-3.0.2.ebuild
28 new file mode 100644
29 index 0000000..6abf75c
30 --- /dev/null
31 +++ b/media-video/ffmpeg/ffmpeg-3.0.2.ebuild
32 @@ -0,0 +1,462 @@
33 +# Copyright 1999-2016 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI=6
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=55.57.57
49 +
50 +SCM=""
51 +if [ "${PV#9999}" != "${PV}" ] ; then
52 + SCM="git-r3"
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 + gmp? (
78 + gpl? ( GPL-3 )
79 + !gpl? ( LGPL-3 )
80 + )
81 + encode? (
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="~amd64 ~mips ~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 gcrypt gnutls gmp
99 + +gpl +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 dcadec:libdcadec fdk:libfdk-aac
109 + jpeg2k:libopenjpeg bluray:libbluray celt:libcelt gme:libgme gsm:libgsm
110 + mmal modplug:libmodplug opus:libopus libilbc librtmp ssh:libssh
111 + schroedinger:libschroedinger speex:libspeex vorbis:libvorbis vpx:libvpx
112 + zvbi:libzvbi
113 + # libavfilter options
114 + bs2b:libbs2b chromaprint flite:libflite frei0r fribidi:libfribidi
115 + fontconfig ladspa libass truetype:libfreetype rubberband:librubberband
116 + zimg:libzimg
117 + # libswresample options
118 + libsoxr
119 + # Threads; we only support pthread for now but ffmpeg supports more
120 + +threads:pthreads
121 +)
122 +
123 +# Same as above but for encoders, i.e. they do something only with USE=encode.
124 +FFMPEG_ENCODER_FLAG_MAP=(
125 + amrenc:libvo-amrwbenc mp3:libmp3lame
126 + faac:libfaac kvazaar:libkvazaar nvenc:nvenc
127 + openh264:libopenh264 snappy:libsnappy theora:libtheora twolame:libtwolame
128 + wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265 xvid:libxvid
129 +)
130 +
131 +IUSE="
132 + alsa doc +encode jack oss pic static-libs test v4l
133 + ${FFMPEG_FLAG_MAP[@]%:*}
134 + ${FFMPEG_ENCODER_FLAG_MAP[@]%:*}
135 +"
136 +
137 +# Strings for CPU features in the useflag[:configure_option] form
138 +# if :configure_option isn't set, it will use 'useflag' as configure option
139 +ARM_CPU_FEATURES=( armv5te armv6 armv6t2 neon armvfp:vfp )
140 +MIPS_CPU_FEATURES=( mipsdspr1 mipsdspr2 mipsfpu )
141 +PPC_CPU_FEATURES=( altivec )
142 +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 )
143 +X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} )
144 +X86_CPU_REQUIRED_USE="
145 + cpu_flags_x86_avx2? ( cpu_flags_x86_avx )
146 + cpu_flags_x86_fma4? ( cpu_flags_x86_avx )
147 + cpu_flags_x86_fma3? ( cpu_flags_x86_avx )
148 + cpu_flags_x86_xop? ( cpu_flags_x86_avx )
149 + cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 )
150 + cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 )
151 + cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 )
152 + cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
153 + cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
154 + cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
155 + cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
156 + cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
157 + cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx )
158 + cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow )
159 + cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
160 +"
161 +
162 +IUSE="${IUSE}
163 + ${ARM_CPU_FEATURES[@]%:*}
164 + ${MIPS_CPU_FEATURES[@]%:*}
165 + ${PPC_CPU_FEATURES[@]%:*}
166 + ${X86_CPU_FEATURES[@]%:*}
167 +"
168 +
169 +CPU_REQUIRED_USE="
170 + ${X86_CPU_REQUIRED_USE}
171 +"
172 +
173 +# "$(tc-arch):XXX" form where XXX_CPU_FEATURES are the cpu features that apply to
174 +# $(tc-arch).
175 +CPU_FEATURES_MAP="
176 + arm:ARM
177 + arm64:ARM
178 + mips:MIPS
179 + ppc:PPC
180 + ppc64:PPC
181 + x86:X86
182 + amd64:X86
183 +"
184 +
185 +FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher )
186 +IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
187 +
188 +RDEPEND="
189 + alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
190 + amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
191 + bluray? ( >=media-libs/libbluray-0.3.0-r1[${MULTILIB_USEDEP}] )
192 + bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
193 + bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
194 + cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
195 + celt? ( >=media-libs/celt-0.11.1-r1[${MULTILIB_USEDEP}] )
196 + chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] )
197 + dcadec? ( media-sound/dcadec[${MULTILIB_USEDEP}] )
198 + encode? (
199 + amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
200 + faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
201 + kvazaar? ( media-libs/kvazaar[${MULTILIB_USEDEP}] )
202 + mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
203 + nvenc? ( media-video/nvidia_video_sdk )
204 + openh264? ( >=media-libs/openh264-1.4.0-r1[${MULTILIB_USEDEP}] )
205 + snappy? ( >=app-arch/snappy-1.1.2-r1[${MULTILIB_USEDEP}] )
206 + theora? (
207 + >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
208 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
209 + )
210 + twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
211 + wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
212 + webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
213 + x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
214 + x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] )
215 + xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
216 + )
217 + fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
218 + flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
219 + fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
220 + frei0r? ( media-plugins/frei0r-plugins )
221 + fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
222 + gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] )
223 + gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
224 + gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] )
225 + gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
226 + gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
227 + iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
228 + iec61883? (
229 + >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
230 + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
231 + >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
232 + )
233 + ieee1394? (
234 + >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
235 + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
236 + )
237 + jack? ( virtual/jack[${MULTILIB_USEDEP}] )
238 + jpeg2k? ( >=media-libs/openjpeg-2:2[${MULTILIB_USEDEP}] )
239 + libass? ( >=media-libs/libass-0.10.2[${MULTILIB_USEDEP}] )
240 + libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
241 + libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] )
242 + libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
243 + libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
244 + lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
245 + mmal? ( media-libs/raspberrypi-userland )
246 + modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
247 + openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
248 + opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] )
249 + openssl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
250 + opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
251 + pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
252 + librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
253 + rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] )
254 + samba? ( >=net-fs/samba-3.6.23-r1[${MULTILIB_USEDEP}] )
255 + schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
256 + sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
257 + speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
258 + ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] )
259 + truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
260 + vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
261 + vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
262 + vorbis? (
263 + >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
264 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
265 + )
266 + vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] )
267 + X? (
268 + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
269 + >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
270 + !xcb? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] )
271 + >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
272 + )
273 + xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] )
274 + zimg? ( media-libs/zimg[${MULTILIB_USEDEP}] )
275 + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
276 + zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
277 + !media-video/qt-faststart
278 + postproc? ( !media-libs/libpostproc )
279 +"
280 +
281 +DEPEND="${RDEPEND}
282 + >=sys-devel/make-3.81
283 + doc? ( sys-apps/texinfo )
284 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
285 + ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
286 + cpu_flags_x86_mmx? ( >=dev-lang/yasm-1.2 )
287 + test? ( net-misc/wget sys-devel/bc )
288 + v4l? ( sys-kernel/linux-headers )
289 +"
290 +
291 +RDEPEND="${RDEPEND}
292 + abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
293 + !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
294 +
295 +# Code requiring FFmpeg to be built under gpl license
296 +GPL_REQUIRED_USE="
297 + postproc? ( gpl )
298 + frei0r? ( gpl )
299 + cdio? ( gpl )
300 + samba? ( 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 ) nvenc? ( 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 + default
330 +}
331 +
332 +multilib_src_configure() {
333 + local myconf=( ${EXTRA_FFMPEG_CONF} )
334 +
335 + local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
336 + use openssl && use gpl && myconf+=( --enable-nonfree )
337 + use samba && myconf+=( --enable-version3 )
338 +
339 + # Encoders
340 + if use encode ; then
341 + ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
342 +
343 + # Licensing.
344 + if use amrenc ; then
345 + myconf+=( --enable-version3 )
346 + fi
347 + if use faac || use nvenc ; then
348 + myconf+=( --enable-nonfree )
349 + fi
350 + else
351 + myconf+=( --disable-encoders )
352 + fi
353 +
354 + # Indevs
355 + use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 )
356 + for i in alsa oss jack ; do
357 + use ${i} || myconf+=( --disable-indev=${i} )
358 + done
359 + use xcb || ffuse+=( X:x11grab )
360 +
361 + # Outdevs
362 + for i in alsa oss sdl ; do
363 + use ${i} || myconf+=( --disable-outdev=${i} )
364 + done
365 +
366 + # Decoders
367 + use amr && myconf+=( --enable-version3 )
368 + use gmp && 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) ; do
406 + [[ ${i} = native ]] && i="host" # bug #273421
407 + myconf+=( --cpu=${i} )
408 + break
409 + done
410 +
411 + # LTO support, bug #566282
412 + is-flagq "-flto*" && myconf+=( "--enable-lto" )
413 +
414 + # Mandatory configuration
415 + myconf=(
416 + --enable-avfilter
417 + --enable-avresample
418 + --disable-stripping
419 + "${myconf[@]}"
420 + )
421 +
422 + # cross compile support
423 + if tc-is-cross-compiler ; then
424 + myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
425 + case ${CHOST} in
426 + *freebsd*)
427 + myconf+=( --target-os=freebsd )
428 + ;;
429 + *mingw32*)
430 + myconf+=( --target-os=mingw32 )
431 + ;;
432 + *linux*)
433 + myconf+=( --target-os=linux )
434 + ;;
435 + esac
436 + fi
437 +
438 + # doc
439 + myconf+=(
440 + $(multilib_native_use_enable doc)
441 + $(multilib_native_use_enable doc htmlpages)
442 + $(multilib_native_enable manpages)
443 + )
444 +
445 + set -- "${S}/configure" \
446 + --prefix="${EPREFIX}/usr" \
447 + --libdir="${EPREFIX}/usr/$(get_libdir)" \
448 + --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
449 + --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
450 + --mandir="${EPREFIX}/usr/share/man" \
451 + --enable-shared \
452 + --cc="$(tc-getCC)" \
453 + --cxx="$(tc-getCXX)" \
454 + --ar="$(tc-getAR)" \
455 + --optflags="${CFLAGS}" \
456 + $(use_enable static-libs static) \
457 + "${myconf[@]}"
458 + echo "${@}"
459 + "${@}" || die
460 +}
461 +
462 +multilib_src_compile() {
463 + emake V=1
464 +
465 + if multilib_is_native_abi; then
466 + for i in "${FFTOOLS[@]}" ; do
467 + if use fftools_${i} ; then
468 + emake V=1 tools/${i}
469 + fi
470 + done
471 + fi
472 +}
473 +
474 +multilib_src_install() {
475 + emake V=1 DESTDIR="${D}" install install-doc
476 +
477 + if multilib_is_native_abi; then
478 + for i in "${FFTOOLS[@]}" ; do
479 + if use fftools_${i} ; then
480 + dobin tools/${i}
481 + fi
482 + done
483 + fi
484 +}
485 +
486 +multilib_src_install_all() {
487 + dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
488 + [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
489 +}
490 +
491 +multilib_src_test() {
492 + 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" \
493 + emake V=1 fate
494 +}