]> git.pld-linux.org Git - packages/gdal.git/blob - gdal-poppler.patch
- added poppler patch (fixes build with poppler 0.24+)
[packages/gdal.git] / gdal-poppler.patch
1 --- gdal-1.9.2/frmts/pdf/pdfio.h.orig   2013-09-27 19:25:21.549930220 +0200
2 +++ gdal-1.9.2/frmts/pdf/pdfio.h        2013-09-27 19:50:28.013200337 +0200
3 @@ -55,10 +55,11 @@
4                           Guint lengthA, Object *dictA);
5          virtual ~VSIPDFFileStream();
6  
7 -        virtual Stream *   makeSubStream(Guint startA, GBool limitedA,
8 -                                         Guint lengthA, Object *dictA);
9 -        virtual int        getPos();
10 -        virtual Guint      getStart();
11 +        virtual BaseStream *copy();
12 +        virtual Stream *   makeSubStream(Goffset startA, GBool limitedA,
13 +                                         Goffset lengthA, Object *dictA);
14 +        virtual Goffset    getPos();
15 +        virtual Goffset    getStart();
16          virtual StreamKind getKind();
17          virtual GooString *getFileName();
18  
19 @@ -69,8 +70,8 @@
20          virtual void       reset();
21          virtual void       unfilteredReset ();
22          virtual void       close();
23 -        virtual void       setPos(Guint pos, int dir = 0);
24 -        virtual void       moveStart(int delta);
25 +        virtual void       setPos(Goffset pos, int dir = 0);
26 +        virtual void       moveStart(Goffset delta);
27  
28      private:
29          VSIPDFFileStream  *poParent;
30 --- gdal-1.9.2/configure.in.orig        2013-09-27 19:03:37.856651598 +0200
31 +++ gdal-1.9.2/configure.in     2013-09-27 19:24:36.179932130 +0200
32 @@ -3000,10 +3000,10 @@
33          echo 'public:' >> testpoppler.cpp
34          echo '  TestStream() : BaseStream(0,0) {}' >> testpoppler.cpp
35          echo '  ~TestStream() {}' >> testpoppler.cpp
36 -        echo '  virtual Stream *makeSubStream(Guint start, GBool limited, Guint length, Object *dict) { return 0; }' >> testpoppler.cpp
37 -        echo '  virtual void setPos(Guint pos, int dir = 0) { }' >> testpoppler.cpp
38 -        echo '  virtual Guint getStart() { return 0; }' >> testpoppler.cpp
39 -        echo '  virtual void moveStart(int delta) { }' >> testpoppler.cpp
40 +        echo '  virtual Stream *makeSubStream(Goffset start, GBool limited, Goffset length, Object *dict) { return 0; }' >> testpoppler.cpp
41 +        echo '  virtual void setPos(Goffset pos, int dir = 0) { }' >> testpoppler.cpp
42 +        echo '  virtual Goffset getStart() { return 0; }' >> testpoppler.cpp
43 +        echo '  virtual void moveStart(Goffset delta) { }' >> testpoppler.cpp
44          echo '};' >> testpoppler.cpp
45          echo 'int main(int argc, char** argv) { return 0; }' >> testpoppler.cpp
46          if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then
47 --- gdal-1.9.2/frmts/pdf/pdfdataset.cpp.orig    2012-10-09 02:58:26.000000000 +0200
48 +++ gdal-1.9.2/frmts/pdf/pdfdataset.cpp 2013-09-27 19:40:31.413225370 +0200
49 @@ -522,12 +522,12 @@
50  
51  #ifdef USE_POPPLER
52  #ifdef POPPLER_0_20_OR_LATER
53 -static void PDFDatasetErrorFunction(void* userData, ErrorCategory eErrCatagory, int nPos, char *pszMsg)
54 +static void PDFDatasetErrorFunction(void* userData, ErrorCategory eErrCatagory, Goffset nPos, char *pszMsg)
55  {
56      CPLString osError;
57  
58      if (nPos >= 0)
59 -        osError.Printf("Pos = %d, ", nPos);
60 +        osError.Printf("Pos = %lld, ", (long long)nPos);
61      osError += pszMsg;
62  
63      if (strcmp(osError.c_str(), "Incorrect password") == 0)
64 --- gdal-1.9.2/frmts/pdf/pdfio.cpp.orig 2012-10-09 02:58:26.000000000 +0200
65 +++ gdal-1.9.2/frmts/pdf/pdfio.cpp      2013-09-27 20:31:25.879764002 +0200
66 @@ -102,12 +102,17 @@
67      }
68  }
69  
70 +BaseStream *VSIPDFFileStream::copy()
71 +{
72 +    return new VSIPDFFileStream(*this);
73 +}
74 +
75  /************************************************************************/
76  /*                             makeSubStream()                          */
77  /************************************************************************/
78  
79 -Stream *VSIPDFFileStream::makeSubStream(Guint startA, GBool limitedA,
80 -                                        Guint lengthA, Object *dictA)
81 +Stream *VSIPDFFileStream::makeSubStream(Goffset startA, GBool limitedA,
82 +                                        Goffset lengthA, Object *dictA)
83  {
84      return new VSIPDFFileStream(this,
85                                  startA, limitedA,
86 @@ -118,7 +123,7 @@
87  /*                                 getPos()                             */
88  /************************************************************************/
89  
90 -int VSIPDFFileStream::getPos()
91 +Goffset VSIPDFFileStream::getPos()
92  {
93      return nCurrentPos;
94  }
95 @@ -127,7 +132,7 @@
96  /*                                getStart()                            */
97  /************************************************************************/
98  
99 -Guint VSIPDFFileStream::getStart()
100 +Goffset VSIPDFFileStream::getStart()
101  {
102      return nStart;
103  }
104 @@ -273,7 +278,7 @@
105  /*                               setPos()                               */
106  /************************************************************************/
107  
108 -void VSIPDFFileStream::setPos(Guint pos, int dir)
109 +void VSIPDFFileStream::setPos(Goffset pos, int dir)
110  {
111      if (dir >= 0)
112      {
113 @@ -301,7 +306,7 @@
114  /*                            moveStart()                               */
115  /************************************************************************/
116  
117 -void VSIPDFFileStream::moveStart(int delta)
118 +void VSIPDFFileStream::moveStart(Goffset delta)
119  {
120      nStart += delta;
121      VSIFSeekL(f, nCurrentPos = nStart, SEEK_SET);
This page took 0.10035 seconds and 3 git commands to generate.