Sunpoet Po-Chuan Hsieh 2019-01-11 20:16:50 +00:00
parent 4bb255c4b0
commit 55af9fe246
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=489995
13 changed files with 119 additions and 133 deletions

View File

@ -18,6 +18,6 @@ CRAN_DEPENDS= R-cran-sp>=1.1.0:math/R-cran-sp
BUILD_DEPENDS= ${CRAN_DEPENDS}
RUN_DEPENDS= ${CRAN_DEPENDS}
USES= cran:auto-plist,compiles pkgconfig
USES= compiler:c++11-lang cran:auto-plist,compiles pkgconfig
.include <bsd.port.mk>

View File

@ -2,11 +2,9 @@
# $FreeBSD$
PORTNAME= gdal
PORTVERSION= 2.2.4
PORTREVISION= 2
PORTVERSION= 2.4.0
CATEGORIES= graphics geography
MASTER_SITES= https://download.osgeo.org/gdal/${PORTVERSION}/ \
ftp://ftp.remotesensing.org/pub/gdal/${PORTVERSION}/ \
LOCAL/sunpoet
MAINTAINER= sunpoet@FreeBSD.org
@ -24,13 +22,15 @@ LIB_DEPENDS= libgeotiff.so:graphics/libgeotiff \
OPTIONS_DEFINE= ARMADILLO CFITSIO CURL ECW EXPAT FREEXL GEOS GTA HDF5 JASPER \
KML LIBXML2 MYSQL NETCDF ODBC OPENJPEG PCRE PGSQL SFCGAL \
SPATIALITE SQLITE WEBP XERCES
SPATIALITE SQLITE WEBP XERCES ZSTD
OPTIONS_DEFAULT=JASPER
OPTIONS_RADIO= PDF
OPTIONS_RADIO_PDF= PODOFO POPPLER
OPTIONS_SUB= yes
PCRE_DESC= Regular expression support for SQLite
USES= compiler:c++11-lang gmake iconv jpeg localbase pkgconfig ssl tar:xz
CFLAGS+= -fPIC
CONFIGURE_ARGS= --datadir=${DATADIR} \
--enable-static=yes \
@ -43,7 +43,7 @@ CONFIGURE_ARGS= --datadir=${DATADIR} \
--with-libtiff=yes \
--with-libz=/usr \
--with-png=yes \
--with-static-proj4=no \
--with-proj=yes \
--with-threads=yes \
--without-libtool \
${ICONV_CONFIGURE_ARG}
@ -51,13 +51,29 @@ GNU_CONFIGURE= yes
LDFLAGS+= ${ICONV_LIB}
MAKE_JOBS_UNSAFE= yes
MAKEFILE= GNUmakefile
USE_CXXSTD= c++11
USE_LDCONFIG= yes
USES= gmake iconv jpeg localbase tar:xz
PLIST_SUB= PORTVERSION=${PORTVERSION}
SLAVEDIRS= graphics/p5-Geo-GDAL graphics/py-gdal
HEADER_FILES= alg/gdalwarpkernel_opencl.h \
alg/gvgcpfit.h \
alg/internal_qhull_headers.h \
alg/thinplatespline.h\
gcore/gdalexif.h \
gcore/gdaljp2metadatagenerator.h \
gcore/gdalsse_priv.h \
gnm/gnm_priv.h \
port/cpl_aws.h \
port/cpl_cpu_features.h \
port/cpl_google_cloud.h \
port/cpl_sha1.h \
port/cpl_sha256.h \
port/cpl_vsil_curl_priv.h \
port/cpl_worker_thread_pool.h
ARMADILLO_CONFIGURE_WITH= armadillo
ARMADILLO_LIB_DEPENDS= libarmadillo.so:math/armadillo
CFITSIO_CONFIGURE_WITH= cfitsio
@ -114,6 +130,8 @@ WEBP_CONFIGURE_WITH= webp
WEBP_LIB_DEPENDS= libwebp.so:graphics/webp
XERCES_CONFIGURE_WITH= xerces
XERCES_LIB_DEPENDS= libxerces-c.so:textproc/xerces-c3
ZSTD_CONFIGURE_WITH= zstd
ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd
post-patch:
@${REINPLACE_CMD} -e '/^#GDAL_SLIB_SONAME/ s|^#||' ${WRKSRC}/GDALmake.opt.in
@ -130,7 +148,7 @@ post-patch:
@${RM} -r ${WRKSRC}/ogr/ogrsf_frmts/geojson/libjson/
post-install:
cd ${WRKSRC}/gnm/ && ${INSTALL_DATA} gnm.h gnm_api.h gnm_priv.h gnmgraph.h ${STAGEDIR}${PREFIX}/include/
cd ${WRKSRC}/ && ${INSTALL_DATA} ${HEADER_FILES} ${STAGEDIR}${PREFIX}/include/
${INSTALL_DATA} ${WRKSRC}/libgdal.a ${STAGEDIR}${PREFIX}/lib/
${TOUCH} ${STAGEDIR}${PREFIX}/lib/gdalplugins/.keepme
${INSTALL_DATA} ${WRKSRC}/GDALmake.opt ${STAGEDIR}${DATADIR}/

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1521659854
SHA256 (gdal-2.2.4.tar.xz) = 441eb1d1acb35238ca43a1a0a649493fc91fdcbab231d0747e9d462eea192278
SIZE (gdal-2.2.4.tar.xz) = 8255840
TIMESTAMP = 1546772828
SHA256 (gdal-2.4.0.tar.xz) = c3791dcc6d37e59f6efa86e2df2a55a4485237b0a48e330ae08949f0cdf00f27
SIZE (gdal-2.4.0.tar.xz) = 8874628

