media-video/mpv: add SLOT operator on libva rdep.
authorIlya Tumaykin <itumaykin@gmail.com>
Sun, 17 Dec 2017 21:57:40 +0000 (00:57 +0300)
committerPatrice Clement <monsieurp@gentoo.org>
Thu, 21 Dec 2017 20:19:50 +0000 (21:19 +0100)
Also clean up after Polynomial-C's messy fix.

Package-Manager: Portage-2.3.19, Repoman-2.3.6

media-video/mpv/files/0.27.0/mpv-0.27.0-support-libva2.patch [moved from media-video/mpv/files/mpv-libva2.patch with 89% similarity]
media-video/mpv/mpv-0.27.0-r1.ebuild [moved from media-video/mpv/mpv-0.27.0.ebuild with 99% similarity]

similarity index 89%
rename from media-video/mpv/files/mpv-libva2.patch
rename to media-video/mpv/files/0.27.0/mpv-0.27.0-support-libva2.patch
index 843e844945413f05b52e9ca3551a1e54182b71ce..8ae7f537682f8b3b9a5d4e7d8cdb670c1041e17a 100644 (file)
@@ -1,12 +1,10 @@
-From 2ecf240b1cd20875991a5b18efafbe799864ff7f Mon Sep 17 00:00:00 2001
-From: Mark Thompson <sw@jkqxz.net>
-Date: Mon, 9 Oct 2017 20:10:26 +0100
-Subject: [PATCH] vaapi: Use libva2 message callbacks
+commit 2ecf240b1cd20875991a5b18efafbe799864ff7f
+Author: Mark Thompson <sw@jkqxz.net>
+Date:   Mon Oct 9 20:10:26 2017 +0100
+
+vaapi: Use libva2 message callbacks
 
 They are no longer global, so they work vaguely sensibly.
----
- video/vaapi.c | 32 +++++++++++++++++++++++++++++---
- 1 file changed, 29 insertions(+), 3 deletions(-)
 
 diff --git a/video/vaapi.c b/video/vaapi.c
 index 6bedbbaa18..3b1cb9cc41 100644
@@ -15,7 +13,7 @@ index 6bedbbaa18..3b1cb9cc41 100644
 @@ -40,9 +40,27 @@ int va_get_colorspace_flag(enum mp_csp csp)
      return 0;
  }
+
 -// VA message callbacks are global and do not have a context parameter, so it's
 -// impossible to know from which VADisplay they originate. Try to route them
 -// to existing mpv/libmpv instances within this process.
@@ -48,13 +46,13 @@ index 6bedbbaa18..3b1cb9cc41 100644
      va_message_callback(msg, MSGL_V);
  }
 +#endif
+
  static void open_lavu_vaapi_device(struct mp_vaapi_ctx *ctx)
  {
 @@ -108,6 +127,10 @@ struct mp_vaapi_ctx *va_initialize(VADisplay *display, struct mp_log *plog,
          },
      };
+
 +#if VA_CHECK_VERSION(1, 0, 0)
 +    vaSetErrorCallback(display, va_error_callback, res);
 +    vaSetInfoCallback(display,  va_info_callback,  res);
@@ -68,12 +66,12 @@ index 6bedbbaa18..3b1cb9cc41 100644
      vaSetInfoCallback(va_info_callback);
 +#endif
  #endif
+
      int major, minor;
 @@ -154,6 +178,7 @@ void va_destroy(struct mp_vaapi_ctx *ctx)
          if (ctx->destroy_native_ctx)
              ctx->destroy_native_ctx(ctx->native_ctx);
+
 +#if !VA_CHECK_VERSION(1, 0, 0)
          pthread_mutex_lock(&va_log_mutex);
          for (int n = 0; n < num_va_mpv_clients; n++) {
@@ -83,6 +81,6 @@ index 6bedbbaa18..3b1cb9cc41 100644
              TA_FREEP(&va_mpv_clients); // avoid triggering leak detectors
          pthread_mutex_unlock(&va_log_mutex);
 +#endif
+
          talloc_free(ctx);
      }
similarity index 99%
rename from media-video/mpv/mpv-0.27.0.ebuild
rename to media-video/mpv/mpv-0.27.0-r1.ebuild
index 0edb3df22f3aa3069a96c8fa26159d9526c25bc9..fd90c09f204f7f6bb2de0827520bba0e93f59625 100644 (file)
@@ -97,7 +97,7 @@ COMMON_DEPEND="
        vaapi? (
                !libav? ( >=media-video/ffmpeg-3.3:0 )
                libav? ( >=media-video/libav-13:0 )
-               x11-libs/libva[drm?,X?,wayland?]
+               x11-libs/libva:=[drm?,X?,wayland?]
        )
        vdpau? (
                !libav? ( >=media-video/ffmpeg-3.3:0 )
@@ -141,7 +141,6 @@ RDEPEND="${COMMON_DEPEND}
 PATCHES=(
        "${FILESDIR}/${PN}-0.19.0-make-ffmpeg-version-check-non-fatal.patch"
        "${FILESDIR}/${PN}-0.23.0-make-libavdevice-check-accept-libav.patch"
-       "${FILESDIR}/${PN}-libva2.patch" #641384
 )
 
 pkg_setup() {
@@ -152,7 +151,7 @@ src_prepare() {
        cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
        chmod +x "${S}"/waf || die
        eapply "${FILESDIR}/${PV}"
-       default
+       default_src_prepare
 }
 
 src_configure() {