1 |
commit: 9a213769b61a7fbb1a272d496988feebb40dd30d |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 30 10:53:20 2019 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 30 10:53:44 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a213769 |
7 |
|
8 |
media-video/ffmpeg: bump to 3.4.6 for the 3.4 branch |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> |
12 |
|
13 |
media-video/ffmpeg/Manifest | 1 + |
14 |
media-video/ffmpeg/ffmpeg-3.4.6.ebuild | 488 +++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 489 insertions(+) |
16 |
|
17 |
diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest |
18 |
index 6c8f2cd6c92..44cf1ef4930 100644 |
19 |
--- a/media-video/ffmpeg/Manifest |
20 |
+++ b/media-video/ffmpeg/Manifest |
21 |
@@ -4,5 +4,6 @@ DIST ffmpeg-3.3.4.tar.bz2 9944256 BLAKE2B 72d42a16396882b30641fb057bb597f8e98ecf |
22 |
DIST ffmpeg-3.3.6.tar.bz2 9943322 BLAKE2B 2526fdf9580045131426e554a9bf44fdc6567c12213ea4d5b78aa27f14513f14e07f38b8380183686fa1a62440fe4108eaecddca96f4dec3c74c410b1f90ee03 SHA512 1305760fa981bcb43c8fcb5dd1bf7dd8d3f405a124975f062062b741d49e12386e4d3eec3de6a032fc93cd7f6086d939275a669a9997ffa400f70c20f7eb3d23 |
23 |
DIST ffmpeg-3.3.8.tar.bz2 9953307 BLAKE2B edd3c2ce9730494455a05ec9d81b6c2ceb0ebf526124f95a530214cdb113ffe91aa13b80a66501aefa4f571c5b8f2eedb97f8086370d08e3b4e2a98d517eb92b SHA512 a793f6d0a06ff5244a580d9e54e1252d3ac88e2513dad4d137081103327ae4440ebe9b0d60a13f93536cb6b35097982ea76acc4056bfa31683063eef5c211ede |
24 |
DIST ffmpeg-3.4.5.tar.bz2 10183082 BLAKE2B f72157baefcd6a0ca8f389309bbe947ad21996e0f2eb3c46c6bfc90f1ebbb14bfd007d001e46ea51efef5db5f9fcee24b1a90b6862136aeebecdc95bb61b23a5 SHA512 e12707d47404a9ce02790b77d2852fc1a1573c8108e980c7355fa48ba891d1649464d4fe4d08394ecd6d871f651ac4388486b7654cb54a7aaeedaf05c55513ec |
25 |
+DIST ffmpeg-3.4.6.tar.bz2 10190001 BLAKE2B 4c7842900171cf871f8524f08f435797b1a168faa11877100fe74c3ecd4a2c2e004a5110dc23bda818f69b0a484f63d8f34c7904c4827c88894d877cdd70c6fe SHA512 0228751b288096e368f9049854936930b7c1fd89aac31a5382f5de78d3282b4e86a6f562c79833d1635222f0ad56b2e5401a150574714e1b7e0ab4f5d8939812 |
26 |
DIST ffmpeg-4.1.1.tar.bz2 10686360 BLAKE2B 47f4716d7e184d7318eb1a99ab1cdc188009464e973162e583f7ca4ae79fa3b103f9d5329c8993b72d20667e42e5a749123709a4640f07762568300b5c3c897f SHA512 0241c44e1dffd0d890a3d30a1b2387ea167d578bb39ba0c804fb417e132d343a9e43da9247b205e18b893d8cf75d8528e9971569be67ac380b88618ef0a75ed4 |
27 |
DIST ffmpeg-4.1.2.tar.bz2 10687366 BLAKE2B c69cc693078f40610c4414f01ed20f89a85db398b3177d8d79a6f58f2d48b6a8049a2bc622933e0ae0a2889f635c25ccf1c5856cb86a4d98bb0bc2308188ae86 SHA512 6c3bf20d46772a80299c9d385919a745e4022c0a9b3c438c0504d3c94bb8d472f2c9026105330fa7c50c2f23f511eb853f32e4387f73c0b7b0d0761c20cb8b31 |
28 |
|
29 |
diff --git a/media-video/ffmpeg/ffmpeg-3.4.6.ebuild b/media-video/ffmpeg/ffmpeg-3.4.6.ebuild |
30 |
new file mode 100644 |
31 |
index 00000000000..b24f198a07a |
32 |
--- /dev/null |
33 |
+++ b/media-video/ffmpeg/ffmpeg-3.4.6.ebuild |
34 |
@@ -0,0 +1,488 @@ |
35 |
+# Copyright 1999-2019 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=6 |
39 |
+ |
40 |
+# Subslot: libavutil major.libavcodec major.libavformat major |
41 |
+# Since FFmpeg ships several libraries, subslot is kind of limited here. |
42 |
+# Most consumers will use those three libraries, if a "less used" library |
43 |
+# changes its soname, consumers will have to be rebuilt the old way |
44 |
+# (preserve-libs). |
45 |
+# If, for example, a package does not link to libavformat and only libavformat |
46 |
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a |
47 |
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage |
48 |
+# doing so since such a case is unlikely. |
49 |
+FFMPEG_SUBSLOT=55.57.57 |
50 |
+ |
51 |
+SCM="" |
52 |
+if [ "${PV#9999}" != "${PV}" ] ; then |
53 |
+ SCM="git-r3" |
54 |
+ EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git" |
55 |
+fi |
56 |
+ |
57 |
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM} |
58 |
+ |
59 |
+DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec" |
60 |
+HOMEPAGE="http://ffmpeg.org/" |
61 |
+if [ "${PV#9999}" != "${PV}" ] ; then |
62 |
+ SRC_URI="" |
63 |
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot |
64 |
+ SRC_URI="mirror://gentoo/${P}.tar.bz2" |
65 |
+else # Release |
66 |
+ SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2" |
67 |
+fi |
68 |
+FFMPEG_REVISION="${PV#*_p}" |
69 |
+ |
70 |
+SLOT="0/${FFMPEG_SUBSLOT}" |
71 |
+LICENSE=" |
72 |
+ !gpl? ( LGPL-2.1 ) |
73 |
+ gpl? ( GPL-2 ) |
74 |
+ amr? ( |
75 |
+ gpl? ( GPL-3 ) |
76 |
+ !gpl? ( LGPL-3 ) |
77 |
+ ) |
78 |
+ gmp? ( |
79 |
+ gpl? ( GPL-3 ) |
80 |
+ !gpl? ( LGPL-3 ) |
81 |
+ ) |
82 |
+ encode? ( |
83 |
+ amrenc? ( |
84 |
+ gpl? ( GPL-3 ) |
85 |
+ !gpl? ( LGPL-3 ) |
86 |
+ ) |
87 |
+ ) |
88 |
+ samba? ( GPL-3 ) |
89 |
+" |
90 |
+if [ "${PV#9999}" = "${PV}" ] ; then |
91 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" |
92 |
+fi |
93 |
+ |
94 |
+# Options to use as use_enable in the foo[:bar] form. |
95 |
+# This will feed configure with $(use_enable foo bar) |
96 |
+# or $(use_enable foo foo) if no :bar is set. |
97 |
+# foo is added to IUSE. |
98 |
+FFMPEG_FLAG_MAP=( |
99 |
+ +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt gnutls gmp |
100 |
+ +gpl +hardcoded-tables +iconv lzma +network opencl openssl +postproc |
101 |
+ samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau X:xlib xcb:libxcb |
102 |
+ xcb:libxcb-shm xcb:libxcb-xfixes +zlib |
103 |
+ # libavdevice options |
104 |
+ cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal |
105 |
+ opengl |
106 |
+ # indevs |
107 |
+ libv4l:libv4l2 pulseaudio:libpulse libdrm |
108 |
+ # decoders |
109 |
+ amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac |
110 |
+ jpeg2k:libopenjpeg bluray:libbluray gme:libgme gsm:libgsm |
111 |
+ mmal modplug:libmodplug opus:libopus libilbc librtmp ssh:libssh |
112 |
+ speex:libspeex svg:librsvg vorbis:libvorbis |
113 |
+ vpx:libvpx zvbi:libzvbi |
114 |
+ # libavfilter options |
115 |
+ appkit |
116 |
+ bs2b:libbs2b chromaprint flite:libflite frei0r |
117 |
+ fribidi:libfribidi fontconfig ladspa libass truetype:libfreetype |
118 |
+ rubberband:librubberband zeromq:libzmq zimg:libzimg |
119 |
+ # libswresample options |
120 |
+ libsoxr |
121 |
+ # Threads; we only support pthread for now but ffmpeg supports more |
122 |
+ +threads:pthreads |
123 |
+) |
124 |
+ |
125 |
+# Same as above but for encoders, i.e. they do something only with USE=encode. |
126 |
+FFMPEG_ENCODER_FLAG_MAP=( |
127 |
+ amrenc:libvo-amrwbenc mp3:libmp3lame |
128 |
+ kvazaar:libkvazaar nvenc:nvenc |
129 |
+ openh264:libopenh264 snappy:libsnappy theora:libtheora twolame:libtwolame |
130 |
+ wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265 xvid:libxvid |
131 |
+) |
132 |
+ |
133 |
+IUSE=" |
134 |
+ alsa chromium doc +encode jack oss pic static-libs test v4l |
135 |
+ ${FFMPEG_FLAG_MAP[@]%:*} |
136 |
+ ${FFMPEG_ENCODER_FLAG_MAP[@]%:*} |
137 |
+" |
138 |
+ |
139 |
+# Strings for CPU features in the useflag[:configure_option] form |
140 |
+# if :configure_option isn't set, it will use 'useflag' as configure option |
141 |
+ARM_CPU_FEATURES=( |
142 |
+ cpu_flags_arm_thumb:armv5te |
143 |
+ cpu_flags_arm_v6:armv6 |
144 |
+ cpu_flags_arm_thumb2:armv6t2 |
145 |
+ cpu_flags_arm_neon:neon |
146 |
+ cpu_flags_arm_vfp:vfp |
147 |
+ cpu_flags_arm_vfpv3:vfpv3 |
148 |
+ cpu_flags_arm_v8:armv8 |
149 |
+) |
150 |
+ARM_CPU_REQUIRED_USE=" |
151 |
+ arm64? ( cpu_flags_arm_v8 ) |
152 |
+ cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) |
153 |
+ cpu_flags_arm_neon? ( cpu_flags_arm_thumb2 cpu_flags_arm_vfp ) |
154 |
+ cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) |
155 |
+ cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) |
156 |
+ cpu_flags_arm_v6? ( cpu_flags_arm_thumb ) |
157 |
+" |
158 |
+MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu ) |
159 |
+PPC_CPU_FEATURES=( altivec ) |
160 |
+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 ) |
161 |
+X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) |
162 |
+X86_CPU_REQUIRED_USE=" |
163 |
+ cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) |
164 |
+ cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) |
165 |
+ cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) |
166 |
+ cpu_flags_x86_xop? ( cpu_flags_x86_avx ) |
167 |
+ cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) |
168 |
+ cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) |
169 |
+ cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) |
170 |
+ cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) |
171 |
+ cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) |
172 |
+ cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) |
173 |
+ cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) |
174 |
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) |
175 |
+ cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) |
176 |
+ cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) |
177 |
+ cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) |
178 |
+" |
179 |
+ |
180 |
+CPU_FEATURES_MAP=( |
181 |
+ ${ARM_CPU_FEATURES[@]} |
182 |
+ ${MIPS_CPU_FEATURES[@]} |
183 |
+ ${PPC_CPU_FEATURES[@]} |
184 |
+ ${X86_CPU_FEATURES[@]} |
185 |
+) |
186 |
+IUSE="${IUSE} |
187 |
+ ${CPU_FEATURES_MAP[@]%:*}" |
188 |
+ |
189 |
+CPU_REQUIRED_USE=" |
190 |
+ ${ARM_CPU_REQUIRED_USE} |
191 |
+ ${X86_CPU_REQUIRED_USE} |
192 |
+" |
193 |
+ |
194 |
+FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher ) |
195 |
+IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}" |
196 |
+ |
197 |
+RDEPEND=" |
198 |
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) |
199 |
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] ) |
200 |
+ bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] ) |
201 |
+ bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] ) |
202 |
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) |
203 |
+ cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-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[client,${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 |
+ --disable-libcelt # bug #664158 |
419 |
+ "${myconf[@]}" |
420 |
+ ) |
421 |
+ |
422 |
+ # cross compile support |
423 |
+ if tc-is-cross-compiler ; then |
424 |
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) |
425 |
+ case ${CHOST} in |
426 |
+ *freebsd*) |
427 |
+ myconf+=( --target-os=freebsd ) |
428 |
+ ;; |
429 |
+ *mingw32*) |
430 |
+ myconf+=( --target-os=mingw32 ) |
431 |
+ ;; |
432 |
+ *linux*) |
433 |
+ myconf+=( --target-os=linux ) |
434 |
+ ;; |
435 |
+ esac |
436 |
+ fi |
437 |
+ |
438 |
+ # doc |
439 |
+ myconf+=( |
440 |
+ $(multilib_native_use_enable doc) |
441 |
+ $(multilib_native_use_enable doc htmlpages) |
442 |
+ $(multilib_native_enable manpages) |
443 |
+ ) |
444 |
+ |
445 |
+ set -- "${S}/configure" \ |
446 |
+ --prefix="${EPREFIX}/usr" \ |
447 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
448 |
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ |
449 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
450 |
+ --mandir="${EPREFIX}/usr/share/man" \ |
451 |
+ --enable-shared \ |
452 |
+ --cc="$(tc-getCC)" \ |
453 |
+ --cxx="$(tc-getCXX)" \ |
454 |
+ --ar="$(tc-getAR)" \ |
455 |
+ --optflags="${CFLAGS}" \ |
456 |
+ $(use_enable static-libs static) \ |
457 |
+ "${myconf[@]}" |
458 |
+ echo "${@}" |
459 |
+ "${@}" || die |
460 |
+ |
461 |
+ if multilib_is_native_abi && use chromium; then |
462 |
+ einfo "Configuring for Chromium" |
463 |
+ mkdir -p ../chromium || die |
464 |
+ pushd ../chromium >/dev/null || die |
465 |
+ set -- "${@}" \ |
466 |
+ --disable-shared \ |
467 |
+ --enable-static \ |
468 |
+ --enable-pic \ |
469 |
+ --extra-cflags="-DFF_API_CONVERGENCE_DURATION=0" |
470 |
+ echo "${@}" |
471 |
+ "${@}" || die |
472 |
+ popd >/dev/null || die |
473 |
+ fi |
474 |
+} |
475 |
+ |
476 |
+multilib_src_compile() { |
477 |
+ emake V=1 |
478 |
+ |
479 |
+ if multilib_is_native_abi; then |
480 |
+ for i in "${FFTOOLS[@]}" ; do |
481 |
+ if use fftools_${i} ; then |
482 |
+ emake V=1 tools/${i}$(get_exeext) |
483 |
+ fi |
484 |
+ done |
485 |
+ |
486 |
+ if use chromium; then |
487 |
+ einfo "Compiling for Chromium" |
488 |
+ pushd ../chromium >/dev/null || die |
489 |
+ emake V=1 libffmpeg |
490 |
+ popd >/dev/null || die |
491 |
+ fi |
492 |
+ fi |
493 |
+} |
494 |
+ |
495 |
+multilib_src_install() { |
496 |
+ emake V=1 DESTDIR="${D}" install install-doc |
497 |
+ |
498 |
+ if multilib_is_native_abi; then |
499 |
+ for i in "${FFTOOLS[@]}" ; do |
500 |
+ if use fftools_${i} ; then |
501 |
+ dobin tools/${i}$(get_exeext) |
502 |
+ fi |
503 |
+ done |
504 |
+ |
505 |
+ if use chromium; then |
506 |
+ einfo "Installing for Chromium" |
507 |
+ pushd ../chromium >/dev/null || die |
508 |
+ emake V=1 DESTDIR="${D}" install-libffmpeg |
509 |
+ popd >/dev/null || die |
510 |
+ fi |
511 |
+ fi |
512 |
+} |
513 |
+ |
514 |
+multilib_src_install_all() { |
515 |
+ dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges |
516 |
+ [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" |
517 |
+} |
518 |
+ |
519 |
+multilib_src_test() { |
520 |
+ 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" \ |
521 |
+ emake V=1 fate |
522 |
+} |