View File

@ -1,11 +1,11 @@
--- apps/GNUmakefile.orig 2016-10-24 11:00:31 UTC
--- apps/GNUmakefile.orig 2018-05-04 16:05:45 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_DATA) 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)

View File

@ -1,11 +1,11 @@
--- frmts/mrf/mrf_band.cpp.orig 2016-04-25 17:35:55 UTC
--- frmts/mrf/mrf_band.cpp.orig 2018-12-14 21:36:28 UTC
+++ frmts/mrf/mrf_band.cpp
@@ -57,7 +57,7 @@
@@ -49,7 +49,7 @@
#include <vector>
#include <assert.h>
-#include "../zlib/zlib.h"
+#include <zlib.h>
using std::vector;
using std::string;
CPL_CVSID("$Id: mrf_band.cpp 959843c9331689918199b9a8667b8196c8b38c2f 2018-05-04 15:50:28 -0700 Lucian Plesea $")

View File

@ -0,0 +1,20 @@
--- frmts/pdf/pdfdataset.cpp.orig 2018-12-14 21:37:15 UTC
+++ frmts/pdf/pdfdataset.cpp
@@ -3459,7 +3459,7 @@ void PDFDataset::FindLayersPoppler()
#endif
if( ocg != nullptr && ocg->getName() != nullptr )
{
- const char* pszLayerName = (const char*)ocg->getName()->getCString();
+ const char* pszLayerName = (const char*)ocg->getName()->c_str();
AddLayer(pszLayerName);
oLayerOCGMapPoppler[pszLayerName] = ocg;
}
@@ -4787,7 +4787,7 @@ GDALDataset *PDFDataset::Open( GDALOpenI
GooString* poMetadata = poCatalogPoppler->readMetadata();
if (poMetadata)
{
- const char* pszContent = poMetadata->getCString();
+ const char* pszContent = poMetadata->c_str();
if (pszContent != nullptr &&
STARTS_WITH(pszContent, "<?xpacket begin="))
{

View File

@ -0,0 +1,20 @@
--- frmts/pdf/pdfobject.cpp.orig 2018-12-14 21:37:15 UTC
+++ frmts/pdf/pdfobject.cpp
@@ -1061,7 +1061,7 @@ const CPLString& GDALPDFObjectPoppler::G
#else
GooString* gooString = m_po->getString();
#endif
- return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast<const GByte*>(gooString->getCString()),
+ return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast<const GByte*>(gooString->c_str()),
static_cast<int>(gooString->getLength())));
}
else
@@ -1422,7 +1422,7 @@ char* GDALPDFStreamPoppler::GetBytes()
char* pszContent = (char*) VSIMalloc(m_nLength + 1);
if (pszContent)
{
- memcpy(pszContent, gstr->getCString(), m_nLength);
+ memcpy(pszContent, gstr->c_str(), m_nLength);
pszContent[m_nLength] = '\0';
}
delete gstr;

View File

