Bug#679887: gdal: Port to libpoppler25 API

2012-07-13 Thread Pino Toscano
forwarded 679887 http://trac.osgeo.org/gdal/ticket/4668
thanks

Hi,

Alle lunedì 2 luglio 2012, Andy Whitcroft ha scritto:
> 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.

This patch is -not- compatible with the Poppler (0.18.x) currently in 
Debian.
On the other hand, the compatibility of gdal with poppler >= 0.20 has 
been fixed upstream (with r23991 on trunk, and r24437 on the 1.9 
branch), and will be part of the next 1.9.2 release.

-- 
Pino Toscano


signature.asc
Description: This is a digitally signed message part.
___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Bug#679887: gdal: Port to libpoppler25 API

2012-07-02 Thread Andy Whitcroft
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.0 +0100
+++ gdal-1.9.0/debian/patches/series	2012-06-13 16:49:30.0 +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.0 +0100
+++ gdal-1.9.0/debian/patches/track_libpoppler25_abi_changes	2012-06-13 17:15:08.0 +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 
+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.0 +
 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;
___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel