Package: gdal
Version: 1.9.0-3
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu quantal ubuntu-patch

Dear Maintainer,

We are using this patch in Ubuntu to handle the changes in libpoppler's
API version 19 to version 25/26.  Please consider for Debian.

  * Track changes to libpoppler25 API.


Thanks for considering the patch.

-apw

-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 
'precise-proposed'), (500, 'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-26-generic (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru gdal-1.9.0/debian/patches/series gdal-1.9.0/debian/patches/series
--- gdal-1.9.0/debian/patches/series	2012-06-05 13:29:19.000000000 +0100
+++ gdal-1.9.0/debian/patches/series	2012-06-13 16:49:30.000000000 +0100
@@ -9,3 +9,4 @@
 mrsid-plugin
 symver
 spatialite
+track_libpoppler25_abi_changes
diff -Nru gdal-1.9.0/debian/patches/track_libpoppler25_abi_changes gdal-1.9.0/debian/patches/track_libpoppler25_abi_changes
--- gdal-1.9.0/debian/patches/track_libpoppler25_abi_changes	1970-01-01 01:00:00.000000000 +0100
+++ gdal-1.9.0/debian/patches/track_libpoppler25_abi_changes	2012-06-13 17:15:08.000000000 +0100
@@ -0,0 +1,46 @@
+Description: Track changes to libpoppler25 API
+ Track changes to libpoppler 25 ABI.
+ .
+ startDoc now takes a PDFDoc rather than its Xref.
+ setErrorFunction -> setErrorCallback.
+Author: Andy Whitcroft <a...@ubuntu.com>
+Last-Update: 2012-06-13
+Index: gdal-1.9.0/frmts/pdf/pdfdataset.cpp
+===================================================================
+--- gdal-1.9.0.orig/frmts/pdf/pdfdataset.cpp	2012-02-20 09:48:39.000000000 +0000
++++ gdal-1.9.0/frmts/pdf/pdfdataset.cpp	2012-06-13 17:14:21.967465186 +0100
+@@ -330,7 +330,7 @@
+         SplashOutputDev *poSplashOut;
+         poSplashOut = new SplashOutputDev(splashModeRGB8, 4, gFalse, sColor);
+         PDFDoc* poDoc = poGDS->poDoc;
+-        poSplashOut->startDoc(poDoc->getXRef());
++        poSplashOut->startDoc(poDoc);
+         double dfDPI = poGDS->dfDPI;
+ 
+         /* EVIL: we modify a private member... */
+@@ -521,13 +521,14 @@
+ /************************************************************************/
+ 
+ #ifdef USE_POPPLER
+-static void PDFDatasetErrorFunction(int nPos, char *pszMsg, va_list args)
++static void PDFDatasetErrorCallback( void *data, ErrorCategory category,
++				     int nPos, char *msg )
+ {
+     CPLString osError;
+ 
+     if (nPos >= 0)
+         osError.Printf("Pos = %d, ", nPos);
+-    osError += CPLString().vPrintf(pszMsg, args);
++    osError += CPLString().Printf("%s", msg);
+ 
+     if (strcmp(osError.c_str(), "Incorrect password") == 0)
+         return;
+@@ -570,7 +571,7 @@
+     GooString* poUserPwd = NULL;
+ 
+     /* Set custom error handler for poppler errors */
+-    setErrorFunction(PDFDatasetErrorFunction);
++    setErrorCallback(PDFDatasetErrorCallback, NULL);
+ 
+     PDFDoc* poDoc = NULL;
+     ObjectAutoFree oObj;

Reply via email to