Changeset View
Standalone View
databases/postgis/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/ | |||||
sunpoet: It should be https://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 | |||||
matUnsubmitted Done Inline ActionsWrong place in the Makefile. See Chapter 15. Order of Variables in Port Makefiles. mat: Wrong place in the Makefile. See [[ https://www.freebsd.org/doc/en/books/porters… | |||||
lbartolettiAuthorUnsubmitted Done Inline ActionsThere is no information on this subject in the handbook. I modified using the example of security/libressl lbartoletti: There is no information on this subject in the handbook. I modified using the example of… | |||||
USES= alias gettext gmake gnome iconv:wchar_t libtool:keepla localbase perl5 pkgconfig pgsql:9.5+ shebangfix | |||||
sunpoetUnsubmitted Done Inline ActionsAccording to PostGIS Support Matrix, PostGIS 2.5 supports pgsql:9.4+. sunpoet: According to [[ https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS | PostGIS… | |||||
LLD_UNSAFE= yes | |||||
GNU_CONFIGURE= yes | |||||
CONFIGURE_ARGS= ${ICONV_CONFIGURE_BASE} NUMERICFLAGS=${PORTVERSION} | |||||
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= ADDRSTD LOADERGUI SFCGAL TOPOLOGY | |||||
OPTIONS_DEFAULT= ADDRSTD SFCGAL TOPOLOGY | |||||
OPTIONS_SUB= yes | |||||
PLIST_SUB+= PORTVERSION=${PORTVERSION} | |||||
matUnsubmitted Done Inline ActionsWhy +=? mat: Why `+=`?
Also, wrong place in the Makefile. | |||||
lbartolettiAuthorUnsubmitted Done Inline ActionsPLIST_SUB is also not indicated in the manual. lbartoletti: PLIST_SUB is also not indicated in the manual. | |||||
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 | |||||
sunpoetUnsubmitted Done Inline ActionsIt is SFCGAL_CONFIGURE_WITH=sfcgal=${LOCALBASE}/bin/sfcgal-config sunpoet: It is SFCGAL_CONFIGURE_WITH=sfcgal=${LOCALBASE}/bin/sfcgal-config | |||||
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 | |||||
sunpoetUnsubmitted Done Inline ActionsPlease remove it if not needed. sunpoet: Please remove it if not needed. | |||||
CFLAGS+= -I${LOCALBASE}/include | |||||
LDFLAGS+= -L${LOCALBASE}/lib | |||||
sunpoetUnsubmitted Done Inline ActionsIs it still needed when you have USES=localbase already? sunpoet: Is it still needed when you have USES=localbase already? | |||||
matUnsubmitted Done Inline ActionsWrong place in the Makefile. mat: Wrong place in the Makefile. | |||||
VER= ${PORTVERSION:R} | |||||
sunpoetUnsubmitted Done Inline ActionsSince you use it in the Makefile, please also use it in PLIST via PLIST_SUB for consistency, e.g. lib/liblwgeom-2.5.so.0.0.0. sunpoet: Since you use it in the Makefile, please also use it in PLIST via PLIST_SUB for consistency, e. | |||||
pre-configure: | |||||
@${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL | |||||
Done Inline ActionsPlease, remove this, and use options target helpers. mat: Please, remove this, and use options target helpers. | |||||
matUnsubmitted Done Inline ActionsThis seems dubious, PRE-INSTALL is what gets shown when the package is being installed, just before the installation. I do not see how things could be needed to be done twice, once before configure runs, and once before the package is installed. mat: This seems dubious, PRE-INSTALL is what gets shown when the package is being installed, just… | |||||
post-install: | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/shp2pgsql | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/pgsql2shp | |||||
Done Inline ActionsThat's a no on flavors. The ports tree has a *default* postgresql version, only the default will be built. mat: That's a no on flavors.
The ports tree has a *default* postgresql version, only the default… | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/liblwgeom-${VER}.so.0.0.0 | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/postgresql/postgis-${VER}.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 )" ) | |||||
Done Inline ActionsSimilar to stripping bin/*, these can be merged to post-install: as "${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/postgresql/*.so" sunpoet: Similar to stripping bin/*, these can be merged to post-install: as "${STRIP_CMD}… | |||||
post-install-LOADERGUI-on: | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/shp2pgsql-gui | |||||
#post-install-LOADERGUI-off: | |||||
# ${RM} ${STAGEDIR}${PREFIX}/bin/shp2pgsql-gui | |||||
Done Inline ActionsD17320 in general works fine for me on a semi production box, many thanks. I wonder if the lib version should be something other than 0.0.0? This never changed in our PostGIS ports before. Looking into [1], PostGIS in its internal structures uses macros for it: #define LIBLWGEOM_VERSION "2.5.1dev" rhurlin: D17320 in general works fine for me on a semi production box, many thanks.
I wonder if the lib… | |||||
Done Inline ActionsShould be ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/liblwgeom-${VER}.so.${PORTVERSION} instead? lbartoletti: Should be ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/liblwgeom-${VER}.so.${PORTVERSION} instead? | |||||
Done Inline ActionsIf I'm not wrong, it's generated in a file. You should leave it like that. see https://github.com/postgis/postgis/blob/svn-trunk/Version.config#L10 lbartoletti: If I'm not wrong, it's generated in a file. You should leave it like that. see https://github. | |||||
Done Inline ActionsTo be honest, I am not an expert in library naming schemes. For me, it seems ok. rhurlin: To be honest, I am not an expert in library naming schemes. For me, it seems ok. | |||||
post-install-TOPOLOGY-on: | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/postgresql/postgis_topology-${VER}.so | |||||
post-install-RASTER-on: | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/raster2pgsql | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/postgresql/rtpostgis-${VER}.so | |||||
post-install-ADDRSTD-on: | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/postgresql/address_standardizer.so | |||||
.include <bsd.port.mk> |
It should be https://download.osgeo.org/postgis/source/