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

Andrea Canciani ranma42 at gmail.com
Thu Feb 5 08:42:45 PST 2015


On Tue, Feb 3, 2015 at 6:57 AM, Dan Raymond <draymond at foxvalley.net> wrote:

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

I would assume this to already be fixed by:
commit f9b65ae1fc91bc558a01c2ad7be5a121c6f10818
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Tue Oct 21 22:35:12 2014 +1030

    build: fix regression on mingw

    7cfebce1 removed the filename extension for executables.

    Patch from http://sourceforge.net/p/inkscape/mailman/message/32939144/

    Bug 85120

Could you check if current cairo master generates a good "configure"?


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

I pushed the patch available in the associated bugreport to master:
commit 70cc8f250b5669e757b4f044571ba0f71e3dea9e
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Tue Dec 9 16:13:00 2014 +0100

    quartz: Remove call to obsolete CGFontGetGlyphPath

    CGFontGetGlyphPath was not public and is not available anymore on
    modern OSX/iOS systems. The same functionality is available through
    the CoreText API since OSX 10.5.

    Based on a patch by Simon Cozens.

    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=84324

I tested it in my environment, but as I mentioned in the bugreport, I do
not have any iOS device to try it on.

Andrea



>
> 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);
>
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20150205/ad8577ad/attachment.html>


More information about the cairo mailing list