[cairo] patches for configure errors under MinGW, OS X deprecation warnings

Dan Raymond draymond at foxvalley.net
Mon Feb 2 21:57:08 PST 2015


Hi, I would like to submit the following two patches to cairo-1.14.0:

1) the following patch fixes a configure failure when building under 
MinGW on Windows:

diff -rU 0 a/configure b/configure
--- cairo-1.14.0/configure      2014-10-13 19:47:29 -0600
+++ fixed/configure     2015-02-02 21:40:21 -0700
@@ -18933 +18933 @@
-if strings - conftest | grep noonsees >/dev/null ; then
+if strings - conftest$ac_exeext | grep noonsees >/dev/null ; then
@@ -18936 +18936 @@
-if strings - conftest | grep seesnoon >/dev/null ; then
+if strings - conftest$ac_exeext | grep seesnoon >/dev/null ; then

2) the following patch fixes runtime warnings about CGFontGetGlyphPath 
deprecation under OS X 10.10 (Yosemite):
    (discussion at http://comments.gmane.org/gmane.comp.lib.cairo/24875)

diff -rU 0 a/configure.ac b/configure.ac
--- a/configure.ac    2014-10-13 18:46:33.000000000 -0700
+++ b/configure.ac    2015-01-22 20:05:02.000000000 -0800
@@ -205 +205 @@
-    quartz_LIBS="-Xlinker -framework -Xlinker CoreGraphics"
+    quartz_LIBS="-Xlinker -framework -Xlinker CoreGraphics -framework 
-Xlinker CoreText"
diff -rU 0 a/src/cairo-quartz-font.c b/src/cairo-quartz-font.c
--- a/src/cairo-quartz-font.c    2013-09-24 21:38:54.000000000 -0700
+++ b/src/cairo-quartz-font.c    2015-01-22 20:05:33.000000000 -0800
@@ -84,2 +84,2 @@
-/* Not public in the least bit */
-static CGPathRef (*CGFontGetGlyphPathPtr) (CGFontRef fontRef, 
CGAffineTransform *textTransform, int unknown, CGGlyph glyph) = NULL;
+static CTFontRef (*CTFontCreateWithGraphicsFontPtr) (CGFontRef fontRef) 
= NULL;
+static CGPathRef (*CTFontCreatePathForGlyphPtr) (CTFontRef fontRef, 
CGGlyph glyph, CGAffineTransform *textTransform) = NULL;
@@ -130 +130,2 @@
-    CGFontGetGlyphPathPtr = dlsym(RTLD_DEFAULT, "CGFontGetGlyphPath");
+    CTFontCreateWithGraphicsFontPtr = dlsym(RTLD_DEFAULT, 
"CTFontCreateWithGraphicsFont");
+    CTFontCreatePathForGlyphPtr = dlsym(RTLD_DEFAULT, 
"CTFontCreatePathForGlyph");
@@ -147 +148,2 @@
-    CGFontGetGlyphPathPtr &&
+    CTFontCreateWithGraphicsFontPtr &&
+    CTFontCreatePathForGlyphPtr &&
@@ -551,0 +554 @@
+    CTFontRef ctFont;
@@ -567 +570,3 @@
-    glyphPath = CGFontGetGlyphPathPtr (font_face->cgFont, &textMatrix, 
0, glyph);
+    ctFont = CTFontCreateWithGraphicsFontPtr (font_face->cgFont);
+    glyphPath = CTFontCreatePathForGlyphPtr (ctFont, glyph, &textMatrix);
+    CFRelease(ctFont);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20150202/e9e99dac/attachment.html>


More information about the cairo mailing list