debian/0000775000000000000000000000000012270037324007170 5ustar debian/copyright0000664000000000000000000000225511761672165011143 0ustar This package was debianized by Hubert Chan on Wed, 28 Dec 2005 00:35:07 -0700. It was downloaded from http://download.gna.org/gsimageapps/PopplerKit Copyright Holder: Stefan Kleine Stegemann License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. The Debian packaging is Copyright 2005-2006, Hubert Chan and is licensed under the GNU General Public License (see above). debian/changelog0000664000000000000000000000750412270037324011050 0ustar popplerkit.framework (0.0.20051227svn-7.1build1) trusty; urgency=medium * Rebuild for the new poppler soname -- Sebastien Bacher Wed, 22 Jan 2014 22:55:41 +0100 popplerkit.framework (0.0.20051227svn-7.1) unstable; urgency=low * Non-maintainer upload. * Fix compatibility with Poppler >= 0.20.x (Closes: #679893) -- Pino Toscano Tue, 23 Jul 2013 12:33:12 +0200 popplerkit.framework (0.0.20051227svn-7) unstable; urgency=low * debian/compat: Set to 8. * debian/control (Uploaders): Remove Hubert as per his request. (Build-Depends): Add libfontconfig1-dev (Closes: #661075). Replace libpoppler-dev with libpoppler-private-dev (Closes: #660109). Remove dpatch. Unversion libgnustep-gui-dev. Bump debhleper to >= 8. (Vcs-Arch): Replace with... (Vcs-Git): ...as the package is maintained with Git now. (Vcs-Browser): New field. (Depends): Add ${misc:Depends}. (Standards-Version): Bump to 3.9.3; no changes necessary. * debian/source/format: New file. * debian/rules: Don't include /usr/share/cdbs/1/rules/dpatch.mk. (LDFLAGS): New variable, define to -Wl,-z,defs -Wl,--as-needed. (DEB_MAKE_EXTRA_ARGS): Explicitly define to ensure the package is built with hardening-enabled OBJCFLAGS and CCFLAGS. * debian/patches/01_etoile.dpatch: * debian/patches/02_poppler06.dpatch: * debian/patches/05_C++-compilation.dpatch: Convert and rename to standard patches. * debian/patches/00list: Rename to... * debian/patches/series: ...and amend patches' names. -- Yavor Doganov Thu, 31 May 2012 18:37:17 +0300 popplerkit.framework (0.0.20051227svn-6) unstable; urgency=low * debian/compat: Switch to debhelper 6; 4 is now deprecated. * debian/control: Wrap all fields for diff-friendliness. (Build-Depends): Bump debhelper to >= 6. (Standards-Version): Set to 3.8.1; no changes needed. (Vcs-Arch): New field. (libpopplerkit0)
: Remove; inherited from the Source stanza. (Maintainer): Set to the GNUstep team. (Uploaders): Add myself. * debian/patches/05_C++-compilation.dpatch: New patch, fixes FTBFS with gnustep-make 2.0.8. * debian/patches/01_etoile.dpatch: Link against all libraries we use symbols from: libobjc, libgnustep-base, libgnustep-gui, libfontconfig. * debian/patches/00list: Update. * debian/rules: Export messages=yes to get verbose build logs. * debian/watch: Add a dummy one. -- Yavor Doganov Fri, 20 Mar 2009 13:47:10 +0200 popplerkit.framework (0.0.20051227svn-5) unstable; urgency=low * Recompile with new GNUstep. * debian/patches/02_poppler06.dpatch: Add support for Poppler 0.6 (taken from Étoilé SVN). (closes: #451952) * debian/control: use ${binary:Version} instead of ${Source-Version}. -- Hubert Chathi Tue, 11 Dec 2007 09:27:40 -0500 popplerkit.framework (0.0.20051227svn-4) unstable; urgency=low * Update maintainer address. * Apply patches from Étoilé (thanks to Rob Burns, Jason Clouse, and Yen-Ju Chen). * Add support Poppler 0.5. * Fix distorted colours in splash renderer. * Add missing check for fontconfig. -- Hubert Chan Wed, 23 May 2007 17:50:38 -0400 popplerkit.framework (0.0.20051227svn-3) unstable; urgency=low * Recompile with new GNUstep libraries. * Bump standards version to 3.7.2. (no changes) * Add Debianization copyright info to copyright file. -- Hubert Chan Wed, 30 Aug 2006 22:09:21 -0600 popplerkit.framework (0.0.20051227svn-2) unstable; urgency=low * Drop SONAME from -dev package name. -- Hubert Chan Wed, 29 Mar 2006 21:57:43 -0700 popplerkit.framework (0.0.20051227svn-1) unstable; urgency=low * Initial release (closes: #342134). -- Hubert Chan Wed, 28 Dec 2005 00:35:07 -0700 debian/rules0000775000000000000000000000220211761716133010252 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DEB_GS_FRAMEWORKS = PopplerKit DEB_GS_CURRENT_VERSION_NAME_PopplerKit = 1.0 DEB_GS_DEVPKG_NAME_PopplerKit = libpopplerkit-dev include /usr/share/cdbs/1/rules/gnustep.mk include /usr/share/cdbs/1/class/gnumakefile.mk DEB_GS_AUTO_LINTIAN_OVERRIDES = y DEB_GS_AUTO_DH_INSTALL = y DEB_DH_SHLIBDEPS_INCLUDE = $(d_lib)/$(GS_LIBS_DIR) framework = PopplerKit d_lib = debian/$(DEB_GS_LIBPKG_NAME_$(framework)) frameworkver = $(DEB_GS_CURRENT_VERSION_NAME_$(framework)) export messages=yes LDFLAGS += -Wl,-z,defs -Wl,--as-needed DEB_MAKE_EXTRA_ARGS += OBJCFLAGS="$(CFLAGS)" CCFLAGS="$(CFLAGS)" clean:: rm -f config.make binary-post-install/libpopplerkit0:: : # use fonts from gsfonts package instead of locally distributed ones fonts=`ls Fonts/ | sed -e s,Fonts/,,`; \ for i in $$fonts; do \ rm $(d_lib)/$(GS_FRAMEWORKS_DIR)/$(framework).framework/Versions/$(frameworkver)/Resources/$$i; \ ln -s /usr/share/fonts/type1/gsfonts/$$i \ $(d_lib)/$(GS_FRAMEWORKS_DIR)/$(framework).framework/Versions/$(frameworkver)/Resources/$$i; \ done dh_link -plibpopplerkit0 debian/source/0000775000000000000000000000000011761704605010477 5ustar debian/source/format0000664000000000000000000000001411761704605011705 0ustar 3.0 (quilt) debian/control0000664000000000000000000000303511761713472010605 0ustar Source: popplerkit.framework Priority: optional Maintainer: Debian GNUstep maintainers Uploaders: Yavor Doganov Build-Depends: cdbs, debhelper (>= 8), pkg-config, libgnustep-gui-dev, libfreetype6-dev, libfontconfig1-dev, libpoppler-private-dev Vcs-Git: git://git.debian.org/pkg-gnustep/popplerkit.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-gnustep/popplerkit.git Standards-Version: 3.9.3 Section: libs Package: libpopplerkit-dev Section: libdevel Architecture: any Depends: libpopplerkit0 (= ${binary:Version}), libgnustep-gui-dev, ${misc:Depends} Description: GNUstep framework for rendering PDF content (development files) PopplerKit is a GNUstep framework for accessing and rendering PDF content. It is based on the poppler library. . Its features are: - Render PDF content. - Extract text from a PDF document. - Access a PDF document's outline. - Search in PDF documents. . This package contains the development files. Package: libpopplerkit0 Architecture: any Depends: gsfonts, ${shlibs:Depends}, ${misc:Depends} Description: GNUstep framework for rendering PDF content (library files) PopplerKit is a GNUstep framework for accessing and rendering PDF content. It is based on the poppler library. . Its features are: - Render PDF content. - Extract text from a PDF document. - Access a PDF document's outline. - Search in PDF documents. . This package contains the runtime libraries. debian/compat0000664000000000000000000000000211761713246010376 0ustar 8 debian/watch0000664000000000000000000000006011761672165010231 0ustar # There are no releases of PopplerKit to track. debian/patches/0000775000000000000000000000000012173455225010625 5ustar debian/patches/etoile.patch0000664000000000000000000002145211761706671013141 0ustar Patches from Étoilé: - Add support Poppler 0.5 - Fix distorted colours in splash renderer - Add missing check for fontconfig --- popplerkit.framework.orig/bindings/GNUmakefile +++ popplerkit.framework/bindings/GNUmakefile @@ -44,4 +44,12 @@ bindings_C_FILES += poppler_cairo_img_renderer.c endif +ifeq ($(POPPLER_0_4), YES) + bindings_CFLAGS += -DPOPPLER_0_4 +endif + +ifeq ($(POPPLER_0_5), YES) + bindings_CFLAGS += -DPOPPLER_0_5 +endif + include $(GNUSTEP_MAKEFILES)/subproject.make --- popplerkit.framework.orig/bindings/poppler.cc +++ popplerkit.framework/bindings/poppler.cc @@ -124,7 +124,9 @@ } globalParams = new GlobalParams(NULL); +#ifdef POPPLER_0_4 globalParams->setupBaseFontsFc(NULL); +#endif //dump_fonts(FcConfigGetCurrent()); fprintf(stderr, "poppler library initialized\n"); fflush(stderr); } --- popplerkit.framework.orig/bindings/poppler_cairo_img_renderer.cc +++ popplerkit.framework/bindings/poppler_cairo_img_renderer.cc @@ -49,13 +49,25 @@ if (rotate == 90 || rotate == 270) { +#ifdef POPPLER_0_4 width = MAX((int)(page->getHeight() * scale + 0.5), 1); height = MAX((int)(page->getWidth() * scale + 0.5), 1); +#endif +#ifdef POPPLER_0_5 + width = MAX((int)(page->getMediaHeight() * scale + 0.5), 1); + height = MAX((int)(page->getMediaWidth() * scale + 0.5), 1); +#endif } else { +#ifdef POPPLER_0_4 width = MAX((int)(page->getWidth() * scale + 0.5), 1); height = MAX((int)(page->getHeight() * scale + 0.5), 1); +#endif +#ifdef POPPLER_0_5 + width = MAX((int)(page->getMediaWidth() * scale + 0.5), 1); + height = MAX((int)(page->getMediaHeight() * scale + 0.5), 1); +#endif } int rowstride = width * 4; @@ -64,7 +76,11 @@ cairo_surface_t* surface = cairo_image_surface_create_for_data(data, CAIRO_FORMAT_ARGB32, width, height, rowstride); +#ifdef POPPLER_0_5 + output_dev->device->setCairo(cairo_create(surface)); +#else output_dev->device->setSurface(surface); +#endif output_dev->surface = surface; output_dev->data = data; } @@ -122,6 +138,9 @@ SYNCHRONIZED(PAGE(poppler_page)->displaySlice(CAIRO_DEV_IMG(output_dev)->device, (double)hDPI, (double)vDPI, rotate, +#ifdef POPPLER_0_5 + gTrue, // use MediaBox +#endif gTrue, // Crop (int)sliceX, (int)sliceY, (int)sliceW, (int)sliceH, --- popplerkit.framework.orig/bindings/poppler_page.cc +++ popplerkit.framework/bindings/poppler_page.cc @@ -66,7 +66,14 @@ return -1; } + +#ifdef POPPLER_0_4 return PAGE(poppler_page)->getWidth(); +#endif +#ifdef POPPLER_0_5 + return PAGE(poppler_page)->getMediaWidth(); +#endif + } double poppler_page_get_height(void* poppler_page) @@ -76,5 +83,11 @@ return -1; } +#ifdef POPPLER_0_4 return PAGE(poppler_page)->getHeight(); +#endif +#ifdef POPPLER_0_5 + return PAGE(poppler_page)->getMediaHeight(); +#endif + } --- popplerkit.framework.orig/bindings/poppler_splash_renderer.cc +++ popplerkit.framework/bindings/poppler_splash_renderer.cc @@ -35,8 +35,17 @@ { BEGIN_SYNCHRONIZED; SplashColor white; +#ifdef POPPLER_0_4 white.rgb8 = splashMakeRGB8(bg_red, bg_green, bg_blue); void* splashDevice = new SplashOutputDev(splashModeRGB8, gFalse, white); +#endif +#ifdef POPPLER_0_5 + white[0] = bg_red; + white[1] = bg_green; + white[2] = bg_blue; + // I'm not sure what bitmapRowPad should be, 1 is just a guess. + void* splashDevice = new SplashOutputDev(splashModeRGB8, 1, gFalse, white); +#endif END_SYNCHRONIZED; return splashDevice; @@ -77,6 +86,9 @@ SYNCHRONIZED(PAGE(poppler_page)->displaySlice(SPLASH_DEV(output_dev), (double)hDPI, (double)vDPI, rotate, +#ifdef POPPLER_0_5 + gTrue, // useMediaBox +#endif gTrue, // Crop (int)sliceX, (int)sliceY, (int)sliceW, (int)sliceH, @@ -109,22 +121,39 @@ return 0; } +#ifdef POPPLER_0_4 SplashRGB8* rgb8; +#endif +#ifdef POPPLER_0_5 + SplashColorPtr color; +#endif unsigned char* dataPtr; +#ifdef POPPLER_0_4 rgb8 = SPLASH_BITMAP(bitmap)->getDataPtr().rgb8; +#endif +#ifdef POPPLER_0_5 + color = SPLASH_BITMAP(bitmap)->getDataPtr(); +#endif dataPtr = *data; for (int row = 0; row < SPLASH_BITMAP(bitmap)->getHeight(); row++) { for (int col = 0; col < SPLASH_BITMAP(bitmap)->getWidth(); col++) { +#ifdef POPPLER_0_4 *dataPtr++ = splashRGB8R(*rgb8); *dataPtr++ = splashRGB8G(*rgb8); *dataPtr++ = splashRGB8B(*rgb8); ++rgb8; +#endif +#ifdef POPPLER_0_5 + *dataPtr++ = splashRGB8R(color); + *dataPtr++ = splashRGB8G(color); + *dataPtr++ = splashRGB8B(color); + color = color + 3; +#endif } } - return 1; } --- popplerkit.framework.orig/bindings/poppler_text.cc +++ popplerkit.framework/bindings/poppler_text.cc @@ -49,8 +49,12 @@ if (!text_device || !poppler_page || !poppler_document) return 0; - SYNCHRONIZED(PAGE(poppler_page)->display(TEXT_DEV(text_device), hDPI, vDPI, rotate, crop, - NULL, PDF_DOC(poppler_document)->getCatalog())); + SYNCHRONIZED(PAGE(poppler_page)->display(TEXT_DEV(text_device), + hDPI, vDPI, rotate, +#ifdef POPPLER_0_5 + gTrue, // useMediaBox +#endif + crop, NULL, PDF_DOC(poppler_document)->getCatalog())); return 1; } @@ -66,6 +70,9 @@ int result = TEXT_DEV(text_device)->findText(text_utf32, text_len, start_at_top, stop_at_bottom, start_at_last, stop_at_last, +#ifdef POPPLER_0_5 + gTrue, gFalse, +#endif x_min, y_min, x_max, y_max); END_SYNCHRONIZED; --- popplerkit.framework.orig/config.sh +++ popplerkit.framework/config.sh @@ -15,6 +15,14 @@ POPPLER_CFLAGS=`${PKG_CONFIG} --cflags poppler` POPPLER_LIBS="${POPPLER_LDFLAGS} `${PKG_CONFIG} --libs poppler`" +# fontconfig +${PKG_CONFIG} --exists fontconfig +if [ $? -ne 0 ]; then + echo "fontconfig library required but not found!" + exit 1 +fi +FONTCONFIG_LIBS=`${PKG_CONFIG} --libs fontconfig` + # poppler splash device ${PKG_CONFIG} --exists poppler-splash if [ $? -ne 0 ]; then @@ -30,16 +38,31 @@ echo "poppler-cairo not found, building without cairo rendering" HAVE_CAIRO="NO" else - HAVE_CAIRO="YES" - POPPLER_CFLAGS="${POPPLER_CFLAGS} `${PKG_CONFIG} --cflags poppler-cairo`" - POPPLER_LIBS="${POPPLER_LDFLAGS} `${PKG_CONFIG} --libs poppler-cairo`" +# Disable Cairo support for now to avoid most of problem +# HAVE_CAIRO="YES" +# POPPLER_CFLAGS="${POPPLER_CFLAGS} `${PKG_CONFIG} --cflags poppler-cairo`" +# POPPLER_LIBS="${POPPLER_LDFLAGS} `${PKG_CONFIG} --libs poppler-cairo`" + HAVE_CAIRO="NO" +fi + +# check poppler version +${PKG_CONFIG} --atleast-version=0.4 poppler +if [ $? -eq 0 ]; then + POPPLER_VERSION="POPPLER_0_4" +else + echo "PopplerKit does not support this version of poppler" + exit 1 +fi + +${PKG_CONFIG} --atleast-version=0.5 poppler +if [ $? -eq 0 ]; then + POPPLER_VERSION="POPPLER_0_5" fi # include freetype, just to be sure ${PKG_CONFIG} --exists freetype2 if [ $? -eq 0 ]; then FT_CFLAGS=`${PKG_CONFIG} --cflags freetype2` - FT_LIBS=`${PKG_CONFIG} --libs freetype2` else FT_CONFIG=`which freetype-config 2>/dev/null` if [ -z "${FT_CONFIG}" ]; then @@ -47,17 +70,19 @@ exit 1 fi FT_CFLAGS=`${FT_CONFIG} --cflags` - FT_LIBS=`${FT_CONFIG} --libs` fi # write config.make echo "# config.make, generated at `date`" >config.make echo "POPPLER_CFLAGS=${POPPLER_CFLAGS}" >>config.make echo "POPPLER_LIBS=${POPPLER_LIBS}" >>config.make +echo "${POPPLER_VERSION}=YES" >> config.make echo "FT_CFLAGS=${FT_CFLAGS}" >> config.make -echo "FT_LIBS=${FT_LIBS}" >> config.make -echo "ADDITIONAL_CFLAGS=\$(POPPLER_CFLAGS) \$(FT_CFLAGS)" >> config.make -echo "ADDITIONAL_LDFLAGS=\$(POPPLER_LIBS) \$(POPPLER_LIBS)" >> config.make +echo "FONTCONFIG_LIBS=${FONTCONFIG_LIBS}" >> config.make +echo "ADDITIONAL_CFLAGS+=\$(POPPLER_CFLAGS) \$(FT_CFLAGS)" >> config.make +echo "LIBRARIES_DEPEND_UPON=\$(OBJC_LIBS) \$(FND_LIBS) \$(GUI_LIBS) \$(FONTCONFIG_LIBS) \$(POPPLER_LIBS)" >> config.make +# we add -I/usr/X11R6/include for older FreeBSD version. +echo "ADDITIONAL_INCLUDE_DIRS += -I/usr/X11R6/include" >> config.make echo "HAVE_CAIRO=${HAVE_CAIRO}" >>config.make exit 0 debian/patches/poppler06.patch0000664000000000000000000001151711761707624013507 0ustar Patch from Étoilé: - Add support Poppler 0.6 --- popplerkit.orig/bindings/poppler_page.cc +++ popplerkit/bindings/poppler_page.cc @@ -33,7 +33,8 @@ return NULL; } - if ((pageIndex <= 0) || (pageIndex > PDF_DOC(poppler_document)->getNumPages())) + if ((pageIndex <= 0) || + ((int)pageIndex > PDF_DOC(poppler_document)->getNumPages())) { return NULL; } @@ -69,8 +70,7 @@ #ifdef POPPLER_0_4 return PAGE(poppler_page)->getWidth(); -#endif -#ifdef POPPLER_0_5 +#else return PAGE(poppler_page)->getMediaWidth(); #endif @@ -85,9 +85,7 @@ #ifdef POPPLER_0_4 return PAGE(poppler_page)->getHeight(); -#endif -#ifdef POPPLER_0_5 +#else return PAGE(poppler_page)->getMediaHeight(); #endif - } --- popplerkit.orig/bindings/poppler.cc +++ popplerkit/bindings/poppler.cc @@ -110,7 +110,7 @@ } // tell fontconfig about application fonts - for (int i = 0; i < nappFonts; i++) + for (unsigned int i = 0; i < nappFonts; i++) { if (FcConfigAppFontAddFile(FcConfigGetCurrent(), appFonts[i])) { @@ -118,12 +118,16 @@ } else { - fprintf(stderr, "failed to register application font %s\n"); + fprintf(stderr, "failed to register application font %s\n", appFonts[i]); } fflush(stderr); } +#ifdef POPPLER_0_6 + globalParams = new GlobalParams(); +#else globalParams = new GlobalParams(NULL); +#endif #ifdef POPPLER_0_4 globalParams->setupBaseFontsFc(NULL); #endif --- popplerkit.orig/bindings/poppler_splash_renderer.cc +++ popplerkit/bindings/poppler_splash_renderer.cc @@ -38,8 +38,7 @@ #ifdef POPPLER_0_4 white.rgb8 = splashMakeRGB8(bg_red, bg_green, bg_blue); void* splashDevice = new SplashOutputDev(splashModeRGB8, gFalse, white); -#endif -#ifdef POPPLER_0_5 +#else // 0.5, 0.6 white[0] = bg_red; white[1] = bg_green; white[2] = bg_blue; @@ -86,13 +85,17 @@ SYNCHRONIZED(PAGE(poppler_page)->displaySlice(SPLASH_DEV(output_dev), (double)hDPI, (double)vDPI, rotate, -#ifdef POPPLER_0_5 +#ifndef POPPLER_0_4 // 0.5, 0.6 gTrue, // useMediaBox #endif gTrue, // Crop (int)sliceX, (int)sliceY, (int)sliceW, (int)sliceH, +#ifdef POPPLER_0_6 + gFalse, // printing +#else NULL, // Links +#endif PDF_DOC(poppler_document)->getCatalog())); return 1; @@ -123,16 +126,14 @@ #ifdef POPPLER_0_4 SplashRGB8* rgb8; -#endif -#ifdef POPPLER_0_5 +#else // 0.5, 0.6 SplashColorPtr color; #endif unsigned char* dataPtr; #ifdef POPPLER_0_4 rgb8 = SPLASH_BITMAP(bitmap)->getDataPtr().rgb8; -#endif -#ifdef POPPLER_0_5 +#else // 0.5, 0.6 color = SPLASH_BITMAP(bitmap)->getDataPtr(); #endif @@ -146,8 +147,7 @@ *dataPtr++ = splashRGB8G(*rgb8); *dataPtr++ = splashRGB8B(*rgb8); ++rgb8; -#endif -#ifdef POPPLER_0_5 +#else // 0.5, 0.6 *dataPtr++ = splashRGB8R(color); *dataPtr++ = splashRGB8G(color); *dataPtr++ = splashRGB8B(color); --- popplerkit.orig/bindings/GNUmakefile +++ popplerkit/bindings/GNUmakefile @@ -52,4 +52,8 @@ bindings_CFLAGS += -DPOPPLER_0_5 endif +ifeq ($(POPPLER_0_6), YES) + bindings_CFLAGS += -DPOPPLER_0_6 +endif + include $(GNUSTEP_MAKEFILES)/subproject.make --- popplerkit.orig/bindings/poppler_text.cc +++ popplerkit/bindings/poppler_text.cc @@ -51,10 +51,16 @@ SYNCHRONIZED(PAGE(poppler_page)->display(TEXT_DEV(text_device), hDPI, vDPI, rotate, -#ifdef POPPLER_0_5 +#ifndef POPPLER_0_4 gTrue, // useMediaBox #endif - crop, NULL, PDF_DOC(poppler_document)->getCatalog())); + crop, +#ifdef POPPLER_0_6 + gFalse, // printing +#else + NULL, // links +#endif + PDF_DOC(poppler_document)->getCatalog())); return 1; } @@ -70,7 +76,7 @@ int result = TEXT_DEV(text_device)->findText(text_utf32, text_len, start_at_top, stop_at_bottom, start_at_last, stop_at_last, -#ifdef POPPLER_0_5 +#ifndef POPPLER_0_4 // 0.5, 0.6 gTrue, gFalse, #endif x_min, y_min, x_max, y_max); --- popplerkit.orig/config.sh +++ popplerkit/config.sh @@ -59,6 +59,13 @@ POPPLER_VERSION="POPPLER_0_5" fi +${PKG_CONFIG} --atleast-version=0.5.9 poppler +if [ $? -eq 0 ]; then + POPPLER_VERSION="POPPLER_0_6" +fi + +echo $POPPLER_VERSION + # include freetype, just to be sure ${PKG_CONFIG} --exists freetype2 if [ $? -eq 0 ]; then debian/patches/series0000664000000000000000000000010412173455226012036 0ustar etoile.patch poppler06.patch C++-compilation.patch poppler020.patch debian/patches/C++-compilation.patch0000664000000000000000000000225011761707575014503 0ustar Use C++ GNUstep Make variables for C++ compilation. --- popplerkit.orig/bindings/GNUmakefile +++ popplerkit/bindings/GNUmakefile @@ -21,39 +21,36 @@ include $(GNUSTEP_MAKEFILES)/common.make -include ../config.make -# use cplusplus compiler -CC = ${CXX} - SUBPROJECT_NAME=bindings -bindings_CFLAGS = -g +bindings_CCFLAGS = -g bindings_OBJCFLAGS = -Wno-import -bindings_C_FILES = \ -poppler.c \ -poppler_document.c \ -poppler_page.c \ -poppler_splash_renderer.c \ -poppler_text.c +bindings_CC_FILES = \ +poppler.cc \ +poppler_document.cc \ +poppler_page.cc \ +poppler_splash_renderer.cc \ +poppler_text.cc bindings_OBJC_FILES = \ poppler_objc.m ifeq ($(HAVE_CAIRO), YES) - bindings_C_FILES += poppler_cairo_img_renderer.c + bindings_CC_FILES += poppler_cairo_img_renderer.cc endif ifeq ($(POPPLER_0_4), YES) - bindings_CFLAGS += -DPOPPLER_0_4 + bindings_CCFLAGS += -DPOPPLER_0_4 endif ifeq ($(POPPLER_0_5), YES) - bindings_CFLAGS += -DPOPPLER_0_5 + bindings_CCFLAGS += -DPOPPLER_0_5 endif ifeq ($(POPPLER_0_6), YES) - bindings_CFLAGS += -DPOPPLER_0_6 + bindings_CCFLAGS += -DPOPPLER_0_6 endif include $(GNUSTEP_MAKEFILES)/subproject.make debian/patches/poppler020.patch0000664000000000000000000000577512173455225013567 0ustar 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 Author: Pino Toscano Last-Update: 2013-07-23 Bug-Debian: http://bugs.debian.org/679893 --- a/bindings/poppler_splash_renderer.cc +++ b/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)->getXRef() +#endif + )); } void poppler_splash_device_destroy(void* output_dev) @@ -92,11 +98,14 @@ (int)sliceX, (int)sliceY, (int)sliceW, (int)sliceH, #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; } --- a/config.sh +++ b/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 --- a/bindings/GNUmakefile +++ b/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 --- a/bindings/poppler_text.cc +++ b/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;