summaryrefslogtreecommitdiff
path: root/lang/gforth
diff options
context:
space:
mode:
authordholland <dholland>2012-06-28 07:44:39 +0000
committerdholland <dholland>2012-06-28 07:44:39 +0000
commited373e0460f4d66e51d800631ce8e935098073f3 (patch)
tree60e7e3cf3b3dfddb50e2a46416e911159130d56f /lang/gforth
parent7927d6045219b4c617a5559d50d90dee9979862e (diff)
downloadpkgsrc-ed373e0460f4d66e51d800631ce8e935098073f3.tar.gz
Fail the build if on NetBSD and /usr/bin/m4 is one of the buggy
versions that loops chewing memory.
Diffstat (limited to 'lang/gforth')
-rw-r--r--lang/gforth/hacks.mk33
1 files changed, 33 insertions, 0 deletions
diff --git a/lang/gforth/hacks.mk b/lang/gforth/hacks.mk
new file mode 100644
index 00000000000..520c33e7f43
--- /dev/null
+++ b/lang/gforth/hacks.mk
@@ -0,0 +1,33 @@
+# $NetBSD: hacks.mk,v 1.1 2012/06/28 07:44:39 dholland Exp $
+
+.include "../../mk/bsd.prefs.mk"
+
+#
+# A bug in the offending versions (listed below) in main.c of NetBSD's
+# m4 causes the build to loop forever allocating memory, and thus
+# exhaust swap. Note that these versions were never in a release, but
+# their existence did span most of the 5.99.x period and early
+# netbsd-6 prereleases. Therefore, updating the broken system binary
+# is the best course of action. Note that because TOOLS_PATH.m4 does
+# not get defined early enough it does not seem to be possible to set
+# PKG_FAIL_REASON.
+#
+
+.if ${OPSYS} == "NetBSD"
+pre-configure:
+ @${ECHO} '=> Checking ${TOOLS_PATH.m4}'
+ @set -e; \
+ m4_main_ver=`ident ${TOOLS_PATH.m4} | \
+ grep 'NetBSD: main.c' | \
+ awk '{print $$3}'`; \
+ case "$$m4_main_ver" in \
+ 1.38|1.39]|1.40|1.41) \
+ ${ECHO} "${TOOLS_PATH.m4} contains main.c" \
+ "$$m4_main_ver."; \
+ ${ECHO} "Building this package using" \
+ "${TOOLS_PATH.m4} will run out of swap.";\
+ ${ECHO} "Please update ${TOOLS_PATH.m4} from CVS.";\
+ exit 1; \
+ ;; \
+ esac
+.endif