ports/135089: Honor LOCALBASE for CFLAGS

Gerald Pfeifer gerald at FreeBSD.org·
Sun May 31 00:40:02 UTC 2009


>Number:         135089
>Category:       ports
>Synopsis:       Honor LOCALBASE for CFLAGS
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 31 00:40:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Gerald Pfeifer
>Release:        FreeBSD 7.1-RELEASE i386
>Organization:
>Environment:
>Description:
	The ports machinery breaks down in a number of cases (like the
	lang/gcc ports) when LOCALBASE is set to a non-default location.
>How-To-Repeat:
	Build lang/gcc43 with a non-standard LOCALBASE.
>Fix:
	The equivalent of the patch below has been reported to fix this.
	Since we append to CFLAGS we can also remove the kludge to strip
	trailing whitespace from CFLAGS (as long as we do not optimize
	and add to CFLAGS only if LOCALBASE is non-standard).

Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.619
diff -u -3 -p -r1.619 bsd.port.mk
--- bsd.port.mk	22 May 2009 21:57:33 -0000	1.619
+++ bsd.port.mk	30 May 2009 23:52:18 -0000
@@ -1618,9 +1618,7 @@ PLIST_REINPLACE_DIRRMTRY=s!^@dirrmtry \(
 PLIST_REINPLACE_RMTRY=s!^@rmtry \(.*\)!@unexec rm -f %D/\1 2>/dev/null || true!
 PLIST_REINPLACE_STOPDAEMON=s!^@stopdaemon \(.*\)!@unexec %D/etc/rc.d/\1${RC_SUBR_SUFFIX} forcestop 2>/dev/null || true!
 
-# kludge to strip trailing whitespace from CFLAGS;
-# sub-configure will not # survive double space
-CFLAGS:=	${CFLAGS:C/ $//}
+CFLAGS+=	-I${LOCALBASE}/include -L${LOCALBASE}/lib
 
 .if defined(WITHOUT_CPU_CFLAGS)
 .if defined(_CPUCFLAGS)
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list