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: Mon, 09 Jul 2018 11:22:31
Message-Id: 1531135338.3b6f43f775238ae40e1f91fc081efdff32d3080b.aballier@gentoo
1 commit: 3b6f43f775238ae40e1f91fc081efdff32d3080b
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 9 11:22:10 2018 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 9 11:22:18 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b6f43f7
7
8 media-video/ffmpeg: bump to 3.4.3
9
10 Package-Manager: Portage-2.3.41, Repoman-2.3.9
11
12 media-video/ffmpeg/Manifest | 1 +
13 media-video/ffmpeg/ffmpeg-3.4.3.ebuild | 488 +++++++++++++++++++++++++++++++++
14 2 files changed, 489 insertions(+)
15
16 diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
17 index 8b5c16311ad..42497282b77 100644
18 --- a/media-video/ffmpeg/Manifest
19 +++ b/media-video/ffmpeg/Manifest
20 @@ -4,5 +4,6 @@ DIST ffmpeg-3.3.4.tar.bz2 9944256 BLAKE2B 72d42a16396882b30641fb057bb597f8e98ecf
21 DIST ffmpeg-3.3.5.tar.bz2 9945243 BLAKE2B 0fb9aad3d35f6173085e5a790e84c3a45c2051b656e9fb12b13af372778861121d6595e1f929144c32c77861d101fdb2a67c4411907147bd5534ce09d0fae3b9 SHA512 b97eb61f1c8f8ee95d79c6c28b37a0a99ad7752605714bfe8827366d319aed8bcaf2403cefb856604e8d61bca54573838c2ea0d38fa89ab453ccdd46b104725a
22 DIST ffmpeg-3.3.6.tar.bz2 9943322 BLAKE2B 2526fdf9580045131426e554a9bf44fdc6567c12213ea4d5b78aa27f14513f14e07f38b8380183686fa1a62440fe4108eaecddca96f4dec3c74c410b1f90ee03 SHA512 1305760fa981bcb43c8fcb5dd1bf7dd8d3f405a124975f062062b741d49e12386e4d3eec3de6a032fc93cd7f6086d939275a669a9997ffa400f70c20f7eb3d23
23 DIST ffmpeg-3.4.2.tar.bz2 10179184 BLAKE2B a9116fd42b62683d904159b4317df7216df556268d5ac05f48c2204b7269d353746ecd709ad194cab542627047b991528bcfe7c302439753f96ddc5617ab236b SHA512 7d14865316d514b8fee19431b45c5f456422447bd7c68a746e06c6f7450a49aff1ec1d9f88b642c9072e846163d1f7bbe41d1cf73a1ad580f5162f58c8b30fb4
24 +DIST ffmpeg-3.4.3.tar.bz2 10183483 BLAKE2B 144811663ab32db05577e262e2fcf9087528544b2f27fb6c551317d4916d399ee2d6e70f6f5ce6351ba78f6f51609b2455eef6170b3e339699c9f2486a459194 SHA512 924838d334d905de23c950634ad905bc55ae4435e135afdea93639a598ad522c020165f4528c66560448c136c28770c3fd3311328c2307bb232bc1d0914af964
25 DIST ffmpeg-4.0.1.tar.bz2 10425808 BLAKE2B 22afbd0f0a4e4708078e0ce606c4bd461df53aa9855ff029fa18423b2dc48966c12b6f4b2646eb11a949249cdabd42c201ef2833d1ef5e08d789ce663f3235d2 SHA512 4e94cd9c8ebfc18f83d211a09e0015825a07451604a7eb6a328123db5a28bcb205e6729d83859af0740be7312e9a025009013f418d5993bda848fb043f0abaa1
26 DIST ffmpeg-4.0.tar.bz2 10423830 BLAKE2B be020731e2ab3567c326b41fdbca7ff9bd35bfff5c4c8c466b73e2dfb1c6ffb59bfbd82c366e40893732fcf0664ab4862db4cff3950a8350aa6c55d25d296417 SHA512 73224e0f29ce39280a7d67fe9f7ad4a2a7cdb079f1b65916cbac5c0754b995d27d85fee3eb9621b6cba4fbd7a07dcf7b94414a8e5bb9b74738d24af18311d0f2
27
28 diff --git a/media-video/ffmpeg/ffmpeg-3.4.3.ebuild b/media-video/ffmpeg/ffmpeg-3.4.3.ebuild
29 new file mode 100644
30 index 00000000000..aa8b226963b
31 --- /dev/null
32 +++ b/media-video/ffmpeg/ffmpeg-3.4.3.ebuild
33 @@ -0,0 +1,488 @@
34 +# Copyright 1999-2018 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
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 ~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"
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 opencl openssl +postproc
100 + samba:libsmbclient sdl:ffplay sdl:sdl2 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 libdrm
107 + # decoders
108 + amr:libopencore-amrwb amr:libopencore-amrnb 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 + speex:libspeex svg:librsvg vorbis:libvorbis
112 + vpx:libvpx zvbi:libzvbi
113 + # libavfilter options
114 + appkit
115 + bs2b:libbs2b chromaprint flite:libflite frei0r
116 + fribidi:libfribidi fontconfig ladspa libass truetype:libfreetype
117 + rubberband:librubberband zeromq:libzmq zimg:libzimg
118 + # libswresample options
119 + libsoxr
120 + # Threads; we only support pthread for now but ffmpeg supports more
121 + +threads:pthreads
122 +)
123 +
124 +# Same as above but for encoders, i.e. they do something only with USE=encode.
125 +FFMPEG_ENCODER_FLAG_MAP=(
126 + amrenc:libvo-amrwbenc mp3:libmp3lame
127 + kvazaar:libkvazaar nvenc:nvenc
128 + openh264:libopenh264 snappy:libsnappy theora:libtheora twolame:libtwolame
129 + wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265 xvid:libxvid
130 +)
131 +
132 +IUSE="
133 + alsa chromium doc +encode jack oss pic static-libs test v4l
134 + ${FFMPEG_FLAG_MAP[@]%:*}
135 + ${FFMPEG_ENCODER_FLAG_MAP[@]%:*}
136 +"
137 +
138 +# Strings for CPU features in the useflag[:configure_option] form
139 +# if :configure_option isn't set, it will use 'useflag' as configure option
140 +ARM_CPU_FEATURES=(
141 + cpu_flags_arm_thumb:armv5te
142 + cpu_flags_arm_v6:armv6
143 + cpu_flags_arm_thumb2:armv6t2
144 + cpu_flags_arm_neon:neon
145 + cpu_flags_arm_vfp:vfp
146 + cpu_flags_arm_vfpv3:vfpv3
147 + cpu_flags_arm_v8:armv8
148 +)
149 +ARM_CPU_REQUIRED_USE="
150 + arm64? ( cpu_flags_arm_v8 )
151 + cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon )
152 + cpu_flags_arm_neon? ( cpu_flags_arm_thumb2 cpu_flags_arm_vfp )
153 + cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp )
154 + cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 )
155 + cpu_flags_arm_v6? ( cpu_flags_arm_thumb )
156 +"
157 +MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu )
158 +PPC_CPU_FEATURES=( altivec )
159 +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 )
160 +X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} )
161 +X86_CPU_REQUIRED_USE="
162 + cpu_flags_x86_avx2? ( cpu_flags_x86_avx )
163 + cpu_flags_x86_fma4? ( cpu_flags_x86_avx )
164 + cpu_flags_x86_fma3? ( cpu_flags_x86_avx )
165 + cpu_flags_x86_xop? ( cpu_flags_x86_avx )
166 + cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 )
167 + cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 )
168 + cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 )
169 + cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
170 + cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
171 + cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
172 + cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
173 + cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
174 + cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx )
175 + cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow )
176 + cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
177 +"
178 +
179 +CPU_FEATURES_MAP=(
180 + ${ARM_CPU_FEATURES[@]}
181 + ${MIPS_CPU_FEATURES[@]}
182 + ${PPC_CPU_FEATURES[@]}
183 + ${X86_CPU_FEATURES[@]}
184 +)
185 +IUSE="${IUSE}
186 + ${CPU_FEATURES_MAP[@]%:*}"
187 +
188 +CPU_REQUIRED_USE="
189 + ${ARM_CPU_REQUIRED_USE}
190 + ${X86_CPU_REQUIRED_USE}
191 +"
192 +
193 +FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher )
194 +IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
195 +
196 +RDEPEND="
197 + alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
198 + amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
199 + bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] )
200 + bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
201 + bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
202 + cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
203 + celt? ( >=media-libs/celt-0.11.1-r1[${MULTILIB_USEDEP}] )
204 + chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] )
205 + encode? (
206 + amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
207 + kvazaar? ( media-libs/kvazaar[${MULTILIB_USEDEP}] )
208 + mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
209 + nvenc? ( media-video/nvidia_video_sdk )
210 + openh264? ( >=media-libs/openh264-1.4.0-r1[${MULTILIB_USEDEP}] )
211 + snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] )
212 + theora? (
213 + >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
214 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
215 + )
216 + twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
217 + wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
218 + webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] )
219 + x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
220 + x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] )
221 + xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
222 + )
223 + fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
224 + flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
225 + fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
226 + frei0r? ( media-plugins/frei0r-plugins )
227 + fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
228 + gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] )
229 + gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
230 + gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] )
231 + gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] )
232 + gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
233 + iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
234 + iec61883? (
235 + >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
236 + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
237 + >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
238 + )
239 + ieee1394? (
240 + >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
241 + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
242 + )
243 + jack? ( virtual/jack[${MULTILIB_USEDEP}] )
244 + jpeg2k? ( >=media-libs/openjpeg-2:2[${MULTILIB_USEDEP}] )
245 + libass? ( >=media-libs/libass-0.10.2:=[${MULTILIB_USEDEP}] )
246 + libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
247 + libdrm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] )
248 + libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] )
249 + libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
250 + libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
251 + lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
252 + mmal? ( media-libs/raspberrypi-userland )
253 + modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
254 + openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
255 + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
256 + opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] )
257 + openssl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
258 + opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
259 + pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
260 + librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
261 + rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] )
262 + samba? ( >=net-fs/samba-3.6.23-r1[${MULTILIB_USEDEP}] )
263 + sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] )
264 + speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
265 + ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] )
266 + svg? ( gnome-base/librsvg:2=[${MULTILIB_USEDEP}] )
267 + truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
268 + vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
269 + vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
270 + vorbis? (
271 + >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
272 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
273 + )
274 + vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] )
275 + X? (
276 + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
277 + >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
278 + >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
279 + )
280 + xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] )
281 + zeromq? ( >=net-libs/zeromq-4.1.6 )
282 + zimg? ( >=media-libs/zimg-2.4:=[${MULTILIB_USEDEP}] )
283 + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
284 + zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
285 + !media-video/qt-faststart
286 + postproc? ( !media-libs/libpostproc )
287 +"
288 +
289 +DEPEND="${RDEPEND}
290 + >=sys-devel/make-3.81
291 + doc? ( sys-apps/texinfo )
292 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
293 + ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
294 + cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) )
295 + test? ( net-misc/wget sys-devel/bc )
296 + v4l? ( sys-kernel/linux-headers )
297 +"
298 +
299 +# Code requiring FFmpeg to be built under gpl license
300 +GPL_REQUIRED_USE="
301 + postproc? ( gpl )
302 + frei0r? ( gpl )
303 + cdio? ( gpl )
304 + samba? ( gpl )
305 + encode? (
306 + x264? ( gpl )
307 + x265? ( gpl )
308 + xvid? ( gpl )
309 + X? ( !xcb? ( gpl ) )
310 + )
311 +"
312 +REQUIRED_USE="
313 + libv4l? ( v4l )
314 + fftools_cws2fws? ( zlib )
315 + test? ( encode )
316 + ${GPL_REQUIRED_USE}
317 + ${CPU_REQUIRED_USE}"
318 +RESTRICT="
319 + gpl? ( openssl? ( bindist ) fdk? ( bindist ) )
320 +"
321 +
322 +S=${WORKDIR}/${P/_/-}
323 +
324 +PATCHES=(
325 + "${FILESDIR}"/chromium.patch
326 +)
327 +
328 +MULTILIB_WRAPPED_HEADERS=(
329 + /usr/include/libavutil/avconfig.h
330 +)
331 +
332 +src_prepare() {
333 + if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
334 + export revision=git-N-${FFMPEG_REVISION}
335 + fi
336 + default
337 + echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
338 +}
339 +
340 +multilib_src_configure() {
341 + local myconf=( ${EXTRA_FFMPEG_CONF} )
342 +
343 + local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
344 + use openssl && use gpl && myconf+=( --enable-nonfree )
345 + use samba && myconf+=( --enable-version3 )
346 +
347 + # Encoders
348 + if use encode ; then
349 + ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
350 +
351 + # Licensing.
352 + if use amrenc ; then
353 + myconf+=( --enable-version3 )
354 + fi
355 + else
356 + myconf+=( --disable-encoders )
357 + fi
358 +
359 + # Indevs
360 + use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 )
361 + for i in alsa oss jack ; do
362 + use ${i} || myconf+=( --disable-indev=${i} )
363 + done
364 +
365 + # Outdevs
366 + for i in alsa oss sdl ; do
367 + use ${i} || myconf+=( --disable-outdev=${i} )
368 + done
369 +
370 + # Decoders
371 + use amr && myconf+=( --enable-version3 )
372 + use gmp && myconf+=( --enable-version3 )
373 + use fdk && use gpl && myconf+=( --enable-nonfree )
374 +
375 + for i in "${ffuse[@]#+}" ; do
376 + myconf+=( $(use_enable ${i%:*} ${i#*:}) )
377 + done
378 +
379 + # (temporarily) disable non-multilib deps
380 + if ! multilib_is_native_abi; then
381 + for i in frei0r libzmq ; do
382 + myconf+=( --disable-${i} )
383 + done
384 + fi
385 +
386 + # CPU features
387 + for i in "${CPU_FEATURES_MAP[@]}" ; do
388 + use ${i%:*} || myconf+=( --disable-${i#*:} )
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}- --host-cc="$(tc-getBUILD_CC)" )
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 + if multilib_is_native_abi && use chromium; then
461 + einfo "Configuring for Chromium"
462 + mkdir -p ../chromium || die
463 + pushd ../chromium >/dev/null || die
464 + set -- "${@}" \
465 + --disable-shared \
466 + --enable-static \
467 + --enable-pic \
468 + --extra-cflags="-DFF_API_CONVERGENCE_DURATION=0"
469 + echo "${@}"
470 + "${@}" || die
471 + popd >/dev/null || die
472 + fi
473 +}
474 +
475 +multilib_src_compile() {
476 + emake V=1
477 +
478 + if multilib_is_native_abi; then
479 + for i in "${FFTOOLS[@]}" ; do
480 + if use fftools_${i} ; then
481 + emake V=1 tools/${i}$(get_exeext)
482 + fi
483 + done
484 +
485 + if use chromium; then
486 + einfo "Compiling for Chromium"
487 + pushd ../chromium >/dev/null || die
488 + emake V=1 libffmpeg
489 + popd >/dev/null || die
490 + fi
491 + fi
492 +}
493 +
494 +multilib_src_install() {
495 + emake V=1 DESTDIR="${D}" install install-doc
496 +
497 + if multilib_is_native_abi; then
498 + for i in "${FFTOOLS[@]}" ; do
499 + if use fftools_${i} ; then
500 + dobin tools/${i}$(get_exeext)
501 + fi
502 + done
503 +
504 + if use chromium; then
505 + einfo "Installing for Chromium"
506 + pushd ../chromium >/dev/null || die
507 + emake V=1 DESTDIR="${D}" install-libffmpeg
508 + popd >/dev/null || die
509 + fi
510 + fi
511 +}
512 +
513 +multilib_src_install_all() {
514 + dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
515 + [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
516 +}
517 +
518 +multilib_src_test() {
519 + 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" \
520 + emake V=1 fate
521 +}