]> git.pld-linux.org Git - packages/gdal.git/commitdiff
- added poppler patch (fixes build with poppler 0.24+)
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 27 Sep 2013 19:40:25 +0000 (21:40 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 27 Sep 2013 19:40:30 +0000 (21:40 +0200)
gdal-poppler.patch [new file with mode: 0644]
gdal.spec

diff --git a/gdal-poppler.patch b/gdal-poppler.patch
new file mode 100644 (file)
index 0000000..58e2522
--- /dev/null
@@ -0,0 +1,121 @@
+--- gdal-1.9.2/frmts/pdf/pdfio.h.orig  2013-09-27 19:25:21.549930220 +0200
++++ gdal-1.9.2/frmts/pdf/pdfio.h       2013-09-27 19:50:28.013200337 +0200
+@@ -55,10 +55,11 @@
+                          Guint lengthA, Object *dictA);
+         virtual ~VSIPDFFileStream();
+-        virtual Stream *   makeSubStream(Guint startA, GBool limitedA,
+-                                         Guint lengthA, Object *dictA);
+-        virtual int        getPos();
+-        virtual Guint      getStart();
++        virtual BaseStream *copy();
++        virtual Stream *   makeSubStream(Goffset startA, GBool limitedA,
++                                         Goffset lengthA, Object *dictA);
++        virtual Goffset    getPos();
++        virtual Goffset    getStart();
+         virtual StreamKind getKind();
+         virtual GooString *getFileName();
+@@ -69,8 +70,8 @@
+         virtual void       reset();
+         virtual void       unfilteredReset ();
+         virtual void       close();
+-        virtual void       setPos(Guint pos, int dir = 0);
+-        virtual void       moveStart(int delta);
++        virtual void       setPos(Goffset pos, int dir = 0);
++        virtual void       moveStart(Goffset delta);
+     private:
+         VSIPDFFileStream  *poParent;
+--- gdal-1.9.2/configure.in.orig       2013-09-27 19:03:37.856651598 +0200
++++ gdal-1.9.2/configure.in    2013-09-27 19:24:36.179932130 +0200
+@@ -3000,10 +3000,10 @@
+         echo 'public:' >> testpoppler.cpp
+         echo '  TestStream() : BaseStream(0,0) {}' >> testpoppler.cpp
+         echo '  ~TestStream() {}' >> testpoppler.cpp
+-        echo '  virtual Stream *makeSubStream(Guint start, GBool limited, Guint length, Object *dict) { return 0; }' >> testpoppler.cpp
+-        echo '  virtual void setPos(Guint pos, int dir = 0) { }' >> testpoppler.cpp
+-        echo '  virtual Guint getStart() { return 0; }' >> testpoppler.cpp
+-        echo '  virtual void moveStart(int delta) { }' >> testpoppler.cpp
++        echo '  virtual Stream *makeSubStream(Goffset start, GBool limited, Goffset length, Object *dict) { return 0; }' >> testpoppler.cpp
++        echo '  virtual void setPos(Goffset pos, int dir = 0) { }' >> testpoppler.cpp
++        echo '  virtual Goffset getStart() { return 0; }' >> testpoppler.cpp
++        echo '  virtual void moveStart(Goffset delta) { }' >> testpoppler.cpp
+         echo '};' >> testpoppler.cpp
+         echo 'int main(int argc, char** argv) { return 0; }' >> testpoppler.cpp
+         if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then
+--- gdal-1.9.2/frmts/pdf/pdfdataset.cpp.orig   2012-10-09 02:58:26.000000000 +0200
++++ gdal-1.9.2/frmts/pdf/pdfdataset.cpp        2013-09-27 19:40:31.413225370 +0200
+@@ -522,12 +522,12 @@
+ #ifdef USE_POPPLER
+ #ifdef POPPLER_0_20_OR_LATER
+-static void PDFDatasetErrorFunction(void* userData, ErrorCategory eErrCatagory, int nPos, char *pszMsg)
++static void PDFDatasetErrorFunction(void* userData, ErrorCategory eErrCatagory, Goffset nPos, char *pszMsg)
+ {
+     CPLString osError;
+     if (nPos >= 0)
+-        osError.Printf("Pos = %d, ", nPos);
++        osError.Printf("Pos = %lld, ", (long long)nPos);
+     osError += pszMsg;
+     if (strcmp(osError.c_str(), "Incorrect password") == 0)
+--- gdal-1.9.2/frmts/pdf/pdfio.cpp.orig        2012-10-09 02:58:26.000000000 +0200
++++ gdal-1.9.2/frmts/pdf/pdfio.cpp     2013-09-27 20:31:25.879764002 +0200
+@@ -102,12 +102,17 @@
+     }
+ }
++BaseStream *VSIPDFFileStream::copy()
++{
++    return new VSIPDFFileStream(*this);
++}
++
+ /************************************************************************/
+ /*                             makeSubStream()                          */
+ /************************************************************************/
+-Stream *VSIPDFFileStream::makeSubStream(Guint startA, GBool limitedA,
+-                                        Guint lengthA, Object *dictA)
++Stream *VSIPDFFileStream::makeSubStream(Goffset startA, GBool limitedA,
++                                        Goffset lengthA, Object *dictA)
+ {
+     return new VSIPDFFileStream(this,
+                                 startA, limitedA,
+@@ -118,7 +123,7 @@
+ /*                                 getPos()                             */
+ /************************************************************************/
+-int VSIPDFFileStream::getPos()
++Goffset VSIPDFFileStream::getPos()
+ {
+     return nCurrentPos;
+ }
+@@ -127,7 +132,7 @@
+ /*                                getStart()                            */
+ /************************************************************************/
+-Guint VSIPDFFileStream::getStart()
++Goffset VSIPDFFileStream::getStart()
+ {
+     return nStart;
+ }
+@@ -273,7 +278,7 @@
+ /*                               setPos()                               */
+ /************************************************************************/
+-void VSIPDFFileStream::setPos(Guint pos, int dir)
++void VSIPDFFileStream::setPos(Goffset pos, int dir)
+ {
+     if (dir >= 0)
+     {
+@@ -301,7 +306,7 @@
+ /*                            moveStart()                               */
+ /************************************************************************/
+-void VSIPDFFileStream::moveStart(int delta)
++void VSIPDFFileStream::moveStart(Goffset delta)
+ {
+     nStart += delta;
+     VSIFSeekL(f, nCurrentPos = nStart, SEEK_SET);
index 0acccc4930820eee829fd3e22068a3633c40e0e2..54074c50b68d4124395eb702a7914d67368742a7 100644 (file)
--- a/gdal.spec
+++ b/gdal.spec
@@ -55,6 +55,7 @@ Patch3:               %{name}-fpic.patch
 Patch4:                %{name}-format-security.patch
 Patch5:                %{name}-openjpeg2.patch
 Patch6:                %{name}-hdf4-eos.patch
+Patch7:                %{name}-poppler.patch
 URL:           http://www.gdal.org/
 %{?with_opencl:BuildRequires:  OpenCL-devel >= 1.0}
 %{?with_armadillo:BuildRequires:       armadillo-devel}
@@ -95,7 +96,7 @@ BuildRequires:        ogdi-devel >= 3.1
 BuildRequires: perl-devel
 %{?with_php:BuildRequires:     php-devel}
 %{?with_podofo:BuildRequires:  podofo-devel}
-%{?with_poppler:BuildRequires: poppler-devel}
+%{?with_poppler:BuildRequires: poppler-devel >= 0.24}
 # ensure it's compiled with PQescapeStringConn support
 BuildRequires: postgresql-backend-devel >= 8.1.4
 BuildRequires: postgresql-devel >= 8.1.4
@@ -176,7 +177,7 @@ Requires:   ogdi-devel >= 3.1
 %{?with_openjpeg:Requires:     openjpeg2-devel >= 2.0.0-2}
 #Requires:     pcidsk-devel > 0.3
 %{?with_podofo:Requires:       podofo-devel}
-%{?with_poppler:Requires:      poppler-devel}
+%{?with_poppler:Requires:      poppler-devel >= 0.24}
 Requires:      postgresql-devel
 Requires:      proj-devel >= 4
 Requires:      sqlite3-devel >= 3.0.0
@@ -263,6 +264,7 @@ osr.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 # need to regenerate (old ones don't support perl 5.10)
 %{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
This page took 0.074803 seconds and 4 git commands to generate.