aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorErwin Lansing <erwin@FreeBSD.org>2011-10-27 09:46:25 +0000
committerErwin Lansing <erwin@FreeBSD.org>2011-10-27 09:46:25 +0000
commit1beda15b1793b44f6e93c5db39cc31a7406f7ca2 (patch)
tree7c19a6409a2de1ab98762e7e0591e8570cede15f /Mk/bsd.port.mk
parent7920eae3b4ae1a7218d23b8cae9ece9504c7940d (diff)
downloadports-1beda15b1793b44f6e93c5db39cc31a7406f7ca2.tar.gz
ports-1beda15b1793b44f6e93c5db39cc31a7406f7ca2.zip
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
Notes
Notes: svn path=/head/; revision=284427
Diffstat (limited to 'Mk/bsd.port.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 773d1610d148..7c1092953ce1 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