Update to ghostscript-9.94, ugly as usual.  This also enables
jbig2dec support.

There are probably some new devices supported by ghostscript-9.04,
but I didn't yet update the supported devices. This can be done
later in a separate commit.

Ciao,
        Kili

Index: Makefile
===================================================================
RCS file: /cvs/ports/print/ghostscript/gnu/Makefile,v
retrieving revision 1.88
diff -u -p -r1.88 Makefile
--- Makefile    13 Nov 2011 21:18:40 -0000      1.88
+++ Makefile    15 Nov 2011 22:08:15 -0000
@@ -2,11 +2,10 @@
 
 COMMENT=       GNU PostScript interpreter
 
-VERSION=       9.02
+VERSION=       9.04
 DISTNAME=      ghostscript-${VERSION}
-REVISION=      3
 CATEGORIES=    print lang
-SHARED_LIBS=   gs      13.0
+SHARED_LIBS=   gs      14.0
 
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=ghostscript/}
 
@@ -28,13 +27,14 @@ PERMIT_DISTFILES_FTP=       Yes
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
 
-WANTLIB=       c ijs m jpeg>=62 lcms png>=6 pthread tiff z
+WANTLIB=       c ijs m jbig2dec jpeg>=62 lcms png>=6 pthread tiff z
 
 MODULES=       converters/libiconv
 
 RUN_DEPENDS=   print/ghostscript/gnu-fonts
 BUILD_DEPENDS= print/cups>=1.5.0
-LIB_DEPENDS=   graphics/jpeg           \
+LIB_DEPENDS=   graphics/jbig2dec       \
+               graphics/jpeg           \
                graphics/lcms           \
                graphics/png            \
                graphics/tiff           \
@@ -63,7 +63,6 @@ MAKE_FLAGS=   BINDIR=./obj                            \
                INSTALL='${INSTALL}'                    \
                INSTALL_DATA='${INSTALL_DATA}'          \
                INSTALL_PROGRAM='${INSTALL_PROGRAM}'    \
-               JBIG2SRCDIR=./jbig2dec                  \
                JPX_LIB=jasper                          \
                LIBgs_VERSION=${LIBgs_VERSION}          \
                PSGENDIR=./obj                          \
@@ -297,6 +296,9 @@ DEVICES+=   jpeg jpegcmyk jpeggray jpx
 
 # PNG_DEVS (note: png48 not mentioned in configure.ac)
 DEVICES+=      png16 png16m png256 png48 pngalpha pnggray pngmono
+
+# JBIG2_DEVS
+DEVICES+=      jbig2
 
 # TIFF_DEVS
 DEVICES+=      tiff12nc tiff24nc tiff32nc tiffcrle tiffgray tifflzw \
Index: distinfo
===================================================================
RCS file: /cvs/ports/print/ghostscript/gnu/distinfo,v
retrieving revision 1.13
diff -u -p -r1.13 distinfo
--- distinfo    6 Jul 2011 13:49:17 -0000       1.13
+++ distinfo    15 Nov 2011 22:08:15 -0000
@@ -1,5 +1,5 @@
-MD5 (ghostscript-9.02.tar.gz) = hsw6BQnA2WpkHViHnVQnSw==
-RMD160 (ghostscript-9.02.tar.gz) = XlqvGz2b4MBolwaVbrXSoEOtEpU=
-SHA1 (ghostscript-9.02.tar.gz) = HYgx4Nwjxlj+Q8lx/xGVUH4bN4Y=
-SHA256 (ghostscript-9.02.tar.gz) = OcAMp8jHJAujsOyfNkEnez9yyMuxr1kn4JTOvCWba6g=
-SIZE (ghostscript-9.02.tar.gz) = 28145426
+MD5 (ghostscript-9.04.tar.gz) = nC+0rx62CdCduluw+nYXOg==
+RMD160 (ghostscript-9.04.tar.gz) = MKScHMEuO0SRF3YrPtuxIdXSdmw=
+SHA1 (ghostscript-9.04.tar.gz) = dTcAYNCicuZr4gFSoFjkE1l28uU=
+SHA256 (ghostscript-9.04.tar.gz) = 8eMzc4xBw78rR865gGq7gEW83HNTACwyc2FQQlp8HvQ=
+SIZE (ghostscript-9.04.tar.gz) = 34488256
Index: patches/patch-base_devs_mak
===================================================================
RCS file: /cvs/ports/print/ghostscript/gnu/patches/patch-base_devs_mak,v
retrieving revision 1.2
diff -u -p -r1.2 patch-base_devs_mak
--- patches/patch-base_devs_mak 6 Jul 2011 13:49:17 -0000       1.2
+++ patches/patch-base_devs_mak 15 Nov 2011 22:08:15 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-base_devs_mak,v 1.2 2011/07/06 13:49:17 kili Exp $
---- base/devs.mak.orig Thu Mar 10 01:58:08 2011
-+++ base/devs.mak      Tue Jun 28 16:38:49 2011
-@@ -1807,14 +1807,11 @@ $(DD)plibk.dev : $(DEVS_MAK) $(plib_) $(GLD)page.dev
+--- base/devs.mak.orig Fri Aug  5 13:12:20 2011
++++ base/devs.mak      Mon Nov 14 17:20:40 2011
+@@ -1899,14 +1899,11 @@ $(DD)plibk.dev : $(DEVS_MAK) $(plib_) $(GLD)page.dev $
        $(SETPDEV2) $(DD)plibk $(plib_)
  
  ### ------------------------------- CUPS ------------------------------- ###
@@ -9,8 +9,8 @@ $OpenBSD: patch-base_devs_mak,v 1.2 2011
 -lcupsi_dev=$(LCUPSIGENDIR)$(D)lcupsi.dev
 -
  cups_=$(GLOBJ)gdevcups.$(OBJ)
--$(DD)cups.dev : $(DEVS_MAK) $(lcups_dev) $(lcupsi_dev) $(cups_) 
-+$(DD)cups.dev : $(DEVS_MAK) $(cups_) 
+-$(DD)cups.dev : $(DEVS_MAK) $(lcups_dev) $(lcupsi_dev) $(cups_) $(GDEV)
++$(DD)cups.dev : $(DEVS_MAK) $(cups_) $(GDEV)
        $(SETPDEV2) $(DD)cups $(cups_)
 -      $(ADDMOD) $(DD)cups -include $(lcups_dev)
 -      $(ADDMOD) $(DD)cups -include $(lcupsi_dev)
