1 |
commit: 7ca18f7ba89665cc7e88d252914caa1e4987ccee |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 1 12:28:49 2022 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 1 12:29:09 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ca18f7b |
7 |
|
8 |
media-video/ffmpeg: bump to 5.1.1 |
9 |
|
10 |
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> |
11 |
|
12 |
media-video/ffmpeg/Manifest | 2 + |
13 |
media-video/ffmpeg/ffmpeg-5.1.1.ebuild | 606 +++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 608 insertions(+) |
15 |
|
16 |
diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest |
17 |
index b764a0447ea9..c1b17503cf7d 100644 |
18 |
--- a/media-video/ffmpeg/Manifest |
19 |
+++ b/media-video/ffmpeg/Manifest |
20 |
@@ -5,5 +5,7 @@ DIST ffmpeg-4.4.2.tar.xz 9562968 BLAKE2B be044e9895acdd71a237a343a8d047c56db845c |
21 |
DIST ffmpeg-4.4.2.tar.xz.asc 520 BLAKE2B 1ff4a886c7703a05a19499ae5b2b6207df24e05844861cb52f2c56a97f47ab4fefa5011de46a385bab9684964470697ec5e74553098392877f7521a04ffe0fc4 SHA512 a4df97a6328fc076b5611023bd61254f1a5043db1ec2f3426bee305206b2b0937047ede9cb51db31a3387a16218fe95a7a40296770574fa32660118938a9d301 |
22 |
DIST ffmpeg-5.0.1.tar.xz 9812524 BLAKE2B 0a37d425780f7e15836848048214411829bceb0de12bb7089803feb3dda07a077be9c8e8174b72792558ed86d92224bee9d4db20cc74690ea54312fbf2f10e83 SHA512 e5810c7379748a6bbe1a903bf36b4372b67cb3973179727b6af6f0118eef46f4c990155961cc37255e08a5bafdc4b4683503ad410ebb7afe7a35b891c01fa602 |
23 |
DIST ffmpeg-5.0.1.tar.xz.asc 520 BLAKE2B 686a8c372d26bd0158a0e79f6cbe8d9c46127bd200df7f4f6e2a4285bfd412cfa9aff865eca125a27a7204f32ba0cca86bcbf769ee4874e5202cc700b0eb4449 SHA512 9c4bd404196c3a3808bae92873aefc77f8c26a9419cc6130a3f2359a75c8e83189d206e9aee8ff85c5a7fe4a98da24e11cf607ec351386c18979ec2d5ad3b3ad |
24 |
+DIST ffmpeg-5.1.1.tar.xz 10001696 BLAKE2B d0d62b4ab3032b554f52f10e61bc152bc60c4058df6f1f640101c21f1001bb5b5c7dbc21a0559c13051354346fb951f4abe99a9b07b1d4b2410ce6ec4458c909 SHA512 689e38d1a18bfaa8709505bad0c07edabbf02b2f1477dcfcb2fed5e1a3adc654c8e82cb877a92e278c90521242c39ae7e0bbd41e6beb3651de0c96b113d97baa |
25 |
+DIST ffmpeg-5.1.1.tar.xz.asc 520 BLAKE2B 8d5848b0807f11c82c3a6eb93aad129c4d3a1acb8eb154c32d20f6696cb6cac0600bb253629169754951af6962199b95dced2842c8c4d011a62173ee0437baa5 SHA512 4910dbccd108ffec03d08f96a497261964c22a234c786547de136953f57232d315cfd9790d943ad41a299d529ace259439e628c4e0fe6f4b6ff7363baa9c1be5 |
26 |
DIST ffmpeg-5.1.tar.xz 10001864 BLAKE2B b182b93210b7ee8115b657b2507c091f4839cc02d1ef2233d4d5e4aa12fccd4c07f62828501bda3b8f3d0e253036578a11985452d9c07433b465411f090f0c46 SHA512 9ba24f7488d1c7f8a3e3fbc3920e329724e75631d769400998f7a0858c58213f2eee2880fdd7caa9a701150217448a834b5008840327478314e4508c5e0e3b19 |
27 |
DIST ffmpeg-5.1.tar.xz.asc 520 BLAKE2B aaacc60465574f4c49765b3054d2a26bca8a116bd2bcffd818d633f4ad9718d9cdd045b058b8012606ab58531573ce98d8d114cdf9723ac05e1e87be56e1a792 SHA512 41fe8f4865bcd6829f9e7223d05bd7ad58b15e52969c556f0e218ab562fbe0264b37248ea494cd7ae1c4968d79ad59d7f28a1692a8d0838d0de646818ea9b933 |
28 |
|
29 |
diff --git a/media-video/ffmpeg/ffmpeg-5.1.1.ebuild b/media-video/ffmpeg/ffmpeg-5.1.1.ebuild |
30 |
new file mode 100644 |
31 |
index 000000000000..04786c9205ad |
32 |
--- /dev/null |
33 |
+++ b/media-video/ffmpeg/ffmpeg-5.1.1.ebuild |
34 |
@@ -0,0 +1,606 @@ |
35 |
+# Copyright 1999-2022 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=7 |
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=57.59.59 |
50 |
+ |
51 |
+SCM="" |
52 |
+if [ "${PV#9999}" != "${PV}" ] ; then |
53 |
+ SCM="git-r3" |
54 |
+ EGIT_MIN_CLONE_TYPE="single" |
55 |
+ EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git" |
56 |
+fi |
57 |
+ |
58 |
+inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM} |
59 |
+ |
60 |
+DESCRIPTION="Complete solution to record/convert/stream audio and video. Includes libavcodec" |
61 |
+HOMEPAGE="https://ffmpeg.org/" |
62 |
+if [ "${PV#9999}" != "${PV}" ] ; then |
63 |
+ SRC_URI="" |
64 |
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot |
65 |
+ SRC_URI="mirror://gentoo/${P}.tar.xz" |
66 |
+else # Release |
67 |
+ VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/ffmpeg.asc |
68 |
+ inherit verify-sig |
69 |
+ SRC_URI="https://ffmpeg.org/releases/${P/_/-}.tar.xz" |
70 |
+ SRC_URI+=" verify-sig? ( https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc )" |
71 |
+ |
72 |
+ BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-ffmpeg )" |
73 |
+fi |
74 |
+FFMPEG_REVISION="${PV#*_p}" |
75 |
+ |
76 |
+SLOT="0/${FFMPEG_SUBSLOT}" |
77 |
+LICENSE=" |
78 |
+ !gpl? ( LGPL-2.1 ) |
79 |
+ gpl? ( GPL-2 ) |
80 |
+ amr? ( |
81 |
+ gpl? ( GPL-3 ) |
82 |
+ !gpl? ( LGPL-3 ) |
83 |
+ ) |
84 |
+ gmp? ( |
85 |
+ gpl? ( GPL-3 ) |
86 |
+ !gpl? ( LGPL-3 ) |
87 |
+ ) |
88 |
+ libaribb24? ( |
89 |
+ gpl? ( GPL-3 ) |
90 |
+ !gpl? ( LGPL-3 ) |
91 |
+ ) |
92 |
+ encode? ( |
93 |
+ amrenc? ( |
94 |
+ gpl? ( GPL-3 ) |
95 |
+ !gpl? ( LGPL-3 ) |
96 |
+ ) |
97 |
+ ) |
98 |
+ samba? ( GPL-3 ) |
99 |
+" |
100 |
+if [ "${PV#9999}" = "${PV}" ] ; then |
101 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" |
102 |
+fi |
103 |
+ |
104 |
+# Options to use as use_enable in the foo[:bar] form. |
105 |
+# This will feed configure with $(use_enable foo bar) |
106 |
+# or $(use_enable foo foo) if no :bar is set. |
107 |
+# foo is added to IUSE. |
108 |
+FFMPEG_FLAG_MAP=( |
109 |
+ +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt +gnutls gmp |
110 |
+ +gpl hardcoded-tables +iconv libxml2 lzma +network opencl |
111 |
+ openssl +postproc samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau vulkan |
112 |
+ X:xlib X:libxcb X:libxcb-shm X:libxcb-xfixes +zlib |
113 |
+ # libavdevice options |
114 |
+ cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal |
115 |
+ opengl |
116 |
+ # indevs |
117 |
+ libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack |
118 |
+ # decoders |
119 |
+ amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac |
120 |
+ jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme gsm:libgsm |
121 |
+ libaribb24 mmal modplug:libmodplug opus:libopus libilbc librtmp ssh:libssh |
122 |
+ speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec |
123 |
+ vorbis:libvorbis vpx:libvpx zvbi:libzvbi |
124 |
+ # libavfilter options |
125 |
+ appkit |
126 |
+ bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite frei0r vmaf:libvmaf |
127 |
+ fribidi:libfribidi fontconfig ladspa lcms:lcms2 libass libplacebo libtesseract lv2 |
128 |
+ truetype:libfreetype vidstab:libvidstab |
129 |
+ rubberband:librubberband zeromq:libzmq zimg:libzimg |
130 |
+ # libswresample options |
131 |
+ libsoxr |
132 |
+ # Threads; we only support pthread for now but ffmpeg supports more |
133 |
+ +threads:pthreads |
134 |
+) |
135 |
+ |
136 |
+# Same as above but for encoders, i.e. they do something only with USE=encode. |
137 |
+FFMPEG_ENCODER_FLAG_MAP=( |
138 |
+ amf amrenc:libvo-amrwbenc kvazaar:libkvazaar libaom mp3:libmp3lame |
139 |
+ openh264:libopenh264 rav1e:librav1e snappy:libsnappy svt-av1:libsvtav1 |
140 |
+ theora:libtheora twolame:libtwolame webp:libwebp x264:libx264 |
141 |
+ x265:libx265 xvid:libxvid |
142 |
+) |
143 |
+ |
144 |
+IUSE=" |
145 |
+ alsa chromium doc +encode oss pic sndio static-libs test v4l |
146 |
+ ${FFMPEG_FLAG_MAP[@]%:*} |
147 |
+ ${FFMPEG_ENCODER_FLAG_MAP[@]%:*} |
148 |
+" |
149 |
+ |
150 |
+# Strings for CPU features in the useflag[:configure_option] form |
151 |
+# if :configure_option isn't set, it will use 'useflag' as configure option |
152 |
+ARM_CPU_FEATURES=( |
153 |
+ cpu_flags_arm_thumb:armv5te |
154 |
+ cpu_flags_arm_v6:armv6 |
155 |
+ cpu_flags_arm_thumb2:armv6t2 |
156 |
+ cpu_flags_arm_neon:neon |
157 |
+ cpu_flags_arm_vfp:vfp |
158 |
+ cpu_flags_arm_vfpv3:vfpv3 |
159 |
+ cpu_flags_arm_v8:armv8 |
160 |
+) |
161 |
+ARM_CPU_REQUIRED_USE=" |
162 |
+ arm64? ( cpu_flags_arm_v8 ) |
163 |
+ cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) |
164 |
+ cpu_flags_arm_neon? ( cpu_flags_arm_thumb2 cpu_flags_arm_vfp ) |
165 |
+ cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) |
166 |
+ cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) |
167 |
+ cpu_flags_arm_v6? ( cpu_flags_arm_thumb ) |
168 |
+" |
169 |
+MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu ) |
170 |
+PPC_CPU_FEATURES=( cpu_flags_ppc_altivec:altivec cpu_flags_ppc_vsx:vsx cpu_flags_ppc_vsx2:power8 ) |
171 |
+PPC_CPU_REQUIRED_USE=" |
172 |
+ cpu_flags_ppc_vsx? ( cpu_flags_ppc_altivec ) |
173 |
+ cpu_flags_ppc_vsx2? ( cpu_flags_ppc_vsx ) |
174 |
+" |
175 |
+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 ) |
176 |
+X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) |
177 |
+X86_CPU_REQUIRED_USE=" |
178 |
+ cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) |
179 |
+ cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) |
180 |
+ cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) |
181 |
+ cpu_flags_x86_xop? ( cpu_flags_x86_avx ) |
182 |
+ cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) |
183 |
+ cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) |
184 |
+ cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) |
185 |
+ cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) |
186 |
+ cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) |
187 |
+ cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) |
188 |
+ cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) |
189 |
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) |
190 |
+ cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) |
191 |
+ cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) |
192 |
+ cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) |
193 |
+" |
194 |
+ |
195 |
+CPU_FEATURES_MAP=( |
196 |
+ ${ARM_CPU_FEATURES[@]} |
197 |
+ ${MIPS_CPU_FEATURES[@]} |
198 |
+ ${PPC_CPU_FEATURES[@]} |
199 |
+ ${X86_CPU_FEATURES[@]} |
200 |
+) |
201 |
+IUSE="${IUSE} |
202 |
+ ${CPU_FEATURES_MAP[@]%:*}" |
203 |
+ |
204 |
+CPU_REQUIRED_USE=" |
205 |
+ ${ARM_CPU_REQUIRED_USE} |
206 |
+ ${PPC_CPU_REQUIRED_USE} |
207 |
+ ${X86_CPU_REQUIRED_USE} |
208 |
+" |
209 |
+ |
210 |
+FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher ) |
211 |
+IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}" |
212 |
+ |
213 |
+RDEPEND=" |
214 |
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) |
215 |
+ amf? ( media-video/amdgpu-pro-amf ) |
216 |
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] ) |
217 |
+ bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] ) |
218 |
+ bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] ) |
219 |
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) |
220 |
+ cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] ) |
221 |
+ chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] ) |
222 |
+ codec2? ( media-libs/codec2[${MULTILIB_USEDEP}] ) |
223 |
+ dav1d? ( >=media-libs/dav1d-0.4.0:0=[${MULTILIB_USEDEP}] ) |
224 |
+ encode? ( |
225 |
+ amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] ) |
226 |
+ kvazaar? ( >=media-libs/kvazaar-1.2.0[${MULTILIB_USEDEP}] ) |
227 |
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] ) |
228 |
+ openh264? ( >=media-libs/openh264-1.4.0-r1:=[${MULTILIB_USEDEP}] ) |
229 |
+ rav1e? ( >=media-video/rav1e-0.4:=[capi] ) |
230 |
+ snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] ) |
231 |
+ theora? ( |
232 |
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] |
233 |
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] |
234 |
+ ) |
235 |
+ twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] ) |
236 |
+ webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] ) |
237 |
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] ) |
238 |
+ x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] ) |
239 |
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] ) |
240 |
+ ) |
241 |
+ fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] ) |
242 |
+ flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] ) |
243 |
+ fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] ) |
244 |
+ frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] ) |
245 |
+ fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] ) |
246 |
+ gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] ) |
247 |
+ gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] ) |
248 |
+ gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] ) |
249 |
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] ) |
250 |
+ iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] ) |
251 |
+ iec61883? ( |
252 |
+ >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}] |
253 |
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] |
254 |
+ >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}] |
255 |
+ ) |
256 |
+ ieee1394? ( |
257 |
+ >=media-libs/libdc1394-2.2.1:2=[${MULTILIB_USEDEP}] |
258 |
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] |
259 |
+ ) |
260 |
+ jack? ( virtual/jack[${MULTILIB_USEDEP}] ) |
261 |
+ jpeg2k? ( >=media-libs/openjpeg-2:2[${MULTILIB_USEDEP}] ) |
262 |
+ jpegxl? ( >=media-libs/libjxl-0.7.0[$MULTILIB_USEDEP] ) |
263 |
+ lcms? ( >=media-libs/lcms-2.13:2[$MULTILIB_USEDEP] ) |
264 |
+ libaom? ( >=media-libs/libaom-1.0.0-r1:=[${MULTILIB_USEDEP}] ) |
265 |
+ libaribb24? ( >=media-libs/aribb24-1.0.3-r2[${MULTILIB_USEDEP}] ) |
266 |
+ libass? ( >=media-libs/libass-0.11.0:=[${MULTILIB_USEDEP}] ) |
267 |
+ libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] ) |
268 |
+ libdrm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) |
269 |
+ libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] ) |
270 |
+ libplacebo? ( >=media-libs/libplacebo-4.192.0[$MULTILIB_USEDEP] ) |
271 |
+ librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] ) |
272 |
+ libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] ) |
273 |
+ libtesseract? ( >=app-text/tesseract-4.1.0-r1[${MULTILIB_USEDEP}] ) |
274 |
+ libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] ) |
275 |
+ libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] ) |
276 |
+ lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] ) |
277 |
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) |
278 |
+ mmal? ( media-libs/raspberrypi-userland ) |
279 |
+ modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] ) |
280 |
+ openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] ) |
281 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
282 |
+ opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] ) |
283 |
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] ) |
284 |
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] ) |
285 |
+ rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] ) |
286 |
+ samba? ( >=net-fs/samba-3.6.23-r1[client,${MULTILIB_USEDEP}] ) |
287 |
+ sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] ) |
288 |
+ sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) |
289 |
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] ) |
290 |
+ srt? ( >=net-libs/srt-1.3.0:=[${MULTILIB_USEDEP}] ) |
291 |
+ ssh? ( >=net-libs/libssh-0.5.5:=[sftp,${MULTILIB_USEDEP}] ) |
292 |
+ svg? ( |
293 |
+ gnome-base/librsvg:2=[${MULTILIB_USEDEP}] |
294 |
+ x11-libs/cairo[${MULTILIB_USEDEP}] |
295 |
+ ) |
296 |
+ nvenc? ( >=media-libs/nv-codec-headers-9.1.23.1 ) |
297 |
+ svt-av1? ( >=media-libs/svt-av1-0.9.0[${MULTILIB_USEDEP}] ) |
298 |
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] ) |
299 |
+ vaapi? ( >=x11-libs/libva-1.2.1-r1:0=[${MULTILIB_USEDEP}] ) |
300 |
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] ) |
301 |
+ vidstab? ( >=media-libs/vidstab-1.1.0[${MULTILIB_USEDEP}] ) |
302 |
+ vmaf? ( >=media-libs/libvmaf-2.0.0[${MULTILIB_USEDEP}] ) |
303 |
+ vorbis? ( |
304 |
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] |
305 |
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] |
306 |
+ ) |
307 |
+ vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] ) |
308 |
+ vulkan? ( >=media-libs/vulkan-loader-1.2.189:=[${MULTILIB_USEDEP}] ) |
309 |
+ X? ( |
310 |
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] |
311 |
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] |
312 |
+ >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] |
313 |
+ >=x11-libs/libxcb-1.4:=[${MULTILIB_USEDEP}] |
314 |
+ ) |
315 |
+ postproc? ( !media-libs/libpostproc ) |
316 |
+ zeromq? ( >=net-libs/zeromq-4.1.6 ) |
317 |
+ zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] ) |
318 |
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) |
319 |
+ zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] ) |
320 |
+" |
321 |
+ |
322 |
+RDEPEND="${RDEPEND} |
323 |
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) |
324 |
+ !openssl? ( gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) ) |
325 |
+" |
326 |
+ |
327 |
+DEPEND="${RDEPEND} |
328 |
+ amf? ( media-libs/amf-headers ) |
329 |
+ ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] ) |
330 |
+ v4l? ( sys-kernel/linux-headers ) |
331 |
+" |
332 |
+ |
333 |
+# += for verify-sig above |
334 |
+BDEPEND+=" |
335 |
+ >=sys-devel/make-3.81 |
336 |
+ virtual/pkgconfig |
337 |
+ cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) |
338 |
+ cuda? ( >=sys-devel/clang-7[llvm_targets_NVPTX] ) |
339 |
+ doc? ( sys-apps/texinfo ) |
340 |
+ test? ( net-misc/wget sys-devel/bc ) |
341 |
+" |
342 |
+ |
343 |
+# Code requiring FFmpeg to be built under gpl license |
344 |
+GPL_REQUIRED_USE=" |
345 |
+ postproc? ( gpl ) |
346 |
+ frei0r? ( gpl ) |
347 |
+ cdio? ( gpl ) |
348 |
+ rubberband? ( gpl ) |
349 |
+ vidstab? ( gpl ) |
350 |
+ samba? ( gpl ) |
351 |
+ encode? ( |
352 |
+ x264? ( gpl ) |
353 |
+ x265? ( gpl ) |
354 |
+ xvid? ( gpl ) |
355 |
+ ) |
356 |
+" |
357 |
+REQUIRED_USE=" |
358 |
+ cuda? ( nvenc ) |
359 |
+ libv4l? ( v4l ) |
360 |
+ fftools_cws2fws? ( zlib ) |
361 |
+ test? ( encode ) |
362 |
+ ${GPL_REQUIRED_USE} |
363 |
+ ${CPU_REQUIRED_USE}" |
364 |
+RESTRICT=" |
365 |
+ !test? ( test ) |
366 |
+ gpl? ( openssl? ( bindist ) fdk? ( bindist ) ) |
367 |
+" |
368 |
+ |
369 |
+S=${WORKDIR}/${P/_/-} |
370 |
+ |
371 |
+PATCHES=( |
372 |
+ "${FILESDIR}"/chromium-r1.patch |
373 |
+) |
374 |
+ |
375 |
+MULTILIB_WRAPPED_HEADERS=( |
376 |
+ /usr/include/libavutil/avconfig.h |
377 |
+) |
378 |
+ |
379 |
+build_separate_libffmpeg() { |
380 |
+ use opencl |
381 |
+} |
382 |
+ |
383 |
+pkg_setup() { |
384 |
+ # ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends on ffmpeg. |
385 |
+ # May cause breakage while updating, #862996, #625210, #833821. |
386 |
+ if has_version media-libs/chromaprint[tools] && use chromaprint; then |
387 |
+ ewarn "You have media-libs/chromaprint installed with 'tools' USE flag, which " |
388 |
+ ewarn "links to ffmpeg, and you have enabled 'chromaprint' USE flag for ffmpeg, " |
389 |
+ ewarn "which links to chromaprint. This may cause issues while rebuilding ffmpeg." |
390 |
+ ewarn "" |
391 |
+ ewarn "If your build fails to 'ERROR: chromaprint not found', rebuild chromaprint " |
392 |
+ ewarn "without the 'tools' use flag first, then rebuild ffmpeg, and then finally enable " |
393 |
+ ewarn "'tools' USE flag for chromaprint. See #862996." |
394 |
+ fi |
395 |
+} |
396 |
+ |
397 |
+src_prepare() { |
398 |
+ if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot |
399 |
+ export revision=git-N-${FFMPEG_REVISION} |
400 |
+ fi |
401 |
+ |
402 |
+ default |
403 |
+ |
404 |
+ # -fdiagnostics-color=auto gets appended after user flags which |
405 |
+ # will ignore user's preference. |
406 |
+ sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die |
407 |
+ |
408 |
+ echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die |
409 |
+} |
410 |
+ |
411 |
+multilib_src_configure() { |
412 |
+ local myconf=( ) |
413 |
+ |
414 |
+ # bug 842201 |
415 |
+ use ia64 && tc-is-gcc && append-flags \ |
416 |
+ -fno-tree-ccp \ |
417 |
+ -fno-tree-dominator-opts \ |
418 |
+ -fno-tree-fre \ |
419 |
+ -fno-code-hoisting \ |
420 |
+ -fno-tree-pre \ |
421 |
+ -fno-tree-vrp |
422 |
+ |
423 |
+ local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) |
424 |
+ use openssl && myconf+=( --enable-nonfree ) |
425 |
+ use samba && myconf+=( --enable-version3 ) |
426 |
+ |
427 |
+ # Encoders |
428 |
+ if use encode ; then |
429 |
+ ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" ) |
430 |
+ |
431 |
+ # Licensing. |
432 |
+ if use amrenc ; then |
433 |
+ myconf+=( --enable-version3 ) |
434 |
+ fi |
435 |
+ else |
436 |
+ myconf+=( --disable-encoders ) |
437 |
+ fi |
438 |
+ |
439 |
+ # Indevs |
440 |
+ use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 ) |
441 |
+ for i in alsa oss jack sndio ; do |
442 |
+ use ${i} || myconf+=( --disable-indev=${i} ) |
443 |
+ done |
444 |
+ |
445 |
+ # Outdevs |
446 |
+ for i in alsa oss sndio ; do |
447 |
+ use ${i} || myconf+=( --disable-outdev=${i} ) |
448 |
+ done |
449 |
+ |
450 |
+ # Decoders |
451 |
+ use amr && myconf+=( --enable-version3 ) |
452 |
+ use gmp && myconf+=( --enable-version3 ) |
453 |
+ use libaribb24 && myconf+=( --enable-version3 ) |
454 |
+ use fdk && use gpl && myconf+=( --enable-nonfree ) |
455 |
+ |
456 |
+ for i in "${ffuse[@]#+}" ; do |
457 |
+ myconf+=( $(use_enable ${i%:*} ${i#*:}) ) |
458 |
+ done |
459 |
+ |
460 |
+ if use openssl ; then |
461 |
+ myconf+=( --disable-gnutls ) |
462 |
+ has_version dev-libs/openssl:0/3 && myconf+=( --enable-version3 ) |
463 |
+ fi |
464 |
+ |
465 |
+ # (temporarily) disable non-multilib deps |
466 |
+ if ! multilib_is_native_abi; then |
467 |
+ for i in librav1e libzmq ; do |
468 |
+ myconf+=( --disable-${i} ) |
469 |
+ done |
470 |
+ fi |
471 |
+ |
472 |
+ # CPU features |
473 |
+ for i in "${CPU_FEATURES_MAP[@]}" ; do |
474 |
+ use ${i%:*} || myconf+=( --disable-${i#*:} ) |
475 |
+ done |
476 |
+ |
477 |
+ if use pic ; then |
478 |
+ myconf+=( --enable-pic ) |
479 |
+ # disable asm code if PIC is required |
480 |
+ # as the provided asm decidedly is not PIC for x86. |
481 |
+ [[ ${ABI} == x86 ]] && myconf+=( --disable-asm ) |
482 |
+ fi |
483 |
+ [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004 |
484 |
+ |
485 |
+ # Try to get cpu type based on CFLAGS. |
486 |
+ # Bug #172723 |
487 |
+ # We need to do this so that features of that CPU will be better used |
488 |
+ # If they contain an unknown CPU it will not hurt since ffmpeg's configure |
489 |
+ # will just ignore it. |
490 |
+ for i in $(get-flag mcpu) $(get-flag march) ; do |
491 |
+ [[ ${i} = native ]] && i="host" # bug #273421 |
492 |
+ myconf+=( --cpu=${i} ) |
493 |
+ break |
494 |
+ done |
495 |
+ |
496 |
+ # LTO support, bug #566282, bug #754654, bug #772854 |
497 |
+ [[ ${ABI} != x86 ]] && is-flagq "-flto*" && myconf+=( "--enable-lto" ) |
498 |
+ filter-lto |
499 |
+ |
500 |
+ # Mandatory configuration |
501 |
+ myconf=( |
502 |
+ --enable-avfilter |
503 |
+ --disable-stripping |
504 |
+ # This is only for hardcoded cflags; those are used in configure checks that may |
505 |
+ # interfere with proper detections, bug #671746 and bug #645778 |
506 |
+ # We use optflags, so that overrides them anyway. |
507 |
+ --disable-optimizations |
508 |
+ --disable-libcelt # bug #664158 |
509 |
+ "${myconf[@]}" |
510 |
+ ) |
511 |
+ |
512 |
+ # cross compile support |
513 |
+ if tc-is-cross-compiler ; then |
514 |
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) |
515 |
+ case ${CHOST} in |
516 |
+ *freebsd*) |
517 |
+ myconf+=( --target-os=freebsd ) |
518 |
+ ;; |
519 |
+ *mingw32*) |
520 |
+ myconf+=( --target-os=mingw32 ) |
521 |
+ ;; |
522 |
+ *linux*) |
523 |
+ myconf+=( --target-os=linux ) |
524 |
+ ;; |
525 |
+ esac |
526 |
+ fi |
527 |
+ |
528 |
+ # doc |
529 |
+ myconf+=( |
530 |
+ $(multilib_native_use_enable doc) |
531 |
+ $(multilib_native_use_enable doc htmlpages) |
532 |
+ $(multilib_native_enable manpages) |
533 |
+ ) |
534 |
+ |
535 |
+ # Fixed in 5.0.1? Waiting for verification from someone who hit the issue. |
536 |
+ local extra_libs |
537 |
+ if use arm || use ppc || use mips || [[ ${CHOST} == *i486* ]] ; then |
538 |
+ # bug #782811 |
539 |
+ # bug #790590 |
540 |
+ extra_libs+="$(test-flags-CCLD -latomic) " |
541 |
+ fi |
542 |
+ |
543 |
+ set -- "${S}/configure" \ |
544 |
+ --prefix="${EPREFIX}/usr" \ |
545 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
546 |
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ |
547 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
548 |
+ --mandir="${EPREFIX}/usr/share/man" \ |
549 |
+ --enable-shared \ |
550 |
+ --cc="$(tc-getCC)" \ |
551 |
+ --cxx="$(tc-getCXX)" \ |
552 |
+ --ar="$(tc-getAR)" \ |
553 |
+ --nm="$(tc-getNM)" \ |
554 |
+ --strip="$(tc-getSTRIP)" \ |
555 |
+ --ranlib="$(tc-getRANLIB)" \ |
556 |
+ --pkg-config="$(tc-getPKG_CONFIG)" \ |
557 |
+ --optflags="${CFLAGS}" \ |
558 |
+ --extra-libs="${extra_libs}" \ |
559 |
+ $(use_enable static-libs static) \ |
560 |
+ "${myconf[@]}" \ |
561 |
+ ${EXTRA_FFMPEG_CONF} |
562 |
+ echo "${@}" |
563 |
+ "${@}" || die |
564 |
+ |
565 |
+ if multilib_is_native_abi && use chromium && build_separate_libffmpeg; then |
566 |
+ einfo "Configuring for Chromium" |
567 |
+ mkdir -p ../chromium || die |
568 |
+ pushd ../chromium >/dev/null || die |
569 |
+ set -- "${@}" \ |
570 |
+ --disable-shared \ |
571 |
+ --enable-static \ |
572 |
+ --enable-pic \ |
573 |
+ --disable-opencl |
574 |
+ echo "${@}" |
575 |
+ "${@}" || die |
576 |
+ popd >/dev/null || die |
577 |
+ fi |
578 |
+} |
579 |
+ |
580 |
+multilib_src_compile() { |
581 |
+ emake V=1 |
582 |
+ |
583 |
+ if multilib_is_native_abi; then |
584 |
+ for i in "${FFTOOLS[@]}" ; do |
585 |
+ if use fftools_${i} ; then |
586 |
+ emake V=1 tools/${i}$(get_exeext) |
587 |
+ fi |
588 |
+ done |
589 |
+ |
590 |
+ if use chromium; then |
591 |
+ if build_separate_libffmpeg; then |
592 |
+ einfo "Compiling for Chromium" |
593 |
+ pushd ../chromium >/dev/null || die |
594 |
+ emake V=1 libffmpeg |
595 |
+ popd >/dev/null || die |
596 |
+ else |
597 |
+ emake V=1 libffmpeg |
598 |
+ fi |
599 |
+ fi |
600 |
+ fi |
601 |
+} |
602 |
+ |
603 |
+multilib_src_test() { |
604 |
+ 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" \ |
605 |
+ emake V=1 fate |
606 |
+} |
607 |
+ |
608 |
+multilib_src_install() { |
609 |
+ emake V=1 DESTDIR="${D}" install install-doc |
610 |
+ |
611 |
+ if multilib_is_native_abi; then |
612 |
+ for i in "${FFTOOLS[@]}" ; do |
613 |
+ if use fftools_${i} ; then |
614 |
+ dobin tools/${i}$(get_exeext) |
615 |
+ fi |
616 |
+ done |
617 |
+ |
618 |
+ if use chromium; then |
619 |
+ if build_separate_libffmpeg; then |
620 |
+ einfo "Installing for Chromium" |
621 |
+ pushd ../chromium >/dev/null || die |
622 |
+ emake V=1 DESTDIR="${D}" install-libffmpeg |
623 |
+ popd >/dev/null || die |
624 |
+ else |
625 |
+ emake V=1 DESTDIR="${D}" install-libffmpeg |
626 |
+ |
627 |
+ # When not built separately, libffmpeg has no code of |
628 |
+ # its own so this QA check raises a false positive. |
629 |
+ QA_FLAGS_IGNORED+=" usr/$(get_libdir)/chromium/.*" |
630 |
+ fi |
631 |
+ fi |
632 |
+ fi |
633 |
+} |
634 |
+ |
635 |
+multilib_src_install_all() { |
636 |
+ dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges |
637 |
+ [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" |
638 |
+ |
639 |
+ use amf && doenvd "${FILESDIR}"/amf-env-vulkan-override |
640 |
+} |