@ -1,81 +0,0 @@
Obtained from: https://github.com/nextgis-borsch/lib_opencad/commit/f40ce46804f1612fbeb035d0be5a746105cfc17e
--- ogr/ogrsf_frmts/cad/libopencad/cadheader.cpp.orig 2017-04-28 16:07:33 UTC
+++ ogr/ogrsf_frmts/cad/libopencad/cadheader.cpp
@@ -310,14 +310,22 @@ CADVariant::CADVariant( const string& va
{
}
-CADVariant::CADVariant( time_t val ) :
+CADVariant::CADVariant( long julianday, long milliseconds ) :
type ( DataType::DATETIME ),
decimalVal ( 0 ),
xVal ( 0 ),
yVal ( 0 ),
- zVal ( 0 ),
- dateTimeVal ( val )
+ zVal ( 0 )
{
+ // unix -> julian return ( unixSecs / 86400.0 ) + 2440587.5;
+ // julian -> unix return (julian - 2440587.5) * 86400.0
+
+ double dfSeconds = double( milliseconds ) / 1000;
+ double dfUnix = 0;
+ if(julianday != 0)
+ dfUnix = ( double( julianday ) - 2440587.5 ) * 86400.0;
+ dateTimeVal = static_cast<time_t>( dfUnix + dfSeconds );
+
char str_buff[256];
strftime(str_buff, 255, "%Y-%m-%d %H:%M:%S", localtime(&dateTimeVal));
stringVal = str_buff;
@@ -335,33 +343,6 @@ CADVariant::CADVariant( const CADHandle&
{
}
-CADVariant::CADVariant( const CADVariant& orig ) :
- type ( orig.type ),
- decimalVal ( orig.decimalVal ),
- xVal ( orig.xVal ),
- yVal ( orig.yVal ),
- zVal ( orig.zVal ),
- stringVal ( orig.stringVal ),
- handleVal ( orig.handleVal ),
- dateTimeVal ( orig.dateTimeVal )
-{
-}
-
-CADVariant& CADVariant::operator=( const CADVariant& orig )
-{
- if( this == & orig )
- return * this;
- type = orig.type;
- stringVal = orig.stringVal;
- decimalVal = orig.decimalVal;
- xVal = orig.xVal;
- yVal = orig.yVal;
- zVal = orig.zVal;
- handleVal = orig.handleVal;
- dateTimeVal = orig.dateTimeVal;
- return * this;
-}
-
long CADVariant::getDecimal() const
{
return decimalVal;
@@ -461,15 +442,7 @@ int CADHeader::addValue( short code, dou
int CADHeader::addValue( short code, long julianday, long milliseconds )
{
- // unix -> julian return ( unixSecs / 86400.0 ) + 2440587.5;
- // julian -> unix return (julian - 2440587.5) * 86400.0
-
- double dfSeconds = double( milliseconds ) / 1000;
- double dfUnix = 0;
- if(julianday != 0)
- dfUnix = ( double( julianday ) - 2440587.5 ) * 86400.0;
- time_t fullSeconds = static_cast<time_t>( dfUnix + dfSeconds );
- return addValue( code, CADVariant( fullSeconds ) );
+ return addValue( code, CADVariant( julianday, milliseconds ) );
}
int CADHeader::getGroupCode( short code )

View File

@ -1,17 +0,0 @@
Obtained from: https://github.com/nextgis-borsch/lib_opencad/commit/f40ce46804f1612fbeb035d0be5a746105cfc17e
--- ogr/ogrsf_frmts/cad/libopencad/cadheader.h.orig 2017-04-28 16:07:33 UTC
+++ ogr/ogrsf_frmts/cad/libopencad/cadheader.h
@@ -79,10 +79,8 @@ public:
// cppcheck-suppress noExplicitConstructor
CADVariant( const std::string& val );
// cppcheck-suppress noExplicitConstructor
- CADVariant( time_t val );
-public:
- CADVariant( const CADVariant& orig );
- CADVariant& operator=( const CADVariant& orig );
+ CADVariant( long julianday, long milliseconds );
+
public:
long getDecimal() const;
double getReal() const;

View File

@ -1,17 +0,0 @@
Obtained from: https://github.com/nextgis-borsch/lib_opencad/commit/f40ce46804f1612fbeb035d0be5a746105cfc17e
--- ogr/ogrsf_frmts/cad/libopencad/opencad.h.orig 2017-04-28 16:07:33 UTC
+++ ogr/ogrsf_frmts/cad/libopencad/opencad.h
@@ -31,10 +31,10 @@
#ifndef OPENCAD_H
#define OPENCAD_H
-#define OCAD_VERSION "0.3.2"
+#define OCAD_VERSION "0.3.3"
#define OCAD_VERSION_MAJOR 0
#define OCAD_VERSION_MINOR 3
-#define OCAD_VERSION_REV 2
+#define OCAD_VERSION_REV 3
#ifndef OCAD_COMPUTE_VERSION
#define OCAD_COMPUTE_VERSION(maj,min,rev) ((maj)*10000+(min)*100+rev) // maj - any, min < 99, rev < 99

View File

@ -25,6 +25,7 @@ bin/ogrtindex
bin/testepsg
etc/bash_completion.d/gdal-bash-completion.sh
include/cpl_atomic_ops.h
include/cpl_auto_close.h
include/cpl_aws.h
include/cpl_config.h
include/cpl_config_extras.h
@ -35,6 +36,7 @@ include/cpl_error.h
include/cpl_google_cloud.h
include/cpl_hash_set.h
include/cpl_http.h
include/cpl_json.h
include/cpl_list.h
include/cpl_minixml.h
include/cpl_minizip_ioapi.h
@ -112,16 +114,19 @@ libdata/pkgconfig/gdal.pc
%%DATADIR%%/GDALLogoColor.svg
%%DATADIR%%/GDALLogoGS.svg
%%DATADIR%%/GDALmake.opt
%%DATADIR%%/bag_template.xml
%%DATADIR%%/compdcs.csv
%%DATADIR%%/coordinate_axis.csv
%%DATADIR%%/cubewerx_extra.wkt
%%DATADIR%%/datum_shift.csv
%%DATADIR%%/default.rsc
%%DATADIR%%/ecw_cs.wkt
%%DATADIR%%/eedaconf.json
%%DATADIR%%/ellipsoid.csv
%%DATADIR%%/epsg.wkt
%%DATADIR%%/esri_StatePlane_extra.wkt
%%DATADIR%%/esri_Wisconsin_extra.wkt
%%DATADIR%%/esri_epsg.wkt
%%DATADIR%%/esri_extra.wkt
%%DATADIR%%/gcs.csv
%%DATADIR%%/gcs.override.csv
@ -177,6 +182,7 @@ libdata/pkgconfig/gdal.pc
%%DATADIR%%/pci_ellips.txt
%%DATADIR%%/pcs.csv
%%DATADIR%%/pcs.override.csv
%%DATADIR%%/pds4_template.xml
%%DATADIR%%/plscenesconf.json
%%DATADIR%%/prime_meridian.csv
%%DATADIR%%/projop_wparm.csv

View File

@ -0,0 +1,37 @@
Obtained from: https://github.com/Toblerity/Fiona/commit/99fa8c27e6f8f8d1dba428fe123878cf9bb5bba3
--- setup.py.orig 2018-07-17 18:09:40 UTC
+++ setup.py
@@ -181,6 +181,14 @@ ext_options = dict(
extra_link_args=extra_link_args,
)
+ext_options_cpp = ext_options.copy()
+# GDAL 2.3+ requires C++11
+if sys.platform == "win32":
+ ext_options_cpp["extra_compile_args"] = ["/std:c++11"]
+else:
+ ext_options_cpp["extra_compile_args"] = ["-std=c++11"]
+
+
# Define the extension modules.
ext_modules = []
@@ -207,7 +215,7 @@ if source_is_repo and "clean" not in sys
ext_modules = cythonize([
Extension('fiona._geometry', ['fiona/_geometry.pyx'], **ext_options),
- Extension('fiona._transform', ['fiona/_transform.pyx'], **ext_options),
+ Extension('fiona._transform', ['fiona/_transform.pyx'], **ext_options_cpp),
Extension('fiona._crs', ['fiona/_crs.pyx'], **ext_options),
Extension('fiona._drivers', ['fiona/_drivers.pyx'], **ext_options),
Extension('fiona._err', ['fiona/_err.pyx'], **ext_options),
@@ -217,7 +225,7 @@ if source_is_repo and "clean" not in sys
# If there's no manifest template, as in an sdist, we just specify .c files.
elif "clean" not in sys.argv:
ext_modules = [
- Extension('fiona._transform', ['fiona/_transform.cpp'], **ext_options),
+ Extension('fiona._transform', ['fiona/_transform.cpp'], **ext_options_cpp),
Extension('fiona._geometry', ['fiona/_geometry.c'], **ext_options),
Extension('fiona._crs', ['fiona/_crs.c'], **ext_options),
Extension('fiona._drivers', ['fiona/_drivers.c'], **ext_options),

View File

@ -24,6 +24,6 @@ LIB_DEPENDS= libgdal.so:graphics/gdal \
BUILD_DEPENDS= ${CRAN_DEPENDS}
RUN_DEPENDS= ${CRAN_DEPENDS}
USES= cran:auto-plist,compiles
USES= compiler:c++11-lang cran:auto-plist,compiles
.include <bsd.port.mk>