From 7213e2db1d7de013f33a8ffb0c4a0926f47eb253 Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Fri, 11 Jul 2003 06:30:43 +0000 Subject: If GNU_CONFIGURE is defined, replace all instances of config.guess and config.sub found under ${WRKDIR} with the master versions from ${PORTSDIR}/Template. This allows old ports (which contain old versions of these scripts) to build on newer architectures like ia64 and amd64. Submitted by: naddy (initial patch, reworked by me) --- Mk/bsd.port.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Mk') diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index c1fd582de3c1..230d96c1037d 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -2825,6 +2825,16 @@ do-configure: cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ ${SCRIPTDIR}/configure; \ fi +.if defined(GNU_CONFIGURE) + @CONFIG_GUESS_DIRS=$$(${FIND} ${WRKDIR} -name config.guess -o -name config.sub \ + | ${XARGS} -n 1 /usr/bin/dirname); \ + for _D in $${CONFIG_GUESS_DIRS}; do \ + ${CP} -f ${TEMPLATES}/config.guess $${_D}/config.guess; \ + ${CHMOD} a+rx $${_D}/config.guess; \ + ${CP} -f ${TEMPLATES}/config.sub $${_D}/config.sub; \ + ${CHMOD} a+rx $${_D}/config.sub; \ + done +.endif .if defined(HAS_CONFIGURE) @(cd ${CONFIGURE_WRKSRC} && \ if ! ${SETENV} CC="${CC}" CXX="${CXX}" \ -- cgit v1.2.3