From bryan@shatow.net  Thu Jun  7 15:05:36 2012
Return-Path: <bryan@shatow.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7AA481065672
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  7 Jun 2012 15:05:36 +0000 (UTC)
	(envelope-from bryan@shatow.net)
Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92])
	by mx1.freebsd.org (Postfix) with ESMTP id 257588FC19
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  7 Jun 2012 15:05:36 +0000 (UTC)
Received: (qmail 64778 invoked from network); 7 Jun 2012 10:05:33 -0500
Received: from unknown (HELO test8.xzibition.com) (10.10.0.34)
  by sweb.xzibition.com with SMTP; 7 Jun 2012 10:05:33 -0500
Received: by test8.xzibition.com (sSMTP sendmail emulation); Thu, 07 Jun 2012 10:04:26 -0500
Message-Id: <20120607150536.7AA481065672@hub.freebsd.org>
Date: Thu, 07 Jun 2012 10:04:26 -0500
From: "Bryan Drewery" <bryan@shatow.net>
Reply-To: Bryan Drewery <bryan@shatow.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: bapt@freebsd.org, sunpoet@freebsd.org
Subject: [PATCH] net/mtr: Convert to new options framework
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         168808
>Category:       ports
>Synopsis:       [PATCH] net/mtr: Convert to new options framework
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sunpoet
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 07 15:10:08 UTC 2012
>Closed-Date:    Wed Jul 04 09:56:15 UTC 2012
>Last-Modified:  Wed Jul  4 10:00:34 UTC 2012
>Originator:     Bryan Drewery
>Release:        FreeBSD 8.3-RELEASE i386
>Organization:
>Environment:

	
>Description:
	- Convert to new options framework
	- Fixes build without X11 [ports/168795]
>How-To-Repeat:
	
>Fix:

	

--- patch-net-mtr-optionsng.txt begins here ---
--- Makefile.orig	2012-06-07 10:00:33.000000000 -0500
+++ Makefile	2012-06-07 10:02:20.000000000 -0500
@@ -16,7 +16,7 @@
 MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	Traceroute and ping in a single graphical network diagnostic tool
 
-OPTIONS=	IPV6	"Build IPv6 support" on
+OPTIONS_DEFINE=	IPV6 X11
 
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
@@ -26,20 +26,18 @@
 
 .include <bsd.port.options.mk>
 
-.if !defined(WITHOUT_IPV6)
+.if ${PORT_OPTIONS:MIPV6}
 CONFIGURE_ARGS+=--enable-ipv6
 CATEGORIES+=	ipv6
 .else
 CONFIGURE_ARGS+=--disable-ipv6
 .endif
 
-.if !defined(WITHOUT_X11)
+.if ${PORT_OPTIONS:MX11}
 CONFIGURE_ARGS+=--with-gtk
-OPTIONS+=	X11	"Build X11-enabled mtr" on
 USE_GNOME=	gtk20
 .else
 CONFIGURE_ARGS+=--without-gtk
-OPTIONS+=	X11	"Build X11-enabled mtr" off
 PKGNAMESUFFIX=	-nox11
 .endif
 
--- patch-net-mtr-optionsng.txt ends here ---


>Release-Note:
>Audit-Trail:

From: Bryan Drewery <bryan@shatow.net>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/168808: [PATCH] net/mtr: Convert to new options framework
Date: Thu, 07 Jun 2012 10:19:56 -0500

 This is a multi-part message in MIME format.
 --------------040504000307090504050606
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 Previous patch missed the OPTIONS_DEFAULT= IPV6. Not sure if it is
 intended to have X11 as the default. I left it out of my patch.
 Attached adds IPV6 to default.
 
 --------------040504000307090504050606
 Content-Type: text/plain; charset=windows-1252;
  name="patch-net-mtr-optionsng.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="patch-net-mtr-optionsng.txt"
 
 --- Makefile.orig	2012-06-07 10:00:33.000000000 -0500
 +++ Makefile	2012-06-07 10:16:02.000000000 -0500
 @@ -16,7 +16,8 @@
  MAINTAINER=	sunpoet@FreeBSD.org
  COMMENT=	Traceroute and ping in a single graphical network diagnostic tool
  
 -OPTIONS=	IPV6	"Build IPv6 support" on
 +OPTIONS_DEFINE=	IPV6 X11
 +OPTIONS_DEFAULT=	IPV6
  
  GNU_CONFIGURE=	yes
  USE_GMAKE=	yes
 @@ -26,20 +27,18 @@
  
  .include <bsd.port.options.mk>
  
 -.if !defined(WITHOUT_IPV6)
 +.if ${PORT_OPTIONS:MIPV6}
  CONFIGURE_ARGS+=--enable-ipv6
  CATEGORIES+=	ipv6
  .else
  CONFIGURE_ARGS+=--disable-ipv6
  .endif
  
 -.if !defined(WITHOUT_X11)
 +.if ${PORT_OPTIONS:MX11}
  CONFIGURE_ARGS+=--with-gtk
 -OPTIONS+=	X11	"Build X11-enabled mtr" on
  USE_GNOME=	gtk20
  .else
  CONFIGURE_ARGS+=--without-gtk
 -OPTIONS+=	X11	"Build X11-enabled mtr" off
  PKGNAMESUFFIX=	-nox11
  .endif
  
 
 --------------040504000307090504050606--
