Gentoo Archives: gentoo-commits

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