diff --git a/libva-1.7.3-glvnd-fix.patch b/libva-1.7.3-glvnd-fix.patch new file mode 100644 index 0000000..148dca7 --- /dev/null +++ b/libva-1.7.3-glvnd-fix.patch @@ -0,0 +1,29 @@ +diff -up libva-1.7.3/va/wayland/va_wayland_drm.c~ libva-1.7.3/va/wayland/va_wayland_drm.c +--- libva-1.7.3/va/wayland/va_wayland_drm.c~ 2016-11-10 02:06:57.000000000 +0100 ++++ libva-1.7.3/va/wayland/va_wayland_drm.c 2017-02-15 10:45:17.079528725 +0100 +@@ -38,7 +38,10 @@ + #include "wayland-drm-client-protocol.h" + + /* XXX: Wayland/DRM support currently lives in Mesa libEGL.so.* library */ +-#define LIBWAYLAND_DRM_NAME "libEGL.so.1" ++/* First try the soname of a glvnd enabled mesa build */ ++#define LIBWAYLAND_DRM_NAME "libEGL_mesa.so.0" ++/* Then fallback to plain libEGL.so.1 (which might not be mesa) */ ++#define LIBWAYLAND_DRM_NAME_FALLBACK "libEGL.so.1" + + typedef struct va_wayland_drm_context { + struct va_wayland_context base; +@@ -207,8 +210,11 @@ va_wayland_drm_create(VADisplayContextP + vtable->has_prime_sharing = 0; + + wl_drm_ctx->handle = dlopen(LIBWAYLAND_DRM_NAME, RTLD_LAZY|RTLD_LOCAL); +- if (!wl_drm_ctx->handle) +- return false; ++ if (!wl_drm_ctx->handle) { ++ wl_drm_ctx->handle = dlopen(LIBWAYLAND_DRM_NAME_FALLBACK, RTLD_LAZY|RTLD_LOCAL); ++ if (!wl_drm_ctx->handle) ++ return false; ++ } + + wl_drm_ctx->drm_interface = + dlsym(wl_drm_ctx->handle, "wl_drm_interface"); diff --git a/libva.spec b/libva.spec index c046975..29571be 100644 --- a/libva.spec +++ b/libva.spec @@ -1,11 +1,12 @@ Name: libva Version: 1.7.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Video Acceleration (VA) API for Linux Group: System Environment/Libraries License: MIT URL: http://freedesktop.org/wiki/Software/vaapi Source0: http://www.freedesktop.org/software/vaapi/releases/libva/libva-%{version}.tar.bz2 +Patch0: libva-1.7.3-glvnd-fix.patch BuildRequires: libudev-devel BuildRequires: libXext-devel @@ -49,7 +50,7 @@ of %{name}, including the vainfo tool for determining what (if any) %prep -%setup -q +%autosetup -p1 %build %configure --disable-static \ @@ -71,7 +72,7 @@ find %{buildroot} -regex ".*\.la$" | xargs rm -f -- %postun -p /sbin/ldconfig %files -%doc COPYING +%license COPYING %{_libdir}/libva*.so.* # Keep these specific: if any new real drivers start showing up # in libva, we need to know about it so they can be patent-audited @@ -94,6 +95,9 @@ find %{buildroot} -regex ".*\.la$" | xargs rm -f -- %{!?_without_wayland:%{_bindir}/putsurface_wayland} %changelog +* Wed Feb 15 2017 Hans de Goede - 1.7.3-3 +- Fix libva not working when using with libglvnd + wayland (rhbz#1422151) + * Fri Feb 10 2017 Fedora Release Engineering - 1.7.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild