[th] xpdf + nowy freetype

Szymon Siwek sls w poczta.wp.pl
Śro, 28 Cze 2006, 00:53:36 CEST


Witam!
Załączam łatkę umożliwiającą zbudowanie xpdfa ze świeżym freetype.
-- 
Szymon Siwek
Los nikomu nie szczędzi rozczarowań.
-------------- następna część ---------
diff -urN xpdf-3.01-org/splash/SplashFTFont.cc xpdf-3.01/splash/SplashFTFont.cc
--- xpdf-3.01-org/splash/SplashFTFont.cc	2005-12-23 16:57:18.076514614 +0100
+++ xpdf-3.01/splash/SplashFTFont.cc	2005-12-23 17:33:42.731318339 +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,
-------------- następna część ---------
Index: xpdf.spec
===================================================================
RCS file: /cvsroot/SPECS/xpdf.spec,v
retrieving revision 1.100
diff -u -r1.100 xpdf.spec
--- xpdf.spec	21 May 2006 21:19:48 -0000	1.100
+++ xpdf.spec	24 Jun 2006 14:14:44 -0000
@@ -30,6 +30,7 @@
 Patch2:		%{name}-nonumericlocale.patch
 Patch3:		%{name}-%{version}pl2.patch
 Patch4:		%{name}-cve-2006-0301.patch
+Patch5:		http://freetype.sourceforge.net/freetype2/patches/%{name}-3.01-noftinternals.patch

 URL:		http://www.foolabs.com/xpdf/
 %{?with_x:BuildRequires:	xorg-lib-libX11-devel}
 BuildRequires:	autoconf
@@ -108,6 +109,7 @@
 %patch1 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %build
 %{__autoconf}


Więcej informacji o liście dyskusyjnej pld-devel-pl