@@ -19,4 +19,4 @@ $OpenBSD: patch-base_devs_mak,v 1.2 2011
  
  $(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
-+      $(GLCC) $(GLO_)gdevcups.$(OBJ) $(C_) $(CFLAGS) $(I_)$(GLSRC) 
$(I_)$(GLOBJ) cups$(D)gdevcups.c
++      $(CUPS_CC) $(GLO_)gdevcups.$(OBJ) $(C_) $(CFLAGS) $(I_)$(GLSRC) 
$(I_)$(GLOBJ) cups$(D)gdevcups.c
Index: patches/patch-base_gdevpng_c
===================================================================
RCS file: patches/patch-base_gdevpng_c
diff -N patches/patch-base_gdevpng_c
--- patches/patch-base_gdevpng_c        8 Jul 2011 20:36:09 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,196 +0,0 @@
-$OpenBSD: patch-base_gdevpng_c,v 1.1 2011/07/08 20:36:09 naddy Exp $
-
-Fix build with png-1.5.
-
---- base/gdevpng.c.orig        Wed Jul 16 20:34:01 2008
-+++ base/gdevpng.c     Mon Jul  4 13:56:36 2011
-@@ -36,12 +36,14 @@
- #include "gdevpccm.h"
- #include "gscdefs.h"
- 
--#define PNG_INTERNAL
- /*
-  * libpng versions 1.0.3 and later allow disabling access to the stdxxx
-  * files while retaining support for FILE * I/O.
-+ *
-+ * This is a misunderstanding - this is a build time option for libpng,
-+ * it has no effect on a user of libpng.
-  */
--#define PNG_NO_CONSOLE_IO
-+/*#define PNG_NO_CONSOLE_IO*/
- /*
-  * Earlier libpng versions require disabling FILE * I/O altogether.
-  * This produces a compiler warning about no prototype for png_init_io.
-@@ -280,7 +282,7 @@ png_print_page(gx_device_printer * pdev, FILE * file)
-       goto done;
-     }
-     /* set error handling */
--    if (setjmp(png_ptr->jmpbuf)) {
-+    if (setjmp(png_jmpbuf(png_ptr))) {
-       /* If we get here, we had a problem reading the file */
-       code = gs_note_error(gs_error_VMerror);
-       goto done;
-@@ -290,19 +292,12 @@ png_print_page(gx_device_printer * pdev, FILE * file)
-     png_init_io(png_ptr, file);
- 
-     /* set the file information here */
--    info_ptr->width = pdev->width;
--    info_ptr->height = pdev->height;
--    /* resolution is in pixels per meter vs. dpi */
--    info_ptr->x_pixels_per_unit =
--      (png_uint_32) (pdev->HWResolution[0] * (100.0 / 2.54));
--    info_ptr->y_pixels_per_unit =
--      (png_uint_32) (pdev->HWResolution[1] * (100.0 / 2.54));
--    info_ptr->phys_unit_type = PNG_RESOLUTION_METER;
--    info_ptr->valid |= PNG_INFO_pHYs;
-     switch (depth) {
-       case 32:
--          info_ptr->bit_depth = 8;
--          info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
-+          png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height,
-+              8, PNG_COLOR_TYPE_RGB_ALPHA,
-+              PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
-+              PNG_FILTER_TYPE_DEFAULT);
-           png_set_invert_alpha(png_ptr);
-           {   gx_device_pngalpha *ppdev = (gx_device_pngalpha *)pdev;
-               png_color_16 background;
-@@ -315,57 +310,69 @@ png_print_page(gx_device_printer * pdev, FILE * file)
-           }
-           break;
-       case 48:
--          info_ptr->bit_depth = 16;
--          info_ptr->color_type = PNG_COLOR_TYPE_RGB;
-+          png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height,
-+              16, PNG_COLOR_TYPE_RGB,
-+              PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
-+              PNG_FILTER_TYPE_DEFAULT);
- #if defined(ARCH_IS_BIG_ENDIAN) && (!ARCH_IS_BIG_ENDIAN) 
-           png_set_swap(png_ptr);
- #endif
-           break;
-       case 24:
--          info_ptr->bit_depth = 8;
--          info_ptr->color_type = PNG_COLOR_TYPE_RGB;
-+          png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height,
-+              8, PNG_COLOR_TYPE_RGB,
-+              PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
-+              PNG_FILTER_TYPE_DEFAULT);
-           break;
-       case 8:
--          info_ptr->bit_depth = 8;
--          if (gx_device_has_color(pdev))
--              info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
--          else
--              info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
-+          png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height,
-+              8, gx_device_has_color(pdev) ?
-+                      PNG_COLOR_TYPE_PALETTE : PNG_COLOR_TYPE_GRAY,
-+              PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
-+              PNG_FILTER_TYPE_DEFAULT);
-           break;
-       case 4:
--          info_ptr->bit_depth = 4;
--          info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
-+          png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height,
-+              4, PNG_COLOR_TYPE_PALETTE,
-+              PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
-+              PNG_FILTER_TYPE_DEFAULT);
-           break;
-       case 1:
--          info_ptr->bit_depth = 1;
--          info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
-+          png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height,
-+              1, PNG_COLOR_TYPE_GRAY,
-+              PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
-+              PNG_FILTER_TYPE_DEFAULT);
-           /* invert monocrome pixels */
-           png_set_invert_mono(png_ptr);
-           break;
-+      default:
-+          png_error(png_ptr, "invalid bit depth");
-     }
- 
-+    /* resolution is in pixels per meter vs. dpi */
-+    png_set_pHYs(png_ptr, info_ptr, 
-+      (png_uint_32) (pdev->HWResolution[0] * (100.0 / 2.54)),
-+      (png_uint_32) (pdev->HWResolution[1] * (100.0 / 2.54)),
-+      PNG_RESOLUTION_METER);
-+
-     /* set the palette if there is one */
--    if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) {
-+    if (png_get_color_type(png_ptr, info_ptr)  == PNG_COLOR_TYPE_PALETTE) {
-       int i;
-       int num_colors = 1 << depth;
-       gx_color_value rgb[3];
-+      png_color palette[256];
- 
--      info_ptr->palette =
--          (void *)gs_alloc_bytes(mem, 256 * sizeof(png_color),
--                                 "png palette");
--      if (info_ptr->palette == 0) {
--          code = gs_note_error(gs_error_VMerror);
--          goto done;
--      }
--      info_ptr->num_palette = num_colors;
--      info_ptr->valid |= PNG_INFO_PLTE;
-+      if (num_colors > 256)
-+          num_colors = 256;
-+
-       for (i = 0; i < num_colors; i++) {
-           (*dev_proc(pdev, map_color_rgb)) ((gx_device *) pdev,
-                                             (gx_color_index) i, rgb);
--          info_ptr->palette[i].red = gx_color_value_to_byte(rgb[0]);
--          info_ptr->palette[i].green = gx_color_value_to_byte(rgb[1]);
--          info_ptr->palette[i].blue = gx_color_value_to_byte(rgb[2]);
-+          palette[i].red = gx_color_value_to_byte(rgb[0]);
-+          palette[i].green = gx_color_value_to_byte(rgb[1]);
-+          palette[i].blue = gx_color_value_to_byte(rgb[2]);
-       }
-+      png_set_PLTE(png_ptr, info_ptr, palette, num_colors);
-     }
-     /* add comment */
-     strncpy(software_key, "Software", sizeof(software_key));
-@@ -375,15 +382,14 @@ png_print_page(gx_device_printer * pdev, FILE * file)
-     text_png.key = software_key;
-     text_png.text = software_text;
-     text_png.text_length = strlen(software_text);
--    info_ptr->text = &text_png;
--    info_ptr->num_text = 1;
-+    png_set_text(png_ptr, info_ptr, &text_png, 1);
- 
-     /* write the file information */
-     png_write_info(png_ptr, info_ptr);
- 
-     /* don't write the comments twice */
--    info_ptr->num_text = 0;
--    info_ptr->text = NULL;
-+    /*info_ptr->num_text = 0;*/
-+    /*info_ptr->text = NULL;*/
- 
-     /* Write the contents of the image. */
-     for (y = 0; y < height; y++) {
-@@ -395,7 +401,7 @@ png_print_page(gx_device_printer * pdev, FILE * file)
-     png_write_end(png_ptr, info_ptr);
- 
-     /* if you alloced the palette, free it here */
--    gs_free_object(mem, info_ptr->palette, "png palette");
-+    /*gs_free_object(mem, info_ptr->palette, "png palette");*/
- 
-   done:
-     /* free the structures */
-@@ -405,6 +411,7 @@ png_print_page(gx_device_printer * pdev, FILE * file)
-     return code;
- }
- 
-+#if 0 /* not required in 1.5 */
- /*
-  * Patch around a static reference to a never-used procedure.
-  * This could be avoided if we were willing to edit pngconf.h to
-@@ -421,6 +428,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep bu
-                    PPFB_LENGTH_T length)
- {
- }
-+#endif
- #endif
- 
- static int
Index: patches/patch-base_lib_mak
===================================================================
RCS file: /cvs/ports/print/ghostscript/gnu/patches/patch-base_lib_mak,v
retrieving revision 1.1
diff -u -p -r1.1 patch-base_lib_mak
--- patches/patch-base_lib_mak  8 Jun 2011 19:15:48 -0000       1.1
+++ patches/patch-base_lib_mak  15 Nov 2011 22:08:15 -0000
@@ -1,12 +1,13 @@
 $OpenBSD: patch-base_lib_mak,v 1.1 2011/06/08 19:15:48 kili Exp $
---- base/lib.mak.orig  Thu Sep  9 01:20:36 2010
-+++ base/lib.mak       Sun Sep 19 13:19:33 2010
-@@ -25,11 +25,11 @@ GLO_=$(O_)$(GLOBJ)
+--- base/lib.mak.orig  Fri Aug  5 13:12:20 2011
++++ base/lib.mak       Mon Nov 14 13:41:09 2011
+@@ -27,12 +27,12 @@ AUXO_=$(O_)$(AUX)
  GLI_=$(GLGENDIR) $(II)$(GLSRCDIR)
  GLF_=
- GLCCFLAGS=$(I_)$(GLI_)$(_I) $(GLF_)
+ GLCCFLAGS=$(I_)$(GLI_)$(_I) $(GLF_) -DWHICH_CMS="$(WHICH_CMS)"
 -GLCC=$(CC_) $(GLCCFLAGS)
 +GLCC=$(CC) $(GLCCFLAGS) $(CCFLAGS)
+ GLCCAUX=$(CCAUX_) $(GLCCFLAGS)
  GLJCC=$(CC_) $(I_)$(GLI_) $(II)$(JI_)$(_I) $(JCF_) $(GLF_)
  GLZCC=$(CC_) $(I_)$(GLI_) $(II)$(ZI_)$(_I) $(ZCF_) $(GLF_)
  GLJBIG2CC=$(CC_) $(I_)$(GLI_) $(II)$(JB2I_)$(_I) $(JB2CF_) $(GLF_)
Index: patches/patch-base_unix-dll_mak
===================================================================
RCS file: /cvs/ports/print/ghostscript/gnu/patches/patch-base_unix-dll_mak,v
retrieving revision 1.2
diff -u -p -r1.2 patch-base_unix-dll_mak
--- patches/patch-base_unix-dll_mak     6 Jul 2011 13:49:17 -0000       1.2
+++ patches/patch-base_unix-dll_mak     15 Nov 2011 22:08:15 -0000
@@ -1,22 +1,22 @@
 $OpenBSD: patch-base_unix-dll_mak,v 1.2 2011/07/06 13:49:17 kili Exp $
---- base/unix-dll.mak.orig     Tue Jan 18 11:22:12 2011
-+++ base/unix-dll.mak  Tue Jun 28 13:50:10 2011
+--- base/unix-dll.mak.orig     Fri Aug  5 13:12:20 2011
++++ base/unix-dll.mak  Mon Nov 14 18:48:00 2011
 @@ -23,10 +23,6 @@
  #  export LD_LIBRARY_PATH=/insert-path-here/sobin
  #  export GS_LIB=/insert-path-here/lib
  
 -# Location for building shared object
--SOOBJRELDIR=../soobj
--SOBINRELDIR=../sobin
+-SODIRPREFIX=so
+-SODEBUGDIRPREFIX=sodebug
 -
  # ------------------- Ghostscript shared object --------------------------- #
  
  # Shared object names
-@@ -34,12 +30,16 @@ SOBINRELDIR=../sobin
+@@ -34,12 +30,16 @@ SODEBUGDIRPREFIX=sodebug
  # simple loader (no support for display device)
  GSSOC_XENAME=$(GS)c$(XE)
  GSSOC_XE=$(BINDIR)/$(GSSOC_XENAME)
--GSSOC=$(BINDIR)/$(SOBINRELDIR)/$(GSSOC_XENAME)
+-GSSOC=$(BINDIR)/$(GSSOC_XENAME)
 +GSSOC-Yes=
 +GSSOC-No=$(BINDIR)/$(GSSOC_XENAME)
 +GSSOC=$(GSSOC-$(USE_GTK))
@@ -24,14 +24,14 @@ $OpenBSD: patch-base_unix-dll_mak,v 1.2 
  # loader suporting display device using Gtk+
  GSSOX_XENAME=$(GS)x$(XE)
  GSSOX_XE=$(BINDIR)/$(GSSOX_XENAME)
--GSSOX=$(BINDIR)/$(SOBINRELDIR)/$(GSSOX_XENAME)
+-GSSOX=$(BINDIR)/$(GSSOX_XENAME)
 +GSSOX-Yes=$(BINDIR)/$(GSSOX_XENAME)
 +GSSOX-No=
 +GSSOX=$(GSSOX-$(USE_GTK))
  
  # shared library
  GS_SONAME_BASE=lib$(GS)
-@@ -47,16 +47,11 @@ GS_SONAME_BASE=lib$(GS)
+@@ -47,16 +47,10 @@ GS_SONAME_BASE=lib$(GS)
  # GNU/Linux
  GS_SOEXT=so
  GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT)
@@ -46,12 +46,12 @@ $OpenBSD: patch-base_unix-dll_mak,v 1.2 
 -# trailing space to separation it from the value of the option. For GNU ld and
 -# similar linkers it must containt the trailing "=" 
 -LDFLAGS_SO=-shared 
-Wl,$(LD_SET_DT_SONAME)$(LDFLAGS_SO_PREFIX)$(GS_SONAME_MAJOR)
- 
+-
 -
  # MacOS X
  #GS_SOEXT=dylib
  #GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT)
-@@ -83,25 +78,25 @@ $(GS_SO_MAJOR): $(GS_SO_MAJOR_MINOR)
+@@ -83,13 +77,13 @@ $(GS_SO_MAJOR): $(GS_SO_MAJOR_MINOR)
        ln -s $(GS_SONAME_MAJOR_MINOR) $(GS_SO_MAJOR)
  
  # Build the small Ghostscript loaders, with Gtk+ and without
@@ -71,37 +71,51 @@ $OpenBSD: patch-base_unix-dll_mak,v 1.2 
  
  # ------------------------- Recursive make targets ------------------------- #
  
- SODEFS=\
-- GS_XE=$(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR)\
-+ GS_XE=$(BINDIR)/$(GS_SONAME_MAJOR_MINOR)\
+@@ -99,6 +93,13 @@ SODEFS=\
   STDIO_IMPLEMENTATION=c\
-- DISPLAY_DEV=$(DD)$(SOOBJRELDIR)/display.dev\
-- BINDIR=$(BINDIR)/$(SOBINRELDIR)\
-- GLGENDIR=$(GLGENDIR)/$(SOOBJRELDIR)\
-- GLOBJDIR=$(GLOBJDIR)/$(SOOBJRELDIR)\
-- PSGENDIR=$(PSGENDIR)/$(SOOBJRELDIR)\
-- PSOBJDIR=$(PSOBJDIR)/$(SOOBJRELDIR)
-+ DISPLAY_DEV=$(DD)display.dev\
-+ BINDIR=$(BINDIR)\
-+ GLGENDIR=$(GLGENDIR)\
-+ GLOBJDIR=$(GLOBJDIR)\
-+ PSGENDIR=$(PSGENDIR)\
-+ PSOBJDIR=$(PSOBJDIR)
- 
- 
- # Normal shared object
-@@ -110,8 +105,8 @@ so: SODIRS
-         then echo "Warning: this target requires gmake";\
+  BUILDDIRPREFIX=$(BUILDDIRPREFIX)
+ 
++# NOTE: moved somewhere else:
++# + BINDIR=$(BINDIR)\
++# + GLGENDIR=$(GLGENDIR)\
++# + GLOBJDIR=$(GLOBJDIR)\
++# + PSGENDIR=$(PSGENDIR)\
++# + PSOBJDIR=$(PSOBJDIR)
++
+ # This is a bit nasty; because of the directory name rewriting that happens
+ # on a recursive build, we have to recurse twice before we are sure that
+ # all the targets are correct.
+@@ -117,19 +118,27 @@ sodebug:
        fi
-       $(MAKE) $(SODEFS) LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS_STANDARD) 
$(GCFLAGS) $(XCFLAGS)' prefix=$(prefix) \
--                $(GLOBJDIR)/$(SOOBJRELDIR)/echogs$(XEAUX) 
$(GLOBJDIR)/$(SOOBJRELDIR)/genarch$(XEAUX)
--      $(MAKE) $(SODEFS) LDFLAGS='$(LDFLAGS) $(LDFLAGS_SO)' 
CFLAGS='$(CFLAGS_STANDARD) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' \
-+                ${ECHOGS_XE} $(GENARCH_XE)
-+      $(MAKE) $(SODEFS) LDFLAGS='$(LDFLAGS) $(LDFLAGS_SO)' 
CFLAGS='$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)' \
-                 prefix=$(prefix)
-       $(MAKE) $(SODEFS) LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS_STANDARD) 
$(GCFLAGS) $(XCFLAGS)' prefix=$(prefix) $(GSSOC) $(GSSOX)
+       $(MAKE) so-subtarget GENOPT='-DDEBUG' BUILDDIRPREFIX=$(SODEBUGDIRPREFIX)
  
-@@ -139,13 +134,11 @@ install-so: so
++# NOTE: Differs from gs-9.02, may be wrong
+ so-subtarget:
+       $(MAKE) $(SODEFS) GENOPT='$(GENOPT)' LDFLAGS='$(LDFLAGS)'\
+        CFLAGS='$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)' prefix=$(prefix)\
++       USE_GTK=$(USE_GTK) \
+        directories
+       $(MAKE) $(SODEFS) GENOPT='$(GENOPT)' LDFLAGS='$(LDFLAGS)'\
+        CFLAGS='$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)' prefix=$(prefix)\
++       USE_GTK=$(USE_GTK) \
+        $(AUXDIR)/echogs$(XEAUX) $(AUXDIR)/genarch$(XEAUX)
+       $(MAKE) $(SODEFS) GENOPT='$(GENOPT)' LDFLAGS='$(LDFLAGS) $(LDFLAGS_SO)'\
+-       CFLAGS='$(CFLAGS_STANDARD) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)'\
++       CFLAGS='$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)'\
++       USE_GTK=$(USE_GTK) \
+        prefix=$(prefix)
++      @echo USE_GTK = $(USE_GTK)
++      @echo GSSOC = $(GSSOC)
++      @echo GSSOX = $(GSSOX)
+       $(MAKE) $(SODEFS) GENOPT='$(GENOPT)' LDFLAGS='$(LDFLAGS)'\
+        CFLAGS='$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)' prefix=$(prefix)\
+-       $(GSSOC_XE) $(GSSOX_XE)
++       USE_GTK=$(USE_GTK) \
++       $(GSSOC) $(GSSOX)
+ 
+ install-so:
+       $(MAKE) install-so-subtarget BUILDDIRPREFIX=$(SODIRPREFIX)
+@@ -145,13 +154,11 @@ install-so-subtarget: so-subtarget
        -mkdir -p $(DESTDIR)$(bindir)
        -mkdir -p $(DESTDIR)$(libdir)
        -mkdir -p $(DESTDIR)$(gsincludedir)
@@ -109,37 +123,20 @@ $OpenBSD: patch-base_unix-dll_mak,v 1.2 
        $(INSTALL_PROGRAM) $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME)
 +      [ "$(USE_GTK)" = No ] || \
        $(INSTALL_PROGRAM) $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME)
--      $(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) 
$(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR)
+       $(INSTALL_PROGRAM) $(BINDIR)/$(GS_SONAME_MAJOR_MINOR) 
$(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR)
 -      $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME)
 -      ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME)
 -      $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
 -      ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
-+      $(INSTALL_PROGRAM) $(BINDIR)/$(GS_SONAME_MAJOR_MINOR) 
$(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR)
        $(INSTALL_DATA) $(PSSRC)iapi.h $(DESTDIR)$(gsincludedir)iapi.h
        $(INSTALL_DATA) $(PSSRC)ierrors.h $(DESTDIR)$(gsincludedir)ierrors.h
        $(INSTALL_DATA) $(GLSRC)gdevdsp.h $(DESTDIR)$(gsincludedir)gdevdsp.h
-@@ -154,17 +147,17 @@ soinstall: install-so install-scripts install-data $(I
+@@ -163,6 +170,8 @@ sodebuginstall:
+       $(MAKE) soinstall-subtarget GENOPT='-DDEBUG' 
BUILDDIRPREFIX=$(SODEBUGDIRPREFIX)
+ 
+ soinstall-subtarget: install-so install-scripts install-data 
$(INSTALL_SHARED) $(INSTALL_CONTRIB)
++
++# NOTE: target SODIRS moved somewhere else.
  
- # Make the build directories
- SODIRS: STDDIRS
--      @if test ! -d $(BINDIR)/$(SOBINRELDIR); then mkdir -p 
$(BINDIR)/$(SOBINRELDIR); fi
--      @if test ! -d $(GLGENDIR)/$(SOOBJRELDIR); then mkdir -p 
$(GLGENDIR)/$(SOOBJRELDIR); fi
--      @if test ! -d $(GLOBJDIR)/$(SOOBJRELDIR); then mkdir -p 
$(GLOBJDIR)/$(SOOBJRELDIR); fi
--      @if test ! -d $(PSGENDIR)/$(SOOBJRELDIR); then mkdir -p 
$(PSGENDIR)/$(SOOBJRELDIR); fi
--      @if test ! -d $(PSOBJDIR)/$(SOOBJRELDIR); then mkdir -p 
$(PSOBJDIR)/$(SOOBJRELDIR); fi
-+      @if test ! -d $(BINDIR); then mkdir -p $(BINDIR); fi
-+      @if test ! -d $(GLGENDIR); then mkdir -p $(GLGENDIR); fi
-+      @if test ! -d $(GLOBJDIR); then mkdir -p $(GLOBJDIR); fi
-+      @if test ! -d $(PSGENDIR); then mkdir -p $(PSGENDIR); fi
-+      @if test ! -d $(PSOBJDIR); then mkdir -p $(PSOBJDIR); fi
- 
- 
- soclean: SODIRS
-       $(MAKE) $(SODEFS) clean
--      $(RM_) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME)
--      $(RM_) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR)
-+      $(RM_) $(BINDIR)/$(GS_SONAME)
-+      $(RM_) $(BINDIR)/$(GS_SONAME_MAJOR)
-       $(RM_) $(GSSOC)
-       $(RM_) $(GSSOX)
-       @-rmdir $(BINDIR)/$(SOBINRELDIR) $(GLGENDIR)/$(SOOBJRELDIR) 
$(GLOBJDIR)/$(SOOBJRELDIR) $(PSGENDIR)/$(SOOBJRELDIR) 
$(PSOBJDIR)/$(SOOBJRELDIR) || true 
+ # Clean targets
+ soclean:
Index: patches/patch-base_unix-gcc_mak
===================================================================
RCS file: /cvs/ports/print/ghostscript/gnu/patches/patch-base_unix-gcc_mak,v
retrieving revision 1.3
diff -u -p -r1.3 patch-base_unix-gcc_mak
--- patches/patch-base_unix-gcc_mak     13 Nov 2011 21:18:40 -0000      1.3
+++ patches/patch-base_unix-gcc_mak     15 Nov 2011 22:08:15 -0000
@@ -1,15 +1,15 @@
 $OpenBSD: patch-base_unix-gcc_mak,v 1.3 2011/11/13 21:18:40 kili Exp $
---- base/unix-gcc.mak.orig     Thu Mar  3 21:23:43 2011
-+++ base/unix-gcc.mak  Sun Nov 13 19:29:43 2011
-@@ -30,6 +30,7 @@ PSLIBDIR=./lib
+--- base/unix-gcc.mak.orig     Fri Aug  5 13:12:20 2011
++++ base/unix-gcc.mak  Mon Nov 14 16:38:09 2011
+@@ -31,6 +31,7 @@ PSLIBDIR=./lib
  PSRESDIR=./Resource
- PSGENDIR=./obj
- PSOBJDIR=./obj
+ PSGENDIR=./$(BUILDDIRPREFIX)obj
+ PSOBJDIR=./$(BUILDDIRPREFIX)obj
 +CONTRIBDIR=./contrib
  
  # Do not edit the next group of lines.
  
-@@ -68,12 +69,12 @@ gsincludedir = $(includedir)/ghostscript/
+@@ -69,12 +70,12 @@ gsincludedir = $(includedir)/ghostscript/
  
  docdir=$(gsdatadir)/doc
  exdir=$(gsdatadir)/examples
@@ -24,7 +24,7 @@ $OpenBSD: patch-base_unix-gcc_mak,v 1.3 
  
  # Define whether or not searching for initialization files should always
  # look in the current directory first.  This leads to well-known security
-@@ -201,6 +202,9 @@ IJS_NAME=
+@@ -210,6 +211,9 @@ IJS_NAME=
  IJSSRCDIR=ijs
  IJSEXECTYPE=unix
  
@@ -34,7 +34,7 @@ $OpenBSD: patch-base_unix-gcc_mak,v 1.3 
  # Define how to build the library archives.  (These are not used in any
  # standard configuration.)
  
-@@ -209,6 +213,11 @@ IJSEXECTYPE=unix
+@@ -218,6 +222,11 @@ IJSEXECTYPE=unix
  
  IMDISRCDIR=imdi
  
@@ -46,7 +46,7 @@ $OpenBSD: patch-base_unix-gcc_mak,v 1.3 
  AR=ar
  ARFLAGS=qc
  RANLIB=ranlib
-@@ -217,7 +226,7 @@ RANLIB=ranlib
+@@ -226,7 +235,7 @@ RANLIB=ranlib
  
  # Define the name of the C compiler.
  
@@ -55,7 +55,7 @@ $OpenBSD: patch-base_unix-gcc_mak,v 1.3 
  
  # Define the name of the linker for the final link step.
  # Normally this is the same as the C compiler.
-@@ -229,7 +238,7 @@ CCLD=$(CC)
+@@ -238,7 +247,7 @@ CCLD=$(CC)
  # the 2.7.0-2.7.2 optimizer bug, either "-Dconst=" or
  # "-Wcast-qual -Wwrite-strings" is automatically included.
  
@@ -64,7 +64,7 @@ $OpenBSD: patch-base_unix-gcc_mak,v 1.3 
  
  # Define the added flags for standard, debugging, profiling 
  # and shared object builds.
-@@ -366,8 +375,6 @@ DISPLAY_DEV=
+@@ -375,8 +384,6 @@ DISPLAY_DEV=
  # Choose the device(s) to include.  See devs.mak for details,
  # devs.mak and contrib.mak for the list of available devices.
  
@@ -73,7 +73,7 @@ $OpenBSD: patch-base_unix-gcc_mak,v 1.3 
  #DEVICE_DEVS1=
  #DEVICE_DEVS2=
  #DEVICE_DEVS3=
-@@ -389,35 +396,14 @@ DEVICE_DEVS=$(DISPLAY_DEV) $(DD)x11.dev $(DD)x11alpha.
+@@ -398,37 +405,29 @@ DEVICE_DEVS=$(DISPLAY_DEV) $(DD)x11.dev $(DD)x11alpha.
  #DEVICE_DEVS19=
  #DEVICE_DEVS20=
  
@@ -87,14 +87,15 @@ $OpenBSD: patch-base_unix-gcc_mak,v 1.3 
 -DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev 
$(DD)pcx24b.dev $(DD)pcxcmyk.dev
 -DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev 
$(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev 
$(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev
 -DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev 
$(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev
--DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev $(DD)tiff48nc.dev 
$(DD)tiffgray.dev $(DD)tiff32nc.dev $(DD)tiff64nc.dev $(DD)tiffsep.dev 
$(DD)tiffsep1.dev $(DD)tiffscaled.dev
+-DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev $(DD)tiff48nc.dev 
$(DD)tiffgray.dev $(DD)tiff32nc.dev $(DD)tiff64nc.dev $(DD)tiffsep.dev 
$(DD)tiffsep1.dev $(DD)tiffscaled.dev $(DD)tiffscaled8.dev $(DD)tiffscaled24.dev
 -DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)psrgb.dev $(DD)bit.dev 
$(DD)bitrgb.dev $(DD)bitcmyk.dev
--DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev 
$(DD)png256.dev $(DD)png16m.dev $(DD)pngalpha.dev
+-DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pngmonod.dev $(DD)pnggray.dev 
$(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev $(DD)pngalpha.dev
 -DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev $(DD)jpegcmyk.dev
 -DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)ps2write.dev 
$(DD)epswrite.dev $(DD)txtwrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev
 -DEVICE_DEVS16=$(DD)bbox.dev
+ 
+-DEVICE_DEVS17=$(DD)plan.dev $(DD)planm.dev $(DD)plang.dev $(DD)planc.dev 
$(DD)plank.dev
 -
--DEVICE_DEVS17=
 -DEVICE_DEVS18=
 -DEVICE_DEVS19=
 -DEVICE_DEVS20=$(DD)cljet5.dev $(DD)cljet5c.dev $(DD)pamcmyk32.dev 
$(DD)pamcmyk4.dev
@@ -110,9 +111,23 @@ $OpenBSD: patch-base_unix-gcc_mak,v 1.3 
 +# Copied from Makefile.in
 +EXTRA_INIT_FILES= Fontmap cidfmap xlatmap FAPI FCOfontmap-PCLPS2 gs_cet.ps
  
++# CCFLAGS=$(GENOPT) $(CAPOPT) $(CFLAGS)
++# CC_=$(CC) $(CCFLAGS)
++CCAUX_=$(CCAUX) $(CFLAGS)
++CUPS_CC=$(CC)
++# CC_LEAF=$(CC_)
++# # note gcc can't use -fomit-frame-pointer with -pg.
++# CC_LEAF_PG=$(CC_)
++# # These are the specific warnings we have to turn off to compile those
++# # specific few files that need this.  We may turn off others in the future.
++# CC_NO_WARN=$(CC_)
++# CCAUX_NO_WARN=$(CCAUX_)
++# CC_SHARED=$(CC_) @DYNAMIC_CFLAGS@
++
  # ---------------------------- End of options --------------------------- #
  
-@@ -460,6 +446,7 @@ include $(GLSRCDIR)/zlib.mak
+ # Define the name of the partial makefile that specifies options --
+@@ -476,6 +475,7 @@ include $(GLSRCDIR)/zlib.mak
  include $(GLSRCDIR)/png.mak
  include $(GLSRCDIR)/tiff.mak
  include $(GLSRCDIR)/jbig2.mak
@@ -120,7 +135,7 @@ $OpenBSD: patch-base_unix-gcc_mak,v 1.3 
  include $(GLSRCDIR)/icclib.mak
  include $(GLSRCDIR)/lcms.mak
  include $(GLSRCDIR)/ijs.mak
-@@ -470,6 +457,7 @@ include $(GLSRCDIR)/unixlink.mak
+@@ -486,6 +486,7 @@ include $(GLSRCDIR)/unixlink.mak
  include $(GLSRCDIR)/unix-dll.mak
  include $(GLSRCDIR)/unix-end.mak
  include $(GLSRCDIR)/unixinst.mak
Index: patches/patch-cups_gdevcups_c
===================================================================
RCS file: /cvs/ports/print/ghostscript/gnu/patches/patch-cups_gdevcups_c,v
retrieving revision 1.6
diff -u -p -r1.6 patch-cups_gdevcups_c
--- patches/patch-cups_gdevcups_c       8 Sep 2011 10:34:06 -0000       1.6
+++ patches/patch-cups_gdevcups_c       15 Nov 2011 22:08:15 -0000
@@ -1,15 +1,15 @@
 $OpenBSD: patch-cups_gdevcups_c,v 1.6 2011/09/08 10:34:06 ajacoutot Exp $
---- cups/gdevcups.c.orig       Mon Mar  7 16:40:13 2011
-+++ cups/gdevcups.c    Tue Jun 28 13:37:01 2011
-@@ -70,6 +70,7 @@
- #include "gsparam.h"
+--- cups/gdevcups.c.orig       Fri Aug  5 13:12:21 2011
++++ cups/gdevcups.c    Mon Nov 14 14:25:31 2011
+@@ -71,6 +71,7 @@
  #include "arch.h"
+ #include "gsicc_manage.h"
  
 +#include <dlfcn.h>
  #include <stdlib.h>
  #include <ctype.h>
  #include <cups/raster.h>
-@@ -227,6 +228,15 @@ typedef struct gx_device_cups_s
+@@ -228,6 +229,15 @@ typedef struct gx_device_cups_s
    int                   cupsRasterVersion;
  
    /* Used by cups_put_params(): */
@@ -25,7 +25,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
  } gx_device_cups;
  
  private gx_device_procs       cups_procs =
