Instafix for FreeBSD ports brokenness on 10.0?

Jilles Tjoelker jilles at stack.nl
Sun Oct 2 16:23:32 UTC 2011


Thanks for the patch, but it does not work properly. There is also a
freebsd[123]* a.out detector which needs to be disabled as well,
otherwise only (for example) a libiconv.so.3.0 appears, no libiconv.so.3
or libiconv.so symlink.

In addition, the below patch is for bsd.port.mk in the src repository,
so it only affects 10.x.

With this, I can build things like libiconv and gettext on a
10.0-CURRENT system without needing even more horrible hacks like faking
uname. Please test as some additional tweaks may be necessary.

The proper fix is indeed in autotools, but I think it is inappropriate
to keep head effectively frozen until this problem can be fixed
properly.

Index: share/mk/bsd.port.mk
===================================================================
--- share/mk/bsd.port.mk	(revision 225917)
+++ share/mk/bsd.port.mk	(working copy)
@@ -14,3 +14,15 @@
 
 .include <bsd.own.mk>
 .include "${BSDPORTMK}"
+
+.if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK)
+# Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x.
+run-autotools-fixup:
+	find ${WRKSRC} -type f \( -name config.libpath -o \
+		-name config.rpath -o -name configure -o -name libtool.m4 \) \
+		-exec sed -i '' -e 's/freebsd1\*)/SHOULDNOTMATCHANYTHING1)/' \
+		-e 's/freebsd\[123\]\*)/SHOULDNOTMATCHANYTHING2)/' {} +
+
+.ORDER: run-autotools run-autotools-fixup do-configure
+do-configure: run-autotools-fixup
+.endif

(Sorry for the messed up threading, I am not subscribed to ports at .)

-- 
Jilles Tjoelker


More information about the freebsd-ports mailing list