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, 28 Oct 2016 13:01:11
Message-Id: 1477659617.66a0e948c46e86111f1018610e3af5e30545a12c.aballier@gentoo
1 commit: 66a0e948c46e86111f1018610e3af5e30545a12c
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 28 13:00:11 2016 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 28 13:00:17 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66a0e948
7
8 media-video/ffmpeg: bump to 3.2
9
10 Package-Manager: portage-2.3.2
11
12 media-video/ffmpeg/Manifest | 1 +
13 media-video/ffmpeg/ffmpeg-3.2.ebuild | 457 +++++++++++++++++++++++++++++++++++
14 2 files changed, 458 insertions(+)
15
16 diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
17 index db75107..268e6f9 100644
18 --- a/media-video/ffmpeg/Manifest
19 +++ b/media-video/ffmpeg/Manifest
20 @@ -2,3 +2,4 @@ DIST ffmpeg-2.8.6.tar.bz2 8582420 SHA256 40611e329bc354592c6f8f1deb033c31b91f80e
21 DIST ffmpeg-2.8.7.tar.bz2 8581128 SHA256 8777ce4a335640fdd13680ba423ef6da330ff5071bfbe27cdbb452379167efe5 SHA512 26c7e50b76c89c606f4a3894c7c42bf1dc70b1778df879ba66723b0b29bfb7a206004bd3e9da29a27f57cf870ce395eb8b7ff1d53d7ba7b3c620d956b1c4cb06 WHIRLPOOL 361a3ef9c664b3b5f489b871071a1ce581cfef089a6a1014988e6c7463d45533d3a8af9b3e49ddb7e2257cef06205771d8e584a090d65e3c645421e963346a35
22 DIST ffmpeg-2.8.8.tar.bz2 8583641 SHA256 b70848958feadca180315d17b1131a1b519527971590e6ee8363a4c568ed06a6 SHA512 26fc2f9da8b0c62fb3147632476d328dff096f07efc83112dd3cf3a1da6b42edab053ef8f05d2035c5f824d9336020b3b4a99501243f83ec66255f082278bfb3 WHIRLPOOL 9ba67f08dcfbed0c3519767d9fea35f24a3652290ad095d01d928cf9f54e9e99afa410889c6afb84f22cd9882b5a7d44f304d602b41510973962517228f5f32f
23 DIST ffmpeg-3.1.5.tar.bz2 9334190 SHA256 2400882a2c7795c74f0abebc28d267f2796510fb69ba324b0e9f16cc8dbb0d2b SHA512 9d22d48318cf6d44ce3a4d2ee57fa51d04c685a1c72e9668f5ad4443d246a33108f66f1dc9106e1c4db52b6c2c267b6682b9b7c3d267e4c37e4460f4169b97d1 WHIRLPOOL fda0698359383dda01ba8b96e3004d64fb8c32534771c6eb21d1daeca32596d2a2de566eb991170a259de31b5f029fb1a6d99ab8f100bf464058a71ee6438a42
24 +DIST ffmpeg-3.2.tar.bz2 9605348 SHA256 76d6cd9f5e64463a5b9940736da8a515c990bcbbe506a722e2040916cb366d74 SHA512 025caee069709e4d5281033c95c5dcb1a8d8928da98f5a5e55734577852f960668d9a1df2a059e9b800ad2bf2b53c7d1ea6655ccdc0e14281fbcc45f2ae7a1bb WHIRLPOOL 206f6a7ced6f73c143cf3c67d35d6d12e477622895018c96da17c6a59ba382c3f0878e5ef8b6f0f295cc11b6910e46baabee8f0fc0f3f65677890f2072ad443a
25
26 diff --git a/media-video/ffmpeg/ffmpeg-3.2.ebuild b/media-video/ffmpeg/ffmpeg-3.2.ebuild
27 new file mode 100644
28 index 00000000..02accca
29 --- /dev/null
30 +++ b/media-video/ffmpeg/ffmpeg-3.2.ebuild
31 @@ -0,0 +1,457 @@
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 ~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:sdl2 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 + 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 + kvazaar? ( media-libs/kvazaar[${MULTILIB_USEDEP}] )
200 + mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
201 + nvenc? ( media-video/nvidia_video_sdk )
202 + openh264? ( >=media-libs/openh264-1.4.0-r1[${MULTILIB_USEDEP}] )
203 + snappy? ( >=app-arch/snappy-1.1.2-r1[${MULTILIB_USEDEP}] )
204 + theora? (
205 + >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
206 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
207 + )
208 + twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
209 + wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
210 + webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
211 + x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
212 + x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] )
213 + xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
214 + )
215 + fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
216 + flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
217 + fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
218 + frei0r? ( media-plugins/frei0r-plugins )
219 + fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
220 + gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] )
221 + gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
222 + gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] )
223 + gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
224 + gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
225 + iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
226 + iec61883? (
227 + >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
228 + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
229 + >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
230 + )
231 + ieee1394? (
232 + >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
233 + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
234 + )
235 + jack? ( virtual/jack[${MULTILIB_USEDEP}] )
236 + jpeg2k? ( >=media-libs/openjpeg-2:2[${MULTILIB_USEDEP}] )
237 + libass? ( >=media-libs/libass-0.10.2[${MULTILIB_USEDEP}] )
238 + libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
239 + libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] )
240 + libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
241 + libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
242 + lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
243 + mmal? ( media-libs/raspberrypi-userland )
244 + modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
245 + openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
246 + opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] )
247 + openssl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
248 + opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
249 + pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
250 + librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
251 + rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] )
252 + samba? ( >=net-fs/samba-3.6.23-r1[${MULTILIB_USEDEP}] )
253 + schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
254 + sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] )
255 + speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
256 + ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] )
257 + truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
258 + vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
259 + vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
260 + vorbis? (
261 + >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
262 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
263 + )
264 + vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] )
265 + X? (
266 + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
267 + >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
268 + !xcb? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] )
269 + >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
270 + )
271 + xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] )
272 + zimg? ( media-libs/zimg[${MULTILIB_USEDEP}] )
273 + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
274 + zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
275 + !media-video/qt-faststart
276 + postproc? ( !media-libs/libpostproc )
277 +"
278 +
279 +DEPEND="${RDEPEND}
280 + >=sys-devel/make-3.81
281 + doc? ( sys-apps/texinfo )
282 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
283 + ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
284 + cpu_flags_x86_mmx? ( >=dev-lang/yasm-1.2 )
285 + test? ( net-misc/wget sys-devel/bc )
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 + encode? (
300 + x264? ( gpl )
301 + x265? ( gpl )
302 + xvid? ( gpl )
303 + X? ( !xcb? ( gpl ) )
304 + )
305 +"
306 +REQUIRED_USE="
307 + libv4l? ( v4l )
308 + fftools_cws2fws? ( zlib )
309 + test? ( encode )
310 + ${GPL_REQUIRED_USE}
311 + ${CPU_REQUIRED_USE}"
312 +RESTRICT="
313 + gpl? ( openssl? ( bindist ) fdk? ( bindist ) )
314 +"
315 +
316 +S=${WORKDIR}/${P/_/-}
317 +
318 +MULTILIB_WRAPPED_HEADERS=(
319 + /usr/include/libavutil/avconfig.h
320 +)
321 +
322 +src_prepare() {
323 + if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
324 + export revision=git-N-${FFMPEG_REVISION}
325 + fi
326 + default
327 +}
328 +
329 +multilib_src_configure() {
330 + local myconf=( ${EXTRA_FFMPEG_CONF} )
331 +
332 + local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
333 + use openssl && use gpl && myconf+=( --enable-nonfree )
334 + use samba && myconf+=( --enable-version3 )
335 +
336 + # Encoders
337 + if use encode ; then
338 + ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
339 +
340 + # Licensing.
341 + if use amrenc ; then
342 + myconf+=( --enable-version3 )
343 + fi
344 + else
345 + myconf+=( --disable-encoders )
346 + fi
347 +
348 + # Indevs
349 + use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 )
350 + for i in alsa oss jack ; do
351 + use ${i} || myconf+=( --disable-indev=${i} )
352 + done
353 + use xcb || ffuse+=( X:x11grab )
354 +
355 + # Outdevs
356 + for i in alsa oss sdl ; do
357 + use ${i} || myconf+=( --disable-outdev=${i} )
358 + done
359 +
360 + # Decoders
361 + use amr && myconf+=( --enable-version3 )
362 + use gmp && myconf+=( --enable-version3 )
363 + use fdk && use gpl && myconf+=( --enable-nonfree )
364 +
365 + for i in "${ffuse[@]#+}" ; do
366 + myconf+=( $(use_enable ${i%:*} ${i#*:}) )
367 + done
368 +
369 + # (temporarily) disable non-multilib deps
370 + if ! multilib_is_native_abi; then
371 + for i in frei0r ; do
372 + myconf+=( --disable-${i} )
373 + done
374 + fi
375 +
376 + # CPU features
377 + for i in ${CPU_FEATURES_MAP} ; do
378 + if [ "$(tc-arch)" = "${i%:*}" ] ; then
379 + local var="${i#*:}_CPU_FEATURES[@]"
380 + for j in ${!var} ; do
381 + use ${j%:*} || myconf+=( --disable-${j#*:} )
382 + done
383 + fi
384 + done
385 +
386 + if use pic ; then
387 + myconf+=( --enable-pic )
388 + # disable asm code if PIC is required
389 + # as the provided asm decidedly is not PIC for x86.
390 + [[ ${ABI} == x86 ]] && myconf+=( --disable-asm )
391 + fi
392 + [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004
393 +
394 + # Try to get cpu type based on CFLAGS.
395 + # Bug #172723
396 + # We need to do this so that features of that CPU will be better used
397 + # If they contain an unknown CPU it will not hurt since ffmpeg's configure
398 + # will just ignore it.
399 + for i in $(get-flag mcpu) $(get-flag march) ; do
400 + [[ ${i} = native ]] && i="host" # bug #273421
401 + myconf+=( --cpu=${i} )
402 + break
403 + done
404 +
405 + # LTO support, bug #566282
406 + is-flagq "-flto*" && myconf+=( "--enable-lto" )
407 +
408 + # Mandatory configuration
409 + myconf=(
410 + --enable-avfilter
411 + --enable-avresample
412 + --disable-stripping
413 + "${myconf[@]}"
414 + )
415 +
416 + # cross compile support
417 + if tc-is-cross-compiler ; then
418 + myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
419 + case ${CHOST} in
420 + *freebsd*)
421 + myconf+=( --target-os=freebsd )
422 + ;;
423 + *mingw32*)
424 + myconf+=( --target-os=mingw32 )
425 + ;;
426 + *linux*)
427 + myconf+=( --target-os=linux )
428 + ;;
429 + esac
430 + fi
431 +
432 + # doc
433 + myconf+=(
434 + $(multilib_native_use_enable doc)
435 + $(multilib_native_use_enable doc htmlpages)
436 + $(multilib_native_enable manpages)
437 + )
438 +
439 + set -- "${S}/configure" \
440 + --prefix="${EPREFIX}/usr" \
441 + --libdir="${EPREFIX}/usr/$(get_libdir)" \
442 + --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
443 + --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
444 + --mandir="${EPREFIX}/usr/share/man" \
445 + --enable-shared \
446 + --cc="$(tc-getCC)" \
447 + --cxx="$(tc-getCXX)" \
448 + --ar="$(tc-getAR)" \
449 + --optflags="${CFLAGS}" \
450 + $(use_enable static-libs static) \
451 + "${myconf[@]}"
452 + echo "${@}"
453 + "${@}" || die
454 +}
455 +
456 +multilib_src_compile() {
457 + emake V=1
458 +
459 + if multilib_is_native_abi; then
460 + for i in "${FFTOOLS[@]}" ; do
461 + if use fftools_${i} ; then
462 + emake V=1 tools/${i}
463 + fi
464 + done
465 + fi
466 +}
467 +
468 +multilib_src_install() {
469 + emake V=1 DESTDIR="${D}" install install-doc
470 +
471 + if multilib_is_native_abi; then
472 + for i in "${FFTOOLS[@]}" ; do
473 + if use fftools_${i} ; then
474 + dobin tools/${i}
475 + fi
476 + done
477 + fi
478 +}
479 +
480 +multilib_src_install_all() {
481 + dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
482 + [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
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 +}