Mail archive
alpine-aports

[alpine-aports] [PATCH 02/15] community/mpv: upgrade to 0.29.1

From: Drew DeVault <sir_at_cmpwn.com>
Date: Mon, 29 Oct 2018 20:11:24 -0400

Also enables the Wayland backend
---
 community/mpv/APKBUILD         | 22 +++++----
 community/mpv/fix-libva2.patch | 88 ----------------------------------
 2 files changed, 13 insertions(+), 97 deletions(-)
 delete mode 100644 community/mpv/fix-libva2.patch
diff --git a/community/mpv/APKBUILD b/community/mpv/APKBUILD
index b7f78291b4..e381750205 100644
--- a/community/mpv/APKBUILD
+++ b/community/mpv/APKBUILD
_at_@ -4,8 +4,8 @@
 # Contributor: Jakub Skrzypnik <j.skrzypnik_at_openmailbox.org>
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
 pkgname=mpv
-pkgver=0.27.2
-pkgrel=2
+pkgver=0.29.1
+pkgrel=0
 pkgdesc="Video player based on MPlayer/mplayer2"
 url="https://mpv.io/"
 arch="all"
_at_@ -14,15 +14,14 @@ makedepends="libxxf86dga-dev libxv-dev libmad-dev lame-dev libao-dev
 	libtheora-dev xvidcore-dev zlib-dev sdl-dev freetype-dev
 	x264-dev faac-dev ttf-dejavu libxvmc-dev alsa-lib-dev libva-dev
 	mesa-dev ffmpeg-dev libass-dev perl lua5.2-dev libvdpau-dev python2
-	libxext-dev libxinerama-dev libxscrnsaver-dev py-docutils libxrandr-dev"
+	libxext-dev libxinerama-dev libxscrnsaver-dev py-docutils libxrandr-dev
+	wayland-dev cmocka-dev"
 subpackages="
 	$pkgname-doc
 	$pkgname-libs
 	$pkgname-zsh-completion:zshcomp:noarch"
 options="net" # downloads a waf tarball
-source="$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/$pkgname/archive/v$pkgver.tar.gz
-	fix-libva2.patch
-	"
+source="$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/$pkgname/archive/v$pkgver.tar.gz"
 builddir="$srcdir/$pkgname-$pkgver"
 
 # secfixes:
_at_@ -45,10 +44,16 @@ build() {
 		--enable-alsa \
 		--enable-libass \
 		--enable-libmpv-shared \
-		--enable-zsh-comp
+		--enable-zsh-comp \
+		--enable-test
 	./waf build
 }
 
+check() {
+	cd "$builddir"
+	find build/test/ -perm -111 -exec '{}' ';'
+}
+
 package() {
 	cd "$builddir"
 
_at_@ -73,5 +78,4 @@ zshcomp() {
 		"$subpkgdir/usr/share/zsh/site-functions"
 }
 
-sha512sums="bf74a150b3732b8c233362e0902c54f85fbea9ca1765a2a8f946a6eecd9b37a72ede36a36d0dd98a770539c4f81fe24c8ce26be9db7cd6eddd8514a8f82d9cda  mpv-0.27.2.tar.gz
-43e89cf7e939cc30c4a70172f06d652005a251350dfc9335d51dde981f177b656bf3cf8f3eaa1a2b19fc563e9a09f6e32843eff2105fab7e3d9e10f3b2245f84  fix-libva2.patch"
+sha512sums="ec57c9ceaaf2915ee237dd5a1c5ea5d22725d8611e28a9b998e5bb0d8ab5bdf3631d0267fc7b54da31cb1eaa145ef35841e68846bd41c3b9e1024902e92fd086  mpv-0.29.1.tar.gz"
diff --git a/community/mpv/fix-libva2.patch b/community/mpv/fix-libva2.patch
deleted file mode 100644
index 843e844945..0000000000
--- a/community/mpv/fix-libva2.patch
+++ /dev/null
_at_@ -1,88 +0,0 @@
-From 2ecf240b1cd20875991a5b18efafbe799864ff7f Mon Sep 17 00:00:00 2001
-From: Mark Thompson <sw_at_jkqxz.net>
-Date: Mon, 9 Oct 2017 20:10:26 +0100
-Subject: [PATCH] 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
---- a/video/vaapi.c
-+++ b/video/vaapi.c
-_at_@ -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.
-+#if VA_CHECK_VERSION(1, 0, 0)
-+static void va_message_callback(void *context, const char *msg, int mp_level)
-+{
-+    struct mp_vaapi_ctx *res = context;
-+    mp_msg(res->log, mp_level, "libva: %s", msg);
-+}
-+
-+static void va_error_callback(void *context, const char *msg)
-+{
-+    va_message_callback(context, msg, MSGL_ERR);
-+}
-+
-+static void va_info_callback(void *context, const char *msg)
-+{
-+    va_message_callback(context, msg, MSGL_V);
-+}
-+#else
-+// Pre-libva2 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.
- static pthread_mutex_t va_log_mutex = PTHREAD_MUTEX_INITIALIZER;
- static struct mp_vaapi_ctx **va_mpv_clients;
- static int num_va_mpv_clients;
-_at_@ -77,6 +95,7 @@ static void va_info_callback(const char *msg)
- {
-     va_message_callback(msg, MSGL_V);
- }
-+#endif
- 
- static void open_lavu_vaapi_device(struct mp_vaapi_ctx *ctx)
- {
-_at_@ -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);
-+#else
-     pthread_mutex_lock(&va_log_mutex);
-     MP_TARRAY_APPEND(NULL, va_mpv_clients, num_va_mpv_clients, res);
-     pthread_mutex_unlock(&va_log_mutex);
-_at_@ -117,6 +140,7 @@ struct mp_vaapi_ctx *va_initialize(VADisplay *display, struct mp_log *plog,
- #ifdef VA_FOURCC_I010
-     vaSetErrorCallback(va_error_callback);
-     vaSetInfoCallback(va_info_callback);
-+#endif
- #endif
- 
-     int major, minor;
-_at_@ -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++) {
-             if (va_mpv_clients[n] == ctx) {
-_at_@ -164,6 +189,7 @@ void va_destroy(struct mp_vaapi_ctx *ctx)
-         if (num_va_mpv_clients == 0)
-             TA_FREEP(&va_mpv_clients); // avoid triggering leak detectors
-         pthread_mutex_unlock(&va_log_mutex);
-+#endif
- 
-         talloc_free(ctx);
-     }
-- 
2.18.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Oct 29 2018 - 20:11:24 UTC