public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-chromium/files/, media-video/ffmpeg-chromium/
@ 2023-12-23 21:50 James Le Cuirot
  0 siblings, 0 replies; 9+ messages in thread
From: James Le Cuirot @ 2023-12-23 21:50 UTC (permalink / raw
  To: gentoo-commits

commit:     7e1da0f34edf3491b3ea3767f632147347d4fec3
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 23 21:35:25 2023 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Dec 23 21:48:28 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e1da0f3

media-video/ffmpeg-chromium: Drop old 114

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 media-video/ffmpeg-chromium/Manifest               |   1 -
 .../ffmpeg-chromium/ffmpeg-chromium-114-r1.ebuild  | 235 ---------------------
 .../files/ffmpeg-chromium-100.patch                |  27 ---
 .../files/ffmpeg-chromium-binutils-2.41.patch      |  77 -------
 4 files changed, 340 deletions(-)

diff --git a/media-video/ffmpeg-chromium/Manifest b/media-video/ffmpeg-chromium/Manifest
index 5c98ac2cff30..3798d6bde713 100644
--- a/media-video/ffmpeg-chromium/Manifest
+++ b/media-video/ffmpeg-chromium/Manifest
@@ -1,2 +1 @@
-DIST ffmpeg-chromium-114.tar.xz 9934024 BLAKE2B cc11bd00bcf6bef5f946a16f1544881c71503207ba3c6ec57cdc37124ea562366dced2e029f31e57a6f78ec7073412ac0b8ec470d14975a3cc40fad2e96ec5df SHA512 1b1743664d58f5b92971d113ea441604e0b46f28b22df1b02ab0431b8e884789fb6d81b4f50ff1526f716381abcc63e1b336d23edd9ea28abe8b3526fba08ce9
 DIST ffmpeg-chromium-120.tar.xz 10096036 BLAKE2B 8f24dfed854c713df369e6ef15bc773a3166fdf6eb8c90bcb1d1b7ddddaca0702df7615bc323432a40b5d213352945fa49acf8e864df2caa358764b5068a75f3 SHA512 0e0bfb44225981f91edceeb6f302592a7e108da49c5e6503b43f0e12b91d84dece908efe5e548bb31ccab49c5fba5a8365f5f0793bbf1450d35bfd836f8a3e9b

diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-114-r1.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-114-r1.ebuild
deleted file mode 100644
index af6f8a58ab78..000000000000
--- a/media-video/ffmpeg-chromium/ffmpeg-chromium-114-r1.ebuild
+++ /dev/null
@@ -1,235 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic toolchain-funcs
-
-COMMIT="842ef367665edee29efa2b09f7298fa5ecabe8b5"
-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.xz"
-
-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
-		nvenc: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 )
-	>=media-libs/opus-1.0.2-r2
-	vaapi? ( >=media-libs/libva-1.2.1-r1:0= )
-	nvenc? ( >=media-libs/nv-codec-headers-9.1.23.1 )
-	vdpau? ( >=x11-libs/libvdpau-0.7 )
-	vulkan? ( >=media-libs/vulkan-loader-1.2.189:= )
-"
-
-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
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-100.patch
-	"${FILESDIR}"/${PN}-binutils-2.41.patch
-	"${FILESDIR}"/chromium.patch
-)
-
-src_prepare() {
-	export revision=git-N-g${COMMIT:0:10}
-	default
-
-	# -fdiagnostics-color=auto gets appended after user flags which
-	# will ignore user's preference.
-	sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die
-
-	echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
-}
-
-src_configure() {
-	local myconf=( )
-
-	# bug 842201
-	use ia64 && tc-is-gcc && append-flags \
-		-fno-tree-ccp \
-		-fno-tree-dominator-opts \
-		-fno-tree-fre \
-		-fno-code-hoisting \
-		-fno-tree-pre \
-		-fno-tree-vrp
-
-	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, bug #772854
-	is-flagq "-flto*" && myconf+=( "--enable-lto" )
-	filter-lto
-
-	# 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
-			*mingw32*)
-				myconf+=( --target-os=mingw32 )
-				;;
-			*linux*)
-				myconf+=( --target-os=linux )
-				;;
-		esac
-	fi
-
-	# Use --extra-libs if needed for LIBS
-	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)" \
-		--strip="$(tc-getSTRIP)" \
-		--ranlib="$(tc-getRANLIB)" \
-		--pkg-config="$(tc-getPKG_CONFIG)" \
-		--optflags="${CFLAGS}" \
-		--disable-all \
-		--disable-autodetect \
-		--disable-error-resilience \
-		--disable-everything \
-		--disable-faan \
-		--disable-iconv \
-		--disable-network \
-		--enable-avcodec \
-		--enable-avformat \
-		--enable-avutil \
-		--enable-libopus \
-		--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
-}

