aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2013-05-28 17:12:07 +0800
committerEmanuel Haupt <ehaupt@FreeBSD.org>2013-05-28 17:12:07 +0800
commit16bdd1c586cd0510a25f6e70e88f7345d70446df (patch)
treeb9734420b21838bda81f65f7ef4557ac1b703779 /net
parent0b457cd4c0a2046ce20f488bd89976390e3bc788 (diff)
downloadfreebsd-ports-gnome-16bdd1c586cd0510a25f6e70e88f7345d70446df.tar.gz
freebsd-ports-gnome-16bdd1c586cd0510a25f6e70e88f7345d70446df.tar.zst
freebsd-ports-gnome-16bdd1c586cd0510a25f6e70e88f7345d70446df.zip
Handle clang 3.3 fallout. I wish we had a __FreeBSD_version tag from when the
clang 3.3 import happened, that way we wouldn't have to resort to such hacks.
Diffstat (limited to 'net')
-rw-r--r--net/socat/Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/net/socat/Makefile b/net/socat/Makefile
index 786b33ed0e94..870fd677d407 100644
--- a/net/socat/Makefile
+++ b/net/socat/Makefile
@@ -24,14 +24,23 @@ MAN1= socat.1
PLIST_FILES= bin/filan bin/procan bin/socat
PORTDOCS= EXAMPLES README SECURITY FAQ
-.if ${CC} == clang
-CFLAGS+= -Wno-unused-comparison
-.endif
-
OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
+# we could be on HEAD where CC is in fact clang 3.3 but since we have no
+# __FreeBSD_version tag from when the 3.3 import happened we have to do some
+# probing
+#
+.if(${OSVERSION} >= 1000000)
+_CLANG!= cc --version | ${HEAD} -1 | ${SED} -e 's/.*clang version \([0-9]\)\.\([0-9]\).*/\1\2/'
+CFLAGS+= -Wno-unused-comparison
+.endif
+
+.if ${CC} == clang
+CFLAGS+= -Wno-unused-comparison
+.endif
+
do-install:
.for f in filan procan socat
${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin