Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 May 2009 01:59:34 +0200 (CEST)
From:      Gerald Pfeifer <gerald@FreeBSD.org·>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/135089: Honor LOCALBASE for CFLAGS
Message-ID:  <200905302359.n4UNxYeo069748@sputnik1.dbai.tuwien.ac.at>
Resent-Message-ID: <200905310040.n4V0e1m2056571@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905302359.n4UNxYeo069748>