diff --git a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-100.patch b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-100.patch
deleted file mode 100644
index e0aa000faaa3..000000000000
--- a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-100.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -Naur a/configure b/configure
---- a/configure	2022-03-22 10:20:35.000000000 +0000
-+++ b/configure	2022-03-23 09:17:18.914615584 +0000
-@@ -6600,15 +6600,14 @@
-                                { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
- enabled libopenmpt        && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
- enabled libopenvino       && require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api
--# Chromium uses a built in copy of libopus that is not visible to pkg-config.
--# enabled libopus           && {
--#    enabled libopus_decoder && {
--#        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
--#    }
--#    enabled libopus_encoder && {
--#        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
--#    }
--# }
-+enabled libopus           && {
-+    enabled libopus_decoder && {
-+        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
-+    }
-+    enabled libopus_encoder && {
-+        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
-+    }
-+}
- enabled libplacebo        && require_pkg_config libplacebo "libplacebo >= 4.192.0" libplacebo/vulkan.h pl_vulkan_create
- enabled libpulse          && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
- enabled librabbitmq       && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection

diff --git a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-binutils-2.41.patch b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-binutils-2.41.patch
deleted file mode 100644
index 81d544625919..000000000000
--- a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-binutils-2.41.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-https://bugs.gentoo.org/911582
-https://bugs.gentoo.org/911839
-https://trac.ffmpeg.org/ticket/10405
-https://git.videolan.org/?p=ffmpeg.git;a=commit;h=25cd95a9dc3510c3cc0d7aad6f9d83f6a1078c7e
-https://sourceware.org/PR30578
-https://gcc.gnu.org/PR108941
-
-From 25cd95a9dc3510c3cc0d7aad6f9d83f6a1078c7e Mon Sep 17 00:00:00 2001
-From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
-Date: Sun, 16 Jul 2023 18:18:02 +0300
-Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
- instructions within inline assembly
-
-Fixes assembling with binutil as >= 2.41
-
-Signed-off-by: James Almer <jamrial@gmail.com>
-(cherry picked from commit effadce6c756247ea8bae32dc13bb3e6f464f0eb)
---- a/libavcodec/x86/mathops.h
-+++ b/libavcodec/x86/mathops.h
-@@ -35,12 +35,20 @@
- static av_always_inline av_const int MULL(int a, int b, unsigned shift)
- {
-     int rt, dummy;
-+    if (__builtin_constant_p(shift))
-     __asm__ (
-         "imull %3               \n\t"
-         "shrdl %4, %%edx, %%eax \n\t"
-         :"=a"(rt), "=d"(dummy)
--        :"a"(a), "rm"(b), "ci"((uint8_t)shift)
-+        :"a"(a), "rm"(b), "i"(shift & 0x1F)
-     );
-+    else
-+        __asm__ (
-+            "imull %3               \n\t"
-+            "shrdl %4, %%edx, %%eax \n\t"
-+            :"=a"(rt), "=d"(dummy)
-+            :"a"(a), "rm"(b), "c"((uint8_t)shift)
-+        );
-     return rt;
- }
- 
-@@ -113,19 +121,31 @@ __asm__ volatile(\
- // avoid +32 for shift optimization (gcc should do that ...)
- #define NEG_SSR32 NEG_SSR32
- static inline  int32_t NEG_SSR32( int32_t a, int8_t s){
-+    if (__builtin_constant_p(s))
-     __asm__ ("sarl %1, %0\n\t"
-          : "+r" (a)
--         : "ic" ((uint8_t)(-s))
-+         : "i" (-s & 0x1F)
-     );
-+    else
-+        __asm__ ("sarl %1, %0\n\t"
-+               : "+r" (a)
-+               : "c" ((uint8_t)(-s))
-+        );
-     return a;
- }
- 
- #define NEG_USR32 NEG_USR32
- static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
-+    if (__builtin_constant_p(s))
-     __asm__ ("shrl %1, %0\n\t"
-          : "+r" (a)
--         : "ic" ((uint8_t)(-s))
-+         : "i" (-s & 0x1F)
-     );
-+    else
-+        __asm__ ("shrl %1, %0\n\t"
-+               : "+r" (a)
-+               : "c" ((uint8_t)(-s))
-+        );
-     return a;
- }
- 
--- 
-2.30.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-chromium/files/, media-video/ffmpeg-chromium/
@ 2023-12-01 23:32 James Le Cuirot
  0 siblings, 0 replies; 9+ messages in thread
From: James Le Cuirot @ 2023-12-01 23:32 UTC (permalink / raw
  To: gentoo-commits

commit:     33f108891044253b68de92157add2a032dd67b0a
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  1 23:28:30 2023 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Fri Dec  1 23:31:28 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33f10889

media-video/ffmpeg-chromium: Version bump to 117

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 media-video/ffmpeg-chromium/Manifest               |   1 +
 .../ffmpeg-chromium/ffmpeg-chromium-117.ebuild     | 244 +++++++++++++++++++++
 .../files/ffmpeg-chromium-117.patch                |  27 +++
 3 files changed, 272 insertions(+)

diff --git a/media-video/ffmpeg-chromium/Manifest b/media-video/ffmpeg-chromium/Manifest
index 62b13188f8f7..053efc7c0468 100644
--- a/media-video/ffmpeg-chromium/Manifest
+++ b/media-video/ffmpeg-chromium/Manifest
@@ -1 +1,2 @@
 DIST ffmpeg-chromium-114.tar.xz 9934024 BLAKE2B cc11bd00bcf6bef5f946a16f1544881c71503207ba3c6ec57cdc37124ea562366dced2e029f31e57a6f78ec7073412ac0b8ec470d14975a3cc40fad2e96ec5df SHA512 1b1743664d58f5b92971d113ea441604e0b46f28b22df1b02ab0431b8e884789fb6d81b4f50ff1526f716381abcc63e1b336d23edd9ea28abe8b3526fba08ce9
+DIST ffmpeg-chromium-117.tar.xz 10085348 BLAKE2B 2de4d0913061f97967013481a878cd97adca0af0c0eb89c6909cb83ce56ad6ee077b527651f6392b15d78090fb5d7bf05d0734ca4c0aebb678405f51fceab11a SHA512 2bbc6b34cdb1e47fd741e443cde32e95e8adba569d27a559f14a25440280cb0a6a56e5856fc6d7ebdd73aca9942da3ec9c0037079fd39007653c134e1be96e67

diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-117.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-117.ebuild
new file mode 100644
index 000000000000..c51a4c4b8b9b
--- /dev/null
+++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-117.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+COMMIT="556e3ba65d21006a8732d66e4aa8f810cee39ed0"
+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.xz"
+
+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
+		nvenc: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_vfp
+		arm? ( cpu_flags_arm_thumb2 )
+	)
+	cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp )
+	cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 )
+	cpu_flags_arm_v6? (
+		arm? ( 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? ( >=media-libs/libva-1.2.1-r1:0= )
+	nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 )
+	vdpau? ( >=x11-libs/libvdpau-0.7 )
+	vulkan? ( >=media-libs/vulkan-loader-1.3.255:= )
+"
+
+DEPEND="${RDEPEND}
+	vulkan? ( >=dev-util/vulkan-headers-1.3.255 )
+"
+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
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-117.patch
+	"${FILESDIR}"/chromium.patch
+)
+
+src_prepare() {
+	export revision=git-N-g${COMMIT:0:10}
+	default
+
+	# -fdiagnostics-color=auto gets appended after user flags which
+	# will ignore user's preference.
+	sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die
+
+	echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
+}
+
+src_configure() {
+	local myconf=( )
+
+	# bug 842201
+	use ia64 && tc-is-gcc && append-flags \
+		-fno-tree-ccp \
+		-fno-tree-dominator-opts \
+		-fno-tree-fre \
+		-fno-code-hoisting \
+		-fno-tree-pre \
+		-fno-tree-vrp
+
+	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, bug #772854
+	if [[ ${ABI} != x86 ]] && is-flagq "-flto*"; then
+		# Respect -flto value, e.g -flto=thin
+		local v="$(get-flag flto)"
+		[[ -n ${v} ]] && myconf+=( "--enable-lto=${v}" ) || myconf+=( "--enable-lto" )
+	fi
+	filter-lto
+
+	# 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
+			*mingw32*)
+				myconf+=( --target-os=mingw32 )
+				;;
+			*linux*)
+				myconf+=( --target-os=linux )
+				;;
+		esac
+	fi
+
+	# Use --extra-libs if needed for LIBS
+	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)" \
+		--strip="$(tc-getSTRIP)" \
+		--ranlib="$(tc-getRANLIB)" \
+		--pkg-config="$(tc-getPKG_CONFIG)" \
+		--optflags="${CFLAGS}" \
+		--disable-all \
+		--disable-autodetect \
+		--disable-error-resilience \
+		--disable-everything \
+		--disable-faan \
+		--disable-iconv \
+		--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
+}