Responsible-Changed-From-To: freebsd-ports-bugs->sunpoet 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Jun 7 15:31:55 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: Sayetsky Anton <vsjcfm@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/168808: [PATCH] net/mtr: Convert to new options framework
Date: Fri, 8 Jun 2012 09:37:16 +0300

 Patch tested. It effectively fixes ports/168795

From: Bryan Drewery <bryan@shatow.net>
To: bug-followup@FreeBSD.org, sunpoet@freebsd.org
Cc:  
Subject: Re: ports/168808: [PATCH] net/mtr: Convert to new options framework
Date: Thu, 21 Jun 2012 21:27:03 -0500

 This is a multi-part message in MIME format.
 --------------000907050201010109000101
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 sunpoet pointed out that the previous patches did not properly set X11
 as the default for net/mtr. This patch does. While properly keeping it
 default off for net/mtr-nox11.
 
 I also considered some other checks such as ${.CURDIR],
 ${PKGNAMESUFFIX}. I ended up checking for !defined(WITHOUT_X11) as this
 avoids needing to updating net/mtr-nox11 and matches how it worked before.
 
 Regards,
 Bryan Drewery
 
 --------------000907050201010109000101
 Content-Type: text/plain; charset=windows-1252;
  name="patch-net-mtr-optionsng.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="patch-net-mtr-optionsng.txt"
 
 --- Makefile.orig	2012-06-07 10:00:33.000000000 -0500
 +++ Makefile	2012-06-21 21:18:06.000000000 -0500
 @@ -16,7 +16,11 @@
  MAINTAINER=	sunpoet@FreeBSD.org
  COMMENT=	Traceroute and ping in a single graphical network diagnostic tool
  
 -OPTIONS=	IPV6	"Build IPv6 support" on
 +OPTIONS_DEFINE=	IPV6 X11
 +OPTIONS_DEFAULT=	IPV6
 +.if !defined(WITHOUT_X11)
 +OPTIONS_DEFAULT+=	X11
 +.endif
  
  GNU_CONFIGURE=	yes
  USE_GMAKE=	yes
 @@ -26,20 +30,18 @@
  
  .include <bsd.port.options.mk>
  
 -.if !defined(WITHOUT_IPV6)
 +.if ${PORT_OPTIONS:MIPV6}
  CONFIGURE_ARGS+=--enable-ipv6
  CATEGORIES+=	ipv6
  .else
  CONFIGURE_ARGS+=--disable-ipv6
  .endif
  
 -.if !defined(WITHOUT_X11)
 +.if ${PORT_OPTIONS:MX11}
  CONFIGURE_ARGS+=--with-gtk
 -OPTIONS+=	X11	"Build X11-enabled mtr" on
  USE_GNOME=	gtk20
  .else
  CONFIGURE_ARGS+=--without-gtk
 -OPTIONS+=	X11	"Build X11-enabled mtr" off
  PKGNAMESUFFIX=	-nox11
  .endif
  
 
 --------------000907050201010109000101--
State-Changed-From-To: open->feedback 
State-Changed-By: sunpoet 
State-Changed-When: Sat Jun 23 13:44:21 UTC 2012 
State-Changed-Why:  
Please confirm if the patch [1] for new options framework works for you 
both in net/mtr and net/mtr-nox11. 

[1] http://people.freebsd.org/~sunpoet/mtr.patch 

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

