Subject: x11/render fix for broken Xmd.h
To: None <tech-pkg@netbsd.org>
From: Jonathan Perkin <jonathan@perkin.org.uk>
List: tech-pkg
Date: 12/16/2003 15:39:34
--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Folks,

I'd like to commit the attached patch, but would prefer some eyes
looking at it beforehand as it's not one of my most familiar areas.

x11/Xrender is currently broken on my Solaris 8 build box, due to

  "Composite.c", line 48: undefined symbol: sz_
  "Composite.c", line 48: syntax error before or at: xRenderCompositeReq
  "Composite.c", line 48: syntax error before or at: xRenderCompositeReq
  "Composite.c", line 48: syntax error before or at: xRenderCompositeReq
  "Composite.c", line 65: cannot recover from previous errors
  cc: acomp failed for Composite.c
  *** Error code 1

which is because the version of X11/Xmd.h on that machine has a
broken check for __STDC__ which breaks the SIZEOF macro.  This has
been fixed since (the package compiles fine on my Solaris 9
machine), but with Xrender being quite a critical package these days
it's obviously causing quite a huge loss on the bulk build results.
I think most users will still be on Solaris 8 or older too.

Cheers,

-- 
Jonathan Perkin                         <jonathan@perkin.org.uk>
BBC Internet Services         http://www.perkin.org.uk/jonathan/

--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="render.diff"

Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/x11/render/distinfo,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 distinfo
--- distinfo	2003/09/19 16:33:57	1.1.1.1
+++ distinfo	2003/12/16 15:33:30
@@ -2,3 +2,4 @@
 
 SHA1 (render-0.8.tar.gz) = 73b88307fd318e0a1a7ed50c7cf7808d550cca99
 Size (render-0.8.tar.gz) = 51478 bytes
+SHA1 (patch-aa) = db04a3856fae392270a793766d2f37bb1990c239
--- /dev/null	2003-12-16 15:26:52.000000000 +0000
+++ patches/patch-aa	2003-12-16 15:33:21.570991000 +0000
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- renderproto.h.orig	2003-04-21 18:19:22.000000000 +0100
++++ renderproto.h	2003-12-16 15:32:39.752161000 +0000
+@@ -29,6 +29,17 @@
+ #include <X11/Xmd.h>
+ #include <X11/extensions/render.h>
+ 
++/* Work around bug in -r1.47 of XConsortium: Xmd.h, which breaks packages
++ * dependant on x11/render for certain versions of OpenWindows */
++#undef _SIZEOF
++#undef SIZEOF
++#if ((defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)) && !defined(UNIXCPP)) || defined(ANSICPP) || defined(_LP64)
++#define _SIZEOF(x) sz_##x
++#define SIZEOF(x) _SIZEOF(x)
++#else
++#define SIZEOF(x) sz_/**/x
++#endif
++
+ #define Window CARD32
+ #define Drawable CARD32
+ #define Font CARD32

--sm4nu43k4a2Rpi4c--