ports/71250: change-request: add CPPFLAGS for USE_GETOPT_LONG
Yen-Ming Lee
leeym at utopia.leeym.com
Wed Sep 1 16:20:26 UTC 2004
>Number: 71250
>Category: ports
>Synopsis: change-request: add CPPFLAGS for USE_GETOPT_LONG
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Sep 01 16:20:25 GMT 2004
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list