From owner-freebsd-bugs@FreeBSD.ORG Mon May 14 21:10:04 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F1C516A403 for ; Mon, 14 May 2007 21:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 710E813C4B7 for ; Mon, 14 May 2007 21:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l4ELA4Vj002770 for ; Mon, 14 May 2007 21:10:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l4ELA42K002769; Mon, 14 May 2007 21:10:04 GMT (envelope-from gnats) Resent-Date: Mon, 14 May 2007 21:10:04 GMT Resent-Message-Id: <200705142110.l4ELA42K002769@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dominic Fandrey Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF99D16A403 for ; Mon, 14 May 2007 21:03:45 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 7158B13C465 for ; Mon, 14 May 2007 21:03:45 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l4EL3icW098690 for ; Mon, 14 May 2007 21:03:44 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l4EKwhe4098075; Mon, 14 May 2007 20:58:43 GMT (envelope-from nobody) Message-Id: <200705142058.l4EKwhe4098075@www.freebsd.org> Date: Mon, 14 May 2007 20:58:43 GMT From: Dominic Fandrey To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: misc/112668: [ports][Xorg7.2][graphics/mesa-demos] Broken for non-nvidia drivers. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 21:10:04 -0000 >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 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: