aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorlinimon <linimon@FreeBSD.org>2017-05-14 15:06:11 +0800
committerlinimon <linimon@FreeBSD.org>2017-05-14 15:06:11 +0800
commitb80f70edbfe3fe405a5428c171a09dff8af967f9 (patch)
tree0287692785a56a5bdea64720bcd23daab94b8325 /www
parent0f6f8b8329acdec759fb09696921ffe56e3d2df6 (diff)
downloadfreebsd-ports-gnome-b80f70edbfe3fe405a5428c171a09dff8af967f9.tar.gz
freebsd-ports-gnome-b80f70edbfe3fe405a5428c171a09dff8af967f9.tar.zst
freebsd-ports-gnome-b80f70edbfe3fe405a5428c171a09dff8af967f9.zip
Commit a workaround for archs with no clang in base. This avoids
the warning '"clang --version" returned non-zero status' when doing operations such as 'make describe'. I have been running with this patch on sparc64 for quite some time. It has also been tested on powerpc64, and for harmlessness on amd64. Arguably, this is a something missing in the infrastructure. Approved by: portmgr (tier-2 blanket)
Diffstat (limited to 'www')
-rw-r--r--www/mod_spdy/Makefile17
1 files changed, 14 insertions, 3 deletions
diff --git a/www/mod_spdy/Makefile b/www/mod_spdy/Makefile
index 9af4d3098209..6ca0f87a8cec 100644
--- a/www/mod_spdy/Makefile
+++ b/www/mod_spdy/Makefile
@@ -46,15 +46,26 @@ SUB_LIST+= APACHEMODDIR=${APACHEMODDIR}
OPTIONS_DEFINE= GCC DEBUG
+# workaround for archs with no clang in base, part 1:
+# do not include the option to turn GCC off. Instead, force its use.
+OPTIONS_EXCLUDE_sparc64= GCC
+
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MGCC}
+# workaround for archs with no clang in base, part 2
+.if ${PORT_OPTIONS:MGCC} || ${ARCH} == sparc64
+FORCE_GCC= yes
+.else
+FORCE_GCC= no
+.endif
+
+.if ${FORCE_GCC} == yes
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils
CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
.endif
-.if ${PORT_OPTIONS:MGCC}
+.if ${FORCE_GCC} == yes
USE_GCC?= yes
GYP_DEFINES+= gcc_version=${CXX:S/g++//}
.else
@@ -103,7 +114,7 @@ post-patch:
-e 's,%%FILESDIR%%,${FILESDIR},g' \
-e 's,%%OPENSSLBASE%%,${OPENSSLBASE},g' \
${WRKSRC}/build_modssl_with_npn.sh
-.if ${PORT_OPTIONS:MGCC}
+.if ${FORCE_GCC} == yes
@${REINPLACE_CMD} -e 's,%%GCCCXXFLAGS%%,-I${LOCALBASE}/lib/gcc${CXX:S/g++//}/include,g' \
-e 's,%%GCCLDFLAGS%%,-L${LOCALBASE}/lib/gcc${CXX:S/g++//},g' \
${WRKSRC}/Makefile