-@@ -425,7 +435,14 @@ gx_device_cups    gs_cups_device =
+@@ -426,7 +436,14 @@ gx_device_cups    gs_cups_device =
    {0x00},                                  /* EncodeLUT */
    {0x00},                                  /* Density */
    {0x00},                                  /* Matrix */
@@ -41,16 +41,16 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
  };
  
  /*
-@@ -458,7 +475,7 @@ cups_close(gx_device *pdev)                /* I - Device 
info */
+@@ -459,7 +476,7 @@ cups_close(gx_device *pdev)                /* I - Device 
info */
  
    if (cups->stream != NULL)
    {
 -    cupsRasterClose(cups->stream);
 +    cups->cupsRasterClose(cups->stream);
-     close(fileno(cups->file));
      cups->stream = NULL;
-     cups->file = NULL;
-@@ -2687,6 +2704,39 @@ cups_open(gx_device *pdev)              /* I - Device 
info */
+   }
+ 
+@@ -2699,6 +2716,39 @@ cups_open(gx_device *pdev)              /* I - Device 
info */
    dprintf1("DEBUG2: cups_open(%p)\n", pdev);
  #endif /* DEBUG */
  
@@ -90,7 +90,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
    dprintf("INFO: Start rendering...\n");
    cups->printer_procs.get_space_params = cups_get_space_params;
  
