From e9d044d4b9b71200a96adfa280848858c0f468c9 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 13 Nov 2021 13:10:00 +0000 Subject: gentoo resync : 13.11.2021 --- media-video/ffmpeg-chromium/Manifest | 4 +- .../ffmpeg-chromium/ffmpeg-chromium-94.ebuild | 8 + .../ffmpeg-chromium/ffmpeg-chromium-96.ebuild | 231 +++++++++++++++++++++ 3 files changed, 242 insertions(+), 1 deletion(-) create mode 100644 media-video/ffmpeg-chromium/ffmpeg-chromium-96.ebuild (limited to 'media-video/ffmpeg-chromium') diff --git a/media-video/ffmpeg-chromium/Manifest b/media-video/ffmpeg-chromium/Manifest index 2aa78c4fc79e..138d31fb3d7f 100644 --- a/media-video/ffmpeg-chromium/Manifest +++ b/media-video/ffmpeg-chromium/Manifest @@ -1,5 +1,7 @@ AUX chromium.patch 1536 BLAKE2B 8caf1ff11f8da710138cbb857bd42e8679f98f3c30a3eaddb51611b7c39fb48c23890257997d3ddfee47244e6ffc0abb241e3118e0e8bcbf63442885445bcee3 SHA512 711b338178fe042aff92375d6593197337529986ea55ac6288df4c725145dd06c41fcfc11df4843e03eeaa4bad90ed558acf8f6945b9b96c9751fff92a41811a AUX ffmpeg-chromium-94.patch 1617 BLAKE2B 83afc6ae7f6d3b802e7c074545f8e46980751065303dc80283af917771675c987b063a4d39d9ca853b2753c40d38c3484c09a32500011b8faac0fca7e1807dad SHA512 41f4d79581602c475f245fb08f14e065ae2ca5b4863dade0e9652e33786fec90a631aa1a0e67f262ab067a12298883aea2d40309d2303bef76d7d99d06329eb2 DIST ffmpeg-chromium-94.tar.gz 14709687 BLAKE2B 06dedbd86befd8caed4c6cb34755b52cf70630f8fbd712f89d42e5b63e498f9d2a77935fbd7c87194f6d56fb0f83ff26beba00357dd51b3ac3e2e4480ff4351e SHA512 a6cf5404c892c878c50e3ba8369456db587e327bc3d77e857b9d34f3665ecfee7d3865b20e9871ccda570b30d9d34c03fd981cdc7f495809ea8f12cb8f15937e -EBUILD ffmpeg-chromium-94.ebuild 5985 BLAKE2B 1eb0251b8f8e52ad66ec4cd098f83439930e1eb9859465720714f715b84388b21ea737405a8ac7814fb2f210ae2389693c2eb97d0b22417579b4384461cd483b SHA512 28553c78a5b9ebcd7d401e8e35051256603c8b5d01191f4152833201a7f630f4a0a4df645ced60a3d0498f3d23188cde6cf08de33cf1a03359647d4921ddfd0b +DIST ffmpeg-chromium-96.tar.gz 14782341 BLAKE2B 686f5e0970ab49663e43d54cdb9b0216560dabc676711666c9e51840af64d2c78d47b55bcf36625751676839869e1b1f3b65516499646db00fd29f5ed2ff90d3 SHA512 169a1bf58000be0799b05b1d3f3a63b5a93ec66023d31f1ac6f5d9cd77408a390a9308fb626e94c3f1d4e1170638c1c81ac68b248e06c28d318d731ddda8e4d2 +EBUILD ffmpeg-chromium-94.ebuild 6148 BLAKE2B 3dcc0310ab9cf7280f64bddca3dd9bb120e217afacca2eff0cdb31be84cc8398eb35da3937dec968e6b5e1afeab24ebb51f100bb3db44d8d91243e22f1f3fdfb SHA512 ac8e2cd29c98a89881580d5ae4e6cba3a0f1143e36ad553520dd12244caddc02e753b4f775454f09b1ef602765713753e2976c6d3851ae3b1f4d458728e4f5c2 +EBUILD ffmpeg-chromium-96.ebuild 6153 BLAKE2B f24b6866de0a6386e1c47475609da520e49bc578a2bc6a89eef6bccf8440f68cf427b3a62103d76b3d6220bb398f136ae8f5017b754ca108895ed8db5a5b0da9 SHA512 6b44d445e12eeaaec9c8fa06f23c1abc48a0294d09f28df238b32ac3a5e4d046545f5bee9da0507fb3e633bcbeec72ea31c08f8cf3fc37c334256201b5a29e2d MISC metadata.xml 669 BLAKE2B 3e1b3934b51d07a5620026f2d24e027d217380a9ef7819b3ee54e09b12b0d3ed377cef911989d63a6ab65bd7cb92752997fdd90afb0e6f29dc9496a9035daf4c SHA512 556601bbb7357eb7b8be23a93268b8f173bf16b42518f4b931e97d13880b5e0642546c1ead253a625a8938a9c7020cf52f69eaa629e65de47dfa010af6299674 diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-94.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-94.ebuild index 46851bbea181..94e036354132 100644 --- a/media-video/ffmpeg-chromium/ffmpeg-chromium-94.ebuild +++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-94.ebuild @@ -180,6 +180,13 @@ src_configure() { esac fi + local extra_libs + if use arm || use ppc ; then + # bug #782811 + # bug #790590 + extra_libs+="$(test-flags-CCLD -latomic) " + fi + set -- "${S}/configure" \ --prefix="${EPREFIX}/usr" \ --libdir="${EPREFIX}/usr/$(get_libdir)" \ @@ -191,6 +198,7 @@ src_configure() { --ranlib="$(tc-getRANLIB)" \ --pkg-config="$(tc-getPKG_CONFIG)" \ --optflags="${CFLAGS}" \ + --extra-libs="${extra_libs}" \ --disable-all \ --disable-autodetect \ --disable-error-resilience \ diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-96.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-96.ebuild new file mode 100644 index 000000000000..8dafc5bbbacc --- /dev/null +++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-96.ebuild @@ -0,0 +1,231 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +COMMIT="d772086c1ec3d79dbf7098f0ba96beffc501e16f" +DESCRIPTION="FFmpeg built specifically for codec support in Chromium-based browsers" +HOMEPAGE="https://ffmpeg.org/" +SRC_URI="https://dev.gentoo.org/~chewi/distfiles/${P}.tar.gz" + +SLOT="${PV}" +LICENSE=" + !gpl? ( LGPL-2.1 ) + gpl? ( GPL-2 ) +" + +KEYWORDS="~amd64 ~arm ~arm64" + +# Options to use as use_enable in the foo[:bar] form. +# This will feed configure with $(use_enable foo bar) +# or $(use_enable foo foo) if no :bar is set. +# foo is added to IUSE. +FFMPEG_FLAG_MAP=( + cpudetection:runtime-cpudetect debug + +gpl + vaapi vdpau vulkan + # decoders + mmal +opus:libopus + video_cards_nvidia:ffnvcodec + # Threads; we only support pthread for now but ffmpeg supports more + +threads:pthreads +) + +IUSE=" + ${FFMPEG_FLAG_MAP[@]%:*} +" + +# Strings for CPU features in the useflag[:configure_option] form +# if :configure_option isn't set, it will use 'useflag' as configure option +ARM_CPU_FEATURES=( + cpu_flags_arm_thumb:armv5te + cpu_flags_arm_v6:armv6 + cpu_flags_arm_thumb2:armv6t2 + cpu_flags_arm_neon:neon + cpu_flags_arm_vfp:vfp + cpu_flags_arm_vfpv3:vfpv3 + cpu_flags_arm_v8:armv8 +) +ARM_CPU_REQUIRED_USE=" + arm64? ( cpu_flags_arm_v8 ) + cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) + cpu_flags_arm_neon? ( cpu_flags_arm_thumb2 cpu_flags_arm_vfp ) + cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) + cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) + cpu_flags_arm_v6? ( cpu_flags_arm_thumb ) +" +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 ) +X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) +X86_CPU_REQUIRED_USE=" + cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) + cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) + cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) + cpu_flags_x86_xop? ( cpu_flags_x86_avx ) + cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) + cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) + cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) + cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) + cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) + cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) + cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) + cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) + cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) + cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) + cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) +" + +CPU_FEATURES_MAP=( + ${ARM_CPU_FEATURES[@]} + ${X86_CPU_FEATURES[@]} +) +IUSE="${IUSE} + ${CPU_FEATURES_MAP[@]%:*}" + +CPU_REQUIRED_USE=" + ${ARM_CPU_REQUIRED_USE} + ${X86_CPU_REQUIRED_USE} +" + +RDEPEND=" + mmal? ( media-libs/raspberrypi-userland ) + opus? ( >=media-libs/opus-1.0.2-r2 ) + vaapi? ( >=x11-libs/libva-1.2.1-r1:0= ) + video_cards_nvidia? ( >=media-libs/nv-codec-headers-9.1.23.1 ) + vdpau? ( >=x11-libs/libvdpau-0.7 ) + vulkan? ( >=media-libs/vulkan-loader-1.1.97:= ) +" + +DEPEND="${RDEPEND} +" +BDEPEND=" + >=sys-devel/make-3.81 + virtual/pkgconfig + cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) +" + +REQUIRED_USE=" + ${CPU_REQUIRED_USE}" +RESTRICT=" + test +" + +S="${WORKDIR}" + +PATCHES=( + "${FILESDIR}"/${PN}-94.patch + "${FILESDIR}"/chromium.patch +) + +src_prepare() { + export revision=git-N-g${COMMIT:0:10} + default + echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die +} + +src_configure() { + local myconf=( ) + + local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) + + for i in "${ffuse[@]#+}" ; do + myconf+=( $(use_enable ${i%:*} ${i#*:}) ) + done + + # CPU features + for i in "${CPU_FEATURES_MAP[@]}" ; do + use ${i%:*} || myconf+=( --disable-${i#*:} ) + done + + # Try to get cpu type based on CFLAGS. + # Bug #172723 + # We need to do this so that features of that CPU will be better used + # If they contain an unknown CPU it will not hurt since ffmpeg's configure + # will just ignore it. + for i in $(get-flag mcpu) $(get-flag march) ; do + [[ ${i} = native ]] && i="host" # bug #273421 + myconf+=( --cpu=${i} ) + break + done + + # LTO support, bug #566282, bug #754654 + is-flagq "-flto*" && myconf+=( "--enable-lto" ) + filter-flags "-flto*" + + # Mandatory configuration + myconf=( + --disable-stripping + # This is only for hardcoded cflags; those are used in configure checks that may + # interfere with proper detections, bug #671746 and bug #645778 + # We use optflags, so that overrides them anyway. + --disable-optimizations + --disable-libcelt # bug #664158 + "${myconf[@]}" + ) + + # cross compile support + if tc-is-cross-compiler ; then + myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) + case ${CHOST} in + *freebsd*) + myconf+=( --target-os=freebsd ) + ;; + *mingw32*) + myconf+=( --target-os=mingw32 ) + ;; + *linux*) + myconf+=( --target-os=linux ) + ;; + esac + fi + + local extra_libs + if use arm || use ppc ; then + # bug #782811 + # bug #790590 + extra_libs+="$(test-flags-CCLD -latomic) " + fi + + set -- "${S}/configure" \ + --prefix="${EPREFIX}/usr" \ + --libdir="${EPREFIX}/usr/$(get_libdir)" \ + --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ + --cc="$(tc-getCC)" \ + --cxx="$(tc-getCXX)" \ + --ar="$(tc-getAR)" \ + --nm="$(tc-getNM)" \ + --ranlib="$(tc-getRANLIB)" \ + --pkg-config="$(tc-getPKG_CONFIG)" \ + --optflags="${CFLAGS}" \ + --extra-libs="${extra_libs}" \ + --disable-all \ + --disable-autodetect \ + --disable-error-resilience \ + --disable-everything \ + --disable-faan \ + --disable-iconv \ + --disable-lzo \ + --disable-network \ + --enable-avcodec \ + --enable-avformat \ + --enable-avutil \ + --enable-decoder=aac,flac,h264,libopus,mp3,pcm_alaw,pcm_f32le,pcm_mulaw,pcm_s16be,pcm_s16le,pcm_s24be,pcm_s24le,pcm_s32le,pcm_u8,theora,vorbis,vp8 \ + --enable-demuxer=aac,flac,matroska,mov,mp3,ogg,wav \ + --enable-parser=aac,flac,h264,mpegaudio,opus,vorbis,vp3,vp8,vp9 \ + --enable-pic \ + --enable-static \ + "${myconf[@]}" \ + ${EXTRA_FFMPEG_CONF} + + echo "${@}" + "${@}" || die +} + +src_compile() { + emake V=1 libffmpeg +} + +src_install() { + emake V=1 DESTDIR="${D}" install-libffmpeg +} -- cgit v1.2.3