On Monday 27 March 2006 7:39 am, Eric Faurot wrote:
> Hi all,
>
> Here is a "diff -N -u" updating cairo to 1.0.4.
The diff didn't apply cleanly. I've attached a working
one in case anyone else would like to try.
> More importantly, I have written a (rather simple) workaround to
> support PseudoColor and StaticColor modes on X11. It is not too fast,
> especially on a remote display, but at least it does not crash (I
> hope). It should even produce reasonnable output, provided that
> colormaps are not changed too much after the first calls to cairo
> drawing functions. It might even work on StaticGray/GrayScale
> displays.
>
> I have tested it on macppc with both wscons and ati drivers, with
> local server, through "ssh -X" and "ssh -Y". Sample code for testing
> can be found at:
>
> http://webcvs.cairographics.org/cairo-demo/X11/
>
> Please test and report, especially those who are stuck with 8 bit
> displays. I do not plan to write something more complicated/efficient
> for now. So, if someone is interested in improving that fix, please do
> so.
Thanks for writing a fix for the lack of PseudoColor and
StaticColor support in cairo. I tried it and it does fix
the segfault and seems to work well enough. I think your
update should go in. Anyone see a reason why it shouldn't?
-Kurt
Index: Makefile
===
RCS file: /cvs/ports/graphics/cairo/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile 10 Jan 2006 08:59:16 - 1.5
+++ Makefile 28 Apr 2006 17:02:04 -
@@ -2,9 +2,9 @@
COMMENT= "vector graphics library"
-PKGNAME= ${DISTNAME}p0
-DISTNAME= cairo-1.0.2
-SHARED_LIBS= cairo 4.3
+PKGNAME= ${DISTNAME}
+DISTNAME= cairo-1.0.4
+SHARED_LIBS= cairo 4.4
CATEGORIES= graphics
HOMEPAGE= http://cairographics.org/introduction
Index: distinfo
===
RCS file: /cvs/ports/graphics/cairo/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo 4 Nov 2005 01:12:58 - 1.2
+++ distinfo 28 Apr 2006 17:02:04 -
@@ -1,4 +1,4 @@
-MD5 (cairo-1.0.2.tar.gz) = d0b7111a14f90ec3afa777ec40c44984
-RMD160 (cairo-1.0.2.tar.gz) = 59f309974fdac86253ed9a4d00e564a2fac310eb
-SHA1 (cairo-1.0.2.tar.gz) = 3a425049499b0b067ed4dc60d94b4d0819c0841b
-SIZE (cairo-1.0.2.tar.gz) = 1458903
+MD5 (cairo-1.0.4.tar.gz) = 9002b0e69b3f94831a22d3f2a7735ce2
+RMD160 (cairo-1.0.4.tar.gz) = 40403971bcb6ed9cd4379e8e13a52f515db886cb
+SHA1 (cairo-1.0.4.tar.gz) = 89e72202e5b51a8914fce60f52f7c51ecdea982a
+SIZE (cairo-1.0.4.tar.gz) = 1475777
Index: patches/patch-cairo_pc_in
===
RCS file: /cvs/ports/graphics/cairo/patches/patch-cairo_pc_in,v
retrieving revision 1.1
diff -u -r1.1 patch-cairo_pc_in
--- patches/patch-cairo_pc_in 10 Jan 2006 08:59:17 - 1.1
+++ patches/patch-cairo_pc_in 28 Apr 2006 17:02:04 -
@@ -1,7 +1,7 @@
-$OpenBSD: patch-cairo_pc_in,v 1.1 2006/01/10 08:59:17 matthieu Exp $
cairo.pc.orig Thu Aug 18 00:57:45 2005
-+++ cairo.pc.in Mon Jan 2 22:51:03 2006
-@@ -8,5 +8,5 @@
+$OpenBSD$
+--- cairo.pc.in.orig Tue Mar 14 03:08:44 2006
cairo.pc.in Thu Mar 23 14:27:36 2006
+@@ -8,5 +8,5 @@ Description: Multi-platform 2D graphics
Version: @VERSION@
@PKGCONFIG_REQUIRES@: @FREETYPE_REQUIRES@ @XRENDER_REQUIRES@ @PNG_REQUIRES@ @GLITZ_REQUIRES@
Index: patches/patch-configure
===
RCS file: /cvs/ports/graphics/cairo/patches/patch-configure,v
retrieving revision 1.2
diff -u -r1.2 patch-configure
--- patches/patch-configure 4 Nov 2005 01:12:58 - 1.2
+++ patches/patch-configure 28 Apr 2006 17:02:04 -
@@ -1,7 +1,7 @@
$OpenBSD: patch-configure,v 1.2 2005/11/04 01:12:58 naddy Exp $
configure.orig Tue Oct 4 02:48:32 2005
-+++ configure Fri Nov 4 01:35:40 2005
-@@ -24143,7 +24143,8 @@ fi;
+--- configure.orig Wed Mar 15 20:04:32 2006
configure Thu Mar 23 14:27:36 2006
+@@ -23996,7 +23996,8 @@ fi;
if test "x$use_png" = "xyes"; then
use_png=no
# libpng13 is GnuWin32's libpng-1.2.8 :-(
Index: patches/patch-src_cairo-xlib-surface_c
===
RCS file: patches/patch-src_cairo-xlib-surface_c
diff -N patches/patch-src_cairo-xlib-surface_c
--- /dev/null 1 Jan 1970 00:00:00 -
+++ patches/patch-src_cairo-xlib-surface_c 28 Apr 2006 17:02:04 -
@@ -0,0 +1,383 @@
+$OpenBSD$
+--- src/cairo-xlib-surface.c.orig Wed Mar 15 16:26:51 2006
src/cairo-xlib-surface.c Sun Mar 26 21:00:36 2006
+@@ -72,6 +72,8 @@ _native_byte_order_lsb (void);
+
+ #define CAIRO_ASSUME_PIXMAP 20
+
++struct clut_r3g3b2;
++
+ struct _cairo_xlib_surface {
+ cairo_surface_t base;
+
+@@ -117,6 +119,9 @@ struct _cairo_xlib_surface {
+ int num_clip_rects;
+
+ XRenderPictFormat *format;
++
++struct clut_r3g3b2 *clut;
++
+ };
+
+ #define CAIRO_SURFACE_RENDER_AT_LEAST(surface, major,