mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
media-video/ffmpeg-chromium: add 145
Signed-off-by: Matt Jolly <kangie@gentoo.org>
This commit is contained in:
@@ -5,3 +5,4 @@ DIST ffmpeg-chromium-141.tar.xz 10913152 BLAKE2B 9a4b61af013a2f944406c9494487550
|
||||
DIST ffmpeg-chromium-142.tar.xz 10911552 BLAKE2B b335c4b40bd12da1231d1154c96e8980977baab36da17144294759c371a4649a4cf2d017eeb0bc8d1c2db6230f04de170661252f8f136283464069d98c8f8a98 SHA512 dc9e499ae7a75c339eb05d5d2f2c81251226e19004a9b9ba1815d359930498fbcb05d1c4697f12fff5ef2ac60c431e0569659550b91b3e90763fecfa2d69bda4
|
||||
DIST ffmpeg-chromium-143.tar.xz 10912336 BLAKE2B 21aff9a4cfe03c49064697737e04185c3c48d68965f8649e227cca3f9987e8e141336ae60de966ab1afdaca49971dfb3c73783ca6516efe579e952f51e6b69cd SHA512 338a2017089b69b2c8d109eaa49a091053048b81541a1f2c932aab3e77b38e735c3e4be7dd9abc164a4aad0e3173d8be60371cca8da53654f55261ff93d4d43c
|
||||
DIST ffmpeg-chromium-144.tar.xz 11082768 BLAKE2B eae6cd19f8e51af83fc98d1af430fc668cfe02408bb5948117f253addf7a6157f45ca8e1aba849d9b2a719888559a9702c4c68fb74a641491007929ac3971f51 SHA512 33dae4ff7ae337a931979819b89d76a858bbbe85f2045ab5910ef1a9e224befbf2251787f1096b71e29976a082e7e82c29cce1c15d0c99a8d6b6ac4304159164
|
||||
DIST ffmpeg-chromium-145.tar.xz 11119344 BLAKE2B d6ca614edc549c69b9cbf881cf34099ec64ba54c44b05956f2308b883b49230d7825ed32a6689dca55ffe77b464a36bc3bb305a5a2e2d7dd8ed5133a723cff02 SHA512 028029149ab7bfe2564944b3e8e8767db7c8b42bfbbed1d3fbd10ed07f305d74c2897af6b2119020e14534dcdc36c17063fd2e4b88e86d115f24d84d7e55e194
|
||||
|
||||
241
media-video/ffmpeg-chromium/ffmpeg-chromium-145.ebuild
Normal file
241
media-video/ffmpeg-chromium/ffmpeg-chromium-145.ebuild
Normal file
@@ -0,0 +1,241 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit flag-o-matic toolchain-funcs
|
||||
|
||||
COMMIT=fd8d327732d4c4a3ef831f4de49635e9528cb73e
|
||||
DESCRIPTION="FFmpeg built specifically for codec support in Chromium-based browsers"
|
||||
HOMEPAGE="https://ffmpeg.org/"
|
||||
SRC_URI="https://deps.gentoo.zip/media-video/${P}.tar.xz"
|
||||
|
||||
LICENSE="
|
||||
!gpl? ( LGPL-2.1 )
|
||||
gpl? ( GPL-2 )
|
||||
"
|
||||
SLOT="${PV}"
|
||||
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64"
|
||||
|
||||
# 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
|
||||
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
|
||||
cpu_flags_arm_asimddp:dotprod
|
||||
cpu_flags_arm_i8mm:i8mm
|
||||
)
|
||||
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="
|
||||
>=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.277:= )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
vulkan? ( >=dev-util/vulkan-headers-1.3.277 )
|
||||
"
|
||||
BDEPEND="
|
||||
>=dev-build/make-3.81
|
||||
virtual/pkgconfig
|
||||
cpu_flags_x86_mmx? ( >=dev-lang/nasm-2.13 )
|
||||
"
|
||||
|
||||
REQUIRED_USE="
|
||||
vulkan? ( threads )
|
||||
${CPU_REQUIRED_USE}"
|
||||
RESTRICT="
|
||||
test
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-138-configure-enable-libopus.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=( )
|
||||
|
||||
# Bug #918997. Will probably be fixed upstream in the next release.
|
||||
use vulkan && append-ldflags -Wl,-z,muldefs
|
||||
|
||||
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
|
||||
if use arm64; then # 830165 - 'host' explicitly not supported on arm64
|
||||
[[ ${i} != host ]] && myconf+=( --cpu=${i} )
|
||||
else
|
||||
myconf+=( --cpu=${i} )
|
||||
fi
|
||||
break
|
||||
done
|
||||
|
||||
# LTO support, bug #566282, bug #754654, bug #772854
|
||||
if [[ ${ABI} != x86 ]] && tc-is-lto; 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}" \
|
||||
--extra-cflags="-DCHROMIUM_NO_LOGGING" \
|
||||
--disable-all \
|
||||
--disable-autodetect \
|
||||
--disable-error-resilience \
|
||||
--disable-everything \
|
||||
--disable-faan \
|
||||
--disable-iamf \
|
||||
--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,vorbis \
|
||||
--enable-demuxer=aac,flac,matroska,mov,mp3,ogg,wav \
|
||||
--enable-parser=aac,flac,h264,mpegaudio,opus,vorbis,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
|
||||
}
|
||||
Reference in New Issue
Block a user