diff options
author | tron <tron@pkgsrc.org> | 2012-10-08 12:29:08 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2012-10-08 12:29:08 +0000 |
commit | 19d5f9a34a48b812981d19c43575aa9c6e2e462e (patch) | |
tree | 987901229e394740c25b987debc6a60827a26e27 /graphics/cairo | |
parent | b1c1362074b555b1bbe30a9b6f9f88415932dd1d (diff) | |
download | pkgsrc-19d5f9a34a48b812981d19c43575aa9c6e2e462e.tar.gz |
Add patch from cairo's GIT repository to fix crashes with older versions
of X.org. XChat now works again under Mac OS X Lion.
Diffstat (limited to 'graphics/cairo')
-rw-r--r-- | graphics/cairo/Makefile | 3 | ||||
-rw-r--r-- | graphics/cairo/distinfo | 3 | ||||
-rw-r--r-- | graphics/cairo/patches/patch-src_cairo-xlib-surface-shm.c | 44 |
3 files changed, 48 insertions, 2 deletions
diff --git a/graphics/cairo/Makefile b/graphics/cairo/Makefile index 1cba60868cf..ee83d163900 100644 --- a/graphics/cairo/Makefile +++ b/graphics/cairo/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.109 2012/10/07 22:17:54 wiz Exp $ +# $NetBSD: Makefile,v 1.110 2012/10/08 12:29:08 tron Exp $ DISTNAME= cairo-1.12.4 +PKGREVISION= 1 CATEGORIES= graphics MASTER_SITES= http://cairographics.org/releases/ EXTRACT_SUFX= .tar.xz diff --git a/graphics/cairo/distinfo b/graphics/cairo/distinfo index 3b383b214f3..6da17055d36 100644 --- a/graphics/cairo/distinfo +++ b/graphics/cairo/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.62 2012/10/07 22:17:54 wiz Exp $ +$NetBSD: distinfo,v 1.63 2012/10/08 12:29:08 tron Exp $ SHA1 (cairo-1.12.4.tar.xz) = f4158981ed01e73c94fb8072074b17feee61a68b RMD160 (cairo-1.12.4.tar.xz) = 0e2ab9442f47228b7df2354caf157f2a4eeafb31 @@ -7,3 +7,4 @@ SHA1 (patch-aa) = 474f44c1c8d4017137fe59b160afca8f16ad7287 SHA1 (patch-ab) = 62ff361d52742bba0f49c6a32149269b958fa24a SHA1 (patch-ac) = 151c682245004902cf42ba141e3743592691dfb9 SHA1 (patch-ad) = a1068a37113b162ccfe14d7f1bd0baa9df7e5530 +SHA1 (patch-src_cairo-xlib-surface-shm.c) = bf7a24143f1788c21f8362a4a703ef4b5239eb65 diff --git a/graphics/cairo/patches/patch-src_cairo-xlib-surface-shm.c b/graphics/cairo/patches/patch-src_cairo-xlib-surface-shm.c new file mode 100644 index 00000000000..c05a9f86829 --- /dev/null +++ b/graphics/cairo/patches/patch-src_cairo-xlib-surface-shm.c @@ -0,0 +1,44 @@ +$NetBSD: patch-src_cairo-xlib-surface-shm.c,v 1.1 2012/10/08 12:29:08 tron Exp $ + +Prevent application crashes under old version of X.org e.g. under +Mac OS X Lion. Patch taken from here: + +http://cgit.freedesktop.org/cairo/commit/?id=b1532f465e05d566f6d160c5ca916a5a12614067 + +--- src/cairo-xlib-surface-shm.c.orig 2012-10-05 14:06:00.000000000 +0100 ++++ src/cairo-xlib-surface-shm.c 2012-10-08 13:10:35.000000000 +0100 +@@ -1121,6 +1121,24 @@ + return shm->idle > 0; + } + ++#define XORG_VERSION_ENCODE(major,minor,patch,snap) \ ++ (((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap) ++ ++static cairo_bool_t ++xorg_has_buggy_send_event(Display *dpy) ++{ ++ /* Avoid incurring the wrath fixed by: ++ * ++ * commit 2d2dce558d24eeea0eb011ec9ebaa6c5c2273c39 ++ * Author: Sam Spilsbury <sam.spilsbury@canonical.com> ++ * Date: Wed Sep 14 09:58:34 2011 +0800 ++ * ++ * Remove the SendEvent bit (0x80) before doing range checks on event type. ++ */ ++ return (strstr (ServerVendor (dpy), "X.Org") != NULL && ++ VendorRelease (dpy) < XORG_VERSION_ENCODE(1,11,0,1)); ++} ++ + void + _cairo_xlib_display_init_shm (cairo_xlib_display_t *display) + { +@@ -1153,6 +1171,9 @@ + DefaultVisual (display->display, scr), + CWOverrideRedirect, &attr); + ++ if (xorg_has_buggy_send_event(display->display)) ++ has_pixmap = 0; ++ + shm->has_pixmaps = has_pixmap ? MIN_PIXMAP_SIZE : 0; + cairo_list_init (&shm->pool); + |