On Wed, Feb 13, 2013 at 07:59:05PM +0100, Matthias Kilian wrote: > > Ait feels like getting closer... many thanks again for your work on this. > > Indeed: > > gdevcups.c: offsetof(gx_device, icc_struct) = 500 > gdevcups.c: sizeof(gx_color_index) = 4 > gsicc_manage.c: offsetof(gx_device, icc_struct) = 640 > gsicc_manage.c: sizeof(gx_color_index) = 8 > > This looks like some #include and/or #define fuckup (ghostscript > is heavily abusing the preprocessor in very bad ways, to simulate > something like inheritance and also to make it unmaintainable and > unreadable).
The diff below should fix it (on -current). It makes sure that the cups driver is compiled with the same value for GX_COLOR_INDEX_TYPE as everything else. For information: the definition of CCFLAGS is near the end of base/unix-gcc.mak: CCFLAGS=$(GENOPT) $(CAPOPT) $(CFLAGS) -DGX_COLOR_INDEX_TYPE='unsigned long long' Please test, especially on 32-bit archs. Ciao, Kili Index: Makefile =================================================================== RCS file: /cvs/ports/print/ghostscript/gnu/Makefile,v retrieving revision 1.94 diff -u -p -r1.94 Makefile --- Makefile 9 Sep 2012 08:57:36 -0000 1.94 +++ Makefile 14 Feb 2013 18:57:52 -0000 @@ -6,7 +6,7 @@ VERSION= 9.06 DISTNAME= ghostscript-${VERSION} CATEGORIES= print lang SHARED_LIBS= gs 15.0 -REVISION= 0 +REVISION= 1 MASTER_SITES= http://downloads.ghostscript.com/public/ Index: patches/patch-base_devs_mak =================================================================== RCS file: /cvs/ports/print/ghostscript/gnu/patches/patch-base_devs_mak,v retrieving revision 1.5 diff -u -p -r1.5 patch-base_devs_mak --- patches/patch-base_devs_mak 22 Aug 2012 06:24:17 -0000 1.5 +++ patches/patch-base_devs_mak 14 Feb 2013 18:57:52 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-base_devs_mak,v 1.5 2012/08/22 06:24:17 ajacoutot Exp $ --- base/devs.mak.orig Wed Aug 8 10:01:36 2012 -+++ base/devs.mak Fri Aug 17 15:12:56 2012 ++++ base/devs.mak Thu Feb 14 19:52:13 2013 @@ -1831,14 +1831,11 @@ $(DD)plibk.dev : $(DEVS_MAK) $(plib_) $(GLD)page.dev $ $(SETPDEV2) $(DD)plibk $(plib_) @@ -19,4 +19,4 @@ $OpenBSD: patch-base_devs_mak,v 1.5 2012 $(GLOBJ)gdevcups.$(OBJ) : cups$(D)gdevcups.c $(std_h) - $(CUPS_CC) $(GLO_)gdevcups.$(OBJ) $(C_) $(CFLAGS) $(I_)$(GLSRC) $(I_)$(GLOBJ) $(I_)$(LCUPSSRCDIR)$(D)libs $(LCUPSSRCDIR)$(D)gdevcups.c -+ $(CUPS_CC) $(GLO_)gdevcups.$(OBJ) $(C_) $(CFLAGS) $(I_)$(GLSRC) $(I_)$(GLOBJ) cups$(D)gdevcups.c ++ $(CUPS_CC) $(GLO_)gdevcups.$(OBJ) $(C_) $(CCFLAGS) $(I_)$(GLSRC) $(I_)$(GLOBJ) cups$(D)gdevcups.c