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

Bryce Harrington bryce at osg.samsung.com
Sun Feb 8 18:24:11 PST 2015


On Mon, Feb 02, 2015 at 10:57:08PM -0700, Dan Raymond wrote:
> Hi, I would like to submit the following two patches to cairo-1.14.0:

Would you mind sending these patches formatted using 'git format-patch'?
 
> 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

configure is a generated file; make sure to create your patch against
configure.ac.

> 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)

In general when submitting patches to an upstream, you should summarize
both the original problem statement and discussion about the solution.
Pointing to a forum thread is ok for a reference but not as a substitute
for a proper description.

> 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"

Is adding CoreText going to break anything on other versions of OS X?

> 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);

Bryce


More information about the cairo mailing list