[pktools] 05/05: Drop gdal-2.0.patch, applied upstream.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri Dec 18 02:04:08 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository pktools.

commit cea13b666b7673b9f5d10a3680d17af130a4ca13
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Dec 18 03:00:30 2015 +0100

    Drop gdal-2.0.patch, applied upstream.
---
 debian/changelog              |   1 +
 debian/patches/gdal-2.0.patch | 203 ------------------------------------------
 debian/patches/series         |   1 -
 3 files changed, 1 insertion(+), 204 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index bfa3ed3..1d9155c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ pktools (2.6.5-1) UNRELEASED; urgency=medium
 
   * New upstream release.
   * Update libgsl-dev dependency for pktools-dev too.
+  * Drop gdal-2.0.patch, applied upstream.
 
  -- Bas Couwenberg <sebastic at debian.org>  Fri, 18 Dec 2015 02:55:14 +0100
 
diff --git a/debian/patches/gdal-2.0.patch b/debian/patches/gdal-2.0.patch
deleted file mode 100644
index 6c0edd8..0000000
--- a/debian/patches/gdal-2.0.patch
+++ /dev/null
@@ -1,203 +0,0 @@
-Description: Add support for GDAL 2.0.
-Author: Bas Couwenberg <sebastic at debian.org>
-Bug: https://savannah.nongnu.org/bugs/?46270
-Bug-Debian: http://bugs.debian.org/802631
-Forwarded: https://savannah.nongnu.org/bugs/?46270#comment3
-Applied-Upstream: http://git.savannah.gnu.org/cgit/pktools.git/commit/?id=12c409af4e43773a1b0541897e936087d5e5b177
-
---- a/src/imageclasses/ImgReaderOgr.h
-+++ b/src/imageclasses/ImgReaderOgr.h
-@@ -73,8 +73,13 @@ public:
-   //  int getLayer(int layer=0) const;
-   int getFields(std::vector<std::string>& fields, int layer=0) const;
-   int getFields(std::vector<OGRFieldDefn*>& fields, int layer=0) const;
-+#if GDAL_VERSION_MAJOR < 2
-   OGRDataSource* getDataSource(void) {return m_datasource;};
-   OGRSFDriver* getDriver(void) const {return m_datasource->GetDriver();};
-+#else
-+  GDALDataset* getDataSource(void) {return m_datasource;};
-+  GDALDriver* getDriver(void) const {return m_datasource->GetDriver();};
-+#endif
-   int getLayerCount(void) const {return m_datasource->GetLayerCount();};
- //   OGRLayer *executeSql(const std::string& output,const std::string& sqlStatement, OGRGeometry* spatialFilter=NULL);
-   template<typename T> int readSql(Vector2d<T>& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, const std::string& sqlStatement, OGRGeometry* spatialFilter=NULL, int layer=0, bool pos=false, bool verbose=false);
-@@ -90,7 +95,11 @@ protected:
-   void setCodec(void);
- 
-   std::string m_filename;
-+#if GDAL_VERSION_MAJOR < 2
-   OGRDataSource *m_datasource;
-+#else
-+  GDALDataset *m_datasource;
-+#endif
-   char m_fs;
- };
- 
---- a/src/imageclasses/ImgReaderOgr.cc
-+++ b/src/imageclasses/ImgReaderOgr.cc
-@@ -48,15 +48,26 @@ void ImgReaderOgr::open(const std::strin
- //---------------------------------------------------------------------------
- void ImgReaderOgr::close(void)
- {
-+#if GDAL_VERSION_MAJOR < 2
-   OGRDataSource::DestroyDataSource(m_datasource);
-+#else
-+  GDALClose(m_datasource);
-+#endif
- }
- 
- //---------------------------------------------------------------------------
- void ImgReaderOgr::setCodec(void){
-+#if GDAL_VERSION_MAJOR < 2
-   //register the drivers
-   OGRRegisterAll();
-   //open the input OGR datasource. Datasources can be files, RDBMSes, directories full of files, or even remote web services depending on the driver being used. However, the datasource name is always a single string.
-   m_datasource = OGRSFDriverRegistrar::Open(m_filename.c_str(), FALSE);//FAlSE: do not update
-+#else
-+  //register the drivers
-+  GDALAllRegister();
-+  //open the input OGR datasource. Datasources can be files, RDBMSes, directories full of files, or even remote web services depending on the driver being used. However, the datasource name is always a single string.
-+  m_datasource = (GDALDataset*) GDALOpenEx(m_filename.c_str(), GDAL_OF_READONLY, NULL, NULL, NULL);
-+#endif
-   if( m_datasource == NULL ){
-     std::string errorString="Open failed";
-     throw(errorString);
---- a/src/imageclasses/ImgWriterOgr.h
-+++ b/src/imageclasses/ImgWriterOgr.h
-@@ -62,17 +62,30 @@ public:
-   OGRErr createFeature(OGRFeature* theFeature, int layer=0);
-   int getFieldCount(int layer=0) const;
-   int getFeatureCount(int layer=0) const;
-+#if GDAL_VERSION_MAJOR < 2
-   OGRDataSource* getDataSource(void) {return m_datasource;};
-   OGRSFDriver* getDriver(void) const {return m_datasource->GetDriver();};
-+#else
-+  GDALDataset* getDataSource(void) {return m_datasource;};
-+  GDALDriver* getDriver(void) const {return m_datasource->GetDriver();};
-+#endif
- 
- protected:
-   void setCodec(const std::string& imageType);
-+#if GDAL_VERSION_MAJOR < 2
-   void setCodec(OGRSFDriver *poDriver);
-+#else
-+  void setCodec(GDALDriver *poDriver);
-+#endif
-   
- //   OGRLayer* getLayer(int layer=0);
-     
-   std::string m_filename;
-+#if GDAL_VERSION_MAJOR < 2
-   OGRDataSource *m_datasource;
-+#else
-+  GDALDataset *m_datasource;
-+#endif
- //   vector<OGRLayer*> m_layers;
- };
- 
---- a/src/imageclasses/ImgWriterOgr.cc
-+++ b/src/imageclasses/ImgWriterOgr.cc
-@@ -125,31 +125,58 @@ void ImgWriterOgr::open(const std::strin
- //---------------------------------------------------------------------------
- void ImgWriterOgr::close(void)
- {
-+#if GDAL_VERSION_MAJOR < 2
-   OGRDataSource::DestroyDataSource(m_datasource);
-+#else
-+  GDALClose(m_datasource);
-+#endif
- }
- 
- //---------------------------------------------------------------------------
- void ImgWriterOgr::setCodec(const std::string& imageType){
-+#if GDAL_VERSION_MAJOR < 2
-   //register the drivers
-   OGRRegisterAll();
-   //fetch the OGR file driver
-   OGRSFDriver *poDriver;
-   poDriver = OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(imageType.c_str());
-+#else
-+  //register the drivers
-+  GDALAllRegister();
-+  GDALDriver *poDriver;
-+  poDriver = GetGDALDriverManager()->GetDriverByName(imageType.c_str());
-+#endif
-   if( poDriver == NULL ){
-     std::string errorString="FileOpenError";
-     throw(errorString);
-   }
-+#if GDAL_VERSION_MAJOR < 2
-   m_datasource = OGRSFDriverRegistrar::Open( m_filename.c_str(), TRUE );
-+#else
-+  m_datasource = (GDALDataset*) GDALOpenEx(m_filename.c_str(), GDAL_OF_UPDATE, NULL, NULL, NULL);
-+#endif
-   if( m_datasource == NULL ){
-+#if GDAL_VERSION_MAJOR < 2
-     m_datasource = OGRSFDriverRegistrar::Open( m_filename.c_str(), FALSE );
-+#else
-+    m_datasource = (GDALDataset*) GDALOpenEx(m_filename.c_str(), GDAL_OF_READONLY, NULL, NULL, NULL);
-+#endif
-     if ( m_datasource != NULL){// we can only open in not update mode
-       std::string errorString="Update mode not supported, delete output dataset first";
-       throw(errorString);
-+#if GDAL_VERSION_MAJOR < 2
-       OGRDataSource::DestroyDataSource(m_datasource);
-+#else
-+      GDALClose(m_datasource);
-+#endif
-       m_datasource = NULL;
-     }
-     else //create the data source
-+#if GDAL_VERSION_MAJOR < 2
-       m_datasource=poDriver->CreateDataSource(m_filename.c_str(),NULL);
-+#else
-+      m_datasource=poDriver->Create(m_filename.c_str(),0,0,0,GDT_Unknown,NULL);
-+#endif
-   }
-   else{//datasets exists, always overwrite all layers (no update append for now)
-     int nLayerCount = m_datasource->GetLayerCount();
-@@ -166,23 +193,44 @@ void ImgWriterOgr::setCodec(const std::s
-   }
- }
- 
-+#if GDAL_VERSION_MAJOR < 2
- void ImgWriterOgr::setCodec(OGRSFDriver *poDriver){
-   OGRRegisterAll();
-+#else
-+void ImgWriterOgr::setCodec(GDALDriver *poDriver){
-+  GDALAllRegister();
-+#endif
-   if( poDriver == NULL ){
-     std::string errorString="FileOpenError";
-     throw(errorString);
-   }
-+#if GDAL_VERSION_MAJOR < 2
-   m_datasource = OGRSFDriverRegistrar::Open( m_filename.c_str(), TRUE );
-+#else
-+  m_datasource = (GDALDataset*) GDALOpenEx(m_filename.c_str(), GDAL_OF_UPDATE, NULL, NULL, NULL);
-+#endif
-   if( m_datasource == NULL ){
-+#if GDAL_VERSION_MAJOR < 2
-     m_datasource = OGRSFDriverRegistrar::Open( m_filename.c_str(), FALSE );
-+#else
-+    m_datasource = (GDALDataset*) GDALOpenEx(m_filename.c_str(), GDAL_OF_READONLY, NULL, NULL, NULL);
-+#endif
-     if ( m_datasource != NULL){// we can only open in not update mode
-       std::string errorString="Update mode not supported, delete output dataset first";
-       throw(errorString);
-+#if GDAL_VERSION_MAJOR < 2
-       OGRDataSource::DestroyDataSource(m_datasource);
-+#else
-+      GDALClose(m_datasource);
-+#endif
-       m_datasource = NULL;
-     }
-     else //create the data source
-+#if GDAL_VERSION_MAJOR < 2
-       m_datasource=poDriver->CreateDataSource(m_filename.c_str(),NULL);
-+#else
-+      m_datasource=poDriver->Create(m_filename.c_str(),0,0,0,GDT_Unknown,NULL);
-+#endif
-   }
-   else{//datasets exists, always overwrite all layers (no update append for now)
-     int nLayerCount = m_datasource->GetLayerCount();
diff --git a/debian/patches/series b/debian/patches/series
index aa36bf1..e9e0975 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
 automake-subdir-objects.patch
-gdal-2.0.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pktools.git



More information about the Pkg-grass-devel mailing list