misc/112668: [ports][Xorg7.2][graphics/mesa-demos] Broken for
non-nvidia drivers.
Dominic Fandrey
lon_kamikaze at gmx.de
Mon May 14 21:10:04 UTC 2007
>Number: 112668
>Category: misc
>Synopsis: [ports][Xorg7.2][graphics/mesa-demos] Broken for non-nvidia drivers.
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon May 14 21:10:03 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Dominic Fandrey
>Release: Releng_6
>Organization:
private
>Environment:
FreeBSD mobileKamikaze.norad 6.2-STABLE FreeBSD 6.2-STABLE #1: Fri Apr 27 13:45:49 CEST 2007 root at homeKamikaze.norad:/usr/obj/TPR40-6/i386/usr/src/sys/TPR40-6 i386
>Description:
There's a patch in files that introduces an #ifdef for WITH_NVIDIA_GL. Unfortunately the ports Makefile sets WITH_NVIDIA_GL=0 if it is not defined and thus triggers the #ifdef as well.
also the #ifdef is followed by an #elif without parameters, so it's still broken after fixing the makefile. The #elif has to be replaced with #else.
>How-To-Repeat:
Just try to build without NVIDIA and you will see that it attempts to build for NVIDIA anyway (it will miss a function ending with NV, which should end with MESA).
>Fix:
diff -Pur graphics/mesa-demos.orig/Makefile graphics/mesa-demos/Makefile
--- graphics/mesa-demos.orig/Makefile Mon May 14 08:08:47 2007
+++ graphics/mesa-demos/Makefile Mon May 14 08:10:43 2007
@@ -97,8 +97,6 @@
.if defined(WITH_NVIDIA_GL)
CFLAGS+= -DWITH_NVIDIA_GL=1
-.else
-CFLAGS+= -DWITH_NVIDIA_GL=0
.endif
.include <bsd.port.post.mk>
diff -Pur graphics/mesa-demos.orig/files/patch-progs-xdemos-yuvrect_client.c graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c
--- graphics/mesa-demos.orig/files/patch-progs-xdemos-yuvrect_client.c Mon May 14 08:08:47 2007
+++ graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c Mon May 14 08:09:29 2007
@@ -7,7 +7,7 @@
- glx_memory = glXAllocateMemoryMESA(dpy, screen, ImgWidth * ImgHeight * 2, 0, 0 ,0);
+ #ifdef WITH_NVIDIA_GL
+ glx_memory = glXAllocateMemoryNV(ImgWidth * ImgHeight * 2, 0, 0 ,0);
-+ #elif
++ #else
+ glx_memory = glXAllocateMemoryMESA(dpy, screen, ImgWidth * ImgHeight * 2, 0, 0 ,0);
+ #endif
if (!glx_memory)
@@ -20,7 +20,7 @@
- glXFreeMemoryMESA(dpy, DefaultScreen(dpy), glx_memory);
+ #ifdef WITH_NVIDIA_GL
+ glXFreeMemoryNV(glx_memory);
-+ #elif
++ #else
+ glXFreeMemoryMESA(dpy, DefaultScreen(dpy), glx_memory);
+ #endif
glXDestroyContext(dpy, ctx);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list