aboutsummaryrefslogtreecommitdiff
path: root/graphics/gdal/Makefile
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2014-08-22 08:43:35 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2014-08-22 08:43:35 +0000
commitfdcf49927c8b93a464cda71bf50dcfb72c5b175c (patch)
treeb5e82dad2bdad7f49327920c58d9689217371458 /graphics/gdal/Makefile
parent8ac6b65b344175f73000020dc70a71dc1352c2bb (diff)
downloadports-fdcf49927c8b93a464cda71bf50dcfb72c5b175c.tar.gz
ports-fdcf49927c8b93a464cda71bf50dcfb72c5b175c.zip
- Add JSON_C option
- Fix build with devel/json-c 0.12 Obtained from: http://trac.osgeo.org/gdal/changeset/27267
Notes
Notes: svn path=/head/; revision=365616
Diffstat (limited to 'graphics/gdal/Makefile')
-rw-r--r--graphics/gdal/Makefile18
1 files changed, 15 insertions, 3 deletions
diff --git a/graphics/gdal/Makefile b/graphics/gdal/Makefile
index 65e0966428dd..9ec462c2c8a2 100644
--- a/graphics/gdal/Makefile
+++ b/graphics/gdal/Makefile
@@ -15,8 +15,8 @@ COMMENT= Translator library for raster geospatial data formats
LICENSE= MIT
OPTIONS_DEFINE= ARMADILLO CFITSIO CURL ECW EXPAT FREEXL GEOS GEOTIFF GIF GTA \
- HDF5 ICONV JASPER JPEG KML LIBXML2 MYSQL NETCDF ODBC PCRE \
- PGSQL PNG PROJ SQLITE TIFF WEBP XERCES
+ HDF5 ICONV JASPER JPEG JSON_C KML LIBXML2 MYSQL NETCDF ODBC \
+ PCRE PGSQL PNG PROJ SQLITE TIFF WEBP XERCES
OPTIONS_RADIO= PDF
OPTIONS_RADIO_PDF= PODOFO POPPLER
OPTIONS_DEFAULT=GEOTIFF GIF JASPER JPEG PNG TIFF
@@ -82,6 +82,9 @@ JASPER_LIB_DEPENDS= libjasper.so:${PORTSDIR}/graphics/jasper
JPEG_CONFIGURE_OFF= --with-jpeg=internal
JPEG_CONFIGURE_ON= --with-jpeg=${LOCALBASE}
JPEG_LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg
+JSON_C_CONFIGURE_OFF= --with-libjson-c=internal
+JSON_C_CONFIGURE_ON= --with-libjson-c=${LOCALBASE}
+JSON_C_LIB_DEPENDS= libjson-c.so:${PORTSDIR}/devel/json-c
KML_CONFIGURE_OFF= --with-libkml=no
KML_CONFIGURE_ON= --with-libkml=${LOCALBASE}
KML_LIB_DEPENDS= libkmlbase.so:${PORTSDIR}/science/libkml
@@ -129,8 +132,17 @@ XERCES_CONFIGURE_ON= --with-xerces=${LOCALBASE}
XERCES_LIB_DEPENDS= libxerces-c.so:${PORTSDIR}/textproc/xerces-c3
post-patch:
- @${REINPLACE_CMD} -e 's|-lpthread|-pthread|g' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|$$(INST_LIB)/pkgconfig|${PREFIX}/libdata/pkgconfig|' ${WRKSRC}/GNUmakefile
+ @${REINPLACE_CMD} -e 's|-lpthread|-pthread|g' ${WRKSRC}/configure
+# patch for json-c 0.12
+ @${REINPLACE_CMD} -e 's|json_tokener_errors\[jstok->err\]|json_tokener_error_desc(jstok->err)|' \
+ ${WRKSRC}/frmts/mbtiles/mbtilesdataset.cpp \
+ ${WRKSRC}/ogr/ogrsf_frmts/cartodb/ogrcartodbdatasource.cpp \
+ ${WRKSRC}/ogr/ogrsf_frmts/couchdb/ogrcouchdbdatasource.cpp \
+ ${WRKSRC}/ogr/ogrsf_frmts/geojson/ogresrijsonreader.cpp \
+ ${WRKSRC}/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp \
+ ${WRKSRC}/ogr/ogrsf_frmts/geojson/ogrtopojsonreader.cpp \
+ ${WRKSRC}/ogr/ogrsf_frmts/gme/ogrgmejson.cpp
post-install:
${INSTALL_LIB} ${WRKSRC}/libgdal.a ${STAGEDIR}${PREFIX}/lib/