Bug#679893: popplerkit.framework: Port to libpoppler25 API

2013-07-03 Thread Pino Toscano
Hi GNUstep people,

Alle martedì 7 maggio 2013, Pino Toscano ha scritto:
> 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 seems fine, so could it be possible to have it in, now
> that Wheezy has been released?

Ping...

I will most probably NMU this patch at the end of this month, since 
Poppler is outdated enough and I would not like to delay this 
indefinitely...

Thanks,
-- 
Pino Toscano


signature.asc
Description: This is a digitally signed message part.


Bug#679893: popplerkit.framework: Port to libpoppler25 API

2013-05-07 Thread Pino Toscano
Alle martedì 7 maggio 2013, Pino Toscano ha scritto:
> Hi GNUstep people,
> 
> 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 seems fine, so could it be possible to have it in, now
> that Wheezy has been released?
> I'm attaching it, refreshed and with a better header, as independent
> patch out of the ubuntu debdiff for easier review/applying.

And now with the actual patch...

-- 
Pino Toscano
Description: Support Poppler 0.20
 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 
Last-Update: 2012-06-14
Bug-Debian: http://bugs.debian.org/679893

--- popplerkit.framework-0.0.20051227svn.orig/bindings/poppler_splash_renderer.cc
+++ popplerkit.framework-0.0.20051227svn/bindings/poppler_splash_renderer.cc
@@ -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;
 }
--- popplerkit.framework-0.0.20051227svn.orig/config.sh
+++ popplerkit.framework-0.0.20051227svn/config.sh
@@ -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
--- popplerkit.framework-0.0.20051227svn.orig/bindings/GNUmakefile
+++ popplerkit.framework-0.0.20051227svn/bindings/GNUmakefile
@@ -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
--- popplerkit.framework-0.0.20051227svn.orig/bindings/poppler_text.cc
+++ popplerkit.framework-0.0.20051227svn/bindings/poppler_text.cc
@@ -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;



signature.asc
Description: This is a digitally signed message part.


Bug#679893: popplerkit.framework: Port to libpoppler25 API

2013-05-07 Thread Pino Toscano
retitle 679893 popplerkit.framework: compatibility with poppler 0.20
thanks

Hi GNUstep people,

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 seems fine, so could it be possible to have it in, now that 
Wheezy has been released?
I'm attaching it, refreshed and with a better header, as independent 
patch out of the ubuntu debdiff for easier review/applying.

Thanks,
-- 
Pino Toscano


signature.asc
Description: This is a digitally signed message part.


Bug#679893: popplerkit.framework: Port to libpoppler25 API

2012-07-02 Thread Andy Whitcroft
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.0 +0100
+++ popplerkit.framework-0.0.20051227svn/debian/patches/poppler20.patch	2012-06-14 14:04:10.0 +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 
+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.0 +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.0 +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.0 +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.0 +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)->getCat