diff --git a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-117.patch b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-117.patch
new file mode 100644
index 000000000000..8a0cef9e96d8
--- /dev/null
+++ b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-117.patch
@@ -0,0 +1,27 @@
+diff --git a/configure b/configure
+index 802b3be4f2..8f881864f3 100755
+--- a/configure
++++ b/configure
+@@ -6778,14 +6778,14 @@ enabled libopenmpt        && require_pkg_config libopenmpt "libopenmpt >= 0.2.65
+ enabled libopenvino       && { check_pkg_config libopenvino openvino c_api/ie_c_api.h ie_c_api_version ||
+                                require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api; }
+ # Chromium uses a built in copy of libopus that is not visible to pkg-config.
+-# enabled libopus           && {
+-#    enabled libopus_decoder && {
+-#        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
+-#    }
+-#    enabled libopus_encoder && {
+-#        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
+-#    }
+-# }
++enabled libopus           && {
++   enabled libopus_decoder && {
++       require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
++   }
++   enabled libopus_encoder && {
++       require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
++   }
++}
+ enabled libplacebo        && require_pkg_config libplacebo "libplacebo >= 4.192.0" libplacebo/vulkan.h pl_vulkan_create
+ enabled libpulse          && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
+ enabled librabbitmq       && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-chromium/files/, media-video/ffmpeg-chromium/
@ 2023-08-10  4:08 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2023-08-10  4:08 UTC (permalink / raw
  To: gentoo-commits

commit:     a685f699e19daaa572044c82858580af15465189
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 10 03:57:06 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 10 03:57:06 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a685f699

media-video/ffmpeg-chromium: fix build w/ binutils-2.41

Closes: https://bugs.gentoo.org/911839
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../ffmpeg-chromium/ffmpeg-chromium-102.ebuild     |  1 +
 .../ffmpeg-chromium/ffmpeg-chromium-106.ebuild     |  1 +
 .../ffmpeg-chromium/ffmpeg-chromium-114.ebuild     |  1 +
 .../files/ffmpeg-chromium-binutils-2.41.patch      | 77 ++++++++++++++++++++++
 4 files changed, 80 insertions(+)

diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-102.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-102.ebuild
index 5c5350f293b1..6e4409a5274b 100644
--- a/media-video/ffmpeg-chromium/ffmpeg-chromium-102.ebuild
+++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-102.ebuild
@@ -116,6 +116,7 @@ S="${WORKDIR}"
 PATCHES=(
 	"${FILESDIR}"/${PN}-100.patch
 	"${FILESDIR}"/${PN}-vk-headers.patch
+	"${FILESDIR}"/${PN}-binutils-2.41.patch
 	"${FILESDIR}"/chromium.patch
 )
 

diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-106.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-106.ebuild
index 39b454aa1a07..a25fa2fc9cdb 100644
--- a/media-video/ffmpeg-chromium/ffmpeg-chromium-106.ebuild
+++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-106.ebuild
@@ -114,6 +114,7 @@ RESTRICT="
 PATCHES=(
 	"${FILESDIR}"/${PN}-100.patch
 	"${FILESDIR}"/${PN}-vk-headers.patch
+	"${FILESDIR}"/${PN}-binutils-2.41.patch
 	"${FILESDIR}"/chromium.patch
 )
 

diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-114.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-114.ebuild
index a550da7245bf..da89ecc4a215 100644
--- a/media-video/ffmpeg-chromium/ffmpeg-chromium-114.ebuild
+++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-114.ebuild
@@ -113,6 +113,7 @@ RESTRICT="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-100.patch
+	"${FILESDIR}"/${PN}-binutils-2.41.patch
 	"${FILESDIR}"/chromium.patch
 )
 

