Changeset View
Changeset View
Standalone View
Standalone View
Makefile
# Created by: Loïc BARTOLETTI <lbartoletti@tuxfamily.org> | |||||
# $FreeBSD$ | |||||
PORTNAME= postgis | |||||
PORTVERSION= 2.5.0 | |||||
CATEGORIES= databases geography | |||||
MASTER_SITES= http://download.osgeo.org/postgis/source/ | |||||
MAINTAINER= lbartoletti@tuxfamily.org | |||||
COMMENT= Geographic objects support for PostgreSQL databases | |||||
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 | |||||
CONFLICTS_INSTALL= postgis20 postgis21 postgis22 postgis23 postgis24 | |||||
USES= alias gettext gmake gnome iconv:wchar_t libtool:keepla localbase perl5 pkgconfig pgsql:9.5+ shebangfix | |||||
LLD_UNSAFE= yes | |||||
GNU_CONFIGURE= yes | |||||
CONFIGURE_ARGS= ${ICONV_CONFIGURE_BASE} | |||||
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 | |||||
USE_GNOME= libxml2 | |||||
USE_LDCONFIG= yes | |||||
USE_PERL5= build | |||||
OPTIONS_DEFINE= LOADERGUI TOPOLOGY SFCGAL ADDRSTD | |||||
OPTIONS_DEFAULT= TOPOLOGY SFCGAL ADDRSTD | |||||
OPTIONS_SUB= yes | |||||
PLIST_SUB+= PORTVERSION=${PORTVERSION} | |||||
LOADERGUI_DESC= Enable shp2pgsql-gui | |||||
TOPOLOGY_DESC= Topology support | |||||
SFCGAL_DESC= Enable sfcgal | |||||
ADDRSTD_DESC= Enable address standardizer | |||||
LOADERGUI_CONFIGURE_WITH= gui | |||||
LOADERGUI_USE= GNOME=gtk20 | |||||
TOPOLOGY_CONFIGURE_WITH= topology | |||||
SFCGAL_LIB_DEPENDS= libSFCGAL.so:databases/sfcgal | |||||
SFCGAL_CONFIGURE_ON= --with-sfcgal=${LOCALBASE}/bin/sfcgal-config | |||||
SFCGAL_CONFIGURE_OFF= --without-sfcgal | |||||
ADDRSTD_CONFIGURE_WITH= address-standardizer | |||||
ADDRSTD_LIB_DEPENDS= libpcre.so:devel/pcre | |||||
ADDRSTD_VARS= WANT_PGSQL+=contrib | |||||
#CONFIGURE_ARGS= --with-gdalconfig=${LOCALBASE}/bin/gdal-config | |||||
CFLAGS+= -I${LOCALBASE}/include | |||||
LDFLAGS+= -L${LOCALBASE}/lib | |||||
VER= ${PORTVERSION:R} | |||||
.include <bsd.port.pre.mk> | |||||
pre-configure: | |||||
@${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL | |||||
post-install: | |||||
${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 )" ) | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/shp2pgsql | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/pgsql2shp | |||||
.if ${PORT_OPTIONS:MLOADERGUI} | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/shp2pgsql-gui | |||||
.else | |||||
${RM} ${STAGEDIR}${PREFIX}/bin/shp2pgsql-gui | |||||
.endif | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/liblwgeom-${VER}.so.0.0.0 | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/postgresql/postgis-${VER}.so | |||||
.if ${PORT_OPTIONS:MTOPOLOGY} | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/postgresql/postgis_topology-${VER}.so | |||||
.endif | |||||
.if ${PORT_OPTIONS:MRASTER} | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/raster2pgsql | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/postgresql/rtpostgis-${VER}.so | |||||
.endif | |||||
.if ${PORT_OPTIONS:MADDRSTD} | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/postgresql/address_standardizer.so | |||||
.endif | |||||
.include <bsd.port.post.mk> |