Date: Sat, 23 Jun 2012 10:29:36 -0500
From: Bryan Drewery <bryan@shatow.net>
To: sunpoet@freebsd.org
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/168808: [PATCH] net/mtr: Convert to new options framework

 It mostly works.
 
 1. mtr_UNSET= is overriding the user's own settings due to = instead of
 +=. This is a user-only setting, the OPTIONS_EXCLUDE seems to be enough.
 You can see this by adding mtr_UNSET=IPV6 in /etc/make.conf and building
 mtr-nox11
 2. Missing tabs on the OPTIONS_DEFAULT and OPTIONS_DEFINE lines
 
 Regards,
 Bryan Drewery

From: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To: Bryan Drewery <bryan@shatow.net>
Cc: bug-followup@freebsd.org
Subject: Re: ports/168808: [PATCH] net/mtr: Convert to new options framework
Date: Sun, 24 Jun 2012 01:51:43 +0800

 On Sat, Jun 23, 2012 at 11:29 PM, Bryan Drewery <bryan@shatow.net> wrote:
 > It mostly works.
 >
 > 1. mtr_UNSET= is overriding the user's own settings due to = instead of
 > +=. This is a user-only setting, the OPTIONS_EXCLUDE seems to be enough.
 > You can see this by adding mtr_UNSET=IPV6 in /etc/make.conf and building
 > mtr-nox11
 
 Hi,
 
 I agree that the patch is not a good solution but it works.
 OPTIONS_EXCLUDE is not enough. It only *hides* the option from the
 dialog but does not actually unset the option. You may remove
 mtr_UNSET line and /var/db/ports/mtr/options then try "make
 build-depends-list" or "make run-depends-list". The invisible X11
 still exists.
 
 > 2. Missing tabs on the OPTIONS_DEFAULT and OPTIONS_DEFINE lines
 
 I meant not to add tab after OPTIONS_DEFAULT= as it has same length as
 OPTION_DEFINE=<tab>.
 
 Regards,
 sunpoet
 
 > Regards,
 > Bryan Drewery

From: Bryan Drewery <bryan@shatow.net>
To: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/168808: [PATCH] net/mtr: Convert to new options framework
Date: Sat, 23 Jun 2012 12:56:20 -0500

 On 6/23/2012 12:51 PM, Sunpoet Po-Chuan Hsieh wrote:
 > I agree that the patch is not a good solution but it works.
 > OPTIONS_EXCLUDE is not enough.
 
 Ok well at least make it a += so it does not override the user's own
 setting if they have unset IPV6.
 
 Regards,
 Bryan Drewery
 

From: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To: Bryan Drewery <bryan@shatow.net>
Cc: bug-followup@freebsd.org
Subject: Re: ports/168808: [PATCH] net/mtr: Convert to new options framework
Date: Sun, 24 Jun 2012 02:30:59 +0800

 On Sun, Jun 24, 2012 at 1:56 AM, Bryan Drewery <bryan@shatow.net> wrote:
 > On 6/23/2012 12:51 PM, Sunpoet Po-Chuan Hsieh wrote:
 >> I agree that the patch is not a good solution but it works.
 >> OPTIONS_EXCLUDE is not enough.
 >
 > Ok well at least make it a += so it does not override the user's own
 > setting if they have unset IPV6.
 
 It makes no difference here and we should not use +=. Port Makefile is
 processed before user's option file.
 
 You can test it by yourself with the following steps:
 1. Remove WITHOUT_X11 from /etc/make.conf
 2. Remove net/mtr and net/mtr-nox11 lines from /usr/local/etc/ports.conf
 3. 'make config' and unset both IPV6 and X11 (to generate option file)
 4. In net/mtr-nox11, 'make -V CONFIGURE_ARGS -V CATEGORIES'
 
 The result should be:
 --disable-ipv6 --without-gtk --prefix=/usr/local ${_LATE_CONFIGURE_ARGS}
 net
 
 These two lines indicate the IPV6 options is off (ref:
 net/mtr/Makefile line 31 to 36).
 
 Regards,
 sunpoet
 
 > Regards,
 > Bryan Drewery