diff --git a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-binutils-2.41.patch b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-binutils-2.41.patch
new file mode 100644
index 000000000000..81d544625919
--- /dev/null
+++ b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-binutils-2.41.patch
@@ -0,0 +1,77 @@
+https://bugs.gentoo.org/911582
+https://bugs.gentoo.org/911839
+https://trac.ffmpeg.org/ticket/10405
+https://git.videolan.org/?p=ffmpeg.git;a=commit;h=25cd95a9dc3510c3cc0d7aad6f9d83f6a1078c7e
+https://sourceware.org/PR30578
+https://gcc.gnu.org/PR108941
+
+From 25cd95a9dc3510c3cc0d7aad6f9d83f6a1078c7e Mon Sep 17 00:00:00 2001
+From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
+Date: Sun, 16 Jul 2023 18:18:02 +0300
+Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
+ instructions within inline assembly
+
+Fixes assembling with binutil as >= 2.41
+
+Signed-off-by: James Almer <jamrial@gmail.com>
+(cherry picked from commit effadce6c756247ea8bae32dc13bb3e6f464f0eb)
+--- a/libavcodec/x86/mathops.h
++++ b/libavcodec/x86/mathops.h
+@@ -35,12 +35,20 @@
+ static av_always_inline av_const int MULL(int a, int b, unsigned shift)
+ {
+     int rt, dummy;
++    if (__builtin_constant_p(shift))
+     __asm__ (
+         "imull %3               \n\t"
+         "shrdl %4, %%edx, %%eax \n\t"
+         :"=a"(rt), "=d"(dummy)
+-        :"a"(a), "rm"(b), "ci"((uint8_t)shift)
++        :"a"(a), "rm"(b), "i"(shift & 0x1F)
+     );
++    else
++        __asm__ (
++            "imull %3               \n\t"
++            "shrdl %4, %%edx, %%eax \n\t"
++            :"=a"(rt), "=d"(dummy)
++            :"a"(a), "rm"(b), "c"((uint8_t)shift)
++        );
+     return rt;
+ }
+ 
+@@ -113,19 +121,31 @@ __asm__ volatile(\
+ // avoid +32 for shift optimization (gcc should do that ...)
+ #define NEG_SSR32 NEG_SSR32
+ static inline  int32_t NEG_SSR32( int32_t a, int8_t s){
++    if (__builtin_constant_p(s))
+     __asm__ ("sarl %1, %0\n\t"
+          : "+r" (a)
+-         : "ic" ((uint8_t)(-s))
++         : "i" (-s & 0x1F)
+     );
++    else
++        __asm__ ("sarl %1, %0\n\t"
++               : "+r" (a)
++               : "c" ((uint8_t)(-s))
++        );
+     return a;
+ }
+ 
+ #define NEG_USR32 NEG_USR32
+ static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
++    if (__builtin_constant_p(s))
+     __asm__ ("shrl %1, %0\n\t"
+          : "+r" (a)
+-         : "ic" ((uint8_t)(-s))
++         : "i" (-s & 0x1F)
+     );
++    else
++        __asm__ ("shrl %1, %0\n\t"
++               : "+r" (a)
++               : "c" ((uint8_t)(-s))
++        );
+     return a;
+ }
+ 
+-- 
+2.30.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-chromium/files/, media-video/ffmpeg-chromium/
@ 2023-02-09 21:49 James Le Cuirot
  0 siblings, 0 replies; 9+ messages in thread
From: James Le Cuirot @ 2023-02-09 21:49 UTC (permalink / raw
  To: gentoo-commits

commit:     810cb8902cdd9f880104d9d6b99ff3023799a2ca
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  9 21:49:23 2023 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Feb  9 21:49:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=810cb890

media-video/ffmpeg-chromium: Apply upstream fix for newer vulkan-headers

Closes: https://bugs.gentoo.org/893502
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 .../ffmpeg-chromium/ffmpeg-chromium-102.ebuild     |  1 +
 .../ffmpeg-chromium/ffmpeg-chromium-106.ebuild     |  1 +
 .../files/ffmpeg-chromium-vk-headers.patch         | 36 ++++++++++++++++++++++
 3 files changed, 38 insertions(+)

diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-102.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-102.ebuild
index 73cbdcc5ebc1..6f9eaaeb8883 100644
--- a/media-video/ffmpeg-chromium/ffmpeg-chromium-102.ebuild
+++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-102.ebuild
@@ -115,6 +115,7 @@ S="${WORKDIR}"
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-100.patch
+	"${FILESDIR}"/${PN}-vk-headers.patch
 	"${FILESDIR}"/chromium.patch
 )
 

diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-106.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-106.ebuild
index c344db389d2a..61f550be5940 100644
--- a/media-video/ffmpeg-chromium/ffmpeg-chromium-106.ebuild
+++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-106.ebuild
@@ -113,6 +113,7 @@ RESTRICT="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-100.patch
+	"${FILESDIR}"/${PN}-vk-headers.patch
 	"${FILESDIR}"/chromium.patch
 )
 

diff --git a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-vk-headers.patch b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-vk-headers.patch
new file mode 100644
index 000000000000..f3c3c0128920
--- /dev/null
+++ b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-vk-headers.patch
@@ -0,0 +1,36 @@
+From eb0455d64690eed0068e5cb202f72ecdf899837c Mon Sep 17 00:00:00 2001
+From: Lynne <dev@lynne.ee>
+Date: Sun, 25 Dec 2022 01:03:30 +0100
+Subject: [PATCH] hwcontext_vulkan: remove optional encode/decode extensions
+ from the list
+
+They're not currently used, so they don't need to be there.
+Vulkan stabilized the decode extensions less than a week ago, and their
+name prefixes were changed from EXT to KHR. It's a bit too soon to be
+depending on it, so rather than bumping, just remove these for now.
+---
+ libavutil/hwcontext_vulkan.c | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
+index f1db1c7291..2a9b5f4aac 100644
+--- a/libavutil/hwcontext_vulkan.c
++++ b/libavutil/hwcontext_vulkan.c
+@@ -358,14 +358,6 @@ static const VulkanOptExtension optional_device_exts[] = {
+     { VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME,            FF_VK_EXT_EXTERNAL_WIN32_MEMORY  },
+     { VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME,         FF_VK_EXT_EXTERNAL_WIN32_SEM     },
+ #endif
+-
+-    /* Video encoding/decoding */
+-    { VK_KHR_VIDEO_QUEUE_EXTENSION_NAME,                      FF_VK_EXT_NO_FLAG                },
+-    { VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME,               FF_VK_EXT_NO_FLAG                },
+-    { VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME,               FF_VK_EXT_NO_FLAG                },
+-    { VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME,                FF_VK_EXT_NO_FLAG                },
+-    { VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME,                FF_VK_EXT_NO_FLAG                },
+-    { VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME,                FF_VK_EXT_NO_FLAG                },
+ };
+ 
+ /* Converts return values to strings */
+-- 
+2.39.1
+


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-chromium/files/, media-video/ffmpeg-chromium/
@ 2022-06-11 10:46 James Le Cuirot
  0 siblings, 0 replies; 9+ messages in thread
