--- Begin Message ---
Package: poppler
Version: 0.4.5-4
Severity: normal
Tags: patch
Hi,
Attached is the diff for my poppler 0.4.5-4.1 NMU.
diff -u poppler-0.4.5/debian/changelog poppler-0.4.5/debian/changelog
--- poppler-0.4.5/debian/changelog
+++ poppler-0.4.5/debian/changelog
@@ -1,3 +1,11 @@
+poppler (0.4.5-4.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Backport SplashFTFont.cc from 0.5.2; fixes FTBFS with Freetype 2.2.
+ (Closes: #373991)
+
+ -- Steinar H. Gunderson <[EMAIL PROTECTED]> Sun, 25 Jun 2006 11:55:39 +0200
+
poppler (0.4.5-4) unstable; urgency=low
* Fix FTBFS with gcc 4.1 (Closes: #357479)
only in patch2:
unchanged:
--- poppler-0.4.5.orig/debian/patches/005_freetype-2.2-ftbfs.patch
+++ poppler-0.4.5/debian/patches/005_freetype-2.2-ftbfs.patch
@@ -0,0 +1,210 @@
+--- poppler-0.4.5/splash/SplashFTFont.cc 2005-10-13 19:20:39.000000000
+0200
++++ poppler-0.5.2/splash/SplashFTFont.cc 2006-04-12 03:58:57.000000000
+0200
+@@ -12,6 +12,15 @@
+ #pragma implementation
+ #endif
+
++#define MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
++
++#define FREETYPE_VERSION \
++ MAKE_VERSION(FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH)
++
++#include <ft2build.h>
++#include FT_OUTLINE_H
++#include FT_SIZES_H
++#include FT_GLYPH_H
+ #include "goo/gmem.h"
+ #include "SplashMath.h"
+ #include "SplashGlyphBitmap.h"
+@@ -20,16 +29,21 @@
+ #include "SplashFTFontFile.h"
+ #include "SplashFTFont.h"
+
+-#include FT_OUTLINE_H
+-#include FT_INTERNAL_OBJECTS_H // needed for FT_New_Size decl
+-
+ //------------------------------------------------------------------------
+
++#if ( FREETYPE_VERSION >= MAKE_VERSION(2,2,0) )
++static int glyphPathMoveTo(const FT_Vector *pt, void *path);
++static int glyphPathLineTo(const FT_Vector *pt, void *path);
++static int glyphPathConicTo(const FT_Vector *ctrl, const FT_Vector *pt, void
*path);
++static int glyphPathCubicTo(const FT_Vector *ctrl1, const FT_Vector *ctrl2,
++ const FT_Vector *pt, void *path);
++#else
+ static int glyphPathMoveTo(FT_Vector *pt, void *path);
+ static int glyphPathLineTo(FT_Vector *pt, void *path);
+ static int glyphPathConicTo(FT_Vector *ctrl, FT_Vector *pt, void *path);
+ static int glyphPathCubicTo(FT_Vector *ctrl1, FT_Vector *ctrl2,
+ FT_Vector *pt, void *path);
++#endif
+
+ //------------------------------------------------------------------------
+ // SplashFTFont
+@@ -39,7 +53,7 @@
+ SplashFont(fontFileA, matA, fontFileA->engine->aa)
+ {
+ FT_Face face;
+- SplashCoord size, div;
++ double size, div;
+ int x, y;
+
+ face = fontFileA->face;
+@@ -112,14 +126,21 @@
+ }
+ if (yMax == yMin) {
+ yMin = 0;
+- yMax = (int)(1.2 * size);
++ yMax = (int)((SplashCoord)1.2 * size);
+ }
+
+ // compute the transform matrix
++#if USE_FIXEDPOINT
++ matrix.xx = (FT_Fixed)((mat[0] / size).getRaw());
++ matrix.yx = (FT_Fixed)((mat[1] / size).getRaw());
++ matrix.xy = (FT_Fixed)((mat[2] / size).getRaw());
++ matrix.yy = (FT_Fixed)((mat[3] / size).getRaw());
++#else
+ matrix.xx = (FT_Fixed)((mat[0] / size) * 65536);
+ matrix.yx = (FT_Fixed)((mat[1] / size) * 65536);
+ matrix.xy = (FT_Fixed)((mat[2] / size) * 65536);
+ matrix.yy = (FT_Fixed)((mat[3] / size) * 65536);
++#endif
+ }
+
+ SplashFTFont::~SplashFTFont() {
+@@ -143,7 +164,7 @@
+ ff = (SplashFTFontFile *)fontFile;
+
+ ff->face->size = sizeObj;
+- offset.x = (FT_Pos)(xFrac * splashFontFractionMul * 64);
++ offset.x = (FT_Pos)(int)((SplashCoord)xFrac * splashFontFractionMul * 64);
+ offset.y = 0;
+ FT_Set_Transform(ff->face, &matrix, &offset);
+ slot = ff->face->glyph;
+@@ -197,6 +218,11 @@
+ return gTrue;
+ }
+
++struct SplashFTFontPath {
++ SplashPath *path;
++ GBool needClose;
++};
++
+ SplashPath *SplashFTFont::getGlyphPath(int c) {
+ static FT_Outline_Funcs outlineFuncs = {
+ &glyphPathMoveTo,
+@@ -206,7 +232,7 @@
+ 0, 0
+ };
+ SplashFTFontFile *ff;
+- SplashPath *path;
++ SplashFTFontPath path;
+ FT_GlyphSlot slot;
+ FT_UInt gid;
+ FT_Glyph glyph;
+@@ -226,26 +252,56 @@
+ if (FT_Get_Glyph(slot, &glyph)) {
+ return NULL;
+ }
+- path = new SplashPath();
++ path.path = new SplashPath();
++ path.needClose = gFalse;
+ FT_Outline_Decompose(&((FT_OutlineGlyph)glyph)->outline,
+- &outlineFuncs, path);
+- return path;
++ &outlineFuncs, &path);
++ if (path.needClose) {
++ path.path->close();
++ }
++ FT_Done_Glyph(glyph);
++ return path.path;
+ }
+
+-static int glyphPathMoveTo(FT_Vector *pt, void *path) {
+- ((SplashPath *)path)->moveTo(pt->x / 64.0, -pt->y / 64.0);
++#if ( FREETYPE_VERSION >= MAKE_VERSION(2,2,0) )
++static int glyphPathMoveTo(const FT_Vector *pt, void *path)
++#else
++static int glyphPathMoveTo(FT_Vector *pt, void *path)
++#endif
++{
++ SplashFTFontPath *p = (SplashFTFontPath *)path;
++
++ if (p->needClose) {
++ p->path->close();
++ p->needClose = gFalse;
++ }
++ p->path->moveTo(pt->x / 64.0, -pt->y / 64.0);
+ return 0;
+ }
+
+-static int glyphPathLineTo(FT_Vector *pt, void *path) {
+- ((SplashPath *)path)->lineTo(pt->x / 64.0, -pt->y / 64.0);
++#if ( FREETYPE_VERSION >= MAKE_VERSION(2,2,0) )
++static int glyphPathLineTo(const FT_Vector *pt, void *path)
++#else
++static int glyphPathLineTo(FT_Vector *pt, void *path)
++#endif
++{
++ SplashFTFontPath *p = (SplashFTFontPath *)path;
++
++ p->path->lineTo(pt->x / 64.0, -pt->y / 64.0);
++ p->needClose = gTrue;
+ return 0;
+ }
+
+-static int glyphPathConicTo(FT_Vector *ctrl, FT_Vector *pt, void *path) {
++#if ( FREETYPE_VERSION >= MAKE_VERSION(2,2,0) )
++static int glyphPathConicTo(const FT_Vector *ctrl, const FT_Vector *pt, void
*path)
++#else
++static int glyphPathConicTo(FT_Vector *ctrl, FT_Vector *pt, void *path)
++#endif
++{
++ SplashFTFontPath *p = (SplashFTFontPath *)path;
+ SplashCoord x0, y0, x1, y1, x2, y2, x3, y3, xc, yc;
+
+- if (!((SplashPath *)path)->getCurPt(&x0, &y0)) {
++ if (!p->path->getCurPt(&x0, &y0)) {
+ return 0;
+ }
+ xc = ctrl->x / 64.0;
+@@ -269,20 +325,28 @@
+ // p1 = (1/3) * (p0 + 2pc)
+ // p2 = (1/3) * (2pc + p3)
+
+- x1 = (1.0 / 3.0) * (x0 + 2 * xc);
+- y1 = (1.0 / 3.0) * (y0 + 2 * yc);
+- x2 = (1.0 / 3.0) * (2 * xc + x3);
+- y2 = (1.0 / 3.0) * (2 * yc + y3);
++ x1 = (SplashCoord)(1.0 / 3.0) * (x0 + (SplashCoord)2 * xc);
++ y1 = (SplashCoord)(1.0 / 3.0) * (y0 + (SplashCoord)2 * yc);
++ x2 = (SplashCoord)(1.0 / 3.0) * ((SplashCoord)2 * xc + x3);
++ y2 = (SplashCoord)(1.0 / 3.0) * ((SplashCoord)2 * yc + y3);
+
+- ((SplashPath *)path)->curveTo(x1, y1, x2, y2, x3, y3);
++ p->path->curveTo(x1, y1, x2, y2, x3, y3);
++ p->needClose = gTrue;
+ return 0;
+ }
+
+-static int glyphPathCubicTo(FT_Vector *ctrl1, FT_Vector *ctrl2,
+- FT_Vector *pt, void *path) {
+- ((SplashPath *)path)->curveTo(ctrl1->x / 64.0, -ctrl1->y / 64.0,
+- ctrl2->x / 64.0, -ctrl2->y / 64.0,
+- pt->x / 64.0, -pt->y / 64.0);
++#if ( FREETYPE_VERSION >= MAKE_VERSION(2,2,0) )
++static int glyphPathCubicTo(const FT_Vector *ctrl1, const FT_Vector *ctrl2,
const FT_Vector *pt, void *path)
++#else
++static int glyphPathCubicTo(FT_Vector *ctrl1, FT_Vector *ctrl2, FT_Vector
*pt, void *path)
++#endif
++{
++ SplashFTFontPath *p = (SplashFTFontPath *)path;
++
++ p->path->curveTo(ctrl1->x / 64.0, -ctrl1->y / 64.0,
++ ctrl2->x / 64.0, -ctrl2->y / 64.0,
++ pt->x / 64.0, -pt->y / 64.0);
++ p->needClose = gTrue;
+ return 0;
+ }
+
--- End Message ---