summaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorerwin <erwin@FreeBSD.org>2011-10-27 09:46:25 +0000
committererwin <erwin@FreeBSD.org>2011-10-27 09:46:25 +0000
commit014d16d0f3c4a65b13926bf8c9ec84d826fdf14a (patch)
treeec4b2dc177084f78c0837768467e63b6eac25e3a /Mk
parent3f7945b89a049d12255656661f0af7041fdc7f23 (diff)
downloadFreeBSD-ports-014d16d0f3c4a65b13926bf8c9ec84d826fdf14a.zip
FreeBSD-ports-014d16d0f3c4a65b13926bf8c9ec84d826fdf14a.tar.gz
Add a workaround for ports that don't recognize FreeBSD 10.x or newer.
Ports that need this can set WITH_FBSD10_FIX to apply the hack, but only on FreeBSD 10. This is only a temporary workaround as the real fix lies upstream by fixing the included scripts, but this will take a long time. Submitted by: ed, jilles, stas, beat (and more) Tested on: pointyhat i386-9-exp and i386-10
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk20
1 files changed, 19 insertions, 1 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 773d161..7c10929 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -901,6 +901,9 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# target has not been overwritten). This message
# will be passed through /usr/bin/fmt before
# being shown to the user.
+# WITH_FBSD10_FIX - Replace freebsd1*) and similar conditions
+# with freebsd1.*) in configure and libtool
+# scripts to fix build on FreeBSD 10 and above.
#
# For build and install:
#
@@ -3657,6 +3660,21 @@ do-patch:
fi
.endif
+.if !target(run-autotools-fixup)
+run-autotools-fixup:
+# Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x.
+.if defined(WITH_FBSD10_FIX) && ${OSVERSION} >= 1000000
+ /bin/test -d ${WRKSRC} && find ${WRKSRC} -type f \( -name config.libpath -o \
+ -name config.rpath -o -name configure -o -name libtool.m4 \) \
+ -exec sed -i '' -e 's|freebsd1\*)|freebsd1.\*)|g' \
+ -e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \
+ -e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \
+ -e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \
+ -e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \
+ {} + || /usr/bin/true
+.endif
+.endif
+
.if !target(configure-autotools)
configure-autotools:
@${DO_NADA}
@@ -4264,7 +4282,7 @@ _PATCH_DEP= extract
_PATCH_SEQ= ask-license patch-message patch-depends patch-dos2unix pre-patch \
pre-patch-script do-patch post-patch post-patch-script
_CONFIGURE_DEP= patch
-_CONFIGURE_SEQ= build-depends lib-depends configure-message \
+_CONFIGURE_SEQ= build-depends lib-depends configure-message run-autotools-fixup \
configure-autotools pre-configure pre-configure-script \
run-autotools do-configure post-configure post-configure-script
_BUILD_DEP= configure
OpenPOWER on IntegriCloud