From: James Le Cuirot @ 2022-06-11 10:46 UTC (permalink / raw
  To: gentoo-commits

commit:     85385c76676aa13c84d253819b2095e5b392f08b
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 11 10:43:16 2022 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Jun 11 10:45:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85385c76

media-video/ffmpeg-chromium: Drop old 96 and 100

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 media-video/ffmpeg-chromium/Manifest               |   2 -
 .../ffmpeg-chromium/ffmpeg-chromium-100.ebuild     | 232 ---------------------
 .../ffmpeg-chromium/ffmpeg-chromium-96.ebuild      | 231 --------------------
 .../ffmpeg-chromium/files/ffmpeg-chromium-94.patch |  26 ---
 4 files changed, 491 deletions(-)

diff --git a/media-video/ffmpeg-chromium/Manifest b/media-video/ffmpeg-chromium/Manifest
index 811a0841b20f..d6ec52bafb6a 100644
--- a/media-video/ffmpeg-chromium/Manifest
+++ b/media-video/ffmpeg-chromium/Manifest
@@ -1,3 +1 @@
-DIST ffmpeg-chromium-100.tar.gz 15144675 BLAKE2B 1195078e12ef0d8b5562b2eed068eea331a03727f3dfbd198fdd1088d70346f892bc9161ecd80ed54f7c5c842c9ae9b16f6d02858f3c4a538ce19de03b5ec9f8 SHA512 35f5ca7164d8d8f58b2f553ec7c6181629af217752fe49bd890051675734864ae4b5d1f135808d101fb0c9855d14842a0074759679a15e9b94fb571c9e2ccee7
 DIST ffmpeg-chromium-102.tar.gz 15165192 BLAKE2B ecf9b9ff538730d8a265e25e3d30900b119bfa5baa8e097e58151d744c95b3e768b96f477f6394015cd77a8ae35991c7cdaee5fb2f700d129b6c6d7ee87b34d9 SHA512 f5aa4c47e801d2547321c7995240e004706f9b5835610f9726ac45a63ac58a62de64d463ddeb8c1a001d31d89a4dbaee3a1be568c33316f29dc2b675b2f3161a
-DIST ffmpeg-chromium-96.tar.gz 14782341 BLAKE2B 686f5e0970ab49663e43d54cdb9b0216560dabc676711666c9e51840af64d2c78d47b55bcf36625751676839869e1b1f3b65516499646db00fd29f5ed2ff90d3 SHA512 169a1bf58000be0799b05b1d3f3a63b5a93ec66023d31f1ac6f5d9cd77408a390a9308fb626e94c3f1d4e1170638c1c81ac68b248e06c28d318d731ddda8e4d2

diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-100.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-100.ebuild
deleted file mode 100644
index da0652b2caa4..000000000000
--- a/media-video/ffmpeg-chromium/ffmpeg-chromium-100.ebuild
+++ /dev/null
@@ -1,232 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic toolchain-funcs
-
-COMMIT="574c39cce3231c69bc9a02ac475c27d944bdb113"
-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.2.189:= )
-"
-
-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}-100.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 || use mips || [[ ${CHOST} == *i486* ]] ; 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)" \
-		--strip="$(tc-getSTRIP)" \
-		--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
-}

diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-96.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-96.ebuild
deleted file mode 100644
index d98240ebe12e..000000000000
--- a/media-video/ffmpeg-chromium/ffmpeg-chromium-96.ebuild
+++ /dev/null
@@ -1,231 +0,0 @@
-# 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
-}