-@@ -2702,7 +2752,7 @@ cups_open(gx_device *pdev)               /* I - Device 
info */
+@@ -2714,7 +2764,7 @@ cups_open(gx_device *pdev)               /* I - Device 
info */
      return (code);
  
    if (cups->PPD == NULL)
@@ -99,7 +99,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
  
    return (0);
  }
-@@ -2799,7 +2849,7 @@ cups_print_pages(gx_device_printer *pdev,
+@@ -2811,7 +2861,7 @@ cups_print_pages(gx_device_printer *pdev,
  
    if (cups->stream == NULL)
    {
@@ -108,7 +108,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
      if (RasterVersion) {
  #ifdef DEBUG
        dprintf1("DEBUG2: cupsRasterVersion = %s\n", RasterVersion->value);
-@@ -2812,7 +2862,7 @@ cups_print_pages(gx_device_printer *pdev,
+@@ -2824,7 +2874,7 @@ cups_print_pages(gx_device_printer *pdev,
        return_error(gs_error_unknownerror);
        }
      }
@@ -117,7 +117,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
                                         (cups->cupsRasterVersion == 3 ?
                                        CUPS_RASTER_WRITE :
                                        CUPS_RASTER_WRITE_COMPRESSED))) == NULL)
-@@ -2843,7 +2893,7 @@ cups_print_pages(gx_device_printer *pdev,
+@@ -2855,7 +2905,7 @@ cups_print_pages(gx_device_printer *pdev,
  
    for (copy = num_copies; copy > 0; copy --)
    {
@@ -126,7 +126,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
  
      if (pdev->color_info.num_components == 1)
        code = cups_print_chunked(pdev, src, dst, srcbytes);
-@@ -3150,7 +3200,7 @@ cups_put_params(gx_device     *pdev,     /* I - Device 
inf
+@@ -3168,7 +3218,7 @@ cups_put_params(gx_device     *pdev,     /* I - Device 
inf
        dprintf1("DEBUG2: cups->PPD = %p\n", cups->PPD);
  #endif /* DEBUG */
  
@@ -135,7 +135,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
        if (backside) {
  #ifdef DEBUG
        dprintf1("DEBUG2: cupsBackSide = %s\n", backside->value);
-@@ -3162,7 +3212,7 @@ cups_put_params(gx_device     *pdev,     /* I - Device 
inf
+@@ -3180,7 +3230,7 @@ cups_put_params(gx_device     *pdev,     /* I - Device 
inf
  #endif /* DEBUG */
  
        backsiderequiresflippedmargins =
@@ -144,7 +144,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
  #ifdef DEBUG
        if (backsiderequiresflippedmargins)
        dprintf1("DEBUG2: APDuplexRequiresFlippedMargin = %s\n",
-@@ -4074,7 +4124,7 @@ cups_print_chunked(gx_device_printer *pdev,
+@@ -4107,7 +4157,7 @@ cups_print_chunked(gx_device_printer *pdev,
  #endif /* DEBUG */
  
    if (cups->PPD) {
@@ -153,7 +153,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
      if (backside) {
  #ifdef DEBUG
        dprintf1("DEBUG2: cupsBackSide = %s\n", backside->value);
-@@ -4251,7 +4301,7 @@ cups_print_chunked(gx_device_printer *pdev,
+@@ -4284,7 +4334,7 @@ cups_print_chunked(gx_device_printer *pdev,
        * Write the bitmap data to the raster stream...
        */
  
@@ -162,7 +162,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
      }
      else
      {
-@@ -4259,7 +4309,7 @@ cups_print_chunked(gx_device_printer *pdev,
+@@ -4292,7 +4342,7 @@ cups_print_chunked(gx_device_printer *pdev,
        * Write the scanline data to the raster stream...
        */
  
@@ -171,7 +171,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
      }
    }
    return (0);
-@@ -4301,7 +4351,7 @@ cups_print_banded(gx_device_printer *pdev,
+@@ -4334,7 +4384,7 @@ cups_print_banded(gx_device_printer *pdev,
  #endif /* DEBUG */
  
    if (cups->PPD) {
@@ -180,7 +180,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
      if (backside) {
  #ifdef DEBUG
        dprintf1("DEBUG2: cupsBackSide = %s\n", backside->value);
-@@ -4972,7 +5022,7 @@ cups_print_banded(gx_device_printer *pdev,
+@@ -5005,7 +5055,7 @@ cups_print_banded(gx_device_printer *pdev,
      * Write the bitmap data to the raster stream...
      */
  
@@ -189,7 +189,7 @@ $OpenBSD: patch-cups_gdevcups_c,v 1.6 20
    }
    return (0);
  }
-@@ -5344,7 +5394,7 @@ cups_print_planar(gx_device_printer *pdev,
+@@ -5377,7 +5427,7 @@ cups_print_planar(gx_device_printer *pdev,
        * Write the bitmap data to the raster stream...
        */
  
Index: patches/patch-cups_pstopxl_in
===================================================================
RCS file: patches/patch-cups_pstopxl_in
diff -N patches/patch-cups_pstopxl_in
--- patches/patch-cups_pstopxl_in       18 Jul 2011 20:24:36 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,101 +0,0 @@
-$OpenBSD: patch-cups_pstopxl_in,v 1.1 2011/07/18 20:24:36 kili Exp $
-
-From jirib via http://bugs.ghostscript.com/show_bug.cgi?id=692328
-
---- cups/pstopxl.in.orig       Tue Jun 29 05:48:17 2010
-+++ cups/pstopxl.in    Thu Jul  7 12:53:16 2011
-@@ -51,9 +51,9 @@ ps_code=
- ppd_opts=
- 
- resolution=
--eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 
's/.*(^|\s)Resolution=([0-9.]+(x[0-9.]+)?).*/resolution="${resolution:-\2}"/p')"
-+eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 
's/.*(^|[[:space:]])Resolution=([0-9.]+(x[0-9.]+)?).*/resolution="${resolution:-\2}"/p')"
- if test -e "$PPD"; then
--  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's/^\*DefaultResolution:\s+([0-9.]+(x[0-9.]+)?).*/resolution="${resolution:-\1}"/p'
 "$PPD")"
-+  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's/^\*DefaultResolution:[[:space:]]+([0-9.]+(x[0-9.]+)?).*/resolution="${resolution:-\1}"/p'
 "$PPD")"
- fi
- echo "DEBUG: Resolution: $resolution" >&2
- if test -n "$resolution"; then
-@@ -61,15 +61,15 @@ if test -n "$resolution"; then
- fi
- 
- pagesize=
--eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 
's/.*(^|\s)(media|PageSize)=(\S+).*/pagesize="${pagesize:-\3}"/p')"
-+eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 
's/.*(^|[[:space:]])(media|PageSize)=([^[:space:]]+).*/pagesize="${pagesize:-\3}"/p')"
- if test -e "$PPD"; then
--  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's/^\*DefaultPageSize:\s+(\S+).*/pagesize="${pagesize:-\1}"/p' "$PPD")"
-+  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's/^\*DefaultPageSize:[[:space:]]+([^[:space:]]+).*/pagesize="${pagesize:-\1}"/p'
 "$PPD")"
- fi
- echo "DEBUG: Page size: $pagesize" >&2
- width=
- height=
- if test -n "$pagesize" && test -e "$PPD"; then
--  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's|^\*PaperDimension\s+'"$pagesize"'/[^:]+:\s+"(\S+)\s+(\S+)".*|width="\1"; 
height="\2"|p' "$PPD")"
-+  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's|^\*PaperDimension[[:space:]]+'"$pagesize"'/[^:]+:[[:space:]]+"([^[:space:]]+)[[:space:]]+([^[:space:]]+)".*|width="\1";
 height="\2"|p' "$PPD")"
- fi
- echo "DEBUG: Width: $width, height: $height" >&2
- if test -n "$width"; then
-@@ -84,7 +84,7 @@ bl_y=
- tr_x=
- tr_y=
- if test -n "$pagesize" && test -e "$PPD"; then
--  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's|^\*ImageableArea\s+'"$pagesize"'/[^:]+:\s+"(\S+)\s+(\S+)\s+(\S+)\s+(\S+)".*|bl_x="\1";
 bl_y="\2"; tr_x="\3"; tr_y="\4"|p' "$PPD")"
-+  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's|^\*ImageableArea[[:space:]]+'"$pagesize"'/[^:]+:[[:space:]]+"([^[:space:]]+)[[:space:]]+([^[:space:]]+)[[:space:]]+([^[:space:]]+)[[:space:]]+([^[:space:]]+)".*|bl_x="\1";
 bl_y="\2"; tr_x="\3"; tr_y="\4"|p' "$PPD")"
- fi
- echo "DEBUG: Absolute margins: $bl_x, $bl_y, $tr_x, $tr_y" >&2
- margin_l=
-@@ -106,14 +106,14 @@ if test -n "$margin_l" && test -n "$margin_b" && \
- fi
- 
- inputslot=
--eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 
's/.*(^|\s)(InputSlot)=(\S+).*/inputslot="${inputslot:-\3}"/p')"
-+eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 
's/.*(^|[[:space:]])(InputSlot)=([^[:space:]]+).*/inputslot="${inputslot:-\3}"/p')"
- if test -e "$PPD"; then
--  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's/^\*DefaultInputSlot:\s+(\S+).*/inputslot="${inputslot:-\1}"/p' "$PPD")"
-+  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's/^\*DefaultInputSlot:[[:space:]]+([^[:space:]]+).*/inputslot="${inputslot:-\1}"/p'
 "$PPD")"
- fi
- echo "DEBUG: InputSlot: $inputslot" >&2
- inputslot_val=
- if test -n "$inputslot" && test -e "$PPD"; then
--  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's|^\*InputSlot\s+'"$inputslot"'/[^:]+:\s+"\s*<\s*<\s*/MediaPosition\s*([0-9]+)\s*>\s*>\s*setpagedevice\s*".*|inputslot_val="\1"|p'
 "$PPD")"
-+  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's|^\*InputSlot[[:space:]]+'"$inputslot"'/[^:]+:[[:space:]]+"[[:space:]]*<[[:space:]]*<[[:space:]]*/MediaPosition[[:space:]]*([0-9]+)[[:space:]]*>[[:space:]]*>[[:space:]]*setpagedevice[[:space:]]*".*|inputslot_val="\1"|p'
 "$PPD")"
- fi
- echo "DEBUG: Value for MediaPosition: $inputslot_val" >&2
- if test -n "$inputslot_val"; then
-@@ -121,14 +121,14 @@ if test -n "$inputslot_val"; then
- fi
- 
- colormodel=
--eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 
's/.*(^|\s)(ColorModel)=(\S+).*/colormodel="${colormodel:-\3}"/p')"
-+eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 
's/.*(^|[[:space:]])(ColorModel)=([^[:space:]]+).*/colormodel="${colormodel:-\3}"/p')"
- if test -e "$PPD"; then
--  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's/^\*DefaultColorModel:\s+(\S+).*/colormodel="${colormodel:-\1}"/p' "$PPD")"
-+  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's/^\*DefaultColorModel:[[:space:]]+([^[:space:]]+).*/colormodel="${colormodel:-\1}"/p'
 "$PPD")"
- fi
- echo "DEBUG: ColorModel: $colormodel" >&2
- colormodel_val=
- if test -n "$colormodel" && test -e "$PPD"; then
--  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's|^\*ColorModel\s+'"$colormodel"'/[^:]+:\s+"\s*<\s*<\s*/BitsPerPixel\s*([0-9]*)\s*>\s*>\s*setpagedevice\s*".*|colormodel_val="\1"|p'
 "$PPD")"
-+  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's|^\*ColorModel[[:space:]]+'"$colormodel"'/[^:]+:[[:space:]]+"[[:space:]]*<[[:space:]]*<[[:space:]]*/BitsPerPixel[[:space:]]*([0-9]*)[[:space:]]*>[[:space:]]*>[[:space:]]*setpagedevice[[:space:]]*".*|colormodel_val="\1"|p'
 "$PPD")"
