diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2007-09-11 09:44:24 +0000 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2007-09-11 09:44:24 +0000 |
commit | 94cb483ac0c7d8626b578a837cb22cfa248cfa13 (patch) | |
tree | f5a1421224cf5b394cc258dbaa5fe31f912b1b88 /gnustep-libs | |
parent | Remove the hardcoded make so that -j x works on FreeBSD. (diff) | |
download | gentoo-2-94cb483ac0c7d8626b578a837cb22cfa248cfa13.tar.gz gentoo-2-94cb483ac0c7d8626b578a837cb22cfa248cfa13.tar.bz2 gentoo-2-94cb483ac0c7d8626b578a837cb22cfa248cfa13.zip |
Add poppler 0.6 support
(Portage version: 2.1.3.9)
Diffstat (limited to 'gnustep-libs')
-rw-r--r-- | gnustep-libs/popplerkit/ChangeLog | 6 | ||||
-rw-r--r-- | gnustep-libs/popplerkit/files/popplerkit-0.2-poppler6_support.patch | 191 | ||||
-rw-r--r-- | gnustep-libs/popplerkit/popplerkit-0.2.ebuild | 9 |
3 files changed, 204 insertions, 2 deletions
diff --git a/gnustep-libs/popplerkit/ChangeLog b/gnustep-libs/popplerkit/ChangeLog index 3c5d29d949a9..499342405174 100644 --- a/gnustep-libs/popplerkit/ChangeLog +++ b/gnustep-libs/popplerkit/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for gnustep-libs/popplerkit # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnustep-libs/popplerkit/ChangeLog,v 1.6 2007/09/10 14:07:31 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnustep-libs/popplerkit/ChangeLog,v 1.7 2007/09/11 09:44:24 voyageur Exp $ + + 11 Sep 2007; Bernard Cafarelli <voyageur@gentoo.org> + +files/popplerkit-0.2-poppler6_support.patch, popplerkit-0.2.ebuild: + Add patch for poppler 0.6 support *popplerkit-0.2 (10 Sep 2007) diff --git a/gnustep-libs/popplerkit/files/popplerkit-0.2-poppler6_support.patch b/gnustep-libs/popplerkit/files/popplerkit-0.2-poppler6_support.patch new file mode 100644 index 000000000000..352d8812ed2c --- /dev/null +++ b/gnustep-libs/popplerkit/files/popplerkit-0.2-poppler6_support.patch @@ -0,0 +1,191 @@ +Index: Etoile/Frameworks/PopplerKit/bindings/poppler_page.cc +=================================================================== +--- Etoile/Frameworks/PopplerKit/bindings/poppler_page.cc (révision 2341) ++++ Etoile/Frameworks/PopplerKit/bindings/poppler_page.cc (révision 2342) +@@ -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 +- + } +Index: Etoile/Frameworks/PopplerKit/bindings/poppler.cc +=================================================================== +--- Etoile/Frameworks/PopplerKit/bindings/poppler.cc (révision 2341) ++++ Etoile/Frameworks/PopplerKit/bindings/poppler.cc (révision 2342) +@@ -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 +Index: Etoile/Frameworks/PopplerKit/bindings/poppler_splash_renderer.cc +=================================================================== +--- Etoile/Frameworks/PopplerKit/bindings/poppler_splash_renderer.cc (révision 2341) ++++ Etoile/Frameworks/PopplerKit/bindings/poppler_splash_renderer.cc (révision 2342) +@@ -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); +Index: Etoile/Frameworks/PopplerKit/bindings/GNUmakefile +=================================================================== +--- Etoile/Frameworks/PopplerKit/bindings/GNUmakefile (révision 2341) ++++ Etoile/Frameworks/PopplerKit/bindings/GNUmakefile (révision 2342) +@@ -55,4 +55,8 @@ + bindings_CFLAGS += -DPOPPLER_0_5 + endif + ++ifeq ($(POPPLER_0_6), YES) ++ bindings_CFLAGS += -DPOPPLER_0_6 ++endif ++ + include $(GNUSTEP_MAKEFILES)/subproject.make +Index: Etoile/Frameworks/PopplerKit/bindings/poppler_text.cc +=================================================================== +--- Etoile/Frameworks/PopplerKit/bindings/poppler_text.cc (révision 2341) ++++ Etoile/Frameworks/PopplerKit/bindings/poppler_text.cc (révision 2342) +@@ -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); +Index: Etoile/Frameworks/PopplerKit/config.sh +=================================================================== +--- Etoile/Frameworks/PopplerKit/config.sh (révision 2341) ++++ Etoile/Frameworks/PopplerKit/config.sh (révision 2342) +@@ -60,6 +60,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 diff --git a/gnustep-libs/popplerkit/popplerkit-0.2.ebuild b/gnustep-libs/popplerkit/popplerkit-0.2.ebuild index 0d7749177152..045c607d768e 100644 --- a/gnustep-libs/popplerkit/popplerkit-0.2.ebuild +++ b/gnustep-libs/popplerkit/popplerkit-0.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnustep-libs/popplerkit/popplerkit-0.2.ebuild,v 1.2 2007/09/10 22:11:53 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnustep-libs/popplerkit/popplerkit-0.2.ebuild,v 1.3 2007/09/11 09:44:24 voyageur Exp $ inherit gnustep-2 @@ -16,3 +16,10 @@ SLOT="0" DEPEND=">=app-text/poppler-0.4 >=media-libs/freetype-2" RDEPEND="${DEPEND}" + +src_unpack() { + unpack ${A} + cd ${S} + + epatch ${FILESDIR}/${P}-poppler6_support.patch +} |