diff --git a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch
deleted file mode 100644
index ba1dfd2c0518..000000000000
--- a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- FFmpeg-chromium/configure	2021-10-07 22:32:34.230130424 +0100
-+++ FFmpeg/configure	2021-10-07 22:34:30.978861042 +0100
-@@ -6474,15 +6464,14 @@
-                                { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
- enabled libopenmpt        && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
- enabled libopenvino       && require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api
--# Chromium uses a built in copy of libopus that is not visible to pkg-config.
--# enabled libopus           && {
--#    enabled libopus_decoder && {
--#        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
--#    }
--#    enabled libopus_encoder && {
--#        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
--#    }
--# }
-+enabled libopus           && {
-+    enabled libopus_decoder && {
-+        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
-+    }
-+    enabled libopus_encoder && {
-+        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
-+    }
-+}
- enabled libpulse          && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
- enabled librabbitmq       && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection
- enabled librav1e          && require_pkg_config librav1e "rav1e >= 0.4.0" rav1e.h rav1e_context_new


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-chromium/files/, media-video/ffmpeg-chromium/
@ 2022-04-13 23:01 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2022-04-13 23:01 UTC (permalink / raw
  To: gentoo-commits

commit:     f504b674e0f40cdc5af889b4f0997f267e113204
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 13 23:01:35 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Apr 13 23:01:35 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f504b674

media-video/ffmpeg-chromium: Revert "Drop old 96"

This reverts commit 7c062ab885eaecbdbed5ba0ffda3fa5c5605c0bc.

Needed by dev-libs/nwjs-0.62.1 for now.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-video/ffmpeg-chromium/Manifest               |   1 +
 .../ffmpeg-chromium/ffmpeg-chromium-96.ebuild      | 231 +++++++++++++++++++++
 .../ffmpeg-chromium/files/ffmpeg-chromium-94.patch |  26 +++
 3 files changed, 258 insertions(+)

diff --git a/media-video/ffmpeg-chromium/Manifest b/media-video/ffmpeg-chromium/Manifest
index be89f1a4a8a0..4fac8cdb143c 100644
--- a/media-video/ffmpeg-chromium/Manifest
+++ b/media-video/ffmpeg-chromium/Manifest
@@ -1 +1,2 @@
 DIST ffmpeg-chromium-100.tar.gz 15144675 BLAKE2B 1195078e12ef0d8b5562b2eed068eea331a03727f3dfbd198fdd1088d70346f892bc9161ecd80ed54f7c5c842c9ae9b16f6d02858f3c4a538ce19de03b5ec9f8 SHA512 35f5ca7164d8d8f58b2f553ec7c6181629af217752fe49bd890051675734864ae4b5d1f135808d101fb0c9855d14842a0074759679a15e9b94fb571c9e2ccee7
+DIST ffmpeg-chromium-96.tar.gz 14782341 BLAKE2B 686f5e0970ab49663e43d54cdb9b0216560dabc676711666c9e51840af64d2c78d47b55bcf36625751676839869e1b1f3b65516499646db00fd29f5ed2ff90d3 SHA512 169a1bf58000be0799b05b1d3f3a63b5a93ec66023d31f1ac6f5d9cd77408a390a9308fb626e94c3f1d4e1170638c1c81ac68b248e06c28d318d731ddda8e4d2

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..d98240ebe12e
--- /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
+}

diff --git a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch
new file mode 100644
index 000000000000..ba1dfd2c0518
--- /dev/null
+++ b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch
@@ -0,0 +1,26 @@
+--- FFmpeg-chromium/configure	2021-10-07 22:32:34.230130424 +0100
++++ FFmpeg/configure	2021-10-07 22:34:30.978861042 +0100
+@@ -6474,15 +6464,14 @@
+                                { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
+ enabled libopenmpt        && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
+ enabled libopenvino       && require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api
+-# Chromium uses a built in copy of libopus that is not visible to pkg-config.
+-# enabled libopus           && {
+-#    enabled libopus_decoder && {
+-#        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
+-#    }
+-#    enabled libopus_encoder && {
+-#        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
+-#    }
+-# }
++enabled libopus           && {
++    enabled libopus_decoder && {
++        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
++    }
++    enabled libopus_encoder && {
++        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
++    }
++}
+ enabled libpulse          && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
+ enabled librabbitmq       && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection
+ enabled librav1e          && require_pkg_config librav1e "rav1e >= 0.4.0" rav1e.h rav1e_context_new


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-chromium/files/, media-video/ffmpeg-chromium/
@ 2022-04-13 21:48 James Le Cuirot
  0 siblings, 0 replies; 9+ messages in thread
From: James Le Cuirot @ 2022-04-13 21:48 UTC (permalink / raw
  To: gentoo-commits

commit:     7c062ab885eaecbdbed5ba0ffda3fa5c5605c0bc
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 13 21:46:46 2022 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Apr 13 21:48:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c062ab8

media-video/ffmpeg-chromium: Drop old 96

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 media-video/ffmpeg-chromium/Manifest               |   1 -
 .../ffmpeg-chromium/ffmpeg-chromium-96.ebuild      | 231 ---------------------
 .../ffmpeg-chromium/files/ffmpeg-chromium-94.patch |  26 ---
 3 files changed, 258 deletions(-)

diff --git a/media-video/ffmpeg-chromium/Manifest b/media-video/ffmpeg-chromium/Manifest
index 4fac8cdb143c..be89f1a4a8a0 100644
--- a/media-video/ffmpeg-chromium/Manifest
+++ b/media-video/ffmpeg-chromium/Manifest
@@ -1,2 +1 @@
 DIST ffmpeg-chromium-100.tar.gz 15144675 BLAKE2B 1195078e12ef0d8b5562b2eed068eea331a03727f3dfbd198fdd1088d70346f892bc9161ecd80ed54f7c5c842c9ae9b16f6d02858f3c4a538ce19de03b5ec9f8 SHA512 35f5ca7164d8d8f58b2f553ec7c6181629af217752fe49bd890051675734864ae4b5d1f135808d101fb0c9855d14842a0074759679a15e9b94fb571c9e2ccee7
-DIST ffmpeg-chromium-96.tar.gz 14782341 BLAKE2B 686f5e0970ab49663e43d54cdb9b0216560dabc676711666c9e51840af64d2c78d47b55bcf36625751676839869e1b1f3b65516499646db00fd29f5ed2ff90d3 SHA512 169a1bf58000be0799b05b1d3f3a63b5a93ec66023d31f1ac6f5d9cd77408a390a9308fb626e94c3f1d4e1170638c1c81ac68b248e06c28d318d731ddda8e4d2

diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-96.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-96.ebuild
deleted file mode 100644
index d98240ebe12e..000000000000
--- a/media-video/ffmpeg-chromium/ffmpeg-chromium-96.ebuild
+++ /dev/null
@@ -1,231 +0,0 @@
-# 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
-}

diff --git a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch
deleted file mode 100644
index ba1dfd2c0518..000000000000
--- a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- FFmpeg-chromium/configure	2021-10-07 22:32:34.230130424 +0100
-+++ FFmpeg/configure	2021-10-07 22:34:30.978861042 +0100
-@@ -6474,15 +6464,14 @@
-                                { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
- enabled libopenmpt        && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
- enabled libopenvino       && require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api
--# Chromium uses a built in copy of libopus that is not visible to pkg-config.
--# enabled libopus           && {
--#    enabled libopus_decoder && {
--#        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
--#    }
--#    enabled libopus_encoder && {
--#        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
--#    }
--# }
-+enabled libopus           && {
-+    enabled libopus_decoder && {
-+        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
-+    }
-+    enabled libopus_encoder && {
-+        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
-+    }
-+}
- enabled libpulse          && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
- enabled librabbitmq       && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection
- enabled librav1e          && require_pkg_config librav1e "rav1e >= 0.4.0" rav1e.h rav1e_context_new


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-chromium/files/, media-video/ffmpeg-chromium/
@ 2022-03-23  9:24 James Le Cuirot
  0 siblings, 0 replies; 9+ messages in thread
From: James Le Cuirot @ 2022-03-23  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     2cc00f9877ce77697d7972eeb58af6c15f05d20a
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 23 09:21:30 2022 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Mar 23 09:21:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2cc00f98

media-video/ffmpeg-chromium: Version bump to 100

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 media-video/ffmpeg-chromium/Manifest               |   1 +
 .../ffmpeg-chromium/ffmpeg-chromium-100.ebuild     | 232 +++++++++++++++++++++
 .../files/ffmpeg-chromium-100.patch                |  27 +++
 3 files changed, 260 insertions(+)

diff --git a/media-video/ffmpeg-chromium/Manifest b/media-video/ffmpeg-chromium/Manifest
index caf2ba51ace7..0d44a157d041 100644
--- a/media-video/ffmpeg-chromium/Manifest
+++ b/media-video/ffmpeg-chromium/Manifest
@@ -1,2 +1,3 @@
+DIST ffmpeg-chromium-100.tar.gz 15144675 BLAKE2B 1195078e12ef0d8b5562b2eed068eea331a03727f3dfbd198fdd1088d70346f892bc9161ecd80ed54f7c5c842c9ae9b16f6d02858f3c4a538ce19de03b5ec9f8 SHA512 35f5ca7164d8d8f58b2f553ec7c6181629af217752fe49bd890051675734864ae4b5d1f135808d101fb0c9855d14842a0074759679a15e9b94fb571c9e2ccee7
 DIST ffmpeg-chromium-94.tar.gz 14709687 BLAKE2B 06dedbd86befd8caed4c6cb34755b52cf70630f8fbd712f89d42e5b63e498f9d2a77935fbd7c87194f6d56fb0f83ff26beba00357dd51b3ac3e2e4480ff4351e SHA512 a6cf5404c892c878c50e3ba8369456db587e327bc3d77e857b9d34f3665ecfee7d3865b20e9871ccda570b30d9d34c03fd981cdc7f495809ea8f12cb8f15937e
 DIST ffmpeg-chromium-96.tar.gz 14782341 BLAKE2B 686f5e0970ab49663e43d54cdb9b0216560dabc676711666c9e51840af64d2c78d47b55bcf36625751676839869e1b1f3b65516499646db00fd29f5ed2ff90d3 SHA512 169a1bf58000be0799b05b1d3f3a63b5a93ec66023d31f1ac6f5d9cd77408a390a9308fb626e94c3f1d4e1170638c1c81ac68b248e06c28d318d731ddda8e4d2

diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-100.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-100.ebuild
new file mode 100644
index 000000000000..3c7d3ee33d68
--- /dev/null
+++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-100.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+COMMIT="574c39cce3231c69bc9a02ac475c27d944bdb113"
+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.2.189:= )
+"
+
+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}-100.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 || use mips || [[ ${CHOST} == *i486* ]] ; 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)" \
+		--strip="$(tc-getSTRIP)" \
+		--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
+}

