Fix xdriinfo not working with libglvnd (rhbz#1429894)
This commit is contained in:
		
							parent
							
								
									5a301a2b15
								
							
						
					
					
						commit
						e33eddd12a
					
				| @ -7,7 +7,7 @@ | ||||
| Summary: Mesa demos | ||||
| Name: mesa-demos | ||||
| Version: 8.3.0 | ||||
| Release: 5%{?dist} | ||||
| Release: 6%{?dist} | ||||
| License: MIT | ||||
| Group: System Environment/Libraries | ||||
| URL: http://www.mesa3d.org | ||||
| @ -18,6 +18,8 @@ Source2: mesad-git-snapshot.sh | ||||
| # Patch pointblast/spriteblast out of the Makefile for legal reasons | ||||
| Patch0: mesa-demos-8.0.1-legal.patch | ||||
| Patch1: mesa-demos-as-needed.patch | ||||
| # Fix xdriinfo not working with libglvnd | ||||
| Patch2: xdriinfo-1.0.4-glvnd.patch | ||||
| BuildRequires: pkgconfig autoconf automake libtool | ||||
| BuildRequires: freeglut-devel | ||||
| BuildRequires: mesa-libGL-devel | ||||
| @ -50,6 +52,9 @@ The egl-utils package provides the eglinfo and es2_info utilities. | ||||
| %setup -q -n %{name}-%{version} -b1 | ||||
| %patch0 -p1 -b .legal | ||||
| %patch1 -p1 -b .asneeded | ||||
| pushd ../%{xdriinfo} | ||||
| %patch2 -p1 | ||||
| popd | ||||
| 
 | ||||
| # These two files are distributable, but non-free (lack of permission to modify). | ||||
| rm -rf src/demos/pointblast.c | ||||
| @ -98,6 +103,9 @@ install -m 0755 src/egl/opengles2/es2_info %{buildroot}%{_bindir} | ||||
| %{_bindir}/es2_info | ||||
| 
 | ||||
| %changelog | ||||
| * Mon Mar 13 2017 Hans de Goede <hdegoede@redhat.com> - 8.3.0-6 | ||||
| - Fix xdriinfo not working with libglvnd (rhbz#1429894) | ||||
| 
 | ||||
| * Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8.3.0-5 | ||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										54
									
								
								xdriinfo-1.0.4-glvnd.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								xdriinfo-1.0.4-glvnd.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,54 @@ | ||||
| diff -up xdriinfo-1.0.4/xdriinfo.c~ xdriinfo-1.0.4/xdriinfo.c
 | ||||
| --- xdriinfo-1.0.4/xdriinfo.c~	2009-10-16 23:39:10.000000000 +0200
 | ||||
| +++ xdriinfo-1.0.4/xdriinfo.c	2017-03-13 12:01:53.419636100 +0100
 | ||||
| @@ -101,23 +101,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; | ||||
|      } | ||||
| @@ -135,6 +121,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); | ||||
| @@ -154,7 +143,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); | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user