- Remove PROJ option: proj4 is required, --with-static-proj4 determines how it being linked, dynamically or statically

- Set SONAME: add GDAL_SLIB_SONAME to GDALmake.opt
- Cosmetic change
- Pet portlint: fix diff header of patch files
- Bump PORTREVISION for dependency and package change
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2016-11-26 17:09:42 +00:00
parent 4780e21059
commit 3058d439df
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=427177
4 changed files with 37 additions and 13 deletions

View file

@ -3,6 +3,7 @@
PORTNAME= gdal
PORTVERSION= 2.1.2
PORTREVISION= 1
CATEGORIES= graphics geography
MASTER_SITES= http://download.osgeo.org/gdal/${PORTVERSION}/ \
ftp://ftp.remotesensing.org/pub/gdal/${PORTVERSION}/ \
@ -18,11 +19,12 @@ LIB_DEPENDS= libgeotiff.so:graphics/libgeotiff \
libgif.so:graphics/giflib \
libjson-c.so:devel/json-c \
libpng.so:graphics/png \
libproj.so:graphics/proj \
libtiff.so:graphics/tiff
OPTIONS_DEFINE= ARMADILLO CFITSIO CURL ECW EXPAT FREEXL GEOS GTA HDF5 JASPER \
KML LIBXML2 MYSQL NETCDF ODBC OPENJPEG PCRE PGSQL PROJ \
SPATIALITE SQLITE WEBP XERCES
KML LIBXML2 MYSQL NETCDF ODBC OPENJPEG PCRE PGSQL SPATIALITE \
SQLITE WEBP XERCES
OPTIONS_DEFAULT=JASPER
OPTIONS_RADIO= PDF
OPTIONS_RADIO_PDF= PODOFO POPPLER
@ -39,6 +41,7 @@ CONFIGURE_ARGS= --datadir=${DATADIR} \
--with-libtiff=yes \
--with-libz=/usr \
--with-png=yes \
--with-static-proj4=no \
--with-threads=yes \
--without-libtool \
${ICONV_CONFIGURE_ARG}
@ -99,8 +102,6 @@ PODOFO_CONFIGURE_WITH= podofo
PODOFO_LIB_DEPENDS= libpodofo.so:graphics/podofo
POPPLER_CONFIGURE_WITH= poppler
POPPLER_LIB_DEPENDS= libpoppler.so:graphics/poppler
PROJ_CONFIGURE_WITH= static-proj4
PROJ_LIB_DEPENDS= libproj.so:graphics/proj
SPATIALITE_CONFIGURE_WITH= spatialite
SPATIALITE_LIB_DEPENDS= libspatialite.so:databases/spatialite
SQLITE_CONFIGURE_WITH= sqlite3
@ -110,6 +111,12 @@ WEBP_LIB_DEPENDS= libwebp.so:graphics/webp
XERCES_CONFIGURE_WITH= xerces
XERCES_LIB_DEPENDS= libxerces-c.so:textproc/xerces-c3
.include <bsd.port.pre.mk>
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
CFLAGS+= -flax-vector-conversions
.endif
post-patch:
@${REINPLACE_CMD} -e 's|$$(INST_LIB)/pkgconfig|${PREFIX}/libdata/pkgconfig|' ${WRKSRC}/GNUmakefile
@${REINPLACE_CMD} -e 's|-lminizip|-lkmlminizip|' ${WRKSRC}/configure
@ -127,12 +134,6 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/libgdal.a ${STAGEDIR}${PREFIX}/lib/
${TOUCH} ${STAGEDIR}${PREFIX}/lib/gdalplugins/.keepme
${INSTALL_DATA} ${WRKSRC}/GDALmake.opt ${STAGEDIR}${DATADIR}/
-${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* ${STAGEDIR}${PREFIX}/lib/libgdal.so.${PORTVERSION}
.include <bsd.port.pre.mk>
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
CFLAGS+= -flax-vector-conversions
.endif
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libgdal.so.${PORTVERSION}
.include <bsd.port.post.mk>

View file

@ -0,0 +1,10 @@
--- GDALmake.opt.in.orig 2016-10-24 11:00:36 UTC
+++ GDALmake.opt.in
@@ -135,6 +135,7 @@ GDAL_VERSION_REV = @GDAL_VERSION_RE
GDAL_LIB = $(GDAL_ROOT)/libgdal.a
GDAL_SLIB = $(GDAL_ROOT)/libgdal.$(SO_EXT)
GDAL_SLIB_LINK = -L$(GDAL_ROOT) -lgdal
+GDAL_SLIB_SONAME= -Wl,-soname,libgdal.$(SO_EXT).$(GDAL_VERSION_MAJOR)
# Mac OS X Framework definition
MACOSX_FRAMEWORK = @MACOSX_FRAMEWORK@

View file

@ -0,0 +1,13 @@
--- apps/GNUmakefile.orig 2016-10-24 11:00:31 UTC
+++ apps/GNUmakefile
@@ -215,7 +215,7 @@ gdal-config-inst: gdal-config.in ../GDAL
install: default
- for f in $(BIN_LIST) ; do $(INSTALL) $$f $(DESTDIR)$(INST_BIN) ; done
- $(INSTALL) gdal_utils.h $(DESTDIR)$(INST_INCLUDE)
- $(INSTALL) gdal-config-inst $(DESTDIR)$(INST_BIN)/gdal-config
+ for f in $(BIN_LIST) ; do $(BSD_INSTALL_PROGRAM) $$f $(DESTDIR)$(INST_BIN) ; done
+ $(BSD_INSTALL_DATA) gdal_utils.h $(DESTDIR)$(INST_INCLUDE)
+ $(BSD_INSTALL_SCRIPT) gdal-config-inst $(DESTDIR)$(INST_BIN)/gdal-config

View file

@ -1,5 +1,5 @@
--- frmts/mrf/mrf_band.cpp.orig 2016-04-26 01:35:55.000000000 +0800
+++ frmts/mrf/mrf_band.cpp 2016-05-04 02:26:58.154088997 +0800
--- frmts/mrf/mrf_band.cpp.orig 2016-04-25 17:35:55 UTC
+++ frmts/mrf/mrf_band.cpp
@@ -57,7 +57,7 @@
#include <vector>