Package: popplerkit.framework
Version: 0.0.20051227svn-7
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 poppler20 (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 popplerkit.framework-0.0.20051227svn/debian/patches/poppler20.patch popplerkit.framework-0.0.20051227svn/debian/patches/poppler20.patch
--- popplerkit.framework-0.0.20051227svn/debian/patches/poppler20.patch	1970-01-01 01:00:00.000000000 +0100
+++ popplerkit.framework-0.0.20051227svn/debian/patches/poppler20.patch	2012-06-14 14:04:10.000000000 +0100
@@ -0,0 +1,117 @@
+Description: Track poppler20 (libpoppler25) API changes
+ Track poppler20 (libpoppler25) API changes:
+ .
+ Add version 0.20 detection to config.sh
+ startDoc now takes a PDFDoc not its XRef
+ findText no longer takes a Catalog argument
+ TextOutputDev now takes a wholeWord argument
+Author: Andy Whitcroft <a...@ubuntu.com>
+Last-Update: 2012-06-14
+Index: popplerkit.framework-0.0.20051227svn/bindings/poppler_splash_renderer.cc
+===================================================================
+--- popplerkit.framework-0.0.20051227svn.orig/bindings/poppler_splash_renderer.cc	2012-06-14 09:51:53.000000000 +0100
++++ popplerkit.framework-0.0.20051227svn/bindings/poppler_splash_renderer.cc	2012-06-14 12:33:45.427732692 +0100
+@@ -57,7 +57,13 @@
+      return;
+    }
+     
+-   SYNCHRONIZED(SPLASH_DEV(output_dev)->startDoc(PDF_DOC(poppler_document)->getXRef()));
++   SYNCHRONIZED(SPLASH_DEV(output_dev)->startDoc(
++#ifdef POPPLER_0_20
++	PDF_DOC(poppler_document)
++#else
++	PDF_DOC(poppler_document)->XRef
++#endif
++   ));
+ }
+ 
+ void poppler_splash_device_destroy(void* output_dev)
+@@ -94,9 +100,12 @@
+ #ifdef POPPLER_0_6
+ 												 gFalse, // printing
+ #else
+-                                                 NULL, // Links
++                                                 NULL // Links
++#endif
++#ifndef POPPLER_0_20
++                                                 , PDF_DOC(poppler_document)->getCatalog()
+ #endif
+-                                                 PDF_DOC(poppler_document)->getCatalog()));
++                                                 ));
+ 
+    return 1;
+ }
+Index: popplerkit.framework-0.0.20051227svn/config.sh
+===================================================================
+--- popplerkit.framework-0.0.20051227svn.orig/config.sh	2012-06-14 09:51:53.000000000 +0100
++++ popplerkit.framework-0.0.20051227svn/config.sh	2012-06-14 10:04:27.775314094 +0100
+@@ -64,6 +64,11 @@
+   POPPLER_VERSION="POPPLER_0_6"
+ fi
+ 
++${PKG_CONFIG} --atleast-version=0.20.0 poppler
++if [ $? -eq 0 ]; then
++  POPPLER_VERSION="POPPLER_0_20"
++fi
++
+ echo $POPPLER_VERSION
+ 
+ # include freetype, just to be sure
+Index: popplerkit.framework-0.0.20051227svn/bindings/GNUmakefile
+===================================================================
+--- popplerkit.framework-0.0.20051227svn.orig/bindings/GNUmakefile	2012-06-14 09:51:53.000000000 +0100
++++ popplerkit.framework-0.0.20051227svn/bindings/GNUmakefile	2012-06-14 10:39:42.001797975 +0100
+@@ -53,4 +53,8 @@
+    bindings_CCFLAGS += -DPOPPLER_0_6
+ endif
+ 
++ifeq ($(POPPLER_0_20), YES)
++   bindings_CCFLAGS += -DPOPPLER_0_20
++endif
++
+ include $(GNUSTEP_MAKEFILES)/subproject.make
+Index: popplerkit.framework-0.0.20051227svn/bindings/poppler_text.cc
+===================================================================
+--- popplerkit.framework-0.0.20051227svn.orig/bindings/poppler_text.cc	2012-06-14 09:51:53.000000000 +0100
++++ popplerkit.framework-0.0.20051227svn/bindings/poppler_text.cc	2012-06-14 14:02:06.922021381 +0100
+@@ -29,7 +29,11 @@
+ void* poppler_text_device_create(int use_phys_layout, int use_raw_text_order, int append)
+ {
+    BEGIN_SYNCHRONIZED;
+-      void* textDevice = new TextOutputDev(NULL, use_phys_layout, use_raw_text_order, append);
++      void* textDevice = new TextOutputDev(NULL, use_phys_layout,
++#ifdef POPPLER_0_20
++					   0,
++#endif
++                                           use_raw_text_order, append);
+    END_SYNCHRONIZED;
+ 
+    return textDevice;
+@@ -56,11 +60,14 @@
+ #endif
+ 			   crop, 
+ #ifdef POPPLER_0_6
+-				gFalse, // printing
++				gFalse // printing
+ #else
+-				NULL, // links
++				NULL // links
++#endif
++#ifndef POPPLER_0_20
++				,PDF_DOC(poppler_document)->getCatalog()
+ #endif
+-				PDF_DOC(poppler_document)->getCatalog()));
++				));
+    return 1;
+ }
+ 
+@@ -79,6 +86,9 @@
+ #ifndef POPPLER_0_4 // 0.5, 0.6
+ 						   gTrue, gFalse,
+ #endif
++#ifdef POPPLER_0_20
++						   gFalse,
++#endif
+                                                    x_min, y_min, x_max, y_max);
+    END_SYNCHRONIZED;
+    
diff -Nru popplerkit.framework-0.0.20051227svn/debian/patches/series popplerkit.framework-0.0.20051227svn/debian/patches/series
--- popplerkit.framework-0.0.20051227svn/debian/patches/series	2012-05-31 16:32:59.000000000 +0100
+++ popplerkit.framework-0.0.20051227svn/debian/patches/series	2012-06-14 10:24:03.000000000 +0100
@@ -1,3 +1,4 @@
 etoile.patch
 poppler06.patch
 C++-compilation.patch
+poppler20.patch

Reply via email to