[PATCH] devel/gccmakede: fix build with clang
Kevin Lo
kevlo at FreeBSD.org
Mon Nov 26 09:50:13 UTC 2012
Hi,
Here's the diff to fix build with clang. Ok?
Index: devel/gccmakedep/Makefile
===================================================================
--- devel/gccmakedep/Makefile (revision 307767)
+++ devel/gccmakedep/Makefile (working copy)
@@ -18,4 +18,14 @@ MAN1= gccmakedep.1
PLIST_FILES= bin/gccmakedep
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+# clang's cpp destroys whitespace, particularly hard tabs in makefiles,
+# which is fatal for gccmakedep.
+.if ${OSVERSION} >= 1000024 || (${OSVERSION} < 1000024 && ${CC} == "clang")
+BUILD_DEPENDS+= ucpp:${PORTSDIR}/devel/ucpp
+RUN_DEPENDS+= ucpp:${PORTSDIR}/devel/ucpp
+CONFIGURE_ENV+= ac_cv_path_RAWCPP="ucpp -s"
+.endif
+
+.include <bsd.port.post.mk>
More information about the freebsd-x11
mailing list