[arch-commits] Commit in xorg-xdriinfo/trunk (PKGBUILD fix_with_glvnd.patch)

Andreas Radke andyrtr at archlinux.org
Tue May 30 15:41:50 UTC 2017


    Date: Tuesday, May 30, 2017 @ 15:41:49
  Author: andyrtr
Revision: 296751

upgpkg: xorg-xdriinfo 1.0.5-2

work with libglvnd support; FS#54228

Added:
  xorg-xdriinfo/trunk/fix_with_glvnd.patch
Modified:
  xorg-xdriinfo/trunk/PKGBUILD

----------------------+
 PKGBUILD             |   15 ++++++++--
 fix_with_glvnd.patch |   70 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-05-30 15:28:50 UTC (rev 296750)
+++ PKGBUILD	2017-05-30 15:41:49 UTC (rev 296751)
@@ -3,7 +3,7 @@
 
 pkgname=xorg-xdriinfo
 pkgver=1.0.5
-pkgrel=1
+pkgrel=2
 pkgdesc="Query configuration information of DRI drivers"
 arch=('i686' 'x86_64')
 url="https://xorg.freedesktop.org/"
@@ -11,11 +11,20 @@
 depends=('libx11' 'libgl')
 makedepends=('xorg-util-macros' 'glproto')
 groups=('xorg-apps' 'xorg')
-source=(https://xorg.freedesktop.org/archive/individual/app/xdriinfo-${pkgver}.tar.bz2{,.sig})
+source=(https://xorg.freedesktop.org/archive/individual/app/xdriinfo-${pkgver}.tar.bz2{,.sig}
+        fix_with_glvnd.patch)
 sha256sums=('4cba3766ef89557422062287248adeb933999071bad6f3ef9c0a478a3c680119'
-            'SKIP')
+            'SKIP'
+            '7668f4aac504ac8e68b9ad7ce170867f645dd22981f8f9efc47860810b7f5bf8')
 validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith <alan.coopersmith at oracle.com>
 
+prepare() {
+  cd xdriinfo-${pkgver}
+  # FS#54228
+  # https://cgit.freedesktop.org/xorg/app/xdriinfo/commit/?id=6273d9dacbf165331c21bcda5a8945c8931d87b8
+  patch -Np1 -i ../fix_with_glvnd.patch
+}
+
 build() {
   cd xdriinfo-${pkgver}
   ./configure --prefix=/usr

Added: fix_with_glvnd.patch
===================================================================
--- fix_with_glvnd.patch	                        (rev 0)
+++ fix_with_glvnd.patch	2017-05-30 15:41:49 UTC (rev 296751)
@@ -0,0 +1,70 @@
+From 6273d9dacbf165331c21bcda5a8945c8931d87b8 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Mon, 13 Mar 2017 12:18:53 +0100
+Subject: Fix xdriinfo not working with glvnd
+
+For glx calls to work on libglvnd as glx provider we must first call
+glXGetClientString. This also means that we can no longer take the
+shortcut to not open the Display when a driver name is past to options.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+
+diff --git a/xdriinfo.c b/xdriinfo.c
+index c23cfa1..c7e7482 100644
+--- a/xdriinfo.c
++++ b/xdriinfo.c
+@@ -112,23 +112,9 @@ int main (int argc, char *argv[]) {
+ 	    return 1;
+ 	}
+     }
+-  /* if the argument to the options command is a driver name, we can handle
+-   * it without opening an X connection */
+-    if (func == OPTIONS && screenNum == -1) {
+-	const char *options = (*GetDriverConfig) (funcArg);
+-	if (!options) {
+-	    fprintf (stderr,
+-		     "Driver \"%s\" is not installed or does not support configuration.\n",
+-		     funcArg);
+-	    return 1;
+-	}
+-	printf ("%s", options);
+-	if (isatty (STDOUT_FILENO))
+-	    printf ("\n");
+-	return 0;
+-    } 
++
+   /* driver command needs a valid screen number */
+-    else if (func == DRIVER && screenNum == -1) {
++    if (func == DRIVER && screenNum == -1) {
+ 	fprintf (stderr, "Invalid screen number \"%s\".\n", funcArg);
+ 	return 1;
+     }
+@@ -146,6 +132,9 @@ int main (int argc, char *argv[]) {
+ 	return 1;
+     }
+ 
++   /* Call glXGetClientString to load vendor libs on glvnd enabled systems */
++    glXGetClientString (dpy, GLX_EXTENSIONS);
++
+     switch (func) {
+       case NSCREENS:
+ 	printf ("%d", nScreens);
+@@ -165,7 +154,13 @@ int main (int argc, char *argv[]) {
+ 	  break;
+       }
+       case OPTIONS: {
+-	  const char *name = (*GetScreenDriver) (dpy, screenNum), *options;
++	  const char *name, *options;
++	  
++	  if (screenNum == -1) {
++	      name = funcArg;
++	  } else {
++	      name = (*GetScreenDriver) (dpy, screenNum);
++	  }
+ 	  if (!name) {
+ 	      fprintf (stderr, "Screen \"%d\" is not direct rendering capable.\n",
+ 		       screenNum);
+-- 
+cgit v0.10.2
+
+



More information about the arch-commits mailing list