[BACK]Return to patch-ap CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / print / xpdf / patches

File: [cvs.NetBSD.org] / pkgsrc / print / xpdf / patches / patch-ap (download)

Revision 1.3, Tue May 30 20:03:28 2006 UTC (13 years, 8 months ago) by tron
Branch: MAIN
CVS Tags: pkgsrc-2006Q4-base, pkgsrc-2006Q4, pkgsrc-2006Q3-base, pkgsrc-2006Q3, pkgsrc-2006Q2-base, pkgsrc-2006Q2
Changes since 1.2: +77 -10 lines

Add patch provided by the FreeType2 maintaines to make this package
build with version 2.2.1 and newer of the "freetype2" package.
Bump package revision because of this fix.

$NetBSD: patch-ap,v 1.3 2006/05/30 20:03:28 tron Exp $

--- splash/SplashFTFont.cc.orig	2005-08-17 06:34:31.000000000 +0100
+++ splash/SplashFTFont.cc	2006-05-30 20:29:49.000000000 +0100
@@ -14,7 +14,8 @@
 
 #include <ft2build.h>
 #include FT_OUTLINE_H
-#include FT_INTERNAL_OBJECTS_H // needed for FT_New_Size decl
+#include FT_SIZES_H // needed for FT_New_Size decl
+#include FT_GLYPH_H
 #include "gmem.h"
 #include "SplashMath.h"
 #include "SplashGlyphBitmap.h"
@@ -25,11 +26,12 @@
 
 //------------------------------------------------------------------------
 
-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);
+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);
 
 //------------------------------------------------------------------------
 // SplashFTFont
@@ -210,7 +212,7 @@
 };
 
 SplashPath *SplashFTFont::getGlyphPath(int c) {
-  static FT_Outline_Funcs outlineFuncs = {
+  static const FT_Outline_Funcs outlineFuncs = {
     &glyphPathMoveTo,
     &glyphPathLineTo,
     &glyphPathConicTo,
@@ -249,7 +251,7 @@
   return path.path;
 }
 
-static int glyphPathMoveTo(FT_Vector *pt, void *path) {
+static int glyphPathMoveTo( const FT_Vector *pt, void *path) {
   SplashFTFontPath *p = (SplashFTFontPath *)path;
 
   if (p->needClose) {
@@ -260,7 +262,7 @@
   return 0;
 }
 
-static int glyphPathLineTo(FT_Vector *pt, void *path) {
+static int glyphPathLineTo(const FT_Vector *pt, void *path) {
   SplashFTFontPath *p = (SplashFTFontPath *)path;
 
   p->path->lineTo(pt->x / 64.0, -pt->y / 64.0);
@@ -268,7 +270,7 @@
   return 0;
 }
 
-static int glyphPathConicTo(FT_Vector *ctrl, FT_Vector *pt, void *path) {
+static int glyphPathConicTo(const FT_Vector *ctrl, const FT_Vector *pt, void *path) {
   SplashFTFontPath *p = (SplashFTFontPath *)path;
   SplashCoord x0, y0, x1, y1, x2, y2, x3, y3, xc, yc;
 
@@ -306,8 +308,8 @@
   return 0;
 }
 
-static int glyphPathCubicTo(FT_Vector *ctrl1, FT_Vector *ctrl2,
-			    FT_Vector *pt, void *path) {
+static int glyphPathCubicTo(const FT_Vector *ctrl1, const FT_Vector *ctrl2,
+			    const FT_Vector *pt, void *path) {
   SplashFTFontPath *p = (SplashFTFontPath *)path;
 
   p->path->curveTo(ctrl1->x / 64.0, -ctrl1->y / 64.0,