1 |
commit: 0af32744bb39b27e92bd73287585595c65cbbcc2 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 28 11:03:57 2016 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 28 11:06:14 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0af32744 |
7 |
|
8 |
media-video/ffmpeg: bump to 3.2.1 |
9 |
|
10 |
Package-Manager: portage-2.3.2 |
11 |
|
12 |
media-video/ffmpeg/Manifest | 1 + |
13 |
media-video/ffmpeg/ffmpeg-3.2.1.ebuild | 457 +++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 458 insertions(+) |
15 |
|
16 |
diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest |
17 |
index 268e6f9..59e9076 100644 |
18 |
--- a/media-video/ffmpeg/Manifest |
19 |
+++ b/media-video/ffmpeg/Manifest |
20 |
@@ -2,4 +2,5 @@ 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.1.tar.bz2 9613356 SHA256 72abc55bea5ff5397ac82320fa5c4843a05f527d0d7912d66784c92fdfbd12fb SHA512 bdadad5a3879d9492c152541db39d96707ca2989d4663ef6b09a19169c67813da329ec99b274519ef119eaaa01a0dd4aee4a5841469068d7c73b27f8dafcd377 WHIRLPOOL d85fd6a10b9e721cba60e5cf88c98148daa99499cd51caeb2796dd9a86a4117cc3c6df9ceef0bd980cad100d33113292323f211861cfc4e8236b5cc0a34d6d55 |
25 |
DIST ffmpeg-3.2.tar.bz2 9605348 SHA256 76d6cd9f5e64463a5b9940736da8a515c990bcbbe506a722e2040916cb366d74 SHA512 025caee069709e4d5281033c95c5dcb1a8d8928da98f5a5e55734577852f960668d9a1df2a059e9b800ad2bf2b53c7d1ea6655ccdc0e14281fbcc45f2ae7a1bb WHIRLPOOL 206f6a7ced6f73c143cf3c67d35d6d12e477622895018c96da17c6a59ba382c3f0878e5ef8b6f0f295cc11b6910e46baabee8f0fc0f3f65677890f2072ad443a |
26 |
|
27 |
diff --git a/media-video/ffmpeg/ffmpeg-3.2.1.ebuild b/media-video/ffmpeg/ffmpeg-3.2.1.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000..02accca |
30 |
--- /dev/null |
31 |
+++ b/media-video/ffmpeg/ffmpeg-3.2.1.ebuild |
32 |
@@ -0,0 +1,457 @@ |
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 ~x86 ~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: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 |
+ |
330 |
+multilib_src_configure() { |
331 |
+ local myconf=( ${EXTRA_FFMPEG_CONF} ) |
332 |
+ |
333 |
+ local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) |
334 |
+ use openssl && use gpl && myconf+=( --enable-nonfree ) |
335 |
+ use samba && myconf+=( --enable-version3 ) |
336 |
+ |
337 |
+ # Encoders |
338 |
+ if use encode ; then |
339 |
+ ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" ) |
340 |
+ |
341 |
+ # Licensing. |
342 |
+ if use amrenc ; then |
343 |
+ myconf+=( --enable-version3 ) |
344 |
+ fi |
345 |
+ else |
346 |
+ myconf+=( --disable-encoders ) |
347 |
+ fi |
348 |
+ |
349 |
+ # Indevs |
350 |
+ use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 ) |
351 |
+ for i in alsa oss jack ; do |
352 |
+ use ${i} || myconf+=( --disable-indev=${i} ) |
353 |
+ done |
354 |
+ use xcb || ffuse+=( X:x11grab ) |
355 |
+ |
356 |
+ # Outdevs |
357 |
+ for i in alsa oss sdl ; do |
358 |
+ use ${i} || myconf+=( --disable-outdev=${i} ) |
359 |
+ done |
360 |
+ |
361 |
+ # Decoders |
362 |
+ use amr && myconf+=( --enable-version3 ) |
363 |
+ use gmp && myconf+=( --enable-version3 ) |
364 |
+ use fdk && use gpl && myconf+=( --enable-nonfree ) |
365 |
+ |
366 |
+ for i in "${ffuse[@]#+}" ; do |
367 |
+ myconf+=( $(use_enable ${i%:*} ${i#*:}) ) |
368 |
+ done |
369 |
+ |
370 |
+ # (temporarily) disable non-multilib deps |
371 |
+ if ! multilib_is_native_abi; then |
372 |
+ for i in frei0r ; do |
373 |
+ myconf+=( --disable-${i} ) |
374 |
+ done |
375 |
+ fi |
376 |
+ |
377 |
+ # CPU features |
378 |
+ for i in ${CPU_FEATURES_MAP} ; do |
379 |
+ if [ "$(tc-arch)" = "${i%:*}" ] ; then |
380 |
+ local var="${i#*:}_CPU_FEATURES[@]" |
381 |
+ for j in ${!var} ; do |
382 |
+ use ${j%:*} || myconf+=( --disable-${j#*:} ) |
383 |
+ done |
384 |
+ fi |
385 |
+ done |
386 |
+ |
387 |
+ if use pic ; then |
388 |
+ myconf+=( --enable-pic ) |
389 |
+ # disable asm code if PIC is required |
390 |
+ # as the provided asm decidedly is not PIC for x86. |
391 |
+ [[ ${ABI} == x86 ]] && myconf+=( --disable-asm ) |
392 |
+ fi |
393 |
+ [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004 |
394 |
+ |
395 |
+ # Try to get cpu type based on CFLAGS. |
396 |
+ # Bug #172723 |
397 |
+ # We need to do this so that features of that CPU will be better used |
398 |
+ # If they contain an unknown CPU it will not hurt since ffmpeg's configure |
399 |
+ # will just ignore it. |
400 |
+ for i in $(get-flag mcpu) $(get-flag march) ; do |
401 |
+ [[ ${i} = native ]] && i="host" # bug #273421 |
402 |
+ myconf+=( --cpu=${i} ) |
403 |
+ break |
404 |
+ done |
405 |
+ |
406 |
+ # LTO support, bug #566282 |
407 |
+ is-flagq "-flto*" && myconf+=( "--enable-lto" ) |
408 |
+ |
409 |
+ # Mandatory configuration |
410 |
+ myconf=( |
411 |
+ --enable-avfilter |
412 |
+ --enable-avresample |
413 |
+ --disable-stripping |
414 |
+ "${myconf[@]}" |
415 |
+ ) |
416 |
+ |
417 |
+ # cross compile support |
418 |
+ if tc-is-cross-compiler ; then |
419 |
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- ) |
420 |
+ case ${CHOST} in |
421 |
+ *freebsd*) |
422 |
+ myconf+=( --target-os=freebsd ) |
423 |
+ ;; |
424 |
+ *mingw32*) |
425 |
+ myconf+=( --target-os=mingw32 ) |
426 |
+ ;; |
427 |
+ *linux*) |
428 |
+ myconf+=( --target-os=linux ) |
429 |
+ ;; |
430 |
+ esac |
431 |
+ fi |
432 |
+ |
433 |
+ # doc |
434 |
+ myconf+=( |
435 |
+ $(multilib_native_use_enable doc) |
436 |
+ $(multilib_native_use_enable doc htmlpages) |
437 |
+ $(multilib_native_enable manpages) |
438 |
+ ) |
439 |
+ |
440 |
+ set -- "${S}/configure" \ |
441 |
+ --prefix="${EPREFIX}/usr" \ |
442 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
443 |
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ |
444 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
445 |
+ --mandir="${EPREFIX}/usr/share/man" \ |
446 |
+ --enable-shared \ |
447 |
+ --cc="$(tc-getCC)" \ |
448 |
+ --cxx="$(tc-getCXX)" \ |
449 |
+ --ar="$(tc-getAR)" \ |
450 |
+ --optflags="${CFLAGS}" \ |
451 |
+ $(use_enable static-libs static) \ |
452 |
+ "${myconf[@]}" |
453 |
+ echo "${@}" |
454 |
+ "${@}" || die |
455 |
+} |
456 |
+ |
457 |
+multilib_src_compile() { |
458 |
+ emake V=1 |
459 |
+ |
460 |
+ if multilib_is_native_abi; then |
461 |
+ for i in "${FFTOOLS[@]}" ; do |
462 |
+ if use fftools_${i} ; then |
463 |
+ emake V=1 tools/${i} |
464 |
+ fi |
465 |
+ done |
466 |
+ fi |
467 |
+} |
468 |
+ |
469 |
+multilib_src_install() { |
470 |
+ emake V=1 DESTDIR="${D}" install install-doc |
471 |
+ |
472 |
+ if multilib_is_native_abi; then |
473 |
+ for i in "${FFTOOLS[@]}" ; do |
474 |
+ if use fftools_${i} ; then |
475 |
+ dobin tools/${i} |
476 |
+ fi |
477 |
+ done |
478 |
+ fi |
479 |
+} |
480 |
+ |
481 |
+multilib_src_install_all() { |
482 |
+ dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges |
483 |
+ [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" |
484 |
+} |
485 |
+ |
486 |
+multilib_src_test() { |
487 |
+ 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" \ |
488 |
+ emake V=1 fate |
489 |
+} |