summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikle Kolyada <zlogene@gentoo.org>2021-03-21 16:54:50 +0300
committerMikle Kolyada <zlogene@gentoo.org>2021-03-21 16:54:50 +0300
commit90710e74fb038e6e0aaa73bb3a359e175517fb07 (patch)
tree97271b1e29482713917637932207e6737f208434 /media-video
parentapp-admin/gopass-summon-provider: Do not strip binary (diff)
downloadgentoo-90710e74fb038e6e0aaa73bb3a359e175517fb07.tar.gz
gentoo-90710e74fb038e6e0aaa73bb3a359e175517fb07.tar.bz2
gentoo-90710e74fb038e6e0aaa73bb3a359e175517fb07.zip
media-video/mpv: sync live ebuild
Closes: https://bugs.gentoo.org/768936 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to 'media-video')
-rw-r--r--media-video/mpv/mpv-9999.ebuild51
1 files changed, 31 insertions, 20 deletions
diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
index e60b0b482c2b..edb74a93b704 100644
--- a/media-video/mpv/mpv-9999.ebuild
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -1,21 +1,22 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-PYTHON_COMPAT=( python{3_7,3_8,3_9} )
+LUA_COMPAT=( lua5-{1..2} luajit )
+PYTHON_COMPAT=( python3_{7..9} )
PYTHON_REQ_USE='threads(+)'
WAF_PV=2.0.9
-inherit bash-completion-r1 eapi7-ver flag-o-matic gnome2-utils pax-utils python-r1 toolchain-funcs waf-utils xdg-utils
+inherit bash-completion-r1 flag-o-matic lua-single pax-utils python-r1 toolchain-funcs waf-utils xdg-utils
DESCRIPTION="Media player based on MPlayer and mplayer2"
HOMEPAGE="https://mpv.io/ https://github.com/mpv-player/mpv"
if [[ ${PV} != *9999* ]]; then
SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux"
+ KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ppc ppc64 x86 ~amd64-linux"
DOCS=( RELEASE_NOTES )
else
EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
@@ -30,7 +31,7 @@ LICENSE="LGPL-2.1+ GPL-2+ BSD ISC"
SLOT="0"
IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins cuda debug doc drm dvb
dvd +egl gamepad gbm +iconv jack javascript jpeg lcms libcaca libmpv +lua
- luajit openal +opengl pulseaudio raspberry-pi rubberband sdl
+ openal +opengl pulseaudio raspberry-pi rubberband sdl
selinux test tools +uchardet vaapi vdpau vulkan wayland +X +xv zlib zimg"
REQUIRED_USE="
@@ -41,7 +42,7 @@ REQUIRED_USE="
gamepad? ( sdl )
gbm? ( drm egl opengl )
lcms? ( opengl )
- luajit? ( lua )
+ lua? ( ${LUA_REQUIRED_USE} )
opengl? ( || ( aqua egl X raspberry-pi !cli ) )
raspberry-pi? ( opengl )
test? ( opengl )
@@ -83,10 +84,7 @@ COMMON_DEPEND="
>=media-libs/libass-0.12.1:=[fontconfig,harfbuzz(+)]
virtual/ttf-fonts
libcaca? ( >=media-libs/libcaca-0.99_beta18 )
- lua? (
- !luajit? ( <dev-lang/lua-5.3:0= )
- luajit? ( dev-lang/luajit:2 )
- )
+ lua? ( ${LUA_DEPS} )
openal? ( >=media-libs/openal-1.13 )
pulseaudio? ( media-sound/pulseaudio )
raspberry-pi? ( >=media-libs/raspberrypi-userland-0_pre20160305-r1 )
@@ -120,17 +118,22 @@ COMMON_DEPEND="
"
DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
- virtual/pkgconfig
- dev-python/docutils
cuda? ( >=media-libs/nv-codec-headers-8.2.15.7 )
dvb? ( virtual/linuxtv-dvb-headers )
- test? ( >=dev-util/cmocka-1.0.0 )
"
RDEPEND="${COMMON_DEPEND}
cuda? ( x11-drivers/nvidia-drivers[X] )
selinux? ( sec-policy/selinux-mplayer )
tools? ( ${PYTHON_DEPS} )
"
+BDEPEND="dev-python/docutils
+ virtual/pkgconfig
+ test? ( >=dev-util/cmocka-1.0.0 )
+"
+
+pkg_setup() {
+ use lua && lua-single_pkg_setup
+}
src_prepare() {
cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
@@ -167,7 +170,6 @@ src_configure() {
$(use_enable iconv)
$(use_enable lua)
- $(usex luajit '--lua=luajit' '')
$(use_enable javascript)
$(use_enable zlib)
$(use_enable bluray libbluray)
@@ -231,6 +233,15 @@ src_configure() {
# Miscellaneous features:
$(use_enable 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
+ fi
if use vaapi && use X; then
mywafargs+=(
@@ -272,14 +283,14 @@ src_install() {
doins -r TOOLS/lua
fi
- if use cli && use luajit; then
- pax-mark -m "${ED}"usr/bin/${PN}
+ if use cli && use lua_single_target_luajit; then
+ pax-mark -m "${ED}"/usr/bin/${PN}
fi
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_replicate_script "${ED}"/usr/bin/umpv
fi
}
@@ -327,12 +338,12 @@ pkg_postinst() {
elog "If you want URL support, please install net-misc/youtube-dl."
- gnome2_icon_cache_update
+ xdg_icon_cache_update
xdg_desktop_database_update
}
pkg_postrm() {
- gnome2_icon_cache_update
+ xdg_icon_cache_update
xdg_desktop_database_update
}