- fi
- echo "DEBUG: Value for BitsPerPixel: $colormodel_val" >&2
- if test -n "$colormodel_val"; then
-@@ -136,15 +136,15 @@ if test -n "$colormodel_val"; then
- fi
- 
- duplex=
--eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 
's/.*(^|\s)(Duplex)=(\S+).*/duplex="${duplex:-\3}"/p')"
-+eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 
's/.*(^|[[:space:]])(Duplex)=([^[:space:]]+).*/duplex="${duplex:-\3}"/p')"
- if test -e "$PPD"; then
--  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's/^\*DefaultDuplex:\s+(\S+).*/duplex="${duplex:-\1}"/p' "$PPD")"
-+  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's/^\*DefaultDuplex:[[:space:]]+([^[:space:]]+).*/duplex="${duplex:-\1}"/p' 
"$PPD")"
- fi
- echo "DEBUG: Duplex: $duplex" >&2
- duplex_val=
- tumble_val=
- if test -n "$duplex" && test -e "$PPD"; then
--  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's|^\*Duplex\s+'"$duplex"'/[^:]+:\s+"\s*<\s*<\s*/Duplex\s*(\S*)\s*(/Tumble\s*(\S*)\s*)?>\s*>\s*setpagedevice\s*".*|duplex_val="\1";
 tumble_val="\3"|p' "$PPD")"