From: Bryan Drewery <bryan@shatow.net>
To: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/168808: [PATCH] net/mtr: Convert to new options framework
Date: Sat, 23 Jun 2012 13:39:52 -0500

 On 6/23/2012 1:30 PM, Sunpoet Po-Chuan Hsieh wrote:
 > It makes no difference here and we should not use +=. Port Makefile is
 > processed before user's option file.
 
 Wrong. Using = blows away the user's options.
 
 /usr/ports/net/mtr-nox11# grep mtr /etc/make.conf
 mtr_UNSET= IPV6
 
 /usr/ports/net/mtr-nox11# grep UNSET Makefile
 mtr_UNSET= X11
 
 
 /usr/ports/net/mtr-nox11# rm -rf /var/db/ports/mtr
 
 /usr/ports/net/mtr-nox11# make pretty-print-config
 +IPV6
 
 It is showing IPV6 despite me having it *unset* in /etc/make.conf due to =.
 
 Changing to +=:
 
 /usr/ports/net/mtr-nox11# grep UNSET Makefile
 mtr_UNSET+= X11
 
 /usr/ports/net/mtr-nox11# make pretty-print-config
 -IPV6
 
 Now it correctly recognizes my mtr_UNSET=IPV6.
 
 Regards,
 Bryan Drewery
 
 

From: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To: Bryan Drewery <bryan@shatow.net>
Cc: bug-followup@freebsd.org
Subject: Re: ports/168808: [PATCH] net/mtr: Convert to new options framework
Date: Sun, 24 Jun 2012 02:59:30 +0800

 On Sun, Jun 24, 2012 at 2:39 AM, Bryan Drewery <bryan@shatow.net> wrote:
 > On 6/23/2012 1:30 PM, Sunpoet Po-Chuan Hsieh wrote:
 >> It makes no difference here and we should not use +=3D. Port Makefile is
 >> processed before user's option file.
 >
 > Wrong. Using =3D blows away the user's options.
 >
 > /usr/ports/net/mtr-nox11# grep mtr /etc/make.conf
 > mtr_UNSET=3D IPV6
 >
 > /usr/ports/net/mtr-nox11# grep UNSET Makefile
 > mtr_UNSET=3D X11
 >
 >
 > /usr/ports/net/mtr-nox11# rm -rf /var/db/ports/mtr
 >
 > /usr/ports/net/mtr-nox11# make pretty-print-config
 > +IPV6
 >
 > It is showing IPV6 despite me having it *unset* in /etc/make.conf due to =
 =3D.
 >
 > Changing to +=3D:
 >
 > /usr/ports/net/mtr-nox11# grep UNSET Makefile
 > mtr_UNSET+=3D X11
 >
 > /usr/ports/net/mtr-nox11# make pretty-print-config
 > -IPV6
 >
 > Now it correctly recognizes my mtr_UNSET=3DIPV6.
 >
 > Regards,
 > Bryan Drewery
 
 OK, now I know what the problem is. Personally I use ports.conf (all
 options in one file) instead of option files and I do not set
 xxx_SET/xxx_UNSET in make.conf. Anyway, I have another solution which
 replaces mtr_UNSET=3DX11 by OPTIONS_FILE_UNSET=3DX11. It should respect
 mtr_SET/mtr_UNSET in make.conf correctly.
 
 Regards,
 sunepot
 
 
 --=20
 =C2=A0 Sunpoet Po-Chuan Hsieh <sunpoet at sunpoet.net> <sunpoet at FreeBSD.=
 org>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 4096R/CC57E36B 8AD8 68F2 7D2B 0A10 7E9B =
 8CC0 DC44 247E CC57 E36B
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
 =A0 =C2=A0 =C2=A0 =C2=A0 http://people.FreeBSD.org/~sunpoet/pgpkeys.txt
State-Changed-From-To: feedback->closed 
State-Changed-By: sunpoet 
State-Changed-When: Wed Jul 4 09:56:14 UTC 2012 
State-Changed-Why:  
Problem solved in the ports tree. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/168808: commit references a PR
Date: Wed,  4 Jul 2012 09:55:26 +0000 (UTC)

 sunpoet     2012-07-04 09:55:12 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/mtr              Makefile 
   Log:
   - Convert to new options framework
   - Cosmetic change
   
   PR:             ports/168795 [1], ports/168808 [2]
   Submitted by:   Sayetsky Anton <vsjcfm@gmail.com> [1],
                   Bryan Drewery <bryan@shatow.net> [2]
   
   Revision  Changes    Path
   1.85      +7 -10     ports/net/mtr/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: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/168808: commit references a PR
Date: Wed,  4 Jul 2012 09:55:56 +0000 (UTC)

 sunpoet     2012-07-04 09:55:42 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/mtr-nox11        Makefile 
   Log:
   - Convert to new options framework
   
   PR:             ports/168795 [1], ports/168808 [2]
   Submitted by:   Sayetsky Anton <vsjcfm@gmail.com> [1],
                   Bryan Drewery <bryan@shatow.net> [2]
   
   Revision  Changes    Path
   1.4       +2 -1      ports/net/mtr-nox11/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:
