From leeym@utopia.leeym.com  Wed Sep  1 16:11:02 2004
Return-Path: <leeym@utopia.leeym.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D1A9B16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Sep 2004 16:11:02 +0000 (GMT)
Received: from utopia.leeym.com (utopia.leeym.com [211.21.137.52])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8CB5243D60
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Sep 2004 16:11:02 +0000 (GMT)
	(envelope-from leeym@utopia.leeym.com)
Received: from localhost (localhost [127.0.0.1])
	by utopia.leeym.com (Postfix) with ESMTP id 3D9223EAD6A
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Sep 2004 00:11:01 +0800 (CST)
Received: from utopia.leeym.com ([127.0.0.1])
 by localhost (utopia.leeym.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 42687-10 for <FreeBSD-gnats-submit@freebsd.org>;
 Thu,  2 Sep 2004 00:10:57 +0800 (CST)
Received: by utopia.leeym.com (Postfix, from userid 1000)
	id 475C33EAD65; Thu,  2 Sep 2004 00:10:57 +0800 (CST)
Message-Id: <20040901161057.475C33EAD65@utopia.leeym.com>
Date: Thu,  2 Sep 2004 00:10:57 +0800 (CST)
From: Yen-Ming Lee <leeym@utopia.leeym.com>
Reply-To: Yen-Ming Lee <leeym@utopia.leeym.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: change-request: add CPPFLAGS for USE_GETOPT_LONG
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         71250
>Category:       ports
>Synopsis:       change-request: add CPPFLAGS for USE_GETOPT_LONG
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 01 16:20:25 GMT 2004
>Closed-Date:    Thu Nov 11 08:35:07 GMT 2004
>Last-Modified:  Thu Nov 11 08:40:27 GMT 2004
>Originator:     Yen-Ming Lee
>Release:        FreeBSD 5.2.1-RELEASE-p9 i386
>Organization:
>Environment:
System: FreeBSD utopia.leeym.com 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #167: Tue Jul 27 05:17:58 CST 2004 root@utopia.leeym.com:/usr/obj/usr/src/sys/UTOPIA i386


	
>Description:

[This is a dirty-but-maybe-useful patch]

Some ports in 5.x still depend on libgnugetopt because of getopt_long_only(3).

However, the interfaces of getopt_long() and getopt_long_only() are identical.
(Only the "long_only" fields of _getopt_internal() are different.)

So, if we add CPPFLAGS=-Dgetopt_long_only=getopt_long, we can get rid of the
dependency on devel/libgnugetopt.

>How-To-Repeat:
	
>Fix:

	

--- bsd.port.mk.diff begins here ---
Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.497
diff -u -r1.497 bsd.port.mk
--- bsd.port.mk	3 Aug 2004 19:03:58 -0000	1.497
+++ bsd.port.mk	1 Sep 2004 15:57:41 -0000
@@ -1361,6 +1361,9 @@
 CPPFLAGS+=		-I${LOCALBASE}/include
 LDFLAGS+=		-L${LOCALBASE}/lib -lgnugetopt
 CONFIGURE_ENV+=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+.else
+CPPFLAGS+=		-Dgetopt_long_only=getopt_long
+CONFIGURE_ENV+=	CPPFLAGS="${CPPFLAGS}"
 .endif
 .endif
 
--- bsd.port.mk.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Sep 1 19:06:01 GMT 2004 
Responsible-Changed-Why:  
bsd.port.mk patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71250 
State-Changed-From-To: open->feedback 
State-Changed-By: krion 
State-Changed-When: Fri Nov 5 13:34:56 GMT 2004 
State-Changed-Why:  
Asked for feedback. 

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

From: Kirill Ponomarew <krion@voodoo.oberon.net>
To: Yen-Ming Lee <leeym@utopia.leeym.com>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/71250: change-request: add CPPFLAGS for USE_GETOPT_LONG
Date: Fri, 5 Nov 2004 14:34:36 +0100

 Hi,
 
 On Thu, Sep 02, 2004 at 12:10:57AM +0800, Yen-Ming Lee wrote:
 > [This is a dirty-but-maybe-useful patch]
 > 
 > Some ports in 5.x still depend on libgnugetopt because of getopt_long_only(3).
 > 
 > However, the interfaces of getopt_long() and getopt_long_only() are identical.
 > (Only the "long_only" fields of _getopt_internal() are different.)
 > 
 > So, if we add CPPFLAGS=-Dgetopt_long_only=getopt_long, we can get rid of the
 > dependency on devel/libgnugetopt.
 
 I see only one port on 5-x which need devel/libgnugetopt installed
 (correct me if I'm wrong), it's mail/libspf, but building it with
 your patch failed:
 
 /usr/bin/ld: cannot find -lgnugetopt
 gmake: *** [shared] Error 1
 
 I don't think it's worth adding this patch only for one port, maybe
 you could fix the build of mail/libspf on 5[6]-x after removing
 libgnugetopt dependency ?
 
 -Kirill

From: Yen-Ming Lee <leeym@FreeBSD.org>
To: Kirill Ponomarew <krion@voodoo.oberon.net>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/71250: change-request: add CPPFLAGS for USE_GETOPT_LONG
Date: Thu, 11 Nov 2004 08:59:33 +0800

 --d6Gm4EdcadzBjdND
 Content-Type: text/plain; charset=big5
 Content-Disposition: inline
 
 On Fri, Nov 05, 2004 at 02:34:36PM +0100, Kirill Ponomarew wrote:
 > I see only one port on 5-x which need devel/libgnugetopt installed
 > (correct me if I'm wrong), it's mail/libspf, but building it with
 > your patch failed:
 > 
 > /usr/bin/ld: cannot find -lgnugetopt
 > gmake: *** [shared] Error 1
 > 
 > I don't think it's worth adding this patch only for one port, maybe
 > you could fix the build of mail/libspf on 5[6]-x after removing
 > libgnugetopt dependency ?
 
 I fixed x11/xstroke, and submitted ports/73724 and ports/73795
 for mail/libspf and net/siproxd.
 
 I'll take care of these PRs and then close this one.
 
 -- 
 Yen-Ming Lee [utf7:+Z05fZWYO] | KeyID:0x5EB52E51 | Taipei, Taiwan
 
 --d6Gm4EdcadzBjdND
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.6 (FreeBSD)
 
 iQCVAwUBQZK5dcnMx0NetS5RAQHc/wQAojuBvxhxogFSk99WCbRTSls0hkHlbvyJ
 TkqZVvRWNc/A43YuStha/ImaLiyAIKWlmsd1CTGFWnELp0nBjanuDlC0TfOo0k6v
 m5An+71ZkbtVlpVnnvM5zcIMmHpSgog/at0yADgz3jaBGNyiKEUo5LOg7TbfScHL
 a0RZ2nsSNKM=
 =wi3L
 -----END PGP SIGNATURE-----
 
 --d6Gm4EdcadzBjdND--
State-Changed-From-To: feedback->closed 
State-Changed-By: krion 
State-Changed-When: Thu Nov 11 08:34:12 GMT 2004 
State-Changed-Why:  
Submitter will take care of these broken ports which 
still depend on getopt_long_only(3) 

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

From: Kirill Ponomarew <krion@voodoo.oberon.net>
To: Yen-Ming Lee <leeym@FreeBSD.org>
Cc: portmgr@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/71250: change-request: add CPPFLAGS for USE_GETOPT_LONG
Date: Thu, 11 Nov 2004 09:33:35 +0100

 --wxDdMuZNg1r63Hyj
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Hi,
 
 On Thu, Nov 11, 2004 at 01:00:50AM +0000, Yen-Ming Lee wrote:
  =20
 >  I fixed x11/xstroke, and submitted ports/73724 and ports/73795
 >  for mail/libspf and net/siproxd.
 > =20
 >  I'll take care of these PRs and then close this one.
 
 Thanks for your efforts.
 
 -Kirill
 
 --wxDdMuZNg1r63Hyj
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.6 (FreeBSD)
 
 iD8DBQFBkyPfQC1G6a60JuURAqbhAJ4kIbW6n7ntb45QzE8WQPDUAYNARQCfSY7k
 XDdfrkQ/jAeedM7SKO+rTn0=
 =U41x
 -----END PGP SIGNATURE-----
 
 --wxDdMuZNg1r63Hyj--
>Unformatted:
