Fix build on gcc-based architectures:

lwgeom_functions_basic.c:1566: error: #pragma GCC diagnostic not allowed inside functions

PR:		236728
Submitted by:	Piotr Kubaj
Approved by:	maintainer
This commit is contained in:
Mark Linimon 2019-03-29 14:41:55 +00:00
parent d8dc4ed3d7
commit b55eb4e424
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=497146

View File

@ -56,6 +56,13 @@ VER= ${PORTVERSION:R}
PLIST_SUB= PORTVERSION=${PORTVERSION} \
VER=${VER}
post-patch:
.if exists(/usr/lib/libstdc++.so)
${REINPLACE_CMD} -e '/^#pragma GCC diagnostic/d' \
${WRKSRC}/postgis/lwgeom_functions_basic.c \
${WRKSRC}/postgis/lwgeom_geos.c
.endif
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/liblwgeom-${VER}.so.0.0.0