summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2011-07-26 16:05:27 +0000
committerdholland <dholland@pkgsrc.org>2011-07-26 16:05:27 +0000
commitdebb56fe4d4dae9fc2f493e150444f6d3aeefe20 (patch)
treedb346e675d77aad1add685e75d478300ad487cb4
parentdbb4f5b3855398fdfcc7cffaaf1a48ede2e5e844 (diff)
downloadpkgsrc-debb56fe4d4dae9fc2f493e150444f6d3aeefe20.tar.gz
When using clang, use devel/ucpp as the C preprocessor, as clang's cpp
destroys tabs in makefiles and thereby causes things to fail miserably.
-rw-r--r--devel/imake/Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/devel/imake/Makefile b/devel/imake/Makefile
index 225e1d68e27..72771939f81 100644
--- a/devel/imake/Makefile
+++ b/devel/imake/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2010/05/21 22:10:11 schwarz Exp $
+# $NetBSD: Makefile,v 1.11 2011/07/26 16:05:27 dholland Exp $
DISTNAME= imake-1.0.3
CATEGORIES= x11 devel
@@ -22,17 +22,24 @@ CONFIGURE_ENV+= HAS_PERL=no
REPLACE_SH+= mkhtmlindex.sh
.include "../../mk/compiler.mk"
-.if empty(PKGSRC_COMPILER:Mgcc)
+.if !empty(PKGSRC_COMPILER:Mclang)
+# clang's cpp destroys whitespace, particularly hard tabs in makefiles,
+# which is fatal for imake.
+DEPENDS+=ucpp-[0-9]*:../../devel/ucpp
+CONFIGURE_ENV+= ac_cv_path_RAWCPP="ucpp -s"
+
+.elif empty(PKGSRC_COMPILER:Mgcc)
CONFIGURE_ENV+= ac_cv_path_RAWCPP="cc -E -Uunix -"
-. if ${OPSYS} == "SunOS"
+.endif
+
+# This required with some C preprocessors and not others,
+# but is harmless when not required.
SUBST_CLASSES+= xmkmf
SUBST_MESSAGE.xmkmf= Fixing "xmkmf" script.
SUBST_STAGE.xmkmf= post-build
SUBST_FILES.xmkmf= xmkmf
SUBST_SED.xmkmf= -e "s/^configdirspec= */configdirspec=/"
-. endif
-.endif
.include "../../x11/xproto/buildlink3.mk"