Hi,

Trying to build HEAD, gnash was failing with FreeType2. Some user on IRC
were aswell.

It all start with configure needing to check for freetype and not
freetype2, letting pkg-config deal with it.
Then Makefile.am have to be changed to reference the right _CFLAGS and
_LIBS

Then the Freetype support code was having the wrong consteness.

Attached is a diff against HEAD to fix the whole thing.

For the record, it is on x86_64 SLED10 SP1 more or less with some extra
stuff.

Let me know if this is not the right fix.

Cheers,

Hub
Index: Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/Makefile.am,v
retrieving revision 1.77
diff -u -r1.77 Makefile.am
--- Makefile.am	13 Jun 2007 09:59:42 -0000	1.77
+++ Makefile.am	13 Jun 2007 23:49:06 -0000
@@ -193,8 +193,8 @@
 	@echo "	Z_LIBS is $(Z_LIBS)"
 	@echo "	LIBXML_CFLAGS is $(LIBXML_CFLAGS)"
 	@echo "	LIBXML_LIBS is $(LIBXML_LIBS)"
-	@echo "	FREETYPE_CFLAGS is $(FREETYPE_CFLAGS)"
-	@echo "	FREETYPE_LIBS is $(FREETYPE_LIBS)"
+	@echo "	FREETYPE2_CFLAGS is $(FREETYPE2_CFLAGS)"
+	@echo "	FREETYPE2_LIBS is $(FREETYPE2_LIBS)"
 	@echo "	FONTCONFIG_CFLAGS is $(FONTCONFIG_CFLAGS)"
 	@echo "	FONTCONFIG_LIBS is $(FONTCONFIG_LIBS)"
 if HAVE_DMALLOC
Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.341
diff -u -r1.341 configure.ac
--- configure.ac	13 Jun 2007 17:51:24 -0000	1.341
+++ configure.ac	13 Jun 2007 23:49:08 -0000
@@ -708,7 +708,7 @@
 GNASH_PKG_INCLUDES([dejagnu], [dejagnu.h])
 
 dnl Find freetype and fontconfig
-GNASH_PKG_FIND(freetype, [freetype/freetype.h], [freetype2 font library], FT_Load_Char)
+GNASH_PKG_FIND(freetype2, [freetype/freetype.h], [freetype2 font library], FT_Load_Char)
 GNASH_PKG_FIND(fontconfig, [fontconfig/fontconfig.h], [fontconfig library], FcFontMatch)
 
 AC_PATH_MING
Index: server/FreetypeGlyphsProvider.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/FreetypeGlyphsProvider.cpp,v
retrieving revision 1.2
diff -u -r1.2 FreetypeGlyphsProvider.cpp
--- server/FreetypeGlyphsProvider.cpp	13 Jun 2007 16:30:52 -0000	1.2
+++ server/FreetypeGlyphsProvider.cpp	13 Jun 2007 23:49:08 -0000
@@ -82,7 +82,7 @@
 
 	/// Callback function for the move_to member of FT_Outline_Funcs
 	static int
