freebsd-ports/databases/postgis32/Makefile
Po-Chuan Hsieh a6509f4844
databases/postgis32: Fix build on FreeBSD 12 by using c++14 explicitly
The error message is as follows:
cc -std=c++11 -x c++ -I../../liblwgeom -Iinclude  -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include -I/usr/local/include/json-c -I/usr/local/include -DNDEBUG -I/usr/local/include -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include   -fPIC -DPIC -c -o flatgeobuf_c.o flatgeobuf_c.cpp
In file included from flatgeobuf_c.cpp:26:
In file included from ./feature_generated.h:7:
In file included from include/flatbuffers/flatbuffers.h:20:
In file included from include/flatbuffers/base.h:241:
In file included from /usr/local/include/absl/strings/string_view.h:39:
In file included from /usr/local/include/absl/base/attributes.h:37:
In file included from /usr/local/include/absl/base/config.h:86:
/usr/local/include/absl/base/policy_checks.h:79:2: error: "C++ versions less than C++14 are not supported."
#error "C++ versions less than C++14 are not supported."
 ^
1 error generated.
gmake[4]: *** [Makefile:50: flatgeobuf_c.o] Error 1
gmake[4]: Leaving directory '/wrkdirs/usr/ports/databases/postgis32/work/postgis-3.2.5/deps/flatgeobuf'
gmake[3]: *** [Makefile:213: ../deps/flatgeobuf/libflatgeobuf.la] Error 2
gmake[3]: Leaving directory '/wrkdirs/usr/ports/databases/postgis32/work/postgis-3.2.5/postgis'
gmake[2]: *** [GNUmakefile:22: all] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/databases/postgis32/work/postgis-3.2.5'
gmake[1]: *** [Makefile:6: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/databases/postgis32/work/postgis-3.2.5'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer.
*** Error code 1

Approved by:	portmgr (blanket)
2023-11-01 13:30:13 +08:00

87 lines
2.9 KiB
Makefile

PORTNAME= postgis
DISTVERSION= 3.2.5
PORTREVISION= 1
CATEGORIES= databases geography
MASTER_SITES= https://download.osgeo.org/postgis/source/
PKGNAMESUFFIX= 32
MAINTAINER= lbartoletti@FreeBSD.org
COMMENT= Geographic objects support for PostgreSQL databases
WWW= https://postgis.net/
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libproj.so:graphics/proj \
libgeos.so:graphics/geos \
libjson-c.so:devel/json-c \
libgdal.so:graphics/gdal
USES= alias compiler:c++14-lang cpe gmake gnome iconv:wchar_t libtool:keepla \
localbase perl5 pkgconfig pgsql:11+ shebangfix
USE_GNOME= libxml2
USE_PERL5= build
GNU_CONFIGURE= yes
CONFIGURE_ARGS= ${ICONV_CONFIGURE_BASE} NUMERICFLAGS=${PORTVERSION}
USE_CXXSTD= c++14
SHEBANG_FILES= extensions/address_standardizer/*.pl raster/test/regress/*.pl \
raster/test/regress/loader/*.pl regress/run_test.pl \
utils/postgis_restore.pl.in utils/*.pl
WANT_PGSQL= server
OPTIONS_DEFINE= ADDRSTD JSON LOADERGUI NLS PROTOBUF RASTER SFCGAL TOPOLOGY WAGYU
OPTIONS_DEFAULT=ADDRSTD JSON NLS PROTOBUF RASTER SFCGAL TOPOLOGY WAGYU
OPTIONS_SUB= yes
ADDRSTD_DESC= Enable address standardizer
JSON_DESC= Enable JSON support
LOADERGUI_DESC= Enable shp2pgsql-gui
PROTOBUF_DESC= Enable protocol buffers
RASTER_DESC= Enable raster support
SFCGAL_DESC= Enable sfcgal
TOPOLOGY_DESC= Topology support
WAGYU_DESC= Enable WAGYU support
ADDRSTD_CONFIGURE_WITH= address-standardizer
ADDRSTD_LIB_DEPENDS= libpcre.so:devel/pcre
ADDRSTD_VARS= WANT_PGSQL+=contrib
JSON_CONFIGURE_WITH= json
JSON_LIB_DEPENDS= libjson-c.so:devel/json-c
LOADERGUI_CONFIGURE_WITH= gui
LOADERGUI_LIB_DEPENDS= libprotobuf-c.so:devel/protobuf-c
LOADERGUI_USE= GNOME=gtk20
NLS_CONFIGURE_WITH= nls
NLS_USES= gettext
PROTOBUF_CONFIGURE_WITH= protobuf
PROTOBUF_LIB_DEPENDS= libprotobuf-c.so:devel/protobuf-c
SFCGAL_CONFIGURE_WITH= sfcgal=${LOCALBASE}/bin/sfcgal-config
SFCGAL_LIB_DEPENDS= libSFCGAL.so:databases/sfcgal
TOPOLOGY_CONFIGURE_WITH= topology
WAGYU_CONFIGURE_WITH= wagyu
CONFLICTS_INSTALL= postgis[0-9][0-9] # lib/postgresql/address_standardizer-3.so
VER= ${PORTVERSION:R}
PLIST_SUB= PORTVERSION=${PORTVERSION}${DISTVERSIONSUFFIX} \
VER=${VER}
.include <bsd.port.pre.mk>
.if ${CHOSEN_COMPILER_TYPE} == gcc
post-patch:
${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/postgresql/*.so
${MKDIR} ${STAGEDIR}${DATADIR}/tiger_geocoder
(cd ${WRKSRC}/extras/tiger_geocoder && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/tiger_geocoder/ "! ( -name *\.orig -o -name *\.bak )" )
${MKDIR} ${STAGEDIR}${DATADIR}/utils
(cd ${WRKSRC}/utils/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/utils/ "! ( -name *\.orig -o -name *\.bak -o -name Makefile -o -name *\.in -o -name uninstall_script )" )
.include <bsd.port.post.mk>