-+  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 
's|^\*Duplex[[:space:]]+'"$duplex"'/[^:]+:[[:space:]]+"[[:space:]]*<[[:space:]]*<[[:space:]]*/Duplex[[:space:]]*([^[:space:]]*)[[:space:]]*(/Tumble[[:space:]]*([^[:space:]]*)[[:space:]]*)?>[[:space:]]*>[[:space:]]*setpagedevice[[:space:]]*".*|duplex_val="\1";
 tumble_val="\3"|p' "$PPD")"
- fi
- echo "DEBUG: Value for Duplex: $duplex_val; Value for Tumble: $tumble_val" >&2
- if test -n "$duplex_val"; then
Index: patches/patch-lib_pv_sh
===================================================================
RCS file: patches/patch-lib_pv_sh
diff -N patches/patch-lib_pv_sh
--- patches/patch-lib_pv_sh     19 Nov 2007 20:06:56 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-lib_pv_sh,v 1.3 2007/11/19 20:06:56 kili Exp $
---- lib/pv.sh.orig     Thu Jul  5 12:41:52 2007
-+++ lib/pv.sh  Mon Sep  3 15:27:31 2007
-@@ -30,19 +30,11 @@ fi
- # executable name set in the makefile
- GS_EXECUTABLE=gs
- 
--TEMPDIR=.
- PAGE=$1
- shift
- FILE="$1"
- shift
--if test -z "$TEMPDIR"; then
--      TEMPDIR=/tmp
--fi
--if which mktemp >/dev/null 2>/dev/null; then
--      tmpfile="`mktemp $TEMPDIR/\"$FILE\".pv.XXXXXX`"
--else
--      tmpfile="$TEMPDIR/$FILE.$$.pv"
--fi
-+tmpfile=`mktemp -t ${FILE}XXXXXXXXXX` || exit 1
- trap "rm -rf $tmpfile" 0 1 2 15
- #dvips -D$RESOLUTION -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile
- dvips -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/print/ghostscript/gnu/pkg/PLIST,v
retrieving revision 1.21
diff -u -p -r1.21 PLIST
--- pkg/PLIST   18 Jul 2011 20:24:36 -0000      1.21
+++ pkg/PLIST   15 Nov 2011 22:08:15 -0000
@@ -2,11 +2,9 @@
 @pkgpath print/ghostscript/afpl${FLAVOR_STRING}
 @pkgpath print/ghostscript/gnu${FLAVOR_STRING},cups
 %%SHARED%%