diff --git a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-100.patch b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-100.patch
new file mode 100644
index 000000000000..e0aa000faaa3
--- /dev/null
+++ b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-100.patch
@@ -0,0 +1,27 @@
+diff -Naur a/configure b/configure
+--- a/configure	2022-03-22 10:20:35.000000000 +0000
++++ b/configure	2022-03-23 09:17:18.914615584 +0000
+@@ -6600,15 +6600,14 @@
+                                { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
+ enabled libopenmpt        && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
+ enabled libopenvino       && require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api
+-# Chromium uses a built in copy of libopus that is not visible to pkg-config.
+-# enabled libopus           && {
+-#    enabled libopus_decoder && {
+-#        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
+-#    }
+-#    enabled libopus_encoder && {
+-#        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
+-#    }
+-# }
++enabled libopus           && {
++    enabled libopus_decoder && {
++        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
++    }
++    enabled libopus_encoder && {
++        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
++    }
++}
+ enabled libplacebo        && require_pkg_config libplacebo "libplacebo >= 4.192.0" libplacebo/vulkan.h pl_vulkan_create
+ enabled libpulse          && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
+ enabled librabbitmq       && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-chromium/files/, media-video/ffmpeg-chromium/
@ 2021-10-07 22:23 James Le Cuirot
  0 siblings, 0 replies; 9+ messages in thread
From: James Le Cuirot @ 2021-10-07 22:23 UTC (permalink / raw
  To: gentoo-commits

commit:     c806301a09f1ae51a5198f110af001400e88ebed
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  7 22:09:11 2021 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Oct  7 22:22:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c806301a

media-video/ffmpeg-chromium: New package based on existing ffmpeg

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 media-video/ffmpeg-chromium/Manifest               |   1 +
 .../ffmpeg-chromium/ffmpeg-chromium-94.ebuild      | 223 +++++++++++++++++++++
 media-video/ffmpeg-chromium/files/chromium.patch   |  41 ++++
 .../ffmpeg-chromium/files/ffmpeg-chromium-94.patch |  26 +++
 media-video/ffmpeg-chromium/metadata.xml           |  14 ++
 5 files changed, 305 insertions(+)

diff --git a/media-video/ffmpeg-chromium/Manifest b/media-video/ffmpeg-chromium/Manifest
new file mode 100644
index 00000000000..3e1116a6ede
--- /dev/null
+++ b/media-video/ffmpeg-chromium/Manifest
@@ -0,0 +1 @@
+DIST ffmpeg-chromium-94.tar.gz 14709687 BLAKE2B 06dedbd86befd8caed4c6cb34755b52cf70630f8fbd712f89d42e5b63e498f9d2a77935fbd7c87194f6d56fb0f83ff26beba00357dd51b3ac3e2e4480ff4351e SHA512 a6cf5404c892c878c50e3ba8369456db587e327bc3d77e857b9d34f3665ecfee7d3865b20e9871ccda570b30d9d34c03fd981cdc7f495809ea8f12cb8f15937e

diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-94.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-94.ebuild
new file mode 100644
index 00000000000..ccadc52a33d
--- /dev/null
+++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-94.ebuild
@@ -0,0 +1,223 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+COMMIT="2d6591aa0835768c437c221c88840ac0c99a50dc"
+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}"/${P}.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
+
+	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}" \
+		--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
+}

