ports/101120: [patch bsd.port.mk] Tell CC and CXX to ports without configure
Dominic Fandrey
lon_kamikaze at gmx.de
Mon Jul 31 19:00:36 UTC 2006
>Number: 101120
>Category: ports
>Synopsis: [patch bsd.port.mk] Tell CC and CXX to ports without configure
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jul 31 19:00:33 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Dominic Fandrey
>Release: Releng_6
>Organization:
private
>Environment:
FreeBSD mobileKamikaze.norad 6.1-STABLE FreeBSD 6.1-STABLE #0: Wed Jul 19 14:54:04 CEST 2006 root at mobileKamikaze.norad:/mnt/vault/obj/mnt/vault/src/sys/TPR40-6 i386
>Description:
If CC is defined in make.conf inside a block such as this:
.if ${.CURDIR:M/usr/ports/*}
CC= distcc cc
CXX= distcc c++
.endif
And WRKDIRPREFIX is set i.e. like this:
WRKDIRPREFIX=/usr/obj
Maybe because /usr/ports is a read only NFS mount (like on my system),
Ports that do not have a configure target will not receive CC and CXX,
because it's not part of MAKE_ENV and make will fall back to the default (CC=cc),
because the if case in make.conf is not matched.
Examples for ports that are affected by this are devel/qmake and graphics/png .
To fix this I created this patch that adds CC and CXX to the MAKE_ENV
if neither HAS_CONFIGURE nor PERL_CONFIGURE are defined.
>How-To-Repeat:
To repeat the problem set WRKDIRPREFIX somewhere outside of PORTSDIR
and enclose the settings for ports in make.conf in a block
as described in the full description.
>Fix:
--- Mk/bsd.port.mk.orig Sun Jul 23 09:39:49 2006
+++ Mk/bsd.port.mk Mon Jul 31 20:41:12 2006
@@ -1967,6 +1967,11 @@
RUN_DEPENDS+= gs:${PORTSDIR}/${GHOSTSCRIPT_PORT}
.endif
+# Ensure that ports without a configure step know about CC and CXX.
+.if !defined(HAS_CONFIGURE) && !defined(PERL_CONFIGURE)
+MAKE_ENV+= CC="${CC}" CXX="${CXX}"
+.endif
+
# Macro for doing in-place file editing using regexps
REINPLACE_ARGS?= -i.bak
REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list