summaryrefslogtreecommitdiff
path: root/media-video/ffmpeg-chromium
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-02 05:01:09 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-02 05:01:09 +0000
commit81f73a84efe20818880d8c52c55a3bd067115b06 (patch)
treeca631191839ca72738880eb47b7e46689f38b59b /media-video/ffmpeg-chromium
parentb0632f33a9a34123e027e91c44916235a5cd9494 (diff)
gentoo auto-resync : 02:12:2023 - 05:01:08
Diffstat (limited to 'media-video/ffmpeg-chromium')
-rw-r--r--media-video/ffmpeg-chromium/Manifest3
-rw-r--r--media-video/ffmpeg-chromium/ffmpeg-chromium-117.ebuild244
-rw-r--r--media-video/ffmpeg-chromium/files/ffmpeg-chromium-117.patch27
3 files changed, 274 insertions, 0 deletions
diff --git a/media-video/ffmpeg-chromium/Manifest b/media-video/ffmpeg-chromium/Manifest
index a646d5939724..55af8900fdbd 100644
--- a/media-video/ffmpeg-chromium/Manifest
+++ b/media-video/ffmpeg-chromium/Manifest
@@ -1,6 +1,9 @@
AUX chromium.patch 1536 BLAKE2B 8caf1ff11f8da710138cbb857bd42e8679f98f3c30a3eaddb51611b7c39fb48c23890257997d3ddfee47244e6ffc0abb241e3118e0e8bcbf63442885445bcee3 SHA512 711b338178fe042aff92375d6593197337529986ea55ac6288df4c725145dd06c41fcfc11df4843e03eeaa4bad90ed558acf8f6945b9b96c9751fff92a41811a
AUX ffmpeg-chromium-100.patch 1653 BLAKE2B 4d0b025b024aa9ce9e325487c09bb3a566b453198626a2178b119eab56adb73d392a8f4499735310108838f73d48c50f54c9c4b1b19db66c98ef15b39e38c3d4 SHA512 89cbf0cd5c4337e4633af7c814002cb4e909b4d4d385d5a3e265882cf1c4e24e4057512bffe7311e53b8a7886c882929221b07961ae86d115803f9b991ef6a05
+AUX ffmpeg-chromium-117.patch 1465 BLAKE2B b8c975ab9249285ec6867efaf5fe7f4bacc210043c8750929dad679444f7ca05a9a5bc374e04aa3d74857a21eddae5fde7d337fb6ecf01f5cd10eadb67c905fc SHA512 d0c51d21dbdec5653fbc53ce4117496ae8a08fcfee5069bd7b8c7c8ee9d9e5395e2751cdef60b23c12c7797cdef2d39e290deaebcd3e009406bde68c95ff7149
AUX ffmpeg-chromium-binutils-2.41.patch 2248 BLAKE2B 16bdc9642b6662d8213814ca3fe7daac7cb74ac62223e0c91fefa7f694fbef7f7f6043d578fb59899b6bf40d79e44e2edae16ff148200a3f6dec654b3b318838 SHA512 3b630b2d8b892eb3f72d2021d9dd9710c435d4b70db2ada7d86446330900e64ae047eca58335750c9b2854654d00c74f486ac73929ac6a7afa4c6971f63bb40e
DIST ffmpeg-chromium-114.tar.xz 9934024 BLAKE2B cc11bd00bcf6bef5f946a16f1544881c71503207ba3c6ec57cdc37124ea562366dced2e029f31e57a6f78ec7073412ac0b8ec470d14975a3cc40fad2e96ec5df SHA512 1b1743664d58f5b92971d113ea441604e0b46f28b22df1b02ab0431b8e884789fb6d81b4f50ff1526f716381abcc63e1b336d23edd9ea28abe8b3526fba08ce9
+DIST ffmpeg-chromium-117.tar.xz 10085348 BLAKE2B 2de4d0913061f97967013481a878cd97adca0af0c0eb89c6909cb83ce56ad6ee077b527651f6392b15d78090fb5d7bf05d0734ca4c0aebb678405f51fceab11a SHA512 2bbc6b34cdb1e47fd741e443cde32e95e8adba569d27a559f14a25440280cb0a6a56e5856fc6d7ebdd73aca9942da3ec9c0037079fd39007653c134e1be96e67
EBUILD ffmpeg-chromium-114.ebuild 6337 BLAKE2B 25965fa55c63e29022d7ad61c707090bb2ead24a94b168a51d5aa741e2de91bfdb4266b11d1e8fea762d57f0ace237ae1191465b1f2ae5db661ede8eed345fa5 SHA512 141d4a6e951dcf523062e18a274207b139a26356ac957ac0d4ee4d5f165cff635e25a20999614ed67b47c73d458d2a3d9918bd0639fa6230d38e9ae6de75b36d
+EBUILD ffmpeg-chromium-117.ebuild 6533 BLAKE2B 79cbc574d220617d70db0c970c5f28a7f0d1ebc1ee42d98b35bf42fdac19d91760ce983fed575dab3165a3f85db36e29255b3811d0bbde68e3a0aeb498286a9e SHA512 e467c82a7213a6eab6e0efabc2bdc025f2aa0ee5b8dd826d7770fbb6364436eacf5a325507ab2c2b1be201400c183f8c170d75a28cefd7b45d22018e5e5e5ef3
MISC metadata.xml 589 BLAKE2B 60a8f7a2eca511672dc67487956c589fffbb86ca6500d61c266916be92d1cde6c26246516289f129bbce05b07b811bdfcc0136d56676ce4097e5f19b361f375a SHA512 3953c626bb570af8cceedbf8b4035a0259e789823c296d11e6823237d05bd5d25a08260c6a8815bcea02bee56a522b0bb8da2b8aacd6be417b1992c4b0d22964
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