summaryrefslogtreecommitdiff
path: root/media-video/mpv
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
commit2719f73b6813d11d13a9650cdd2ab8ec6e69385d (patch)
tree8c816148bcbd22757d892089c989ae614eae4f5a /media-video/mpv
parent0f558761aa2dee1017b4751e4017205e015a9560 (diff)
gentoo resync : 09.07.2022
Diffstat (limited to 'media-video/mpv')
-rw-r--r--media-video/mpv/Manifest5
-rw-r--r--media-video/mpv/files/mpv-9999-docdir.patch11
-rw-r--r--media-video/mpv/metadata.xml4
-rw-r--r--media-video/mpv/mpv-9999.ebuild274
4 files changed, 150 insertions, 144 deletions
diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest
index d2c6664647a7..0921b11506cf 100644
--- a/media-video/mpv/Manifest
+++ b/media-video/mpv/Manifest
@@ -1,3 +1,4 @@
+AUX mpv-9999-docdir.patch 536 BLAKE2B eeb4bec0a51a68515c7c321a4419679e4b6d0567db2145ce44f0ff5141b2043ec3de057607dca0798f2d63f7b5f2e8fde3ed87be725e156e0b769ca561598702 SHA512 e8a122dec7adea75681e285378d99a7f94f4f75926cbde65dd5f0c7014b4a49d4567e719d92a9d9d428f8f746ff0cd3495ba59c5e7b3acb43d83329a10b338c5
DIST mpv-0.33.1.tar.gz 3259882 BLAKE2B 97ab101c2013ffb219d36a788020fb9fc4382d09971ac0beee42701a54667a6c766521be7b052193de4505b2117c2d47b3682ebafab46632fc40b637e0d19c04 SHA512 99d6c40d18c5cf83814b44ec6d8eade229800c5b51a734c9bbe831c3aeb95f8931124c94f6ae2360ffff62053c163bc3c55b254df021e005b350ebc3df7e952b
DIST mpv-0.34.0.tar.gz 3287976 BLAKE2B 9fc412544d81b249c71eed0d6669121a1942771ecb48d50d3fda16b8f967c8a777529e28a234d7169617981cd909ff03aed0deaf15db900d605b8d8849939218 SHA512 9935a20730dbb8fbf4cd11fe2fc38b1981882fc85c93046837a9b99cae089b3f710e6af7d7ea977c177de5479aa24e413f76cab9b995e8b7e66d6b77c524fdf0
DIST mpv-0.34.1.tar.gz 3288356 BLAKE2B c0e5dc3cd23307449a526bd2cf0df5d870322aa1914a139784fd50d77274d42648a769ee4da3ba74e34a7a080700a5740dae13ed0827df1b3cfef36846f983ab SHA512 77ea349d6999f8cce9b5cce4cebd3506a224fc18ab08d22dd16bd34c34d012bb170879b268ddd62db40d116b4cc0b2d9d651b8097f387ed9115c426834cac77e
@@ -6,5 +7,5 @@ DIST waf-2.0.9 103104 BLAKE2B c7e996aa49662da3ff941d076fc7e2dd23e867ade92a3b2ae0
EBUILD mpv-0.33.1-r3.ebuild 9698 BLAKE2B 18a25640c9ba5e3d1b3f06d75d1f9eca75a2eb202a67b6107a9e1704012ef3b20f819ab7e38567068439450b3c9feba916a484ab34e7fca94ec47623965878c0 SHA512 4358a7a120e72cb6cb036aaa30469d534eaecb7596017b3a54ad07443f89732102eb037b9c22fddcd95cbb7660ef0a59fb2f5476b7dbc3e78a804a0d94947a51
EBUILD mpv-0.34.0-r1.ebuild 9701 BLAKE2B fd2f7cbeabd539efa9625d476efdf86bd15de954f100fbdb01ee3549fb92fcf380d9bbcf003dec17d901711007c822b01274a535ff92caa09c978edfbf20db97 SHA512 78ed75d5e4393aacbcba8f223cacc00ea88184c30df9316b7daf4ec2e52b3f65fbd3661468639e9a5ebf52d14e336cf358ccad2659c386ef3052012ce107a572
EBUILD mpv-0.34.1-r1.ebuild 9697 BLAKE2B 91b819898ec285d53675ec92cbc988db16d943f68a5ec54ff1334064a4aeb67033a2375d8398000a1e6d732b2267b9e813ca4a9e6dfde5950a3c4fba51994cbd SHA512 250ed490a9fdc3ab9133f8ddd4195d6820679293bdab104cec9fb3efbc385cfa8e5207321b7bbab20fa16f45e2cee937ac5b74c86dbab0b0a680317d9c724e2c
-EBUILD mpv-9999.ebuild 9724 BLAKE2B 4f539d603252eeb344634f958db5d36fe915205a6d38ecd5bef42de866dd99d7a6979bd4554d673b6ede0adcb992d5fadbc59b994c6ea536704fa64e42bda315 SHA512 b6a755f113b588482d0d0f8f8dc4822dbf2fb6c74a5d1d4213b4ad5269a979f3071d717f8a1e498aca5c76dc91df33f55dacb09affb6fd9e61a963d34513bd14
-MISC metadata.xml 2137 BLAKE2B fe78cb8478cac266c72c939fd87043c0a685c12c840e0966d34d58b1c9dd39767197d93762d8150454a5e2f58ecf0c68cde1289bb392cd92b0d199a81d5f4ff6 SHA512 bd37f4f676eaf2507484d28b0b29f861e575a6232bc67413cae1c09fd16481d5a62b2646ee2e9e5b5a0c5bd8a0dfa63d1b4ef80e3f70c1ef8ff040d103fd6beb
+EBUILD mpv-9999.ebuild 9205 BLAKE2B 8f66b018de4030aa77cf560b9fd0e37f16acc4f821fa5777550dc52cc468d7c613158e59ed511dd27539bde066a92d1c34846cbd0716f2cd0bc3eaa8187aeae8 SHA512 6ea59a928d078c1e2ecc7bdf774a7f486986e5522546131d1ff49fad0685d46665cd6b964f7dab89ee7e41ea13b8476bd771bed0e269fea29537cfb78218f43e
+MISC metadata.xml 2562 BLAKE2B f53ed5de0b371b102412e050901ba3c58f0c1cdd5e5aba6c3f0fd2ac46fffdf3d87022299489cfb6388573edf9ac3a501488939dc4e9d77527efe6fd65102f55 SHA512 fae81e9b21accc130249475ae50e02e48ea1ddf0ea3e6e332d41275ccf4552131a4bf0e7a15856e909572ed0f5c86163b0a7a10d3e13a2015c650e741d63a373
diff --git a/media-video/mpv/files/mpv-9999-docdir.patch b/media-video/mpv/files/mpv-9999-docdir.patch
new file mode 100644
index 000000000000..62a57415163b
--- /dev/null
+++ b/media-video/mpv/files/mpv-9999-docdir.patch
@@ -0,0 +1,11 @@
+--- a/meson.build
++++ b/meson.build
+@@ -1856,7 +1856,7 @@ if get_option('cplayer')
+
+ conf_files = ['etc/mpv.conf', 'etc/input.conf',
+ 'etc/mplayer-input.conf', 'etc/restore-old-bindings.conf']
+- install_data(conf_files, install_dir: join_paths(datadir, 'doc', 'mpv'))
++ install_data(conf_files, install_dir: join_paths(datadir, 'mpv'))
+
+ bash_install_dir = join_paths(datadir, 'bash-completion', 'completions')
+ install_data('etc/mpv.bash-completion', install_dir: bash_install_dir, rename: 'mpv')
diff --git a/media-video/mpv/metadata.xml b/media-video/mpv/metadata.xml
index 8f8efa409921..656c28187c05 100644
--- a/media-video/mpv/metadata.xml
+++ b/media-video/mpv/metadata.xml
@@ -17,14 +17,18 @@
<flag name="jpeg">Enable support for saving screenshots in JPEG format</flag>
<flag name="libmpv">Build mpv shared library</flag>
<flag name="lua">Enable Lua scripting, OSC (On Screen Controller) GUI and <pkg>net-misc/youtube-dl</pkg> hook-script</flag>
+ <flag name="mmal">Enables Multi-Media Abstraction Layer (MMAL) decoding support: Available e.g. on the Raspberry Pi.</flag>
<flag name="opengl" restrict="&lt;media-video/mpv-0.28.0">Enable the recommended 'opengl' video output</flag>
<flag name="opengl" restrict="&gt;=media-video/mpv-0.28.0">Enable support for various OpenGL-based video backends</flag>
<flag name="raspberry-pi">Enable support for the Raspberry Pi</flag>
+ <flag name="pipewire">Enable sound support via native PipeWire backend</flag>
<flag name="rubberband">Enable high quality pitch correction via <pkg>media-libs/rubberband</pkg></flag>
<flag name="sdl">Enable <pkg>media-libs/libsdl2</pkg> based video and audio outputs
(Note: these outputs exist for compatibility reasons only, avoid if possible)</flag>
+ <flag name="sndio">Enable sound support via <pkg>media-sound/sndio</pkg></flag>
<flag name="tools">Install extra tools: mpv_identify.sh, mpv_idet.sh, and umpv</flag>
<flag name="uchardet">Enable subtitles charset discovery via <pkg>app-i18n/uchardet</pkg></flag>
+ <flag name="vector">Use function implementations more amenable to vectorization (gives speedup). Made optional in case of bugs.</flag>
<flag name="vulkan">Enable support for various Vulkan-based video backends</flag>
<flag name="zimg">Enable libzimg support (for vf_fingerprint)</flag>
</use>
diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
index 647b7976525a..0958d7c9fee9 100644
--- a/media-video/mpv/mpv-9999.ebuild
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -1,38 +1,40 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
LUA_COMPAT=( lua5-{1..2} luajit )
PYTHON_COMPAT=( python3_{8..10} )
PYTHON_REQ_USE='threads(+)'
-WAF_PV=2.0.22
-
-inherit bash-completion-r1 flag-o-matic lua-single optfeature pax-utils python-r1 toolchain-funcs waf-utils xdg-utils
+inherit edo flag-o-matic lua-single optfeature meson pax-utils python-single-r1 toolchain-funcs xdg
DESCRIPTION="Media player based on MPlayer and mplayer2"
HOMEPAGE="https://mpv.io/ https://github.com/mpv-player/mpv"
-if [[ ${PV} != *9999* ]]; then
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
+ inherit git-r3
+
+ DOCS=()
+else
SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux"
+
DOCS=( RELEASE_NOTES )
-else
- EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
- inherit git-r3
- DOCS=(); SRC_URI=""
fi
-SRC_URI+=" https://waf.io/waf-${WAF_PV}"
+
DOCS+=( README.md DOCS/{client-api,interface}-changes.rst )
-# See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC.
-LICENSE="LGPL-2.1+ GPL-2+ BSD ISC"
+# See Copyright in sources and Gentoo bug #506946. libmpv is ISC.
+# See https://github.com/mpv-player/mpv/blob/6265724f3331e3dee8d9ec2b6639def5004a5fa2/Copyright which
+# says other files may be BSD/MIT/ISC.
+LICENSE="LGPL-2.1+ GPL-2+ BSD MIT ISC"
SLOT="0"
IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins debug doc drm dvb
dvd +egl gamepad gbm +iconv jack javascript jpeg lcms libcaca libmpv +lua
- nvenc openal +opengl pulseaudio raspberry-pi rubberband sdl
- selinux test tools +uchardet vaapi vdpau vulkan wayland +X +xv zlib zimg"
+ mmal nvenc openal +opengl pipewire pulseaudio raspberry-pi rubberband sdl
+ selinux sndio test tools +uchardet vaapi vdpau +vector vulkan wayland +X +xv zlib zimg"
REQUIRED_USE="
|| ( cli libmpv )
@@ -79,17 +81,19 @@ COMMON_DEPEND="
)
jack? ( virtual/jack )
javascript? ( >=dev-lang/mujs-1.0.0 )
- jpeg? ( virtual/jpeg:0 )
+ jpeg? ( media-libs/libjpeg-turbo:= )
lcms? ( >=media-libs/lcms-2.6:2 )
>=media-libs/libass-0.12.1:=[fontconfig,harfbuzz(+)]
virtual/ttf-fonts
libcaca? ( >=media-libs/libcaca-0.99_beta18 )
lua? ( ${LUA_DEPS} )
openal? ( >=media-libs/openal-1.13 )
- pulseaudio? ( media-sound/pulseaudio )
+ pulseaudio? ( media-libs/libpulse )
+ pipewire? ( media-video/pipewire:= )
raspberry-pi? ( >=media-libs/raspberrypi-userland-0_pre20160305-r1 )
rubberband? ( >=media-libs/rubberband-1.8.0 )
sdl? ( media-libs/libsdl2[sound,threads,video] )
+ sndio? ( media-sound/sndio )
vaapi? ( x11-libs/libva:=[drm(+)?,X?,wayland?] )
vdpau? ( x11-libs/libvdpau )
vulkan? (
@@ -118,7 +122,6 @@ COMMON_DEPEND="
zimg? ( >=media-libs/zimg-2.9.2 )
"
DEPEND="${COMMON_DEPEND}
- ${PYTHON_DEPS}
dvb? ( virtual/linuxtv-dvb-headers )
nvenc? ( >=media-libs/nv-codec-headers-8.2.15.7 )
"
@@ -129,21 +132,18 @@ RDEPEND="${COMMON_DEPEND}
"
BDEPEND="dev-python/docutils
virtual/pkgconfig
- test? ( >=dev-util/cmocka-1.0.0 )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999-docdir.patch
+)
+
pkg_setup() {
use lua && lua-single_pkg_setup
-}
-
-src_prepare() {
- cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
- chmod +x "${S}"/waf || die
- default
+ use tools && python-single-r1_pkg_setup
}
src_configure() {
- python_setup
tc-export CC PKG_CONFIG AR
if use raspberry-pi; then
@@ -151,133 +151,138 @@ src_configure() {
append-ldflags -L"${ESYSROOT}/opt/vc/lib"
fi
- local mywafargs=(
- --confdir="${EPREFIX}/etc/${PN}"
-
- $(usex cli '' '--disable-cplayer')
- $(use_enable libmpv libmpv-shared)
-
- --disable-libmpv-static
- --disable-static-build
- # See deep down below for build-date.
- --disable-optimize # Don't add '-O2' to CFLAGS.
- $(usex debug '' '--disable-debug-build')
-
- $(use_enable doc html-build)
- --disable-pdf-build
- --enable-manpage-build
- $(use_enable cplugins)
- $(use_enable test)
-
- $(use_enable iconv)
- $(use_enable lua)
- $(use_enable javascript)
- $(use_enable zlib)
- $(use_enable bluray libbluray)
- $(use_enable dvd dvdnav)
- $(use_enable cdda)
- $(use_enable uchardet)
- $(use_enable rubberband)
- $(use_enable lcms lcms2)
- --disable-vapoursynth # Only available in overlays.
- $(use_enable archive libarchive)
-
- --enable-libavdevice
+ if use debug && ! use test; then
+ append-cppflags -DNDEBUG
+ fi
+
+ local emesonargs=(
+ -Dbuild-date=false
+ $(meson_use cli cplayer)
+ $(meson_use libmpv)
+ $(meson_use test tests)
+
+ $(meson_feature doc html-build)
+ -Dmanpage-build=enabled
+ -Dpdf-build=disabled
+
+ $(meson_feature cplugins)
+ $(meson_feature iconv)
+ $(meson_feature javascript)
+ $(meson_feature zlib)
+ $(meson_feature bluray libbluray)
+ $(meson_feature dvd dvdnav)
+
+ $(meson_feature cdda)
+
+ $(meson_feature uchardet)
+ $(meson_feature rubberband)
+ $(meson_feature lcms lcms2)
+
+ # Only available in overlays.
+ -Dvapoursynth=disabled
+
+ $(meson_feature vector)
+
+ $(meson_feature archive libarchive)
+
+ -Dlibavdevice=enabled
# Audio outputs:
- $(use_enable sdl sdl2) # Listed under audio, but also includes video.
- $(use_enable pulseaudio pulse)
- $(use_enable jack)
- $(use_enable openal)
- --disable-opensles
- $(use_enable alsa)
- $(use_enable coreaudio)
+ $(meson_feature sdl sdl2-audio)
+ $(meson_feature pulseaudio pulse)
+ $(meson_feature jack)
+ $(meson_feature openal)
+ $(meson_feature pipewire)
+ -Dopensles=disabled
+ $(meson_feature alsa)
+ $(meson_feature coreaudio)
+ $(meson_feature sndio)
# Video outputs:
- $(use_enable aqua cocoa)
- $(use_enable drm)
- $(use_enable gbm)
- $(use_enable wayland wayland-scanner)
- $(use_enable wayland wayland-protocols)
- $(use_enable wayland)
- $(use_enable X x11)
- $(use_enable xv)
- $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa')
- $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
- $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
- $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
- $(usex opengl "$(use_enable wayland gl-wayland)" '--disable-gl-wayland')
- $(use_enable vdpau)
- $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
- $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl.
- $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
- $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
- $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
- $(use_enable libcaca caca)
- $(use_enable jpeg)
- $(use_enable vulkan shaderc)
- $(use_enable vulkan libplacebo)
- $(use_enable raspberry-pi rpi)
- $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
- $(usex opengl '' '--disable-gl')
- $(use_enable vulkan)
- $(use_enable gamepad sdl2-gamepad)
+ $(meson_feature sdl sdl2-video)
+ $(meson_feature aqua cocoa)
+ $(meson_feature drm)
+ $(meson_feature gbm)
+ $(meson_feature wayland)
+ $(meson_feature X x11)
+ $(meson_feature xv)
+
+ $(meson_feature opengl gl)
+ $(usex opengl "$(meson_feature aqua gl-cocoa)" '-Dgl-cocoa=disabled')
+ $(usex opengl "$(meson_feature X gl-x11)" '-Dgl-x11=disabled')
+
+ $(meson_feature egl)
+ $(usex egl "$(meson_feature X egl-x11)" "-Degl-x11=disabled")
+ $(usex egl "$(meson_feature gbm egl-drm)" "-Degl-drm=disabled")
+ $(usex opengl "$(meson_feature wayland egl-wayland)" '-Degl-wayland=disabled')
+
+ $(meson_feature vdpau)
+ $(usex vdpau "$(meson_feature opengl vdpau-gl-x11)" '-Dvdpau-gl-x11=disabled')
+
+ $(meson_feature vaapi) # See below for vaapi-glx, vaapi-x-egl.
+ $(usex vaapi "$(meson_feature X vaapi-x11)" "-Dvaapi-x11=disabled")
+ $(usex vaapi "$(meson_feature wayland vaapi-wayland)" "-Dvaapi-wayland=disabled")
+ $(usex vaapi "$(meson_feature gbm vaapi-drm)" "-Dvaapi-drm=disabled")
+
+ $(meson_feature libcaca caca)
+ $(meson_feature jpeg)
+ $(meson_feature vulkan shaderc)
+ $(meson_feature vulkan libplacebo)
+ $(meson_feature raspberry-pi rpi)
+ $(meson_feature mmal rpi-mmal)
+
+ -Dsixel=disabled
+ -Dspirv-cross=disabled
+
+ $(usex libmpv "$(meson_feature opengl plain-gl)" "-Dplain-gl=disabled")
+ $(meson_feature opengl gl)
+ $(meson_feature vulkan)
+ $(meson_feature gamepad sdl2-gamepad)
# HWaccels:
# Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
- $(use_enable nvenc cuda-hwaccel)
- $(use_enable nvenc cuda-interop)
+ $(meson_feature nvenc cuda-hwaccel)
+ $(meson_feature nvenc cuda-interop)
# TV features:
- $(use_enable dvb dvbin)
+ $(meson_feature dvb dvbin)
# Miscellaneous features:
- $(use_enable zimg)
+ $(meson_feature zimg)
)
+
if use lua; then
- if use lua_single_target_luajit; then
- mywafargs+=( --lua="luajit" )
- else
- # Because it would be too simple to just let the user directly
- # specify the package name to check, wouldn't it.
- mywafargs+=( --lua="$(ver_rs 1 '' $(ver_cut 1-2 $(lua_get_version)))" )
- fi
+ emesonargs+=( -Dlua="${ELUA}" )
+ else
+ emesonargs+=( -Dlua=disabled )
fi
if use vaapi && use X; then
- mywafargs+=(
- $(use_enable egl vaapi-x-egl)
+ emesonargs+=(
+ $(meson_feature egl vaapi-x-egl)
)
fi
# Not for us
- mywafargs+=(
- --disable-android
- --disable-egl-android
- --disable-uwp
- --disable-audiounit
- --disable-macos-media-player
- --disable-wasapi
- --disable-ios-gl
- --disable-macos-touchbar
- --disable-macos-cocoa-cb
- --disable-tvos
- --disable-egl-angle-win32
+ emesonargs+=(
+ -Duwp=disabled
+ -Daudiounit=disabled
+ -Doss-audio=disabled
+ -Dwasapi=disabled
+
+ -Dd3d11=disabled
+ -Ddirect3d=disabled
)
- mywafargs+=(
- --bashdir="$(get_bashcompdir)"
- --zshdir="${EPREFIX}"/usr/share/zsh/site-functions
-)
-
- # Create reproducible non-live builds.
- [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
+ meson_src_configure
+}
- waf-utils_src_configure "${mywafargs[@]}"
+src_test() {
+ edo "${BUILD_DIR}"/mpv --no-config -v --unittest=all-simple
}
src_install() {
- waf-utils_src_install
+ meson_src_install
if use lua; then
insinto /usr/share/${PN}
@@ -291,7 +296,7 @@ src_install() {
if use tools; then
dobin TOOLS/{mpv_identify.sh,umpv}
newbin TOOLS/idet.sh mpv_idet.sh
- python_replicate_script "${ED}"/usr/bin/umpv
+ python_fix_shebang "${ED}"/usr/bin/umpv
fi
}
@@ -342,18 +347,3 @@ pkg_postinst() {
xdg_icon_cache_update
xdg_desktop_database_update
}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-src_test() {
- cd "${S}"/build/test || die
- local test
- for test in *; do
- if [[ -x ${test} ]]; then
- ./"${test}" || die "Test suite failed"
- fi
- done
-}