-	walkMoveTo(FT_Vector* to, void* ptr)
+	walkMoveTo(const FT_Vector* to, void* ptr)
 	{
 		OutlineWalker* walker = static_cast<OutlineWalker*>(ptr);
 		return walker->moveTo(to);
@@ -90,7 +90,7 @@
 
 	/// Callback function for the line_to member of FT_Outline_Funcs
 	static int
-	walkLineTo(FT_Vector* to, void* ptr)
+	walkLineTo(const FT_Vector* to, void* ptr)
 	{
 		OutlineWalker* walker = static_cast<OutlineWalker*>(ptr);
 		return walker->lineTo(to);
@@ -98,7 +98,7 @@
 
 	/// Callback function for the conic_to member of FT_Outline_Funcs
 	static int
-	walkConicTo(FT_Vector* ctrl, FT_Vector* to, void* ptr)
+	walkConicTo(const FT_Vector* ctrl, const FT_Vector* to, void* ptr)
 	{
 		OutlineWalker* walker = static_cast<OutlineWalker*>(ptr);
 		return walker->conicTo(ctrl, to);
@@ -110,7 +110,7 @@
 	/// falling in the middle of the two control points.
 	///
 	static int
-	walkCubicTo(FT_Vector* ctrl1, FT_Vector* ctrl2, FT_Vector* to, void* ptr)
+	walkCubicTo(const FT_Vector* ctrl1, const FT_Vector* ctrl2, const FT_Vector* to, void* ptr)
 	{
 		OutlineWalker* walker = static_cast<OutlineWalker*>(ptr);
 		return walker->cubicTo(ctrl1, ctrl2, to);
@@ -122,7 +122,7 @@
 
 	float _scale;
 
-	int moveTo(FT_Vector* to)
+	int moveTo(const FT_Vector* to)
 	{
 #ifdef DEBUG_OUTLINE_DECOMPOSITION 
 		log_debug("moveTo: %ld,%ld", to->x, to->y);
@@ -132,7 +132,7 @@
 	}
 
 	int
-	lineTo(FT_Vector* to)
+	lineTo(const FT_Vector* to)
 	{
 #ifdef DEBUG_OUTLINE_DECOMPOSITION 
 		log_debug("lineTo: %ld,%ld", to->x, to->y);
@@ -142,7 +142,7 @@
 	}
 
 	int
-	conicTo(FT_Vector* ctrl, FT_Vector* to)
+	conicTo(const FT_Vector* ctrl, const FT_Vector* to)
 	{
 #ifdef DEBUG_OUTLINE_DECOMPOSITION 
 		log_debug("conicTo: %ld,%ld %ld,%ld", ctrl->x, ctrl->y, to->x, to->y);
@@ -152,7 +152,7 @@
 	}
 
 	int
-	cubicTo(FT_Vector* ctrl1, FT_Vector* ctrl2, FT_Vector* to)
+	cubicTo(const FT_Vector* ctrl1, const FT_Vector* ctrl2, const FT_Vector* to)
 	{
 #ifdef DEBUG_OUTLINE_DECOMPOSITION 
 		log_debug("cubicTo: %ld,%ld %ld,%ld %ld,%ld", ctrl1->x, ctrl1->y, ctrl2->x, ctrl2->y, to->x, to->y);
Index: server/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/server/Makefile.am,v
retrieving revision 1.118
diff -u -r1.118 Makefile.am
--- server/Makefile.am	13 Jun 2007 15:17:30 -0000	1.118
+++ server/Makefile.am	13 Jun 2007 23:49:08 -0000
@@ -48,7 +48,7 @@
 	$(GSTREAMER_CFLAGS) \
 	$(BOOST_CFLAGS) \
 	$(LIBXML_CFLAGS) \
-	$(FREETYPE_CFLAGS) \
+	$(FREETYPE2_CFLAGS) \
 	$(FONTCONFIG_CFLAGS) \
 	$(NULL)
 
@@ -172,7 +172,7 @@
 	$(LIBXML_LIBS) \
 	$(BOOST_LIBS) \
 	$(PTHREAD_LIBS) \
-	$(FREETYPE_LIBS) \
+	$(FREETYPE2_LIBS) \
 	$(FONTCONFIG_LIBS) \
 	$(NULL)
 
Index: server/parser/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/server/parser/Makefile.am,v
retrieving revision 1.35
diff -u -r1.35 Makefile.am
--- server/parser/Makefile.am	12 Jun 2007 12:33:22 -0000	1.35
+++ server/parser/Makefile.am	13 Jun 2007 23:49:08 -0000
@@ -41,7 +41,7 @@
 	$(PTHREAD_CFLAGS) \
 	$(DMALLOC_CFLAGS) \
         $(BOOST_CFLAGS) \
-	$(FREETYPE_CFLAGS) \
+	$(FREETYPE2_CFLAGS) \
 	$(NULL)
 
 libgnashparser_la_SOURCES = \
_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to