summaryrefslogtreecommitdiff
path: root/media-video
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-02-10 23:34:33 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-02-10 23:34:33 +0000
commit0771aa27d30f102abe2c5733a138ffe570da4d15 (patch)
tree1ce3f24ab882caa90bf65381e4f0794872fc7d93 /media-video
parent0bb42730e8fc9c8e571f12e3189c6c6f8d532c24 (diff)
gentoo auto-resync : 10:02:2024 - 23:34:33
Diffstat (limited to 'media-video')
-rw-r--r--media-video/Manifest.gzbin24540 -> 24534 bytes
-rw-r--r--media-video/ffmpeg-chromium/Manifest2
-rw-r--r--media-video/ffmpeg-chromium/ffmpeg-chromium-121.ebuild250
-rw-r--r--media-video/ffmpeg/Manifest6
-rw-r--r--media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild596
-rw-r--r--media-video/ffmpeg/ffmpeg-9999.ebuild3
-rw-r--r--media-video/ffmpeg/metadata.xml6
-rw-r--r--media-video/mjpg-streamer/Manifest1
-rw-r--r--media-video/mjpg-streamer/mjpg-streamer-0_pre20200524-r2.ebuild97
-rw-r--r--media-video/motion/Manifest1
-rw-r--r--media-video/motion/motion-4.5.1-r4.ebuild89
-rw-r--r--media-video/mpv/Manifest1
-rw-r--r--media-video/mpv/mpv-0.37.0-r1.ebuild277
13 files changed, 1325 insertions, 4 deletions
diff --git a/media-video/Manifest.gz b/media-video/Manifest.gz
index f3df923307bf..e105d20c6692 100644
--- a/media-video/Manifest.gz
+++ b/media-video/Manifest.gz
Binary files differ
diff --git a/media-video/ffmpeg-chromium/Manifest b/media-video/ffmpeg-chromium/Manifest
index 7338e7dd0c7d..2ffd8662c0c0 100644
--- a/media-video/ffmpeg-chromium/Manifest
+++ b/media-video/ffmpeg-chromium/Manifest
@@ -1,5 +1,7 @@
AUX chromium.patch 1536 BLAKE2B 8caf1ff11f8da710138cbb857bd42e8679f98f3c30a3eaddb51611b7c39fb48c23890257997d3ddfee47244e6ffc0abb241e3118e0e8bcbf63442885445bcee3 SHA512 711b338178fe042aff92375d6593197337529986ea55ac6288df4c725145dd06c41fcfc11df4843e03eeaa4bad90ed558acf8f6945b9b96c9751fff92a41811a
AUX ffmpeg-chromium-120.patch 1485 BLAKE2B 49ece028bf7da100adc7af93e82b6235fb39f12199ce037b730b97012ca787047b45be821cec609cdfa7e00bb1f8c88a9ecae0b7b88fd8db6f53476b94833f9f SHA512 0f3276f75132bd8adbde4305ffa604cfa3d504ed66f883af109c75711d0f9af6dee2d55d7298ec36864a421250a0c4998d3306f0e47750c016c4274545195b49
DIST ffmpeg-chromium-120.tar.xz 10096036 BLAKE2B 8f24dfed854c713df369e6ef15bc773a3166fdf6eb8c90bcb1d1b7ddddaca0702df7615bc323432a40b5d213352945fa49acf8e864df2caa358764b5068a75f3 SHA512 0e0bfb44225981f91edceeb6f302592a7e108da49c5e6503b43f0e12b91d84dece908efe5e548bb31ccab49c5fba5a8365f5f0793bbf1450d35bfd836f8a3e9b
+DIST ffmpeg-chromium-121.tar.xz 10128048 BLAKE2B ba8e25356b7e0820dffea1b919288ddb3d6ec56fe8d17493529ec978deae629607ff5a5857a313e478193a1fca55fa3e5256e37d57251141e1f0a892cbdcf674 SHA512 e6cef1285237673ce5851cbddf4cda77779821c247a120bf73af2b931745b2886c915a35bb2bc21a8a9c5154be9e540f8abccc3bb64e704f5b859141d0dcc2e1
EBUILD ffmpeg-chromium-120.ebuild 6692 BLAKE2B 8e86de98fb340bd6963a08b03297f0e7eeb450c4aef9464fc64c3292e7c08d50ee7828f5daf167b61281e7deb591e69600b13ad813929353b94dc46c661c7cf9 SHA512 474dc357cbf2f2957f861384cf29cb5315a11c3a3c39be75bd1b24bee744be3c76f1bfa74be0f6e4e8159980e17be10fa4c372451780ab6edf9365bc8715cfa4
+EBUILD ffmpeg-chromium-121.ebuild 6693 BLAKE2B f50732d408a5a79cd0c6e8ce7d589fbe7a46ba358677c8a7df0b3221ac8f6f107c7e491c3cf71d98ca696f2bc991aa8d743f1fca3fc110284ebc4a5998e5ed54 SHA512 602ee71291266646bb4592076255480bf5d2bbef273aa9281f87a2d9e3870de78a89b4431ddf3c70a7cf1e850c265c8c5815089dff3d6764d88b08e25a2bf495
MISC metadata.xml 589 BLAKE2B 60a8f7a2eca511672dc67487956c589fffbb86ca6500d61c266916be92d1cde6c26246516289f129bbce05b07b811bdfcc0136d56676ce4097e5f19b361f375a SHA512 3953c626bb570af8cceedbf8b4035a0259e789823c296d11e6823237d05bd5d25a08260c6a8815bcea02bee56a522b0bb8da2b8aacd6be417b1992c4b0d22964
diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-121.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-121.ebuild
new file mode 100644
index 000000000000..3bb780532c13
--- /dev/null
+++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-121.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+COMMIT="3997177624f6b302bbc8a7edbb6f8a6ab47ea978"
+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
+ 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="
+ 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-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="
+ >=dev-build/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}-120.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 #918997. Will probably be fixed upstream in the next release.
+ use vulkan && append-ldflags -Wl,-z,muldefs
+
+ # 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 ]] && 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}" \
+ --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/Manifest b/media-video/ffmpeg/Manifest
index 8e57bbdd7729..431e154d35c6 100644
--- a/media-video/ffmpeg/Manifest
+++ b/media-video/ffmpeg/Manifest
@@ -27,9 +27,11 @@ DIST ffmpeg-6.0.tar.xz 10234012 BLAKE2B c70884911f3a3e40fe87473f241a2a56b303f5ab
DIST ffmpeg-6.0.tar.xz.asc 520 BLAKE2B be294d375108b57bca3c687620ce2517c54c99012d82dc7aa1a83d5fe6d5453bd3c8620fdfb743df780cf588983a06a66a458c4e3e454dbe535cbba9da30c48c SHA512 a64cd0f8578fcea4537f5a38634c930d66c8ba4abd3e8e9dcffaeb95c3ad2e754d7bc4fbb5272409d4d32abf8180ef83f7204c6a570b52a37e635efd96cb94ed
DIST ffmpeg-6.1.1.tar.xz 10458600 BLAKE2B 77827ff92b47c773ed82e7b7793dbb135c370fe23501169cb1eab08ff5ede77cfd5b397e8fb1d38756812cc82277898fd5c74b7d8495842556570c0c5570daeb SHA512 fca3f8635f29182e3ae0fe843a8a53614e4b47e22c11508df3ff7cdbafbb4b5ee0d82d9b3332871f7c1032033b1cad2f67557d7c5f7f7d85e2adadca122965d5
DIST ffmpeg-6.1.1.tar.xz.asc 520 BLAKE2B 801cd976d10363d1f9fc302351b330cb57e609a266407627ef378172f28974f4a18435b8a77b9cc7a8ff7b75701185211739f685629bbda961c3588c15af1221 SHA512 0e10c1f560bab0812d759d286656593dea5940f02bb52d88d9ba7f10b12b9cc3d7aa2a41c5f7a45b319069e04dce22dc1286b3c1ba685b35cd6d04cd81c5a0f5
+DIST ffmpeg-rpi-6.1.patch 1356823 BLAKE2B 094404eac6d1e43ac094634fa662ce312807013b8af3f80ced03b3d85f2547f803c71181b567c4db2756b2ea54b9bbaf7516a1f72a389d0889c2531edd177275 SHA512 7bdb857146d01ac54ce23c0b2bf32f0255419af52217aed873036cdc82678c3c7ac0e9557ed316fd316faf41c011778bcec277cc4de4d3b7fd9f5eab4078da69
EBUILD ffmpeg-4.4.4-r8.ebuild 20269 BLAKE2B 2d42f92ce34afbd49b4764e59bd3ac4e05e2e052d88000c6b0f0cdeae09b7170998cd52b951145fede6db9a18d480d0eb6e0f87a498bc34f1b61e4aa656d00b4 SHA512 d6a81f4ce5be09ea5ec7e8480c9fd5f4ad9417020f0607de8356fa87f47fe4237d734270ea3224402720451ef123b3354ccc472e011963e2cb1528028b74c229
EBUILD ffmpeg-6.0-r11.ebuild 20020 BLAKE2B a40a46d38cf91778bac13235c227dcb6c9b2d37a7760deb5ffcd2aea4fd0f12cec0a9a6cf9000882b6595b68f619dacc721365f8491bff7c0dda2739d53af97d SHA512 abeb9fba7ee4d2b704a9420c850b9cc8e87a74ceb08b9b6229c2a33aa806d576bb93396646235c41e18bfb4f36ad3d1260244386f1c7a981c5e1a95f1d80da93
EBUILD ffmpeg-6.0.1-r2.ebuild 19932 BLAKE2B a061f4479a123e5718eddb266099c3026092e566b3de0f1402f5ea06bf0138d2996c15f71679e44ca28cc48c87506b98cd46c4ee1ef8b230260a4d45e8b61955 SHA512 eba2afb8851ed6ead9db8443d80b6b782139a0f02e33a64371442f7c02d1b901885c34116923e029091e4caa67f57ee2179a21908c0da98454586935fa73920b
EBUILD ffmpeg-6.1.1-r2.ebuild 19557 BLAKE2B 37f2d46bce4dbbd0fdc1be54c718075da95fadfc6caa28fd4391960af022a2cac54374708a7e8f57455e66fdacaf69b580faaa2a532729c694c5e01faff3da4b SHA512 f04da11f41143394565733af05667e504a5d012c7b4ad669e8be46896f33f71caa3f8fc3b9fd7751667b92b40e412cb15c700423efbb1db5f7c3308fca07e288
-EBUILD ffmpeg-9999.ebuild 19409 BLAKE2B 445fe589f320d341310eb239e2617df50ececaebf9ef34a14ef9f303dddf483996e546ca8bfff07a26127d9ceb929c7d42cbbceab0158747a9fa00d9bd97ecf4 SHA512 ede1e58446f962e6591a26cb72e5b81bdf8f0c22791ce25ed559861242bceba4057af088e41ba22da50a16309ed611acdda8b5c2f78bcad275237f4d8f7ace69
-MISC metadata.xml 7626 BLAKE2B aac77cb3d4cb65c30e9654f59d6d10c59a4df70f096024ce5395c0572d1cf0289178320153d819853cfb6499cdff73ac6a2887cc2325be1e594019261f90d85e SHA512 0b59f1cbaa1800cd3896bd50046510f62933670fc3f1e7524d263f9fb1ddc722f2817b45776a0613a361d57f94aebc3b96228ae95f7e94abe1a009efbb5725b4
+EBUILD ffmpeg-6.1.1-r3.ebuild 19857 BLAKE2B 257b08c1ea37d39019cbc08d392d83d8f0146bb3ba42a22f3f06bb5a7e812a64e62fc64fc554e1e444f99f288d045c89c7cd666d524d02306eac44455acf56cf SHA512 49f3eb157089ec6aa2f462ce351d3ca9d89d356ef8357e6dd48ba2f1e25f84356f86bd042f2d9fd7b8e9cd68ac10532dbd88dbca28ea6af54d7389d2e2a044dd
+EBUILD ffmpeg-9999.ebuild 19361 BLAKE2B d681d6f92adc37dd1a69e2a39ce9419c167d7d7ea1e30fd4254f524d89feb37225e6b2e940e0b8ec1618d6f05cc142f3012101a3921175560d82c377373c49f4 SHA512 036078ad30d19e833fae749c4525a70b9ae208fbaefaf8ba8f27f86327be5fce3f48e5a2e044ebdf1d57f0785c6d0fab6fab424bbcbe833bc579ab5765163675
+MISC metadata.xml 7897 BLAKE2B 911f673353c480db243c202046f876840849cb27155fb109ee365e009d20af086fe188d91c7d33d509a7362330cea853a808c8e0a463aca8de3c304a3ed52ed0 SHA512 bdf26ee26d65a5ce58bc958eaad682cf4b5101100566cd4a4adf0b671418a2a7958a54baa2abff480f17bfcfe2d33aae20ba7d37f0d7b116f210d40796483da1
diff --git a/media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild b/media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild
new file mode 100644
index 000000000000..f512e9d9ac81
--- /dev/null
+++ b/media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild
@@ -0,0 +1,596 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Subslot: libavutil major.libavcodec major.libavformat major
+# Since FFmpeg ships several libraries, subslot is kind of limited here.
+# Most consumers will use those three libraries, if a "less used" library
+# changes its soname, consumers will have to be rebuilt the old way
+# (preserve-libs).
+# If, for example, a package does not link to libavformat and only libavformat
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage
+# doing so since such a case is unlikely.
+FFMPEG_SUBSLOT=58.60.60
+
+SOC_PATCHES=(
+ ffmpeg-rpi-6.1.patch
+)
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+ EGIT_MIN_CLONE_TYPE="single"
+ EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git"
+fi
+
+inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record/convert/stream audio and video. Includes libavcodec"
+HOMEPAGE="https://ffmpeg.org/"
+SRC_URI="soc? ( "${SOC_PATCHES[@]/#/https://dev.gentoo.org/~chewi/distfiles/}" )"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ :
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+ SRC_URI+=" mirror://gentoo/${P}.tar.xz"
+else # Release
+ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/ffmpeg.asc
+ inherit verify-sig
+ SRC_URI+=" https://ffmpeg.org/releases/${P/_/-}.tar.xz"
+ SRC_URI+=" verify-sig? ( https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc )"
+
+ BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-ffmpeg )"
+fi
+FFMPEG_REVISION="${PV#*_p}"
+
+SLOT="0/${FFMPEG_SUBSLOT}"
+LICENSE="
+ !gpl? ( LGPL-2.1 )
+ gpl? ( GPL-2 )
+ amr? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ gmp? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ libaribb24? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ encode? (
+ amrenc? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ )
+ samba? ( GPL-3 )
+"
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+fi
+
+# 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=(
+ +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt +gnutls gmp
+ +gpl hardcoded-tables +iconv libxml2 lzma +network opencl
+ openssl +postproc samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau vulkan
+ X:xlib X:libxcb X:libxcb-shm X:libxcb-xfixes +zlib
+ # libavdevice options
+ cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal
+ opengl
+ # indevs
+ libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack
+ # decoders
+ amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac
+ jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme gsm:libgsm
+ libaribb24 modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh
+ speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec
+ vorbis:libvorbis vpx:libvpx zvbi:libzvbi
+ # libavfilter options
+ appkit
+ bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite fontconfig frei0r
+ fribidi:libfribidi glslang:libglslang ladspa lcms:lcms2 libass libplacebo
+ libtesseract lv2 rubberband:librubberband shaderc:libshaderc truetype:libfreetype
+ truetype:libharfbuzz vidstab:libvidstab vmaf:libvmaf zeromq:libzmq zimg:libzimg
+ # libswresample options
+ libsoxr
+ # Threads; we only support pthread for now but ffmpeg supports more
+ +threads:pthreads
+)
+
+# Same as above but for encoders, i.e. they do something only with USE=encode.
+FFMPEG_ENCODER_FLAG_MAP=(
+ amf amrenc:libvo-amrwbenc kvazaar:libkvazaar libaom mp3:libmp3lame
+ openh264:libopenh264 rav1e:librav1e snappy:libsnappy svt-av1:libsvtav1
+ theora:libtheora twolame:libtwolame webp:libwebp x264:libx264
+ x265:libx265 xvid:libxvid
+)
+
+IUSE="
+ alsa chromium doc +encode oss +pic sndio static-libs test v4l soc
+ ${FFMPEG_FLAG_MAP[@]%:*}
+ ${FFMPEG_ENCODER_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 )
+ )
+"
+MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu )
+PPC_CPU_FEATURES=( cpu_flags_ppc_altivec:altivec cpu_flags_ppc_vsx:vsx cpu_flags_ppc_vsx2:power8 )
+PPC_CPU_REQUIRED_USE="
+ cpu_flags_ppc_vsx? ( cpu_flags_ppc_altivec )
+ cpu_flags_ppc_vsx2? ( cpu_flags_ppc_vsx )
+"
+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[@]}
+ ${MIPS_CPU_FEATURES[@]}
+ ${PPC_CPU_FEATURES[@]}
+ ${X86_CPU_FEATURES[@]}
+)
+IUSE="${IUSE}
+ ${CPU_FEATURES_MAP[@]%:*}"
+
+CPU_REQUIRED_USE="
+ ${ARM_CPU_REQUIRED_USE}
+ ${PPC_CPU_REQUIRED_USE}
+ ${X86_CPU_REQUIRED_USE}
+"
+
+FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt
+ graph2dot ismindex pktdumper qt-faststart sidxindex trasher )
+IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
+
+RDEPEND="
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ amf? ( media-video/amdgpu-pro-amf:= )
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
+ bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] )
+ bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
+ chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] )
+ codec2? ( media-libs/codec2[${MULTILIB_USEDEP}] )
+ dav1d? ( >=media-libs/dav1d-0.5.0:0=[${MULTILIB_USEDEP}] )
+ encode? (
+ amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
+ kvazaar? ( >=media-libs/kvazaar-2.0.0[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ openh264? ( >=media-libs/openh264-1.4.0-r1:=[${MULTILIB_USEDEP}] )
+ rav1e? ( >=media-video/rav1e-0.5:=[capi] )
+ snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] )
+ theora? (
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
+ )
+ twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
+ webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] )
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
+ x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] )
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
+ )
+ fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
+ flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] )
+ fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
+ gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] )
+ glslang? ( dev-util/glslang:=[${MULTILIB_USEDEP}] )
+ gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
+ gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
+ iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
+ iec61883? (
+ >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
+ )
+ ieee1394? (
+ >=media-libs/libdc1394-2.2.1:2=[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ )
+ jack? ( virtual/jack[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/openjpeg-2.1:2=[${MULTILIB_USEDEP}] )
+ jpegxl? ( >=media-libs/libjxl-0.7.0:=[$MULTILIB_USEDEP] )
+ lcms? ( >=media-libs/lcms-2.13:2[$MULTILIB_USEDEP] )
+ libaom? ( >=media-libs/libaom-1.0.0-r1:=[${MULTILIB_USEDEP}] )
+ libaribb24? ( >=media-libs/aribb24-1.0.3-r2[${MULTILIB_USEDEP}] )
+ libass? ( >=media-libs/libass-0.11.0:=[${MULTILIB_USEDEP}] )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
+ libdrm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] )
+ libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] )
+ libplacebo? ( >=media-libs/libplacebo-4.192.0:=[$MULTILIB_USEDEP] )
+ librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
+ libtesseract? ( >=app-text/tesseract-4.1.0-r1[${MULTILIB_USEDEP}] )
+ libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
+ libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] )
+ lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
+ modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
+ openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] )
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
+ qsv? ( media-libs/oneVPL[${MULTILIB_USEDEP}] )
+ rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.6.23-r1[client,${MULTILIB_USEDEP}] )
+ sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] )
+ shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] )
+ sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] )
+ soc? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ srt? ( >=net-libs/srt-1.3.0:=[${MULTILIB_USEDEP}] )
+ ssh? ( >=net-libs/libssh-0.6.0:=[sftp,${MULTILIB_USEDEP}] )
+ svg? (
+ gnome-base/librsvg:2=[${MULTILIB_USEDEP}]
+ x11-libs/cairo[${MULTILIB_USEDEP}]
+ )
+ nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 )
+ svt-av1? ( >=media-libs/svt-av1-0.9.0[${MULTILIB_USEDEP}] )
+ truetype? (
+ >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}]
+ media-libs/harfbuzz:=[${MULTILIB_USEDEP}]
+ )
+ vaapi? ( >=media-libs/libva-1.2.1-r1:0=[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
+ vidstab? ( >=media-libs/vidstab-1.1.0[${MULTILIB_USEDEP}] )
+ vmaf? ( >=media-libs/libvmaf-2.0.0[${MULTILIB_USEDEP}] )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] )
+ vulkan? ( >=media-libs/vulkan-loader-1.3.255:=[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.4:=[${MULTILIB_USEDEP}]
+ )
+ zeromq? ( >=net-libs/zeromq-4.2.1:= )
+ zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
+"
+
+RDEPEND="${RDEPEND}
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
+ !openssl? ( gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) )
+"
+
+DEPEND="${RDEPEND}
+ amf? ( media-libs/amf-headers )
+ ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
+ v4l? ( sys-kernel/linux-headers )
+ vulkan? ( >=dev-util/vulkan-headers-1.3.255 )
+"
+
+# += for verify-sig above
+BDEPEND+="
+ >=dev-build/make-3.81
+ virtual/pkgconfig
+ cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) )
+ cuda? ( >=sys-devel/clang-7[llvm_targets_NVPTX] )
+ doc? ( sys-apps/texinfo )
+ test? ( net-misc/wget app-alternatives/bc )
+"
+
+# Code requiring FFmpeg to be built under gpl license
+GPL_REQUIRED_USE="
+ postproc? ( gpl )
+ frei0r? ( gpl )
+ cdio? ( gpl )
+ rubberband? ( gpl )
+ vidstab? ( gpl )
+ samba? ( gpl )
+ encode? (
+ x264? ( gpl )
+ x265? ( gpl )
+ xvid? ( gpl )
+ )
+"
+REQUIRED_USE="
+ chromium? ( opus )
+ cuda? ( nvenc )
+ fftools_cws2fws? ( zlib )
+ glslang? ( vulkan !shaderc )
+ libv4l? ( v4l )
+ shaderc? ( vulkan !glslang )
+ soc? ( libdrm )
+ test? ( encode )
+ ${GPL_REQUIRED_USE}
+ ${CPU_REQUIRED_USE}"
+RESTRICT="
+ !test? ( test )
+ gpl? ( openssl? ( bindist ) fdk? ( bindist ) )
+"
+
+S=${WORKDIR}/${P/_/-}
+
+PATCHES=(
+ "${FILESDIR}"/chromium-r2.patch
+ "${FILESDIR}"/${PN}-6.1-wint-conversion.patch
+ "${FILESDIR}"/${PN}-6.0-fix-lto-type-mismatch.patch
+ "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch
+)
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libavutil/avconfig.h
+)
+
+pkg_setup() {
+ # ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends on ffmpeg.
+ # May cause breakage while updating, #862996, #625210, #833821.
+ if has_version media-libs/chromaprint[tools] && use chromaprint; then
+ ewarn "You have media-libs/chromaprint installed with 'tools' USE flag, which "
+ ewarn "links to ffmpeg, and you have enabled 'chromaprint' USE flag for ffmpeg, "
+ ewarn "which links to chromaprint. This may cause issues while rebuilding ffmpeg."
+ ewarn ""
+ ewarn "If your build fails to 'ERROR: chromaprint not found', rebuild chromaprint "
+ ewarn "without the 'tools' use flag first, then rebuild ffmpeg, and then finally enable "
+ ewarn "'tools' USE flag for chromaprint. See #862996."
+ fi
+}
+
+src_prepare() {
+ if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
+ export revision=git-N-${FFMPEG_REVISION}
+ fi
+
+ use soc &&
+ eapply "${SOC_PATCHES[@]/#/${DISTDIR}/}"
+
+ 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
+
+ ln -snf "${FILESDIR}"/chromium.c chromium.c || die
+ echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
+}
+
+multilib_src_configure() {
+ local myconf=( )
+
+ # Conditional patch options
+ use soc && myconf+=( --enable-v4l2-request --enable-libudev --enable-sand )
+
+ # 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[@]}" )
+ use openssl && myconf+=( --enable-nonfree )
+ use samba && myconf+=( --enable-version3 )
+
+ # Encoders
+ if use encode ; then
+ ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
+
+ # Licensing.
+ if use amrenc ; then
+ myconf+=( --enable-version3 )
+ fi
+ else
+ myconf+=( --disable-encoders )
+ fi
+
+ # Indevs
+ use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 )
+ for i in alsa oss jack sndio ; do
+ use ${i} || myconf+=( --disable-indev=${i} )
+ done
+
+ # Outdevs
+ for i in alsa oss sndio ; do
+ use ${i} || myconf+=( --disable-outdev=${i} )
+ done
+
+ # Decoders
+ use amr && myconf+=( --enable-version3 )
+ use gmp && myconf+=( --enable-version3 )
+ use libaribb24 && myconf+=( --enable-version3 )
+ use fdk && use gpl && myconf+=( --enable-nonfree )
+
+ for i in "${ffuse[@]#+}" ; do
+ myconf+=( $(use_enable ${i%:*} ${i#*:}) )
+ done
+
+ if use openssl ; then
+ myconf+=( --disable-gnutls )
+ has_version dev-libs/openssl:0/3 && myconf+=( --enable-version3 )
+ fi
+
+ # (temporarily) disable non-multilib deps
+ if ! multilib_is_native_abi; then
+ for i in librav1e libzmq ; do
+ myconf+=( --disable-${i} )
+ done
+ fi
+
+ # CPU features
+ for i in "${CPU_FEATURES_MAP[@]}" ; do
+ use ${i%:*} || myconf+=( --disable-${i#*:} )
+ done
+
+ if use pic ; then
+ myconf+=( --enable-pic )
+ # disable asm code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ [[ ${ABI} == x86 ]] && myconf+=( --disable-asm )
+ fi
+ [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004
+
+ # 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 ]] && 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-libaribcaption # libaribcaption is not packaged (yet?)
+ --enable-avfilter
+ --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
+
+ # doc
+ myconf+=(
+ $(multilib_native_use_enable doc)
+ $(multilib_native_use_enable doc htmlpages)
+ $(multilib_native_enable manpages)
+ )
+
+ # Use --extra-libs if needed for LIBS
+ set -- "${S}/configure" \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --enable-shared \
+ --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}" \
+ $(use_enable static-libs static) \
+ "${myconf[@]}" \
+ ${EXTRA_FFMPEG_CONF}
+ echo "${@}"
+ "${@}" || die
+}
+
+multilib_src_compile() {
+ emake V=1
+
+ if multilib_is_native_abi; then
+ for i in "${FFTOOLS[@]}" ; do
+ if use fftools_${i} ; then
+ emake V=1 tools/${i}$(get_exeext)
+ fi
+ done
+
+ use chromium &&
+ emake V=1 libffmpeg
+ fi
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \
+ emake V=1 fate -k
+}
+
+multilib_src_install() {
+ emake V=1 DESTDIR="${D}" install install-doc
+
+ if multilib_is_native_abi; then
+ for i in "${FFTOOLS[@]}" ; do
+ if use fftools_${i} ; then
+ dobin tools/${i}$(get_exeext)
+ fi
+ done
+
+ use chromium &&
+ emake V=1 DESTDIR="${D}" install-libffmpeg
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
+ [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
+
+ use amf && elog "To use AMF, prefix the ffmpeg call with the 'vk_pro' wrapper script, e.g. `vk_pro ffmpeg -vcodec h264_amf [...]`"
+}
diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild
index 461eb1559ef2..e79ef6ab48eb 100644
--- a/media-video/ffmpeg/ffmpeg-9999.ebuild
+++ b/media-video/ffmpeg/ffmpeg-9999.ebuild
@@ -84,7 +84,7 @@ FFMPEG_FLAG_MAP=(
# decoders
amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac
jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme gsm:libgsm
- libaribb24 mmal modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh
+ libaribb24 modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh
speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec
vorbis:libvorbis vpx:libvpx zvbi:libzvbi
# libavfilter options
@@ -251,7 +251,6 @@ RDEPEND="
libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] )
lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] )
lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
- mmal? ( media-libs/raspberrypi-userland )
modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
diff --git a/media-video/ffmpeg/metadata.xml b/media-video/ffmpeg/metadata.xml
index b4a5b53e7ee1..f309fd82b53b 100644
--- a/media-video/ffmpeg/metadata.xml
+++ b/media-video/ffmpeg/metadata.xml
@@ -4,6 +4,11 @@
<maintainer type="project">
<email>media-video@gentoo.org</email>
</maintainer>
+ <maintainer type="person">
+ <email>chewi@gentoo.org</email>
+ <name>James Le Cuirot</name>
+ <description>chromium and soc USE flags</description>
+ </maintainer>
<use>
<flag name="amf">Enables support for AMD's Advanced Media Framework (AMF)</flag>
<flag name="amr">Enables Adaptive Multi-Rate Audio support</flag>
@@ -65,6 +70,7 @@
<flag name="shaderc">Use <pkg>media-libs/shaderc</pkg> to compile GLSL</flag>
<flag name="snappy">Enable <pkg>app-arch/snappy</pkg> support. Required for e.g. Vidvox Hap encoder.</flag>
<flag name="sndio">Enable support for the <pkg>media-sound/sndio</pkg> backend</flag>
+ <flag name="soc">Apply additional patches for efficient playback on some SoCs (e.g. ARM, RISC-V).</flag>
<flag name="srt">Enable support for Secure Reliable Transport (SRT) via <pkg>net-libs/srt</pkg></flag>
<flag name="ssh">Enable SSH/sftp support via <pkg>net-libs/libssh</pkg>.</flag>
<flag name="svt-av1">Enables AV1 encoding support via <pkg>media-libs/svt-av1</pkg>.</flag>
diff --git a/media-video/mjpg-streamer/Manifest b/media-video/mjpg-streamer/Manifest
index 388c1cfe3df1..2206f99914c4 100644
--- a/media-video/mjpg-streamer/Manifest
+++ b/media-video/mjpg-streamer/Manifest
@@ -6,4 +6,5 @@ DIST mjpg-streamer-0_pre20120621.tar.bz2 471546 BLAKE2B 3ede2a60062bba7c91ddfa0d
DIST mjpg-streamer-0_pre20200524.tar.gz 711183 BLAKE2B 3a40f20f518a53c0c6046cf37728c46c2a843a1dd0ef0086c77940b5133f1337445b1edb2c21edc1bbacc588f7c7b45b1530871c944695c2ae02cf327fde6847 SHA512 d6e910f6693b27c16c33749458affcb4d9336bd15c642156c452fcbc4a8c2ba9f4a6102e6b94f698fc6fb48da9564a09cb0f804a5ac52201e566adf798a70ba2
EBUILD mjpg-streamer-0_pre20120621-r2.ebuild 1879 BLAKE2B 1bc5482504e7ccae9c5de4240dc7033046761d82cf066f6f02f02ef9259c578dbb032f388566fa985a36a11598429b9b63896d320d2ccbe25beb97c6e92fd663 SHA512 d330b8e7015e62f72e146d2555522d38c97661bafb4c4b41e7953324523fc85175d6eb5a61c7827646b11efb85e6e9e34df811c770c4bbfe0f0ef0659d68cbed
EBUILD mjpg-streamer-0_pre20200524-r1.ebuild 3062 BLAKE2B 89b868577061d92b6cd37c0749ab627d1da0148b6fbda18c6cdbb9908ae3a1c0909da74eb31980cc4936ae918d0e89c55ac0eea2998637618ca1d10e151a2511 SHA512 a9e302dcc0befd0df2b65b4c43f01d11593ed8a18334614c5f94fe384522af01faff8b4d58c6d7b61c475df0ade90b313b9633284cb23d8a13f7dba9576716a8
+EBUILD mjpg-streamer-0_pre20200524-r2.ebuild 2947 BLAKE2B 607e721c9f08337cd5b7a200ac837fe46ad02dbe6f12c6ecabd2868b003f89df4c2f62893900e89aa35bd5f3d571ad0e817887cb10df1e706dec76fdbcd6ea55 SHA512 6ce0b05023ba3555c326932b151df44759488417fa5fa8c8c67423108777b979ccf34b4a4a014e5212cac4b439a86434d1e3bfc86a817a60cd764c4c0db0b653
MISC metadata.xml 2303 BLAKE2B b837eb93c8c63e864eb04c397f228206e132ee1451a914d7bc0d294761eb41861f00aba09a2bded4067fdd5434cb976e6d6df2ae092c8b6cc7afc561f35f2a61 SHA512 30c30baf3250ee16b0e8afee2ffd1dcf2784a06965e234cc6c2deb1839cd0c601fd78100e1f009e0df95ed2610cd78eea4ddc1e5d9c1f051fee67d6b17d06f35
diff --git a/media-video/mjpg-streamer/mjpg-streamer-0_pre20200524-r2.ebuild b/media-video/mjpg-streamer/mjpg-streamer-0_pre20200524-r2.ebuild
new file mode 100644
index 000000000000..4348f911ad5d
--- /dev/null
+++ b/media-video/mjpg-streamer/mjpg-streamer-0_pre20200524-r2.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd
+
+DESCRIPTION="MJPG-streamer takes JPGs from Linux-UVC compatible webcams"
+HOMEPAGE="https://github.com/jacksonliam/mjpg-streamer"
+EGIT_COMMIT="85f89a8c321e799fabb1693c5d133f3fb48ee748"
+SRC_URI="https://github.com/jacksonliam/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+INPUT_PLUGINS="input-testpicture input-control input-file input-uvc input-http input-ptp2"
+OUTPUT_PLUGINS="output-file output-udp output-http output-autofocus output-rtsp output-viewer output-zmqserver"
+IUSE_PLUGINS="${INPUT_PLUGINS} ${OUTPUT_PLUGINS}"
+IUSE="input-testpicture input-control +input-file input-uvc input-http input-ptp2
+ output-file output-udp +output-http output-autofocus output-rtsp output-viewer output-zmqserver
+ www http-management wxp-compat"
+REQUIRED_USE="|| ( ${INPUT_PLUGINS} )
+ || ( ${OUTPUT_PLUGINS} )"
+
+RDEPEND="media-libs/libjpeg-turbo:=
+ input-uvc? ( media-libs/libv4l acct-group/video )
+ input-ptp2? ( media-libs/libgphoto2 )
+ output-zmqserver? (
+ dev-libs/protobuf-c
+ net-libs/zeromq
+ )"
+DEPEND="${RDEPEND}
+ input-testpicture? ( media-gfx/imagemagick )"
+
+S="${WORKDIR}/${PN}-${EGIT_COMMIT}/${PN}-experimental"
+
+src_prepare() {
+ sed -i -e "s|.*RPATH.*||g" CMakeLists.txt || die
+ if use wxp-compat; then
+ sed -i -e \
+ 's|^add_feature_option(WXP_COMPAT "Enable compatibility with WebcamXP" OFF)|add_feature_option(WXP_COMPAT "Enable compatibility with WebcamXP" ON)|g' \
+ CMakeLists.txt || die
+ fi
+
+ local flag switch
+ for flag in ${IUSE_PLUGINS}; do
+ use ${flag} && switch='' || switch='#'
+ flag=${flag/input-/input_}
+ flag=${flag/output-/output_}
+ sed -i -e \
+ "s|^add_subdirectory(plugins\/${flag})|${switch}add_subdirectory(plugins/${flag})|" \
+ CMakeLists.txt || die
+ done
+ if use http-management; then
+ sed -i -e \
+ 's|^add_feature_option(ENABLE_HTTP_MANAGEMENT "Enable experimental HTTP management option" OFF)|add_feature_option(ENABLE_HTTP_MANAGEMENT "Enable experimental HTTP management option" ON)|g' \
+ plugins/output_http/CMakeLists.txt || die
+ fi
+ sed -e "s|@LIBDIR@|$(get_libdir)/${PN}/$(get_libdir)|g" "${FILESDIR}/${PN}.initd" > ${PN}.initd || die
+
+ default
+}
+
+src_install() {
+ into /usr
+ dobin ${PN//-/_}
+ into "/usr/$(get_libdir)/${PN}"
+ dolib.so *.so
+
+ if use www ; then
+ insinto /usr/share/${PN}
+ doins -r www
+ fi
+
+ dodoc README.md TODO
+
+ newinitd ${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit mjpg_streamer@.service
+}
+
+pkg_postinst() {
+ einfo
+ elog "Remember to set an input and output plugin for mjpg-streamer."
+
+ if use input-uvc ; then
+ elog "To use the UVC plugin as a regular user, you must be a part of the video group"
+ fi
+
+ if use www ; then
+ einfo
+ elog "An example webinterface has been installed into"
+ elog "/usr/share/mjpg-streamer/www for your usage."
+ fi
+ einfo
+}
diff --git a/media-video/motion/Manifest b/media-video/motion/Manifest
index 15c98a30e399..e858f6e4f7d0 100644
--- a/media-video/motion/Manifest
+++ b/media-video/motion/Manifest
@@ -5,4 +5,5 @@ AUX motion.initd-r5 1392 BLAKE2B 87ac71a1e75ace73ac28c52ff0b1d6bbce364e6d43ef860
AUX motion.service-r4 497 BLAKE2B 8941424317635d214e74d5d558a443212129c38fed9921b101bd3689d743ed6bd68e30748075ae8c5d26aa10732fc6ce1f08707c9ed559eb89a27322e57e0995 SHA512 44e0fa13e4d93af517a06bac5191d16d528648c6b3eb9d56f80e447db7ef46b311acf6fd1d2159a24fa22200be41bdc62eeef8670ddba918bdd28f6d710f90c0
DIST motion-release-4.5.1.tar.gz 856665 BLAKE2B 59ae638113c7f08ced4b18d7c4f19e3b3f1850ba0cd4c224b300be5ac65ae3b45aa391f26f506a91bb4c38a47b552c71db846d2b3217ccf0b2f5799873ab7ddb SHA512 3b8b60ad4f41c37cc215aa575b0295ee99b15f2d32cbf3393c0f7cdd8d87616cca1c00e11cb7bf74e4afa285caa094f08df3ba62ab21dcb28a48336e3ff5803e
EBUILD motion-4.5.1-r3.ebuild 2348 BLAKE2B d55e46855de12b6c63cf90540d129aa93f387cf91ff890f00a06215b583b748f0b1528d3b9a6f323424ef343fcec515566b61f26081b2684eab6b80a8feebc30 SHA512 665dcb6486be8eaf3e82c9afd93c47f6fc29361a273159873908fabfe1934d6c017a220251be20ac3a8de4a6ac591c240684646a1ef3bf6d2b72d04364e0d546
+EBUILD motion-4.5.1-r4.ebuild 2281 BLAKE2B 45c63007c6a8e91866412f4bf8b67b7d224c7015ff903dbd0750324d2dbc06744faad2de30468ee1221bdb8ee5d5843b4544a6fdb8a339369c91755d1949c40c SHA512 efef2a9774338ab4951107f08abc523a3d1b7957ccdf68e672f0658c7f3d7179f469fb51c67891f4c847b726d06f94fb57656d66e5e96814240a5746a31b05f4
MISC metadata.xml 766 BLAKE2B 1385dc89a2d67fc06b0c430b7cb6a606ce22af15c633edc78382e48bc14e423a2a4ff1553531e0e373151e48d2fed1ab78f9da67680fda3eea6b3d717b077d22 SHA512 8c944d3b1bb54b25597bae085b3fdc3da3ff3677eb97fee314558597917355a2fa4db4216720dc51aa171bb032eb426ae8b1d3c9bc5efed3662af75d8d49cc54
diff --git a/media-video/motion/motion-4.5.1-r4.ebuild b/media-video/motion/motion-4.5.1-r4.ebuild
new file mode 100644
index 000000000000..691023faf1fd
--- /dev/null
+++ b/media-video/motion/motion-4.5.1-r4.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools readme.gentoo-r1 systemd
+
+DESCRIPTION="A software motion detector"
+HOMEPAGE="https://motion-project.github.io"
+SRC_URI="https://github.com/Motion-Project/${PN}/archive/release-${PV}.tar.gz -> ${PN}-release-${PV}.tar.gz"
+S="${WORKDIR}/${PN}-release-${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="ffmpeg mariadb mysql postgres sqlite v4l webp"
+
+RDEPEND="
+ acct-group/motion
+ acct-user/motion
+ net-libs/libmicrohttpd:=
+ media-libs/libjpeg-turbo:=
+ >=sys-devel/gettext-0.19
+ ffmpeg? ( media-video/ffmpeg:0= )
+ mariadb? ( dev-db/mariadb-connector-c )
+ mysql? ( dev-db/mysql-connector-c )
+ postgres? ( dev-db/postgresql:= )
+ sqlite? ( dev-db/sqlite:3 )
+ webp? ( media-libs/libwebp:= )
+"
+DEPEND="${RDEPEND}
+ v4l? (
+ media-libs/libv4l
+ virtual/os-headers
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-gettext-0.22-format-specifier.patch
+ "${FILESDIR}"/${P}-webp-underlinking.patch
+)
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+You need to setup a configuraton file (/etc/motion/motion.conf) before
+running motion for the first time.
+
+If motion is built with the mysql or mariadb use flags then please make
+sure to configure a matching database_type in the config file.
+
+Motion runs by default under user motion and group motion:
+- change this if needed in /etc/conf.d/motion
+- or add users who need access to the output files to the motion group
+
+To install motion as a service, use:
+- rc-update add motion default # with OpenRC
+- systemctl enable motion.service # with systemd
+"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with ffmpeg) \
+ $(use_with mariadb) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_with sqlite sqlite3) \
+ $(use_with v4l v4l2) \
+ $(use_with webp) \
+ --without-optimizecpu
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF} \
+ examplesdir=/usr/share/doc/${PF}/examples \
+ install
+
+ newinitd "${FILESDIR}/motion.initd-r5" ${PN}
+ newconfd "${FILESDIR}/motion.confd-r5" ${PN}
+ systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+ readme.gentoo_create_doc
+ readme.gentoo_print_elog
+}
diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest
index 6b1dd41ac0da..cfcb80642e23 100644
--- a/media-video/mpv/Manifest
+++ b/media-video/mpv/Manifest
@@ -4,6 +4,7 @@ AUX mpv-0.37.0-drm-fix.patch 1444 BLAKE2B e0645e9b12ebbd0088b10aed34cabadbdb1b06
DIST mpv-0.36.0.tar.gz 3409178 BLAKE2B 7260c265f02918d4caf72d8d8ecc9d4ab9783d66d675bd683a2f9c228404ad978c6fe0aa50f486b5257740176bc26f8abde7eff20d89019d5f701ec78c7743e1 SHA512 51f455a425ea5aac47acb3582d0f958a34248a2290a8d6887d22bcb9385fe8d1ab5d7f09d5408cfecfb73c1ec85d1b8ec8958e45a4941d3f711a2e580187472f
DIST mpv-0.37.0.tar.gz 3384190 BLAKE2B 31d8d47ed7ae94540189fe05b7ea63f5b0d5c987a22191f931e4bd90664d05dca4c7e0bd0e05fcdf48b977e38e5f8eec0d2572265f2cf4a969a8a9a9dbf83d68 SHA512 a2f7fb3837312ec59c50427af7be3b2b1b6175a53ccc7463e81503284fc4047dff32cb105d665d80be77ee1ae775d4512b71584f324d6d202c9a7fc1fab53257
EBUILD mpv-0.36.0-r1.ebuild 7509 BLAKE2B b019ec3c189c4f1499506c44d71a5c460ace26b8de690b5ff16ecece67ba3749224690fafec149a68785cc02324ee2c7b291a323f17c5c31653423f9ec6b445a SHA512 ca82b7f1eb70e684e24abcafa8c93f25a2541b0c178c8b7bd299cc599946e115722f2234ff2a460dead755f8586523277331ccc17800383ffb5c81c5a9faddae
+EBUILD mpv-0.37.0-r1.ebuild 6807 BLAKE2B 017c62e525061572888780ec1591d18b464458d49c0102ef6ad66198f2a1ae1b5d4a557ab03d53b482a85eb632c087d14890c6d8cc752edd967febc28636af0a SHA512 405c20ea40a3978beea4d4fec459bd9276b63fa08a40d0fb1825d201a1d9bd205d87940778e3911712b37eed862fc3c5cf74ae79562927eab43c58d4b21f2bca
EBUILD mpv-0.37.0.ebuild 7090 BLAKE2B 4c1e7df2155e0efa7bedb2b86d37644763a47cb4ad7f086adee9348a01ac5cea3e4ec13ac7191cb5d7784c24af3e3b1443a8be228e2c10e7660c22664c144e6a SHA512 a48defc31dbead64f4beabcce63db757d2ad3a03e18b55e37135ffc25c744c0829184155b75d8dd78f56bd6d83cacb96139f67f635e6857bc12d0ebae2831272
EBUILD mpv-9999.ebuild 6696 BLAKE2B 4ee848560c4b465dff66a5e444485582292311fa766144df301bc3a0834554d3cac8fd0f1fb682679f49cbd3004bac2fe8e400f8bae4576a4082dd7e9e3b2b64 SHA512 1f2374690f6ca055bf3bd4bf95eedf522335d5eda6bc87fb7fc8e9f6159f0a3cfe5c6307631d608fd754235ea0b29542ee73f4ed110c1ee60ed546e785c1aff5
MISC metadata.xml 2236 BLAKE2B 438015f84e6619d0e668c32ccc5ab271c108dbe3a0d25faae977c914ca5f5440106f892114e2ef486fe09709300aa8830bc40a2723247b242baad031efe0df9e SHA512 73a70af5a34b7881b004a9391a57d4358ac1217c250071cf1893624471389f63f9af4a0953e59655040bd815916601daeddebc73b69018e5ca7f563a5491a329
diff --git a/media-video/mpv/mpv-0.37.0-r1.ebuild b/media-video/mpv/mpv-0.37.0-r1.ebuild
new file mode 100644
index 000000000000..8af7096f3205
--- /dev/null
+++ b/media-video/mpv/mpv-0.37.0-r1.ebuild
@@ -0,0 +1,277 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-1 luajit )
+PYTHON_COMPAT=( python3_{10..12} )
+inherit flag-o-matic lua-single meson optfeature pax-utils python-single-r1 xdg
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
+else
+ SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux"
+fi
+
+DESCRIPTION="Media player for the command line"
+HOMEPAGE="https://mpv.io/"
+
+LICENSE="LGPL-2.1+ GPL-2+ BSD ISC MIT" #506946
+SLOT="0/2" # soname
+IUSE="
+ +X +alsa aqua archive bluray cdda +cli coreaudio debug +drm dvb
+ dvd +egl gamepad +iconv jack javascript jpeg lcms libcaca +libmpv
+ +lua nvenc openal opengl pipewire pulseaudio rubberband sdl selinux
+ sixel sndio test tools +uchardet vaapi vdpau vulkan wayland xv zimg
+ zlib
+"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ || ( cli libmpv )
+ egl? ( || ( X drm wayland ) )
+ lua? ( ${LUA_REQUIRED_USE} )
+ nvenc? ( || ( egl opengl vulkan ) )
+ opengl? ( || ( X aqua ) )
+ test? ( cli )
+ tools? ( cli )
+ uchardet? ( iconv )
+ vaapi? ( || ( X drm wayland ) )
+ vdpau? ( X )
+ vulkan? ( || ( X wayland ) )
+ xv? ( X )
+"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+ media-libs/libass:=[fontconfig]
+ >=media-libs/libplacebo-6.338:=[opengl?,vulkan?]
+ >=media-video/ffmpeg-4.4:=[encode,threads,vaapi?,vdpau?]
+ X? (
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ x11-libs/libXext
+ x11-libs/libXpresent
+ x11-libs/libXrandr
+ xv? ( x11-libs/libXv )
+ )
+ alsa? ( media-libs/alsa-lib )
+ archive? ( app-arch/libarchive:= )
+ bluray? ( media-libs/libbluray:= )
+ cdda? (
+ dev-libs/libcdio-paranoia:=
+ dev-libs/libcdio:=
+ )
+ drm? (
+ x11-libs/libdrm
+ egl? ( media-libs/mesa[gbm(+)] )
+ )
+ dvd? (
+ media-libs/libdvdnav
+ media-libs/libdvdread:=
+ )
+ egl? (
+ media-libs/libglvnd
+ media-libs/libplacebo[opengl]
+ )
+ gamepad? ( media-libs/libsdl2[joystick] )
+ iconv? (
+ virtual/libiconv
+ uchardet? ( app-i18n/uchardet )
+ )
+ jack? ( virtual/jack )
+ javascript? ( dev-lang/mujs:= )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ lcms? ( media-libs/lcms:2 )
+ libcaca? ( media-libs/libcaca )
+ lua? ( ${LUA_DEPS} )
+ openal? ( media-libs/openal )
+ opengl? ( media-libs/libglvnd[X?] )
+ pipewire? ( media-video/pipewire:= )
+ pulseaudio? ( media-libs/libpulse )
+ rubberband? ( media-libs/rubberband )
+ sdl? ( media-libs/libsdl2[sound,threads,video] )
+ sixel? ( media-libs/libsixel )
+ sndio? ( media-sound/sndio:= )
+ vaapi? ( media-libs/libva:=[X?,drm(+)?,wayland?] )
+ vdpau? ( x11-libs/libvdpau )
+ vulkan? (
+ media-libs/shaderc
+ media-libs/vulkan-loader[X?,wayland?]
+ )
+ wayland? (
+ dev-libs/wayland
+ dev-libs/wayland-protocols
+ x11-libs/libxkbcommon
+ )
+ zimg? ( media-libs/zimg )
+ zlib? ( sys-libs/zlib:= )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-mplayer )
+ tools? ( ${PYTHON_DEPS} )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ X? ( x11-base/xorg-proto )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ nvenc? ( media-libs/nv-codec-headers )
+ wayland? ( dev-libs/wayland-protocols )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ cli? ( dev-python/docutils )
+ wayland? ( dev-util/wayland-scanner )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.37.0-drm-fix.patch
+)
+
+pkg_setup() {
+ use lua && lua-single_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ if use !debug; then
+ if use test; then
+ einfo "Skipping -DNDEBUG due to USE=test"
+ else
+ append-cppflags -DNDEBUG # treated specially
+ fi
+ fi
+
+ mpv_feature_multi() {
+ local use set
+ for use in ${1} ${2}; do
+ use ${use} || set=disabled
+ done
+ echo -D${3-${2}}=${set-enabled}
+ }
+
+ local emesonargs=(
+ $(meson_use cli cplayer)
+ $(meson_use libmpv)
+ $(meson_use test tests)
+
+ $(meson_feature cli html-build)
+ $(meson_feature cli manpage-build)
+ -Dpdf-build=disabled
+
+ -Dbuild-date=false
+
+ # misc options
+ $(meson_feature archive libarchive)
+ $(meson_feature bluray libbluray)
+ $(meson_feature cdda)
+ -Dcplugins=enabled
+ $(meson_feature dvb dvbin)
+ $(meson_feature dvd dvdnav)
+ $(meson_feature gamepad sdl2-gamepad)
+ $(meson_feature iconv)
+ $(meson_feature javascript)
+ -Dlibavdevice=enabled
+ $(meson_feature lcms lcms2)
+ -Dlua=$(usex lua "${ELUA}" disabled)
+ $(meson_feature rubberband)
+ -Dsdl2=$(use gamepad || use sdl && echo enabled || echo disabled) #857156
+ $(meson_feature uchardet)
+ -Dvapoursynth=disabled # only available in overlays
+ $(meson_feature zimg)
+ $(meson_feature zlib)
+
+ # audio output
+ $(meson_feature alsa)
+ $(meson_feature coreaudio)
+ $(meson_feature jack)
+ $(meson_feature openal)
+ $(meson_feature pipewire)
+ $(meson_feature pulseaudio pulse)
+ $(meson_feature sdl sdl2-audio)
+ $(meson_feature sndio)
+
+ # video output
+ $(meson_feature X x11)
+ $(meson_feature aqua cocoa)
+ $(meson_feature drm)
+ $(meson_feature jpeg)
+ $(meson_feature libcaca caca)
+ $(meson_feature sdl sdl2-video)
+ $(meson_feature sixel)
+ $(meson_feature wayland)
+ $(meson_feature xv)
+
+ -Dgl=$(use egl || use libmpv || use opengl &&
+ echo enabled || echo disabled)
+ $(meson_feature egl)
+ $(mpv_feature_multi egl X egl-x11)
+ $(mpv_feature_multi egl drm gbm) # gbm is only used by egl-drm
+ $(mpv_feature_multi egl drm egl-drm)
+ $(mpv_feature_multi egl wayland egl-wayland)
+ $(meson_feature libmpv plain-gl)
+ $(mpv_feature_multi opengl X gl-x11)
+ $(mpv_feature_multi opengl aqua gl-cocoa)
+
+ $(meson_feature vulkan)
+ $(meson_feature vulkan shaderc)
+
+ # hardware decoding
+ $(meson_feature nvenc cuda-hwaccel)
+ $(meson_feature nvenc cuda-interop)
+
+ $(meson_feature vaapi)
+ $(mpv_feature_multi vaapi X vaapi-x11)
+ $(mpv_feature_multi vaapi drm vaapi-drm)
+ $(mpv_feature_multi vaapi wayland vaapi-wayland)
+
+ $(meson_feature vdpau)
+ $(mpv_feature_multi vdpau opengl vdpau-gl-x11)
+
+ $(mpv_feature_multi aqua opengl videotoolbox-gl)
+
+ # notable options left to automagic
+ #dmabuf-wayland: USE="drm wayland" + plus memfd_create support
+ #vulkan-interop: USE="vulkan" + >=ffmpeg-6.1
+ # TODO?: perhaps few more similar compound options should be left auto
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ if use lua; then
+ insinto /usr/share/${PN}
+ doins -r TOOLS/lua
+
+ if use cli && use lua_single_target_luajit; then
+ pax-mark -m "${ED}"/usr/bin/${PN}
+ fi
+ fi
+
+ if use tools; then
+ dobin TOOLS/{mpv_identify.sh,umpv}
+ newbin TOOLS/idet.sh mpv_idet.sh
+ python_fix_shebang "${ED}"/usr/bin/umpv
+ fi
+
+ if use cli; then
+ dodir /usr/share/doc/${PF}/html
+ mv "${ED}"/usr/share/doc/{mpv,${PF}/html}/mpv.html || die
+ mv "${ED}"/usr/share/doc/{mpv,${PF}/examples} || die
+ fi
+
+ local GLOBIGNORE=*/*build*:*/*policy*
+ dodoc RELEASE_NOTES DOCS/*.{md,rst}
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ optfeature "URL support with USE=lua" net-misc/yt-dlp
+}