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, 31 Jul 2017 07:43:35
Message-Id: 1501487002.19e3349e79c3ba901c4b3240417d367f751c43a4.aballier@gentoo
1 commit: 19e3349e79c3ba901c4b3240417d367f751c43a4
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 31 07:43:22 2017 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 31 07:43:22 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19e3349e
7
8 media-video/ffmpeg: bump to 3.2.7
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.2.7.ebuild | 460 +++++++++++++++++++++++++++++++++
14 2 files changed, 461 insertions(+)
15
16 diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
17 index 28d53f3b733..936466ff29d 100644
18 --- a/media-video/ffmpeg/Manifest
19 +++ b/media-video/ffmpeg/Manifest
20 @@ -3,5 +3,6 @@ DIST ffmpeg-2.8.11.tar.bz2 8582471 SHA256 9987e0f6b1f66311390f807a0c18ad9c90652b
21 DIST ffmpeg-3.2.4.tar.bz2 9612274 SHA256 c0fa3593a2e9e96ace3c1757900094437ad96d1d6ca19f057c378b5f394496a4 SHA512 ba5004d0f2659faa139c7dbf2f0fc6bab1d4e017d919f4ac271a5d2e8e4a3478909176e3a4d1ad33ddf2f62ab28dd9e00ce9be1399efb7cb3276dde79134cdaa WHIRLPOOL e97a19541f990f86b8adbdc3fd20115258e5644b98a5c7f4e075f8f1320881da33fb9be969d8a5e20d79eea4c63b1c9510841b5cf0d5b479408ff231d3ba69cc
22 DIST ffmpeg-3.2.5.tar.bz2 9619556 SHA256 9ca9f24a442d5a5f0c127106daab5e08e30468e34f97c936cce6be9b114275ae SHA512 304a10c9bafce163d2bfe79fcf989bdd919d6361cb188acf3ebba32094df1ba23e66468a11f789392589e4f1f6c9e9dd7edfaadf999b92ee8540301723fd6501 WHIRLPOOL f0cc3355b2f5d8129221451dce7c2b4dcd9e80ba43c53f97a1931849d6d5eb0b882d70cd3397409f37f103e7237c2f5f04082acbe8d3a2b4827add793fde6d8d
23 DIST ffmpeg-3.2.6.tar.bz2 9623111 SHA256 602b1a8c91bbc87f6e8897c0918d2bf1c7d4820d3888712f0ff0c1198a3f1e8f SHA512 eca75524374003eac78033bd2a744b459a4dc631c59150b6c9291e06a693bdd14e0b11cae9c800446f0648edccc066480c2b869bcb456a74eeabb91ab41f8285 WHIRLPOOL b2b5b78ae0a1ad0c44387e1241825a79cfe87234f1470d9095757b25ed724e04fe42ae96287e3242a80f6f74f380c5167b5388ddc6abf4d6738a1bc4af1ebe4d
24 +DIST ffmpeg-3.2.7.tar.bz2 9622391 SHA256 d5a0f891ed7764876e3c2fd541adcab90641eefe9103ab4d8269a346b10ebc8a SHA512 a5b6df77d2d4ede0cc2f398b763d7405f43f43e37c11a596ec1a2a8921714875fd8fa9ffbcff84355854780872ab7313c859a4a19bf419298b4d3bc797ad8ac4 WHIRLPOOL 8c3f36cd1d254ce5ed3917d498124860bb9620a65add1a3461844565fddb6d315914d38cc9760b7e45ebe4e1818e1872eeaebe65a040dd738a5bcc6508233f7d
25 DIST ffmpeg-3.3.2.tar.bz2 9937466 SHA256 216900d5c0af9017bb8f76b0ad23f0ac53cf7fc618cf04b40d989bd99b088e6a SHA512 673f18b2935d23703e5f325a2c951c69f49b2598acdf1bf3987487eecd246670f792d4363def6832bb17f16cb0e919994cd79141d1d95c8112644c979fb8b796 WHIRLPOOL 92ff3ca83ee4a7479a84dcf3f938a8204c8803d15ee29512a90eb51115ade054ec9044e769a2be6a58dda2cf64bd8d62dfe831244ba43115bf3d4e4f944b8a14
26 DIST ffmpeg-3.3.3.tar.bz2 9940959 SHA256 1069ac8fc7f52e566bea28b41b9c437246aeb5096f82fb26fa96dc7d5a10a473 SHA512 1cc63bf73356f4e618c0d3572a216bdf5689f10deff56b4262f6d740b0bee5a4b3eac234f45fca3d4d2da77903a507b4fba725b76d2d2070f31b6dae9e7a2dab WHIRLPOOL c90d2cc0d3fa7c3635a00c8039f94ff9e7b8413bd14400ddd6f1cccdc9cbbbfd2254ca2a209cefccd7e6c2f750b4594053d4c664eb2867ee208fe5657e95330b
27
28 diff --git a/media-video/ffmpeg/ffmpeg-3.2.7.ebuild b/media-video/ffmpeg/ffmpeg-3.2.7.ebuild
29 new file mode 100644
30 index 00000000000..d7e03bf5fdf
31 --- /dev/null
32 +++ b/media-video/ffmpeg/ffmpeg-3.2.7.ebuild
33 @@ -0,0 +1,460 @@
34 +# Copyright 1999-2017 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="~alpha ~amd64 ~arm ~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 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
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 + schroedinger:libschroedinger speex:libspeex vorbis:libvorbis vpx:libvpx
112 + zvbi:libzvbi
113 + # libavfilter options
114 + bs2b:libbs2b chromaprint ebur128:libebur128 flite:libflite frei0r
115 + fribidi:libfribidi fontconfig ladspa libass truetype:libfreetype
116 + rubberband:librubberband 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 + 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 + ebur128? ( >=media-libs/libebur128-1.1.0[${MULTILIB_USEDEP}] )
198 + encode? (
199 + amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${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/libsdl2[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 + gpl? ( openssl? ( bindist ) fdk? ( bindist ) )
315 +"
316 +
317 +S=${WORKDIR}/${P/_/-}
318 +
319 +MULTILIB_WRAPPED_HEADERS=(
320 + /usr/include/libavutil/avconfig.h
321 +)
322 +
323 +src_prepare() {
324 + if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
325 + export revision=git-N-${FFMPEG_REVISION}
326 + fi
327 + default
328 +
329 + # the version script on Solaris causes invalid symbol version problems
330 + # we don't want their hacky workarounds, we're having a GNU ld
331 + sed -i -e 's/sunos)/sunos) network_extralibs="-lsocket -lnsl"; add_cppflags -D__EXTENSIONS__; enable pic; disable symver ;; no-sunos)/' configure || die
332 +}
333 +
334 +multilib_src_configure() {
335 + local myconf=( ${EXTRA_FFMPEG_CONF} )
336 +
337 + local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
338 + use openssl && use gpl && myconf+=( --enable-nonfree )
339 + use samba && myconf+=( --enable-version3 )
340 +
341 + # Encoders
342 + if use encode ; then
343 + ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
344 +
345 + # Licensing.
346 + if use amrenc ; then
347 + myconf+=( --enable-version3 )
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 +}