1 |
commit: 632777848bf0a206bfb075d31be132f8d1691578 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 11 12:50:41 2019 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 11 12:52:06 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63277784 |
7 |
|
8 |
media-video/ffmpeg: bump to 4.1.1 |
9 |
|
10 |
Package-Manager: Portage-2.3.59, 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-4.1.1.ebuild | 527 +++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 528 insertions(+) |
16 |
|
17 |
diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest |
18 |
index a2dd9352560..ea1b277291f 100644 |
19 |
--- a/media-video/ffmpeg/Manifest |
20 |
+++ b/media-video/ffmpeg/Manifest |
21 |
@@ -6,4 +6,5 @@ DIST ffmpeg-3.3.8.tar.bz2 9953307 BLAKE2B edd3c2ce9730494455a05ec9d81b6c2ceb0ebf |
22 |
DIST ffmpeg-3.4.5.tar.bz2 10183082 BLAKE2B f72157baefcd6a0ca8f389309bbe947ad21996e0f2eb3c46c6bfc90f1ebbb14bfd007d001e46ea51efef5db5f9fcee24b1a90b6862136aeebecdc95bb61b23a5 SHA512 e12707d47404a9ce02790b77d2852fc1a1573c8108e980c7355fa48ba891d1649464d4fe4d08394ecd6d871f651ac4388486b7654cb54a7aaeedaf05c55513ec |
23 |
DIST ffmpeg-4.0.2.tar.bz2 10424065 BLAKE2B 0d3e072fa31bfae37722d8113f9c9cfd2071067b2a29ed5c7332ae49b388b91e8646b6bc8a816517bcebcdcc8d923d1e8b5a080dbdc63ea2a153aea8ecfb2af9 SHA512 92a3bedcd070df72b26dbe3ebf4a3faea0a02289fbefdb6a6c73d65801cf60a7e11cd832d29ab46b7749a1ffd0a31505cf75bb46bd01ea06423b454ca04e9b7b |
24 |
DIST ffmpeg-4.0.3.tar.bz2 10425117 BLAKE2B 1517d66d5a0c931b866df5206ae660a01daf49d375f7750a7b027ce62ab7dc8131fc02b8a6320e5ff7295b9bccdafbbaf25e206c55fad420ea206c1b9638e777 SHA512 8d600adf55f2fc1574a7013700129766a4a3db83bb33ec32fe07759310f1d8804c00e74b58fd1fcbdd91efec214764e4b2fadf7b01c948dc2ccdcd1b4d56e303 |
25 |
+DIST ffmpeg-4.1.1.tar.bz2 10686360 BLAKE2B 47f4716d7e184d7318eb1a99ab1cdc188009464e973162e583f7ca4ae79fa3b103f9d5329c8993b72d20667e42e5a749123709a4640f07762568300b5c3c897f SHA512 0241c44e1dffd0d890a3d30a1b2387ea167d578bb39ba0c804fb417e132d343a9e43da9247b205e18b893d8cf75d8528e9971569be67ac380b88618ef0a75ed4 |
26 |
DIST ffmpeg-4.1.tar.bz2 10687291 BLAKE2B 07293af1b13c6c6cad72e368207db21bdbc4b991931166c24ff40b00c3b3c8e1242be1876af8e3f154cc840fcd90d87b762fe77faccf06936dd096478d5d074b SHA512 ccf6d07268dc47e08ca619eb182a003face2a8ee73ec1a28157330dd7de1df88939def1fc1c7e6b6ac7b59752cdad84657d589b2fafb73e14e5ef03fb6e33417 |
27 |
|
28 |
diff --git a/media-video/ffmpeg/ffmpeg-4.1.1.ebuild b/media-video/ffmpeg/ffmpeg-4.1.1.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..44b6f462331 |
31 |
--- /dev/null |
32 |
+++ b/media-video/ffmpeg/ffmpeg-4.1.1.ebuild |
33 |
@@ -0,0 +1,527 @@ |
34 |
+# Copyright 1999-2019 Gentoo Authors |
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=56.58.58 |
49 |
+ |
50 |
+SCM="" |
51 |
+if [ "${PV#9999}" != "${PV}" ] ; then |
52 |
+ SCM="git-r3" |
53 |
+ EGIT_MIN_CLONE_TYPE="single" |
54 |
+ EGIT_REPO_URI="https://git.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="https://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="https://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="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~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 libressl:libtls lzma +network opencl |
101 |
+ openssl +postproc samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau |
102 |
+ X:xlib xcb:libxcb 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 jack:libjack |
108 |
+ # decoders |
109 |
+ amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 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 srt:libsrt svg:librsvg video_cards_nvidia:ffnvcodec |
113 |
+ vorbis:libvorbis vpx:libvpx zvbi:libzvbi |
114 |
+ # libavfilter options |
115 |
+ appkit |
116 |
+ bs2b:libbs2b chromaprint flite:libflite frei0r |
117 |
+ fribidi:libfribidi fontconfig ladspa libass lv2 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 libaom |
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 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 |
+ codec2? ( media-libs/codec2[${MULTILIB_USEDEP}] ) |
206 |
+ encode? ( |
207 |
+ amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] ) |
208 |
+ kvazaar? ( media-libs/kvazaar[${MULTILIB_USEDEP}] ) |
209 |
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] ) |
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 |
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] ) |
232 |
+ iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] ) |
233 |
+ iec61883? ( |
234 |
+ >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}] |
235 |
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] |
236 |
+ >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}] |
237 |
+ ) |
238 |
+ ieee1394? ( |
239 |
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}] |
240 |
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] |
241 |
+ ) |
242 |
+ jack? ( virtual/jack[${MULTILIB_USEDEP}] ) |
243 |
+ jpeg2k? ( >=media-libs/openjpeg-2:2[${MULTILIB_USEDEP}] ) |
244 |
+ libaom? ( media-libs/libaom[${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 |
+ lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] ) |
252 |
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) |
253 |
+ mmal? ( media-libs/raspberrypi-userland ) |
254 |
+ modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] ) |
255 |
+ openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] ) |
256 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
257 |
+ opengl? ( >=virtual/opengl-7.0-r1[${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 |
+ srt? ( >=net-libs/srt-1.3.0[${MULTILIB_USEDEP}] ) |
266 |
+ ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] ) |
267 |
+ svg? ( gnome-base/librsvg:2=[${MULTILIB_USEDEP}] ) |
268 |
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] ) |
269 |
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] ) |
270 |
+ video_cards_nvidia? ( >=media-libs/nv-codec-headers-8.1.24.2[${MULTILIB_USEDEP}] ) |
271 |
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] ) |
272 |
+ vorbis? ( |
273 |
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] |
274 |
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] |
275 |
+ ) |
276 |
+ vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] ) |
277 |
+ X? ( |
278 |
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] |
279 |
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] |
280 |
+ >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] |
281 |
+ ) |
282 |
+ xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] ) |
283 |
+ zeromq? ( >=net-libs/zeromq-4.1.6 ) |
284 |
+ zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] ) |
285 |
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) |
286 |
+ zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] ) |
287 |
+ !media-video/qt-faststart |
288 |
+ postproc? ( !media-libs/libpostproc ) |
289 |
+" |
290 |
+ |
291 |
+# Crypto & co provider magic |
292 |
+# - libressl is a useflag meaning it should always favor libressl over openssl |
293 |
+# - libressl and openssl provide more features to ffmpeg than gnutls |
294 |
+# |
295 |
+# The ordering is thus: libressl > openssl > gnutls |
296 |
+RDEPEND="${RDEPEND} |
297 |
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) |
298 |
+ !libressl? ( |
299 |
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) |
300 |
+ !openssl? ( gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) ) |
301 |
+ ) |
302 |
+" |
303 |
+ |
304 |
+DEPEND="${RDEPEND} |
305 |
+ >=sys-devel/make-3.81 |
306 |
+ doc? ( sys-apps/texinfo ) |
307 |
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] |
308 |
+ ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] ) |
309 |
+ cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) |
310 |
+ test? ( net-misc/wget sys-devel/bc ) |
311 |
+ v4l? ( sys-kernel/linux-headers ) |
312 |
+" |
313 |
+ |
314 |
+# Code requiring FFmpeg to be built under gpl license |
315 |
+GPL_REQUIRED_USE=" |
316 |
+ postproc? ( gpl ) |
317 |
+ frei0r? ( gpl ) |
318 |
+ cdio? ( gpl ) |
319 |
+ samba? ( gpl ) |
320 |
+ encode? ( |
321 |
+ x264? ( gpl ) |
322 |
+ x265? ( gpl ) |
323 |
+ xvid? ( gpl ) |
324 |
+ X? ( !xcb? ( gpl ) ) |
325 |
+ ) |
326 |
+" |
327 |
+REQUIRED_USE=" |
328 |
+ libv4l? ( v4l ) |
329 |
+ fftools_cws2fws? ( zlib ) |
330 |
+ test? ( encode ) |
331 |
+ ${GPL_REQUIRED_USE} |
332 |
+ ${CPU_REQUIRED_USE}" |
333 |
+RESTRICT=" |
334 |
+ gpl? ( openssl? ( bindist ) fdk? ( bindist ) libressl? ( bindist ) ) |
335 |
+" |
336 |
+ |
337 |
+S=${WORKDIR}/${P/_/-} |
338 |
+ |
339 |
+PATCHES=( |
340 |
+ "${FILESDIR}"/chromium-r1.patch |
341 |
+) |
342 |
+ |
343 |
+MULTILIB_WRAPPED_HEADERS=( |
344 |
+ /usr/include/libavutil/avconfig.h |
345 |
+) |
346 |
+ |
347 |
+build_separate_libffmpeg() { |
348 |
+ use opencl |
349 |
+} |
350 |
+ |
351 |
+src_prepare() { |
352 |
+ if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot |
353 |
+ export revision=git-N-${FFMPEG_REVISION} |
354 |
+ fi |
355 |
+ default |
356 |
+ echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die |
357 |
+} |
358 |
+ |
359 |
+multilib_src_configure() { |
360 |
+ local myconf=( ${EXTRA_FFMPEG_CONF} ) |
361 |
+ |
362 |
+ local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) |
363 |
+ use openssl || use libressl && use gpl && myconf+=( --enable-nonfree ) |
364 |
+ use samba && myconf+=( --enable-version3 ) |
365 |
+ |
366 |
+ # Encoders |
367 |
+ if use encode ; then |
368 |
+ ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" ) |
369 |
+ |
370 |
+ # Licensing. |
371 |
+ if use amrenc ; then |
372 |
+ myconf+=( --enable-version3 ) |
373 |
+ fi |
374 |
+ else |
375 |
+ myconf+=( --disable-encoders ) |
376 |
+ fi |
377 |
+ |
378 |
+ # Indevs |
379 |
+ use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 ) |
380 |
+ for i in alsa oss jack ; do |
381 |
+ use ${i} || myconf+=( --disable-indev=${i} ) |
382 |
+ done |
383 |
+ |
384 |
+ # Outdevs |
385 |
+ for i in alsa oss sdl ; do |
386 |
+ use ${i} || myconf+=( --disable-outdev=${i} ) |
387 |
+ done |
388 |
+ |
389 |
+ # Decoders |
390 |
+ use amr && myconf+=( --enable-version3 ) |
391 |
+ use gmp && myconf+=( --enable-version3 ) |
392 |
+ use fdk && use gpl && myconf+=( --enable-nonfree ) |
393 |
+ |
394 |
+ for i in "${ffuse[@]#+}" ; do |
395 |
+ myconf+=( $(use_enable ${i%:*} ${i#*:}) ) |
396 |
+ done |
397 |
+ |
398 |
+ # Incompatible features: openssl or libressl and gnutls |
399 |
+ if use libressl ; then |
400 |
+ myconf+=( --disable-gnutls --disable-openssl ) |
401 |
+ elif use openssl ; then |
402 |
+ myconf+=( --disable-gnutls ) |
403 |
+ fi |
404 |
+ |
405 |
+ # (temporarily) disable non-multilib deps |
406 |
+ if ! multilib_is_native_abi; then |
407 |
+ for i in frei0r libzmq ; do |
408 |
+ myconf+=( --disable-${i} ) |
409 |
+ done |
410 |
+ fi |
411 |
+ |
412 |
+ # CPU features |
413 |
+ for i in "${CPU_FEATURES_MAP[@]}" ; do |
414 |
+ use ${i%:*} || myconf+=( --disable-${i#*:} ) |
415 |
+ done |
416 |
+ |
417 |
+ if use pic ; then |
418 |
+ myconf+=( --enable-pic ) |
419 |
+ # disable asm code if PIC is required |
420 |
+ # as the provided asm decidedly is not PIC for x86. |
421 |
+ [[ ${ABI} == x86 ]] && myconf+=( --disable-asm ) |
422 |
+ fi |
423 |
+ [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004 |
424 |
+ |
425 |
+ # Try to get cpu type based on CFLAGS. |
426 |
+ # Bug #172723 |
427 |
+ # We need to do this so that features of that CPU will be better used |
428 |
+ # If they contain an unknown CPU it will not hurt since ffmpeg's configure |
429 |
+ # will just ignore it. |
430 |
+ for i in $(get-flag mcpu) $(get-flag march) ; do |
431 |
+ [[ ${i} = native ]] && i="host" # bug #273421 |
432 |
+ myconf+=( --cpu=${i} ) |
433 |
+ break |
434 |
+ done |
435 |
+ |
436 |
+ # LTO support, bug #566282 |
437 |
+ is-flagq "-flto*" && myconf+=( "--enable-lto" ) |
438 |
+ |
439 |
+ # Mandatory configuration |
440 |
+ myconf=( |
441 |
+ --enable-avfilter |
442 |
+ --enable-avresample |
443 |
+ --disable-stripping |
444 |
+ # This is only for hardcoded cflags; those are used in configure checks that may |
445 |
+ # interfere with proper detections, bug #671746 and bug #645778 |
446 |
+ # We use optflags, so that overrides them anyway. |
447 |
+ --disable-optimizations |
448 |
+ --disable-libcelt # bug #664158 |
449 |
+ "${myconf[@]}" |
450 |
+ ) |
451 |
+ |
452 |
+ # cross compile support |
453 |
+ if tc-is-cross-compiler ; then |
454 |
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) |
455 |
+ case ${CHOST} in |
456 |
+ *freebsd*) |
457 |
+ myconf+=( --target-os=freebsd ) |
458 |
+ ;; |
459 |
+ *mingw32*) |
460 |
+ myconf+=( --target-os=mingw32 ) |
461 |
+ ;; |
462 |
+ *linux*) |
463 |
+ myconf+=( --target-os=linux ) |
464 |
+ ;; |
465 |
+ esac |
466 |
+ fi |
467 |
+ |
468 |
+ # doc |
469 |
+ myconf+=( |
470 |
+ $(multilib_native_use_enable doc) |
471 |
+ $(multilib_native_use_enable doc htmlpages) |
472 |
+ $(multilib_native_enable manpages) |
473 |
+ ) |
474 |
+ |
475 |
+ set -- "${S}/configure" \ |
476 |
+ --prefix="${EPREFIX}/usr" \ |
477 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
478 |
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ |
479 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
480 |
+ --mandir="${EPREFIX}/usr/share/man" \ |
481 |
+ --enable-shared \ |
482 |
+ --cc="$(tc-getCC)" \ |
483 |
+ --cxx="$(tc-getCXX)" \ |
484 |
+ --ar="$(tc-getAR)" \ |
485 |
+ --optflags="${CFLAGS}" \ |
486 |
+ $(use_enable static-libs static) \ |
487 |
+ "${myconf[@]}" |
488 |
+ echo "${@}" |
489 |
+ "${@}" || die |
490 |
+ |
491 |
+ if multilib_is_native_abi && use chromium && build_separate_libffmpeg; then |
492 |
+ einfo "Configuring for Chromium" |
493 |
+ mkdir -p ../chromium || die |
494 |
+ pushd ../chromium >/dev/null || die |
495 |
+ set -- "${@}" \ |
496 |
+ --disable-shared \ |
497 |
+ --enable-static \ |
498 |
+ --enable-pic \ |
499 |
+ --disable-opencl |
500 |
+ echo "${@}" |
501 |
+ "${@}" || die |
502 |
+ popd >/dev/null || die |
503 |
+ fi |
504 |
+} |
505 |
+ |
506 |
+multilib_src_compile() { |
507 |
+ emake V=1 |
508 |
+ |
509 |
+ if multilib_is_native_abi; then |
510 |
+ for i in "${FFTOOLS[@]}" ; do |
511 |
+ if use fftools_${i} ; then |
512 |
+ emake V=1 tools/${i}$(get_exeext) |
513 |
+ fi |
514 |
+ done |
515 |
+ |
516 |
+ if use chromium; then |
517 |
+ if build_separate_libffmpeg; then |
518 |
+ einfo "Compiling for Chromium" |
519 |
+ pushd ../chromium >/dev/null || die |
520 |
+ emake V=1 libffmpeg |
521 |
+ popd >/dev/null || die |
522 |
+ else |
523 |
+ emake V=1 libffmpeg |
524 |
+ fi |
525 |
+ fi |
526 |
+ fi |
527 |
+} |
528 |
+ |
529 |
+multilib_src_install() { |
530 |
+ emake V=1 DESTDIR="${D}" install install-doc |
531 |
+ |
532 |
+ if multilib_is_native_abi; then |
533 |
+ for i in "${FFTOOLS[@]}" ; do |
534 |
+ if use fftools_${i} ; then |
535 |
+ dobin tools/${i}$(get_exeext) |
536 |
+ fi |
537 |
+ done |
538 |
+ |
539 |
+ if use chromium; then |
540 |
+ if build_separate_libffmpeg; then |
541 |
+ einfo "Installing for Chromium" |
542 |
+ pushd ../chromium >/dev/null || die |
543 |
+ emake V=1 DESTDIR="${D}" install-libffmpeg |
544 |
+ popd >/dev/null || die |
545 |
+ else |
546 |
+ emake V=1 DESTDIR="${D}" install-libffmpeg |
547 |
+ fi |
548 |
+ fi |
549 |
+ fi |
550 |
+} |
551 |
+ |
552 |
+multilib_src_install_all() { |
553 |
+ dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges |
554 |
+ [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" |
555 |
+} |
556 |
+ |
557 |
+multilib_src_test() { |
558 |
+ 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" \ |
559 |
+ emake V=1 fate |
560 |
+} |