diff --git a/media-video/ffmpeg-chromium/files/chromium.patch b/media-video/ffmpeg-chromium/files/chromium.patch
new file mode 100644
index 00000000000..e24ea84b3df
--- /dev/null
+++ b/media-video/ffmpeg-chromium/files/chromium.patch
@@ -0,0 +1,41 @@
+Allow libffmpeg to be built for Chromium-based browsers
+https://patchwork.ffmpeg.org/patch/4500/
+
+NOTE: This patch lacks the Makefile include line. We append it
+manually instead to make patching across different versions easier.
+
+diff --git a/ffbuild/libffmpeg.mak b/ffbuild/libffmpeg.mak
+new file mode 100644
+index 0000000..992cf3c
+--- /dev/null
++++ b/ffbuild/libffmpeg.mak
+@@ -0,0 +1,27 @@
++LIBFFMPEG = $(SLIBPREF)ffmpeg$(SLIBSUF)
++LIBFFMPEG_LINK = $(LD) -shared -Wl,-soname,$(LIBFFMPEG) -Wl,-Bsymbolic -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--gc-sections $(LDFLAGS) $(LDLIBFLAGS) -o $(LIBFFMPEG)
++
++ifeq ($(CONFIG_SHARED),yes)
++LIBFFMPEG_DEPS = libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavutil/$(SLIBPREF)avutil$(SLIBSUF)
++else
++LIBFFMPEG_DEPS = libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) libavutil/$(LIBPREF)avutil$(LIBSUF)
++endif
++
++$(LIBFFMPEG): $(LIBFFMPEG_DEPS)
++ifeq ($(CONFIG_SHARED),yes)
++	$(LIBFFMPEG_LINK) -Wl,--no-as-needed -lavcodec -lavformat -lavutil
++else
++	$(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive $(EXTRALIBS-avcodec) $(EXTRALIBS-avformat) $(EXTRALIBS-avutil)
++endif
++
++libffmpeg: $(LIBFFMPEG)
++
++install-libffmpeg: $(LIBFFMPEG)
++	$(Q)mkdir -p "$(SHLIBDIR)/chromium"
++	$(INSTALL) -m 755 $< "$(SHLIBDIR)/chromium/$<.$(SLOT)"
++	$(STRIP) "$(SHLIBDIR)/chromium/$<.$(SLOT)"
++
++uninstall-libffmpeg:
++	$(RM) "$(SHLIBDIR)/chromium/$(LIBFFMPEG).$(SLOT)"
++
++.PHONY: libffmpeg install-libffmpeg uninstall-libffmpeg
+--
+2.13.1

diff --git a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch
new file mode 100644
index 00000000000..ba1dfd2c051
--- /dev/null
+++ b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch
@@ -0,0 +1,26 @@
+--- FFmpeg-chromium/configure	2021-10-07 22:32:34.230130424 +0100
++++ FFmpeg/configure	2021-10-07 22:34:30.978861042 +0100
+@@ -6474,15 +6464,14 @@
+                                { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
+ enabled libopenmpt        && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
+ enabled libopenvino       && require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api
+-# Chromium uses a built in copy of libopus that is not visible to pkg-config.
+-# enabled libopus           && {
+-#    enabled libopus_decoder && {
+-#        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
+-#    }
+-#    enabled libopus_encoder && {
+-#        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
+-#    }
+-# }
++enabled libopus           && {
++    enabled libopus_decoder && {
++        require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
++    }
++    enabled libopus_encoder && {
++        require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
++    }
++}
+ enabled libpulse          && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
+ enabled librabbitmq       && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection
+ enabled librav1e          && require_pkg_config librav1e "rav1e >= 0.4.0" rav1e.h rav1e_context_new

diff --git a/media-video/ffmpeg-chromium/metadata.xml b/media-video/ffmpeg-chromium/metadata.xml
new file mode 100644
index 00000000000..5e0aeba3b15
--- /dev/null
+++ b/media-video/ffmpeg-chromium/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+	<email>chewi@gentoo.org</email>
+	<name>James Le Cuirot</name>
+</maintainer>
+<use>
+	<flag name="cpudetection">Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)</flag>
+	<flag name="gpl">Build GPL code. Should be enabled unless you require LGPL binaries.</flag>
+	<flag name="mmal">Enables Multi-Media Abstraction Layer (MMAL) decoding support: Available e.g. on the Raspberry Pi.</flag>
+	<flag name="vulkan">Enables support for the vulkan API for GPU offload.</flag>
+</use>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-12-23 21:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-23 21:50 [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-chromium/files/, media-video/ffmpeg-chromium/ James Le Cuirot
  -- strict thread matches above, loose matches on Subject: below --
2023-12-01 23:32 James Le Cuirot
2023-08-10  4:08 Sam James
2023-02-09 21:49 James Le Cuirot
2022-06-11 10:46 James Le Cuirot
2022-04-13 23:01 Sam James
2022-04-13 21:48 James Le Cuirot
2022-03-23  9:24 James Le Cuirot
2021-10-07 22:23 James Le Cuirot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox