From olli@lurza.secnetix.de  Thu Mar  6 15:04:09 2008
Return-Path: <olli@lurza.secnetix.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 77DFA106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  6 Mar 2008 15:04:09 +0000 (UTC)
	(envelope-from olli@lurza.secnetix.de)
Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2])
	by mx1.freebsd.org (Postfix) with ESMTP id E5D868FC15
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  6 Mar 2008 15:04:08 +0000 (UTC)
	(envelope-from olli@lurza.secnetix.de)
Received: from lurza.secnetix.de (localhost [127.0.0.1])
	by lurza.secnetix.de (8.14.1/8.14.1) with ESMTP id m26F46kL092560;
	Thu, 6 Mar 2008 16:04:07 +0100 (CET)
	(envelope-from oliver.fromme@secnetix.de)
Received: (from olli@localhost)
	by lurza.secnetix.de (8.14.1/8.14.1/Submit) id m26F46DJ092559;
	Thu, 6 Mar 2008 16:04:06 +0100 (CET)
	(envelope-from olli)
Message-Id: <200803061504.m26F46DJ092559@lurza.secnetix.de>
Date: Thu, 6 Mar 2008 16:04:06 +0100 (CET)
From: Oliver Fromme <olli@secnetix.de>
Reply-To: Oliver Fromme <olli@secnetix.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Oliver Fromme <olli@secnetix.de>
Subject: [patch] x11/xlockmore: fix Mesa/GL modes
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         121428
>Category:       ports
>Synopsis:       [patch] x11/xlockmore: fix Mesa/GL modes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 06 15:10:06 UTC 2008
>Closed-Date:    Thu Mar 13 11:33:53 UTC 2008
>Last-Modified:  Thu Mar 13 11:40:01 UTC 2008
>Originator:     Oliver Fromme
>Release:        FreeBSD 7.0-STABLE-20080305 i386
>Organization:
secnetix GmbH & Co. KG
		http://www.secnetix.de/bsd
>Environment:

FreeBSD 7.0-STABLE-20080305 i386,
ports collection up to date.

>Description:

The options switch "Enable Mesa 3D (for GL modes)" is broken.
In fact it's broken in a very interesting way.  :-)

It turns out that these lines are the culprit:

    OPTIONS=MESAGL   "Enable Mesa 3D (for GL modes)"   off

    .if ${ARCH} == amd64
    WITH_MESAGL=    no
    .else
    WITH_MESAGL?=   yes
    .endif
    .if ${WITH_MESAGL} == yes
    CONFIGURE_ARGS+=        --with-mesa

First case:  options MESAGL is *disabled*.  Then the options
framework sets the variable WITHOUT_MESAGL=true.  The above
code (running on non-amd64) then sets WITH_MESAGL=yes anyway
enabling Mesa support even though the user didn't want it.

Second case:  options MESAGL is *enabled*.  As a result, the
variable WITH_MESAGL is set to "true" (not "yes"!).  The
above code only checks for the value "yes", therefore *not*
enabling Mesa support.



>How-To-Repeat:

On a FreeBSD/i386 machine:

cd /usr/ports/x11/xlockmore
make config
make

Notice that Mesa/GL modes are *not* included if you enabled
them in the config menu.  Notice that they *are* included
if you disabled them.


>Fix:

--- x11/xlockmore/Makefile.orig	2007-10-17 12:41:25.000000000 +0200
+++ x11/xlockmore/Makefile	2008-03-06 16:01:51.000000000 +0100
@@ -50,11 +50,10 @@
 .include <bsd.port.pre.mk>
 
 .if ${ARCH} == amd64
-WITH_MESAGL=	no
-.else
-WITH_MESAGL?=	yes
+.undef WITH_MESAGL
 .endif
-.if ${WITH_MESAGL} == yes
+
+.if defined(WITH_MESAGL)
 CONFIGURE_ARGS+=	--with-mesa
 MESALIB=${PTHREAD_LIBS}
 USE_GL=	yes
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Thu Mar 13 11:33:52 UTC 2008 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121428 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/121428: commit references a PR
Date: Thu, 13 Mar 2008 11:33:54 +0000 (UTC)

 miwi        2008-03-13 11:33:44 UTC
 
   FreeBSD ports repository
 
   Modified files:
     x11/xlockmore        Makefile 
   Log:
   - Fix Mesa/GL modes
   
   PR:             121428
   Submitted by:   Oliver Fromme <olli@secnetix.de>
   
   Revision  Changes    Path
   1.109     +4 -4      ports/x11/xlockmore/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
