media-video/mpv: Sync live ebuild
authorMikle Kolyada <zlogene@gentoo.org>
Sat, 26 Oct 2019 19:20:05 +0000 (22:20 +0300)
committerMikle Kolyada <zlogene@gentoo.org>
Sat, 26 Oct 2019 19:20:53 +0000 (22:20 +0300)
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
media-video/mpv/mpv-9999.ebuild

index bbd2d4c179e93d024cd5ef01c1828aa5c0c346a9..575ea9a56dac01150f823a1bd4978f1b260a7cc4 100644 (file)
@@ -15,7 +15,7 @@ HOMEPAGE="https://mpv.io/"
 
 if [[ ${PV} != *9999* ]]; then
        SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-       KEYWORDS="~amd64 ~arm ~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"
@@ -28,17 +28,17 @@ 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 samba? ( GPL-3+ )"
 SLOT="0"
-IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins cuda doc drm dvb
-       dvd +egl gbm +iconv jack javascript jpeg lcms +libass libcaca libmpv +lua
+IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins cuda debug doc drm dvb
+       dvd +egl gamepad gbm +iconv jack javascript jpeg lcms +libass libcaca libmpv +lua
        luajit openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl
-       selinux test tools +uchardet v4l vaapi vdpau vulkan wayland +X +xv zlib
-       zsh-completion"
+       selinux test tools +uchardet v4l vaapi vdpau vulkan wayland +X +xv zlib zimg"
 
 REQUIRED_USE="
        || ( cli libmpv )
        aqua? ( opengl )
        cuda? ( opengl )
        egl? ( || ( gbm X wayland ) )
+       gamepad? ( sdl )
        gbm? ( drm egl opengl )
        lcms? ( opengl )
        luajit? ( lua )
@@ -54,10 +54,11 @@ REQUIRED_USE="
        wayland? ( egl )
        X? ( egl? ( opengl ) )
        xv? ( X )
-       zsh-completion? ( cli )
        ${PYTHON_REQUIRED_USE}
 "
 
+RESTRICT="!test? ( test )"
+
 COMMON_DEPEND="
        >=media-video/ffmpeg-4.0:0=[encode,threads,vaapi?,vdpau?]
        alsa? ( >=media-libs/alsa-lib-1.0.18 )
@@ -70,6 +71,7 @@ COMMON_DEPEND="
                >=media-libs/libdvdread-4.1.0:=
        )
        egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] )
+       gamepad? ( media-libs/libsdl2 )
        iconv? (
                virtual/libiconv
                uchardet? ( app-i18n/uchardet )
@@ -99,7 +101,6 @@ COMMON_DEPEND="
        vulkan? (
                media-libs/shaderc
                media-libs/vulkan-loader[X?,wayland?]
-               >=media-libs/libplacebo-1.18.0[vulkan]
        )
        wayland? (
                >=dev-libs/wayland-1.6.0
@@ -119,17 +120,17 @@ COMMON_DEPEND="
                xv? ( x11-libs/libXv )
        )
        zlib? ( sys-libs/zlib )
+       zimg? ( >=media-libs/zimg-2.9.2 )
 "
 DEPEND="${COMMON_DEPEND}
        ${PYTHON_DEPS}
-       dev-python/docutils
        virtual/pkgconfig
        cuda? ( >=media-libs/nv-codec-headers-8.1.24.1 )
-       doc? ( dev-python/rst2pdf )
+       doc? (  dev-python/docutils
+                       dev-python/rst2pdf )
        dvb? ( virtual/linuxtv-dvb-headers )
        test? ( >=dev-util/cmocka-1.0.0 )
        v4l? ( virtual/os-headers )
-       zsh-completion? ( dev-lang/perl )
 "
 RDEPEND="${COMMON_DEPEND}
        cuda? ( x11-drivers/nvidia-drivers[X] )
@@ -137,14 +138,10 @@ RDEPEND="${COMMON_DEPEND}
        tools? ( ${PYTHON_DEPS} )
 "
 
-PATCHES=(
-       "${FILESDIR}/${PN}-0.29.0-make-ffmpeg-version-check-non-fatal.patch"
-)
-
 src_prepare() {
        cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
        chmod +x "${S}"/waf || die
-       default_src_prepare
+       default
 }
 
 src_configure() {
@@ -156,10 +153,6 @@ src_configure() {
                append-ldflags -L"${SYSROOT%/}${EPREFIX}/opt/vc/lib"
        fi
 
-       # Prevent access violations from zsh completion generation.
-       # See Gentoo bug 656086.
-       use zsh-completion && addpredict /dev/dri
-
        local mywafargs=(
                --confdir="${EPREFIX}/etc/${PN}"
                --docdir="${EPREFIX}/usr/share/doc/${PF}"
@@ -172,15 +165,14 @@ src_configure() {
                --disable-static-build
                # See deep down below for build-date.
                --disable-optimize # Don't add '-O2' to CFLAGS.
-               --disable-debug-build # Don't add '-g' to CFLAGS.
-               --enable-html-build
+               $(use_enable debug debug-build)
 
+               $(use_enable doc html-build)
                $(use_enable doc pdf-build)
+               $(use_enable doc manpage build)
                $(use_enable cplugins)
-               $(use_enable zsh-completion zsh-comp)
                $(use_enable test)
 
-               --disable-android
                $(use_enable iconv)
                $(use_enable samba libsmbclient)
                $(use_enable lua)
@@ -190,14 +182,12 @@ src_configure() {
                $(use_enable libass libass-osd)
                $(use_enable zlib)
                $(use_enable bluray libbluray)
-               $(use_enable dvd dvdread)
                $(use_enable dvd dvdnav)
                $(use_enable cdda)
                $(use_enable uchardet)
                $(use_enable rubberband)
                $(use_enable lcms lcms2)
                --disable-vapoursynth # Only available in overlays.
-               --disable-vapoursynth-lazy
                $(use_enable archive libarchive)
 
                --enable-libavdevice
@@ -239,9 +229,9 @@ src_configure() {
                $(use_enable vulkan shaderc)
                $(use_enable raspberry-pi rpi)
                $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
-               --disable-mali-fbdev # Only available in overlays.
                $(usex opengl '' '--disable-gl')
                $(use_enable vulkan)
+               $(use_enable gamepad sdl2-gamepad)
 
                # HWaccels:
                # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
@@ -249,13 +239,11 @@ src_configure() {
 
                # TV features:
                $(use_enable v4l tv)
-               $(use_enable v4l tv-v4l2)
-               $(use_enable v4l libv4l2)
-               $(use_enable v4l audio-input)
                $(use_enable dvb dvbin)
 
                # Miscellaneous features:
                --disable-apple-remote # Needs testing first. See Gentoo bug 577332.
+               $(use_enable zimg)
        )
 
        if use vaapi && use X; then
@@ -265,6 +253,19 @@ src_configure() {
                )
        fi
 
+       # Not for us
+       mywafargs+=(
+               --disable-android
+               --disable-egl-android
+               --disable-uwp
+               --disable-audiounit
+               --disable-wasapi
+               --disable-ios-gl
+               --disable-apple-remote
+               --disable-macos-touchbar
+               --disable-macos-cocoa-cb
+       )
+
        # Create reproducible non-live builds.
        [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)