From amdmi3@mail.ru  Wed Nov  1 11:22:23 2006
Return-Path: <amdmi3@mail.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C1B9F16A403
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Nov 2006 11:22:23 +0000 (UTC)
	(envelope-from amdmi3@mail.ru)
Received: from mx7.mail.ru (mx7.mail.ru [194.67.23.27])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A134E43D49
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Nov 2006 11:22:13 +0000 (GMT)
	(envelope-from amdmi3@mail.ru)
Received: from [213.148.29.33] (port=11527 helo=nexii.panopticon)
	by mx7.mail.ru with esmtp 
	id 1GfEAe-000KxS-00
	for FreeBSD-gnats-submit@freebsd.org; Wed, 01 Nov 2006 14:22:12 +0300
Received: from hades.panopticon (hades.panopticon [192.168.0.2])
	by nexii.panopticon (Postfix) with ESMTP id 3455817078
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Nov 2006 14:21:14 +0300 (MSK)
Received: by hades.panopticon (Postfix, from userid 1000)
	id 898AB420F; Wed,  1 Nov 2006 14:22:54 +0300 (MSK)
Message-Id: <20061101112254.898AB420F@hades.panopticon>
Date: Wed,  1 Nov 2006 14:22:54 +0300 (MSK)
From: Dmitry Marakasov <amdmi3@mail.ru>
Reply-To: Dmitry Marakasov <amdmi3@mail.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] games/sauerbraten: check non-default options
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         105004
>Category:       ports
>Synopsis:       [PATCH] games/sauerbraten: check non-default options
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    acm
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 01 11:30:20 GMT 2006
>Closed-Date:    Mon Nov 06 18:20:36 GMT 2006
>Last-Modified:  Tue Nov  7 20:10:17 GMT 2006
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 6.1-RELEASE-p10 i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #2: Tue Oct 24 15:22:20 MSD 2006 amdmi3@hades.panopticon:/usr/obj/usr/src/sys/HADES i386


>Description:
It's a good practice to check non-default options in makefiles. I.e. check for WITH_OPT if OPT is off by default, and for WITHOUT_OPT if OPT is on by default. This will allow correct behavior when overriding options from make.conf. See games/cube and other ports.
>How-To-Repeat:
>Fix:

--- patch-sauerbraten begins here ---
diff -ruN sauerbraten.orig/Makefile sauerbraten/Makefile
--- sauerbraten.orig/Makefile	Tue Oct 31 21:01:24 2006
+++ sauerbraten/Makefile	Tue Oct 31 21:12:43 2006
@@ -34,7 +34,7 @@
 
 .include <bsd.port.pre.mk>
 
-.if !defined(WITH_CLIENT) && !defined(WITH_DEDICATED)
+.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED)
 IGNORE=		needs at least one executable (CLIENT or DEDICATED)
 .endif
 
@@ -42,7 +42,7 @@
 BROKEN=		does not compile
 .endif
 
-.if defined(WITH_CLIENT)
+.if !defined(WITHOUT_CLIENT)
 USE_GL=		yes
 USE_SDL=	image mixer sdl
 ALL_TARGET+=	client
@@ -52,7 +52,7 @@
 PLIST_SUB+=	CLIENT=""
 .endif
 
-.if defined(WITH_DEDICATED)
+.if !defined(WITHOUT_DEDICATED)
 ALL_TARGET+=	server
 PLIST_SUB+=	DEDICATED=""
 SAUER_BIN+=	server
--- patch-sauerbraten ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->acm 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Nov 1 11:30:49 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=105004 
State-Changed-From-To: open->closed 
State-Changed-By: acm 
State-Changed-When: Mon Nov 6 18:20:14 UTC 2006 
State-Changed-Why:  
Committed thanks :) 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/105004: commit references a PR
Date: Mon,  6 Nov 2006 18:21:55 +0000 (UTC)

 acm         2006-11-06 18:19:46 UTC
 
   FreeBSD ports repository
 
   Modified files:
     games/sauerbraten    Makefile 
   Log:
   - Use the correct way to check the default options on Makefile
   
   PR:             ports/105004
   Submitted by:   Dmitry Marakasov <amdmi3__at__mail.ru>
   
   Revision  Changes    Path
   1.9       +3 -3      ports/games/sauerbraten/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"
 

From: Ulrich Spoerlein <uspoerlein@gmail.com>
To: bug-followup@FreeBSD.org, amdmi3@mail.ru
Cc:  
Subject: Re: ports/105004: [PATCH] games/sauerbraten: check non-default options
Date: Tue, 7 Nov 2006 20:58:41 +0100

 Hi, Dmitry,
 
 a lot of ports have bogus OPTIONS checks, but this should only be a
 problem if BATCH or PACKAGE_BUILDING is defined.
 
 Could you please review the change at 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=105147
 to see if it would fix the problem with sauerbraten? IMHO, this is a
 more complete fix.
 
 In total, I count 252 affected ports, maintained by 148 maintainers. I
 can publish the list upon request, but PR 105147 is the real fix, IMHO.
 
 Ulrich Spoerlein
>Unformatted:
