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 <a...@ubuntu.com> 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.