aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-11-10 04:09:43 -0300
committerNatanael Copa <ncopa@alpinelinux.org>2019-11-11 09:24:58 +0000
commitf17f79df5402e887a739b3413d842e7595168b0f (patch)
treeeb6a6787ba05f8049b448b864c669e411f059092
parenta62828a82f8bdf9d1ec7db0c9f54622d3e256141 (diff)
downloadaports-f17f79df5402e887a739b3413d842e7595168b0f.tar.bz2
aports-f17f79df5402e887a739b3413d842e7595168b0f.tar.xz
main/libva-intel-driver: fix usage with wayland
-rw-r--r--main/libva-intel-driver/APKBUILD9
-rw-r--r--main/libva-intel-driver/wayland.patch66
2 files changed, 72 insertions, 3 deletions
diff --git a/main/libva-intel-driver/APKBUILD b/main/libva-intel-driver/APKBUILD
index 6713d770a1..fd196ea6b0 100644
--- a/main/libva-intel-driver/APKBUILD
+++ b/main/libva-intel-driver/APKBUILD
@@ -2,14 +2,16 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libva-intel-driver
pkgver=2.3.0
-pkgrel=0
+pkgrel=1
pkgdesc="VA-API implementation for Intel GMA chipsets and Intel HD Graphics"
url="https://freedesktop.org/wiki/Software/vaapi"
arch="x86 x86_64"
license="MIT"
makedepends="libdrm-dev libva-dev wayland-dev meson"
install_if="libva xf86-video-intel"
-source="${pkgname}-${pkgver}.tar.gz::https://github.com/intel/intel-vaapi-driver/archive/${pkgver}.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/intel/intel-vaapi-driver/archive/$pkgver.tar.gz
+ wayland.patch
+ "
builddir="$srcdir"/intel-vaapi-driver-$pkgver
@@ -32,4 +34,5 @@ package() {
DESTDIR="$pkgdir" ninja -C builddir install
}
-sha512sums="98cb6e6bdc22eefa0c7f245d3a2f1fc586d5066e9273c9031e76c30d96fc5902859119ddd4ef2ba39cd044aff57edae3a90ab2e5478c47e118132f8b2c28f1dc libva-intel-driver-2.3.0.tar.gz"
+sha512sums="98cb6e6bdc22eefa0c7f245d3a2f1fc586d5066e9273c9031e76c30d96fc5902859119ddd4ef2ba39cd044aff57edae3a90ab2e5478c47e118132f8b2c28f1dc libva-intel-driver-2.3.0.tar.gz
+dd5ac03413f8c2daca4a2c4a11ba5b74eecf5051a487ede7afba4b71feb9001aac8f0b47d65dc0c436e8222b34daa3ed8144dfa550cfd4f18f2b3c34f885cdec wayland.patch"
diff --git a/main/libva-intel-driver/wayland.patch b/main/libva-intel-driver/wayland.patch
new file mode 100644
index 0000000000..9ae565e054
--- /dev/null
+++ b/main/libva-intel-driver/wayland.patch
@@ -0,0 +1,66 @@
+From 0abb7a1c938437000bfca1a9b3706884467c681e Mon Sep 17 00:00:00 2001
+From: Haihao Xiang <haihao.xiang@intel.com>
+Date: Fri, 7 Dec 2018 13:31:43 +0800
+Subject: [PATCH] Check the interface from libva first
+
+This fixes https://github.com/intel/intel-vaapi-driver/issues/419
+
+Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
+---
+ src/i965_output_wayland.c | 27 ++++++++++++++++-----------
+ 1 file changed, 16 insertions(+), 11 deletions(-)
+
+diff --git a/src/i965_output_wayland.c b/src/i965_output_wayland.c
+index 122db953..a637552e 100644
+--- a/src/i965_output_wayland.c
++++ b/src/i965_output_wayland.c
+@@ -397,6 +397,7 @@ i965_output_wayland_init(VADriverContextP ctx)
+ struct i965_driver_data * const i965 = i965_driver_data(ctx);
+ struct dso_handle *dso_handle;
+ struct wl_vtable *wl_vtable;
++ struct VADriverVTableWayland * const vtable = ctx->vtable_wayland;
+
+ static const struct dso_symbol libegl_symbols[] = {
+ {
+@@ -465,25 +466,29 @@ i965_output_wayland_init(VADriverContextP ctx)
+ if (!i965->wl_output)
+ goto error;
+
+- i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME);
+- if (!i965->wl_output->libegl_handle) {
+- i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME_FALLBACK);
+- if (!i965->wl_output->libegl_handle)
++ wl_vtable = &i965->wl_output->vtable;
++
++ if (vtable->wl_interface)
++ wl_vtable->drm_interface = vtable->wl_interface;
++ else {
++ i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME);
++ if (!i965->wl_output->libegl_handle) {
++ i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME_FALLBACK);
++ if (!i965->wl_output->libegl_handle)
++ goto error;
++ }
++
++ dso_handle = i965->wl_output->libegl_handle;
++ if (!dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable),
++ libegl_symbols))
+ goto error;
+ }
+
+- dso_handle = i965->wl_output->libegl_handle;
+- wl_vtable = &i965->wl_output->vtable;
+- if (!dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable),
+- libegl_symbols))
+- goto error;
+-
+ i965->wl_output->libwl_client_handle = dso_open(LIBWAYLAND_CLIENT_NAME);
+ if (!i965->wl_output->libwl_client_handle)
+ goto error;
+
+ dso_handle = i965->wl_output->libwl_client_handle;
+- wl_vtable = &i965->wl_output->vtable;
+ if (!dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable),
+ libwl_client_symbols))
+ goto error;
+