-bin/bdftops
 bin/dumphint
 bin/dvipdf
 bin/eps2eps
-bin/fixmswrd.pl
 bin/font2c
 @bin bin/gs
 bin/gsbj
@@ -32,7 +30,6 @@ bin/ps2pdf14
 bin/ps2pdfwr
 bin/ps2ps
 bin/ps2ps2
-bin/pv.sh
 bin/unix-lpr.sh
 bin/wftopfa
 libexec/cups/
@@ -526,6 +523,7 @@ share/ghostscript/${VERSION}/iccprofiles
 share/ghostscript/${VERSION}/iccprofiles/default_cmyk.icc
 share/ghostscript/${VERSION}/iccprofiles/default_gray.icc
 share/ghostscript/${VERSION}/iccprofiles/default_rgb.icc
+share/ghostscript/${VERSION}/iccprofiles/gray_to_k.icc
 share/ghostscript/${VERSION}/iccprofiles/lab.icc
 share/ghostscript/${VERSION}/iccprofiles/ps_cmyk.icc
 share/ghostscript/${VERSION}/iccprofiles/ps_gray.icc
@@ -538,7 +536,6 @@ share/ghostscript/${VERSION}/lib/PDFX_de
 share/ghostscript/${VERSION}/lib/acctest.ps
 share/ghostscript/${VERSION}/lib/addxchar.ps
 share/ghostscript/${VERSION}/lib/align.ps
-share/ghostscript/${VERSION}/lib/bdftops.ps
 share/ghostscript/${VERSION}/lib/bj8.rpd
 share/ghostscript/${VERSION}/lib/bj8gc12f.upp
 share/ghostscript/${VERSION}/lib/bj8hg12f.upp

Reply via email to