[Cairo] cairo.pc and older freetype's

James Henstridge james at daa.com.au
Tue Nov 18 07:06:36 PST 2003


In order to get a usable cairo.pc file, I needed to apply the following 
patch.  I don't have the very latest freetype, so "pkg-config --cflags 
cairo" would fail due to missing freetype2.pc.  Is it okay to apply the 
patch?

James.

-- 
Email: james at daa.com.au
WWW:   http://www.daa.com.au/~james/


-------------- next part --------------
Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo/ChangeLog,v
retrieving revision 1.110
diff -u -p -r1.110 ChangeLog
--- ChangeLog	18 Nov 2003 14:18:05 -0000	1.110
+++ ChangeLog	18 Nov 2003 15:07:32 -0000
@@ -1,3 +1,12 @@
+2003-11-18  James Henstridge  <james at daa.com.au>
+
+	* cairo.pc.in (Cflags): add FREETYPE_CFLAGS/LIBS to Libs/Cflags
+	rather than requiring "freetype2", which doesn't exist in anything
+	but the most recent version of freetype.
+
+	* configure.in (FREETYPE_LIBS): add freetype cflags/libs
+	substitutions.
+
 2003-11-18  Carl Worth  <cworth at east.isi.edu>
 
 	* src/cairo.h: Fix build for new freetype header include
Index: configure.in
===================================================================
RCS file: /cvs/cairo/cairo/configure.in,v
retrieving revision 1.30
diff -u -p -r1.30 configure.in
--- configure.in	10 Nov 2003 16:16:34 -0000	1.30
+++ configure.in	18 Nov 2003 15:07:32 -0000
@@ -77,10 +77,15 @@ if test $VERSION_DEC -lt $MIN_VERSION_DE
 fi
 AC_MSG_RESULT($FREETYPE_VERSION - OK)
 
-CAIRO_CFLAGS="$CAIRO_CFLAGS `$FREETYPE_CONFIG --cflags`"
-CAIRO_LIBS="$CAIRO_LIBS `$FREETYPE_CONFIG --libs`"
+FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
+FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
+AC_SUBST(FREETYPE_CFLAGS)
+AC_SUBST(FREETYPE_LIBS)
 
 
+CAIRO_CFLAGS="$CAIRO_CFLAGS $FREETYPE_CFLAGS"
+CAIRO_LIBS="$CAIRO_LIBS $FREETYPE_LIBS"
+
 AC_SUBST(CAIRO_CFLAGS)
 AC_SUBST(CAIRO_LIBS)
 
Index: cairo.pc.in
===================================================================
RCS file: /cvs/cairo/cairo/cairo.pc.in,v
retrieving revision 1.5
diff -u -p -r1.5 cairo.pc.in
--- cairo.pc.in	4 Nov 2003 16:58:53 -0000	1.5
+++ cairo.pc.in	18 Nov 2003 15:07:32 -0000
@@ -7,7 +7,7 @@ Name: cairo
 Description: Multi-platform 2D graphics library
 Version: @VERSION@
 
-Requires: fontconfig freetype2 libic slim
-Libs: -L${libdir} -lcairo -lm
-Cflags: -I${includedir}
+Requires: fontconfig libic slim
+Libs: -L${libdir} -lcairo -lm @FREETYPE_LIBS@
+Cflags: -I${includedir} @FREETYPE_CFLAGS@
 


More information about the cairo mailing list