[135512] trunk/dports/graphics/cairo-devel
ryandesign at macports.org
ryandesign at macports.org
Fri Apr 24 22:59:45 PDT 2015
Revision: 135512
https://trac.macports.org/changeset/135512
Author: ryandesign at macports.org
Date: 2015-04-24 22:59:45 -0700 (Fri, 24 Apr 2015)
Log Message:
-----------
cairo-devel: restore support for Tiger
Modified Paths:
--------------
trunk/dports/graphics/cairo-devel/Portfile
Added Paths:
-----------
trunk/dports/graphics/cairo-devel/files/patch-tiger.diff
Modified: trunk/dports/graphics/cairo-devel/Portfile
===================================================================
--- trunk/dports/graphics/cairo-devel/Portfile 2015-04-25 04:41:31 UTC (rev 135511)
+++ trunk/dports/graphics/cairo-devel/Portfile 2015-04-25 05:59:45 UTC (rev 135512)
@@ -103,6 +103,10 @@
variant_set quartz
}
+platform darwin 8 {
+ patchfiles-append patch-tiger.diff
+}
+
variant x11 {
depends_lib-append port:xrender \
port:xorg-libXext \
Added: trunk/dports/graphics/cairo-devel/files/patch-tiger.diff
===================================================================
--- trunk/dports/graphics/cairo-devel/files/patch-tiger.diff (rev 0)
+++ trunk/dports/graphics/cairo-devel/files/patch-tiger.diff 2015-04-25 05:59:45 UTC (rev 135512)
@@ -0,0 +1,49 @@
+Revert this commit which removed Tiger support:
+http://cgit.freedesktop.org/cairo/commit/?id=70cc8f250b5669e757b4f044571ba0f71e3dea9e
+--- src/cairo-quartz-font.c.orig 2015-03-10 17:21:07.000000000 -0500
++++ src/cairo-quartz-font.c 2015-04-24 23:27:49.000000000 -0500
+@@ -81,6 +81,9 @@
+ static void (*CGContextSetAllowsFontSmoothingPtr) (CGContextRef, bool) = NULL;
+ static bool (*CGContextGetAllowsFontSmoothingPtr) (CGContextRef) = NULL;
+
++/* Not public in the least bit */
++static CGPathRef (*CGFontGetGlyphPathPtr) (CGFontRef fontRef, CGAffineTransform *textTransform, int unknown, CGGlyph glyph) = NULL;
++
+ /* CGFontGetHMetrics isn't public, but the other functions are public/present in 10.5 */
+ typedef struct {
+ int ascent;
+@@ -124,6 +127,7 @@
+ /* These have the same name in 10.4 and 10.5 */
+ CGFontGetUnitsPerEmPtr = dlsym(RTLD_DEFAULT, "CGFontGetUnitsPerEm");
+ CGFontGetGlyphAdvancesPtr = dlsym(RTLD_DEFAULT, "CGFontGetGlyphAdvances");
++ CGFontGetGlyphPathPtr = dlsym(RTLD_DEFAULT, "CGFontGetGlyphPath");
+
+ CGFontGetHMetricsPtr = dlsym(RTLD_DEFAULT, "CGFontGetHMetrics");
+ CGFontGetAscentPtr = dlsym(RTLD_DEFAULT, "CGFontGetAscent");
+@@ -140,6 +144,7 @@
+ CGFontGetGlyphsForUnicharsPtr &&
+ CGFontGetUnitsPerEmPtr &&
+ CGFontGetGlyphAdvancesPtr &&
++ CGFontGetGlyphPathPtr &&
+ (CGFontGetHMetricsPtr || (CGFontGetAscentPtr && CGFontGetDescentPtr && CGFontGetLeadingPtr)))
+ _cairo_quartz_font_symbols_present = TRUE;
+
+@@ -545,7 +550,6 @@
+ CGGlyph glyph = _cairo_quartz_scaled_glyph_index (scaled_glyph);
+ CGAffineTransform textMatrix;
+ CGPathRef glyphPath;
+- CTFontRef ctFont;
+ cairo_path_fixed_t *path;
+
+ if (glyph == INVALID_GLYPH) {
+@@ -560,9 +564,7 @@
+ -font->base.scale.yy,
+ 0, 0);
+
+- ctFont = CTFontCreateWithGraphicsFont (font_face->cgFont, 0.0, NULL, NULL);
+- glyphPath = CTFontCreatePathForGlyph (ctFont, glyph, &textMatrix);
+- CFRelease (ctFont);
++ glyphPath = CGFontGetGlyphPathPtr (font_face->cgFont, &textMatrix, 0, glyph);
+ if (!glyphPath)
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150424/436c0403/attachment-0001.html>
More information about the macports-changes
mailing list