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