Date: Mon, 14 May 2007 20:58:43 GMT From: Dominic Fandrey<lon_kamikaze@gmx.de> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/112668: [ports][Xorg7.2][graphics/mesa-demos] Broken for non-nvidia drivers. Message-ID: <200705142058.l4EKwhe4098075@www.freebsd.org> Resent-Message-ID: <200705142110.l4ELA42K002769@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705142058.l4EKwhe4098075>