[arch-commits] Commit in ghostscript/repos (7 files)

Ionut Biru ibiru at archlinux.org
Mon Jan 30 18:46:16 UTC 2012


    Date: Monday, January 30, 2012 @ 13:46:15
  Author: ibiru
Revision: 148111

db-move: moved ghostscript from [staging] to [testing] (x86_64)

Added:
  ghostscript/repos/testing-x86_64/
  ghostscript/repos/testing-x86_64/PKGBUILD
    (from rev 148047, ghostscript/repos/staging-x86_64/PKGBUILD)
  ghostscript/repos/testing-x86_64/ghostscript-cups-rgbw.patch
    (from rev 148047, ghostscript/repos/staging-x86_64/ghostscript-cups-rgbw.patch)
  ghostscript/repos/testing-x86_64/ghostscript-gpl-9.04-freetype-underlinking.patch
    (from rev 148047, ghostscript/repos/staging-x86_64/ghostscript-gpl-9.04-freetype-underlinking.patch)
  ghostscript/repos/testing-x86_64/gs_bug691759and691760.diff
    (from rev 148047, ghostscript/repos/staging-x86_64/gs_bug691759and691760.diff)
  ghostscript/repos/testing-x86_64/svn_rev11948.diff
    (from rev 148047, ghostscript/repos/staging-x86_64/svn_rev11948.diff)
Deleted:
  ghostscript/repos/staging-x86_64/

--------------------------------------------------+
 PKGBUILD                                         |   74 +++++
 ghostscript-cups-rgbw.patch                      |  263 +++++++++++++++++++++
 ghostscript-gpl-9.04-freetype-underlinking.patch |   12 
 gs_bug691759and691760.diff                       |  215 +++++++++++++++++
 svn_rev11948.diff                                |   16 +
 5 files changed, 580 insertions(+)

Copied: ghostscript/repos/testing-x86_64/PKGBUILD (from rev 148047, ghostscript/repos/staging-x86_64/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2012-01-30 18:46:15 UTC (rev 148111)
@@ -0,0 +1,74 @@
+# $Id$
+# Maintainer: AndyRTR <andyrtr at archlinux.org>
+
+pkgname=ghostscript
+pkgver=9.04
+pkgrel=6
+pkgdesc="An interpreter for the PostScript language"
+arch=('i686' 'x86_64')
+license=('GPL3' 'custom')
+depends=('libxt' 'libcups' 'fontconfig' 'jasper' 'zlib' 'libpng>=1.5.7' 'libjpeg' 'libtiff>=4.0.0' 'lcms') # 'lcms2' won't get used) # move in libpaper from community?
+makedepends=('gtk2' 'gnutls')
+optdepends=('texlive-core:      needed for dvipdf'
+            'gtk2:              needed for gsx')
+url="http://www.ghostscript.com/"
+source=(http://downloads.ghostscript.com/public/ghostscript-${pkgver}.tar.bz2
+	ghostscript-cups-rgbw.patch
+	ghostscript-gpl-9.04-freetype-underlinking.patch)
+options=('!libtool' '!makeflags')
+md5sums=('9f6899e821ab6d78ab2c856f10fa3023'
+         'bc56eb8c5fef0ecf964f6b3e9b7e65ae'
+         'a1928c3e4459dcfee0aaa4b38fadba57')
+
+build() {
+  cd ${srcdir}/ghostscript-${pkgver}
+  
+  # fix broken color printing https://bugs.archlinux.org/task/25519
+  patch -Np1 -i ${srcdir}/ghostscript-cups-rgbw.patch
+  # fix a linking issue
+  patch -Np1 -i ${srcdir}/ghostscript-gpl-9.04-freetype-underlinking.patch
+  
+  # force it to use system-libs
+  rm -rf jpeg libpng zlib jasper expat tiff lcms freetype 
+  
+  ./configure --prefix=/usr \
+	--enable-dynamic \
+	--with-ijs \
+	--with-jbig2dec \
+	--with-omni \
+	--with-x \
+	--with-drivers=ALL\
+	--with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
+	--with-install-cups \
+	--enable-fontconfig \
+	--enable-freetype \
+	--without-luratech \
+	--disable-compile-inits #--help # needed for linking with system-zlib
+  make
+
+  # Build IJS
+  cd ${srcdir}/ghostscript-${pkgver}/ijs
+  ./autogen.sh
+  ./configure --prefix=/usr --enable-shared --disable-static
+  make
+}
+
+package() {
+  cd ${srcdir}/ghostscript-${pkgver}
+  make DESTDIR=${pkgdir} \
+	cups_serverroot=${pkgdir}/etc/cups \
+	cups_serverbin=${pkgdir}/usr/lib/cups install soinstall
+
+  # install missing doc files # http://bugs.archlinux.org/task/18023
+  install -m 644 ${srcdir}/ghostscript-${pkgver}/doc/{Ps2ps2.htm,gs-vms.hlp,gsdoc.el,pscet_status.txt} ${pkgdir}/usr/share/ghostscript/$pkgver/doc/
+  
+  mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}
+  install -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/
+
+  # remove unwanted localized man-pages
+  rm -rf $pkgdir/usr/share/man/[^man1]*
+
+  # install IJS
+  cd ${srcdir}/ghostscript-${pkgver}/ijs
+  make DESTDIR=${pkgdir} install
+}

Copied: ghostscript/repos/testing-x86_64/ghostscript-cups-rgbw.patch (from rev 148047, ghostscript/repos/staging-x86_64/ghostscript-cups-rgbw.patch)
===================================================================
--- testing-x86_64/ghostscript-cups-rgbw.patch	                        (rev 0)
+++ testing-x86_64/ghostscript-cups-rgbw.patch	2012-01-30 18:46:15 UTC (rev 148111)
@@ -0,0 +1,263 @@
+diff -up ghostscript-9.04/cups/gdevcups.c.cups-rgbw ghostscript-9.04/cups/gdevcups.c
+--- ghostscript-9.04/cups/gdevcups.c.cups-rgbw	2011-08-05 12:12:21.000000000 +0100
++++ ghostscript-9.04/cups/gdevcups.c	2011-08-22 10:54:24.614010581 +0100
+@@ -225,6 +225,7 @@ typedef struct gx_device_cups_s
+   unsigned short	EncodeLUT[gx_max_color_value + 1];/* RGB value to output color LUT */
+   int			Density[CUPS_MAX_VALUE + 1];/* Density LUT */
+   int			Matrix[3][3][CUPS_MAX_VALUE + 1];/* Color transform matrix LUT */
++  int                   user_icc;
+   int                   cupsRasterVersion;
+ 
+   /* Used by cups_put_params(): */
+@@ -426,6 +427,7 @@ gx_device_cups	gs_cups_device =
+   {0x00},                                  /* EncodeLUT */
+   {0x00},                                  /* Density */
+   {0x00},                                  /* Matrix */
++  0,
+   3                                     /* cupsRasterVersion */
+ };
+ 
+@@ -1182,15 +1184,18 @@ cups_map_cmyk(gx_device *pdev,		/* I - D
+ 
+     case CUPS_CSPACE_RGB :
+     case CUPS_CSPACE_RGBW :
++        c0 = c + k;
++        c1 = m + k;
++        c2 = y + k;
+         if (cups->header.cupsColorSpace == CUPS_CSPACE_RGBW) {
+-	  c0 = c;
+-	  c1 = m;
+-	  c2 = y;
+-	  c3 = k;
+-	} else {
+-	  c0 = c + k;
+-	  c1 = m + k;
+-	  c2 = y + k;
++	  if ((k >= frac_1 - 1) ||
++	      ((c0 >= frac_1) && (c1 >= frac_1) && (c2 >= frac_1))) {
++	    c0 = frac_1;
++	    c1 = frac_1;
++	    c2 = frac_1;
++	    c3 = frac_1;
++	  } else
++	    c3 = 0;
+ 	}
+ 
+         if (c0 < 0)
+@@ -1212,11 +1217,12 @@ cups_map_cmyk(gx_device *pdev,		/* I - D
+ 	out[2] = frac_1 - (frac)cups->Density[c2];
+ 
+         if (cups->header.cupsColorSpace == CUPS_CSPACE_RGBW) {
+-	  if (c3 < 0)
+-	    c3 = 0;
+-	  else if (c3 > frac_1)
+-	    c3 = frac_1;
+-	  out[3] = frac_1 - (frac)cups->Density[c3];
++	  if (c3 == 0)
++	    out[3] = frac_1;
++	  else if (c3 == frac_1)
++	    out[3] = 0;
++	  else
++	    out[3] = frac_1;
+ 	}
+         break;
+ 
+@@ -2034,10 +2040,15 @@ cups_map_color_rgb(gx_device      *pdev,
+         * cups->DecodeLUT actually maps to RGBW, not CMYK...
+ 	*/
+ 
+-        k = cups->DecodeLUT[c3];
+-        c = cups->DecodeLUT[c0] + k - gx_max_color_value;
+-        m = cups->DecodeLUT[c1] + k - gx_max_color_value;
+-        y = cups->DecodeLUT[c2] + k - gx_max_color_value;
++        if (c3 == 0) {
++	  c = 0;
++	  m = 0;
++	  y = 0;
++	} else {
++	  c = cups->DecodeLUT[c0];
++	  m = cups->DecodeLUT[c1];
++	  y = cups->DecodeLUT[c2];
++	}
+ 
+         if (c > gx_max_color_value)
+ 	  prgb[0] = gx_max_color_value;
+@@ -2282,20 +2293,20 @@ cups_map_rgb_color(gx_device      *pdev,
+           switch (cups->header.cupsBitsPerColor)
+           {
+             default :
+-        	i = 0x0e;
++        	i = 0x00;
+         	break;
+             case 2 :
+-        	i = 0xfc;
++        	i = 0x00;
+         	break;
+             case 4 :
+-        	i = 0xfff0;
++        	i = 0x0000;
+         	break;
+             case 8 :
+-        	i = 0xffffff00;
++        	i = 0x00000000;
+         	break;
+ #ifdef GX_COLOR_INDEX_TYPE
+ 	    case 16 :
+-		i = 0xffffffffffff0000;
++		i = 0x0000000000000000;
+ 		break;
+ #endif /* GX_COLOR_INDEX_TYPE */
+           }
+@@ -2929,7 +2940,10 @@ cups_put_params(gx_device     *pdev,	/* 
+   int                   xflip = 0,
+                         yflip = 0;
+   int                   found = 0;
+-
++  gs_param_string icc_pro_dummy;
++  int old_cmps = cups->color_info.num_components;
++  int old_depth = cups->color_info.depth;
++  
+ #ifdef DEBUG
+   dprintf2("DEBUG2: cups_put_params(%p, %p)\n", pdev, plist);
+ #endif /* DEBUG */
+@@ -3024,6 +3038,11 @@ cups_put_params(gx_device     *pdev,	/* 
+   margins_set = param_read_float_array(plist, "Margins", &arrayval) == 0;
+   color_set   = param_read_int(plist, "cupsColorSpace", &intval) == 0 ||
+                 param_read_int(plist, "cupsBitsPerColor", &intval) == 0;
++
++  if (!cups->user_icc) {
++      cups->user_icc = param_read_string(plist, "OutputICCProfile", &icc_pro_dummy) == 0;
++  }
++
+   /* We set the old dimensions to 1 if we have a color depth change, so
+      that memory reallocation gets forced. This is perhaps not the correct
+      approach to prevent crashes like in bug 690435. We keep it for the
+@@ -3134,12 +3153,20 @@ cups_put_params(gx_device     *pdev,	/* 
+   if ((code = gdev_prn_put_params(pdev, plist)) < 0)
+     return (code);
+ 
++  /* If cups_set_color_info() changed the color model of the device we want to
++   * force the raster memory to be recreated/reinitialized
++   */
++  if (cups->color_info.num_components != old_cmps || cups->color_info.depth != old_depth) {
++      width_old = 0;
++      height_old = 0;
++  }
++  else {
+   /* pdev->width/height may have been changed by the call to
+    * gdev_prn_put_params()
+    */
+-  width_old = pdev->width;
+-  height_old = pdev->height;
+-
++     width_old = pdev->width;
++     height_old = pdev->height;
++  }
+  /*
+   * Update margins/sizes as needed...
+   */
+@@ -4044,22 +4071,88 @@ cups_set_color_info(gx_device *pdev)	/* 
+     for (k = 0; k <= CUPS_MAX_VALUE; k ++)
+       cups->Density[k] = k;
+   }
+-  /* Set up the ICC profile for ghostscript to use based upon the color space.
+-     This is different than the PPD profile above which appears to be some sort
+-     of matrix based TRC profile */
+-  switch (cups->header.cupsColorSpace) {
+-      /* Use RGB profile for this */
+-    case CUPS_CSPACE_RGBW:
+-      if (pdev->icc_struct == NULL) {
+-        pdev->icc_struct = gsicc_new_device_profile_array(pdev->memory);
+-      }
+-      if (pdev->icc_struct->device_profile[gsDEFAULTPROFILE] == NULL) {
+-            code = gsicc_set_device_profile(pdev, pdev->memory, 
+-                DEFAULT_RGB_ICC, gsDEFAULTPROFILE);
+-      }
+-      break;
+-    default:
+-      break;
++  if (!cups->user_icc) {
++    /* Set up the ICC profile for ghostscript to use based upon the color space.
++       This is different than the PPD profile above which appears to be some sort
++       of matrix based TRC profile */
++    switch (cups->header.cupsColorSpace)
++    {
++      default :
++      case CUPS_CSPACE_RGBW :
++      case CUPS_CSPACE_RGB :
++      case CUPS_CSPACE_RGBA :
++      case CUPS_CSPACE_CMY :
++      case CUPS_CSPACE_YMC :
++#    ifdef CUPS_RASTER_HAVE_COLORIMETRIC
++      case CUPS_CSPACE_CIELab :
++      case CUPS_CSPACE_ICC1 :
++      case CUPS_CSPACE_ICC2 :
++      case CUPS_CSPACE_ICC3 :
++      case CUPS_CSPACE_ICC4 :
++      case CUPS_CSPACE_ICC5 :
++      case CUPS_CSPACE_ICC6 :
++      case CUPS_CSPACE_ICC7 :
++      case CUPS_CSPACE_ICC8 :
++      case CUPS_CSPACE_ICC9 :
++      case CUPS_CSPACE_ICCA :
++      case CUPS_CSPACE_ICCB :
++      case CUPS_CSPACE_ICCC :
++      case CUPS_CSPACE_ICCD :
++      case CUPS_CSPACE_ICCE :
++      case CUPS_CSPACE_ICCF :
++#    endif /* CUPS_RASTER_HAVE_COLORIMETRIC */
++        if (!pdev->icc_struct || (pdev->icc_struct &&
++             pdev->icc_struct->device_profile[gsDEFAULTPROFILE]->data_cs != gsRGB)) {
++
++          if (pdev->icc_struct) {
++              rc_decrement(pdev->icc_struct, "cups_set_color_info");            
++          }
++          pdev->icc_struct = gsicc_new_device_profile_array(pdev->memory);
++
++          code = gsicc_set_device_profile(pdev, pdev->memory, 
++              (char *)DEFAULT_RGB_ICC, gsDEFAULTPROFILE);
++          }
++        break;
++
++      case CUPS_CSPACE_W :
++      case CUPS_CSPACE_WHITE :
++      case CUPS_CSPACE_K :
++      case CUPS_CSPACE_GOLD :
++      case CUPS_CSPACE_SILVER :
++        if (!pdev->icc_struct || (pdev->icc_struct &&
++             pdev->icc_struct->device_profile[gsDEFAULTPROFILE]->data_cs != gsGRAY)) {
++
++          if (pdev->icc_struct) {
++              rc_decrement(pdev->icc_struct, "cups_set_color_info");            
++          }
++          pdev->icc_struct = gsicc_new_device_profile_array(pdev->memory);
++
++          code = gsicc_set_device_profile(pdev, pdev->memory->non_gc_memory, 
++              (char *)DEFAULT_GRAY_ICC, gsDEFAULTPROFILE);
++        }
++        break;
++      case CUPS_CSPACE_KCMYcm :
++#    ifdef CUPS_RASTER_HAVE_COLORIMETRIC
++      case CUPS_CSPACE_CIEXYZ :
++#endif
++      case CUPS_CSPACE_CMYK :
++      case CUPS_CSPACE_YMCK :
++      case CUPS_CSPACE_KCMY :
++      case CUPS_CSPACE_GMCK :
++      case CUPS_CSPACE_GMCS :
++        if (!pdev->icc_struct || (pdev->icc_struct &&
++             pdev->icc_struct->device_profile[gsDEFAULTPROFILE]->data_cs != gsCMYK)) {
++
++          if (pdev->icc_struct) {
++              rc_decrement(pdev->icc_struct, "cups_set_color_info");            
++          }
++          pdev->icc_struct = gsicc_new_device_profile_array(pdev->memory);
++
++          code = gsicc_set_device_profile(pdev, pdev->memory, 
++              (char *)DEFAULT_CMYK_ICC, gsDEFAULTPROFILE);
++          }
++        break;
++    }
+   }
+ }
+ 

Copied: ghostscript/repos/testing-x86_64/ghostscript-gpl-9.04-freetype-underlinking.patch (from rev 148047, ghostscript/repos/staging-x86_64/ghostscript-gpl-9.04-freetype-underlinking.patch)
===================================================================
--- testing-x86_64/ghostscript-gpl-9.04-freetype-underlinking.patch	                        (rev 0)
+++ testing-x86_64/ghostscript-gpl-9.04-freetype-underlinking.patch	2012-01-30 18:46:15 UTC (rev 148111)
@@ -0,0 +1,12 @@
+diff -Naur ghostscript-9.04/base/Makefile.in ghostscript-9.04.new/base/Makefile.in
+--- ghostscript-9.04/base/Makefile.in	2011-08-05 13:12:20.000000000 +0200
++++ ghostscript-9.04.new/base/Makefile.in	2011-08-16 16:06:50.487377337 +0200
+@@ -375,7 +375,7 @@
+ # Solaris may need -lnsl -lsocket -lposix4.
+ # (Libraries required by individual drivers are handled automatically.)
+ 
+-EXTRALIBS=@LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@
++EXTRALIBS=@LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@
+ 
+ # Define the standard libraries to search at the end of linking.
+ # Most platforms require -lpthread for the POSIX threads library;

Copied: ghostscript/repos/testing-x86_64/gs_bug691759and691760.diff (from rev 148047, ghostscript/repos/staging-x86_64/gs_bug691759and691760.diff)
===================================================================
--- testing-x86_64/gs_bug691759and691760.diff	                        (rev 0)
+++ testing-x86_64/gs_bug691759and691760.diff	2012-01-30 18:46:15 UTC (rev 148111)
@@ -0,0 +1,215 @@
+Modified: trunk/gs/base/gdevnfwd.c
+===================================================================
+--- trunk/gs/base/gdevnfwd.c	2011-01-06 23:48:14 UTC (rev 12004)
++++ trunk/gs/base/gdevnfwd.c	2011-01-07 04:49:42 UTC (rev 12005)
+@@ -1117,3 +1117,29 @@
+ {
+     return 0;
+ }
++
++bool
++fwd_uses_fwd_cmap_procs(gx_device * dev) 
++{
++    const gx_cm_color_map_procs *pprocs;
++
++    pprocs = dev_proc(dev, get_color_mapping_procs)(dev);
++    if (pprocs == &FwdDevice_cm_map_procs) {
++        return true;
++    }
++    return false;
++}
++
++const gx_cm_color_map_procs*
++fwd_get_target_cmap_procs(gx_device * dev)
++{
++    const gx_cm_color_map_procs *pprocs;
++    gx_device_forward * const fdev = (gx_device_forward *)dev;
++    gx_device * const tdev = fdev->target;
++
++    pprocs = dev_proc(tdev, get_color_mapping_procs(tdev));
++    while (pprocs == &FwdDevice_cm_map_procs) {
++        pprocs = fwd_get_target_cmap_procs(tdev);
++    }
++    return pprocs;
++}
+\ No newline at end of file
+
+Modified: trunk/gs/base/gdevp14.c
+===================================================================
+--- trunk/gs/base/gdevp14.c	2011-01-06 23:48:14 UTC (rev 12004)
++++ trunk/gs/base/gdevp14.c	2011-01-07 04:49:42 UTC (rev 12005)
+@@ -900,7 +900,11 @@
+                         nos->parent_color_info_procs->num_components, 1,
+                                   false, false, true, tos->planestride, 
+                                   tos->rowstride, num_rows, num_cols);
+-                    /* Transform the data */
++                    /* Transform the data. Since the pdf14 device should be
++                       using RGB, CMYK or Gray buffers, this transform 
++                       does not need to worry about the cmap procs of 
++                       the target device.  Those are handled when we do
++                       the pdf14 put image operation */
+                     gscms_transform_color_buffer(icc_link, &input_buff_desc, 
+                                         &output_buff_desc, tos->data, 
+                                         new_data_buf);
+
+Modified: trunk/gs/base/gxcmap.c
+===================================================================
+--- trunk/gs/base/gxcmap.c	2011-01-06 23:48:14 UTC (rev 12004)
++++ trunk/gs/base/gxcmap.c	2011-01-07 04:49:42 UTC (rev 12005)
+@@ -31,6 +31,7 @@
+ #include "gsicc_manage.h"
+ #include "gdevdevn.h"
+ #include "gsicc_cache.h"
++#include "gscms.h"
+ 
+ /* Structure descriptor */
+ public_st_device_color();
+@@ -1744,3 +1745,37 @@
+ 
+     }
+ }
++
++bool
++gx_device_uses_std_cmap_procs(gx_device * dev) 
++{
++    const gx_cm_color_map_procs *pprocs;
++
++    if (dev->device_icc_profile != NULL) {
++        pprocs = dev_proc(dev, get_color_mapping_procs)(dev);
++        /* Check if they are forwarding procs */
++        if (fwd_uses_fwd_cmap_procs(dev)) {
++            pprocs = fwd_get_target_cmap_procs(dev);
++        } 
++        switch(dev->device_icc_profile->data_cs) {
++            case gsGRAY:
++                if (pprocs == &DeviceGray_procs) {
++                    return true;
++                }
++                break;
++            case gsRGB:	
++                if (pprocs == &DeviceRGB_procs) {
++                    return true;
++                }
++                break;
++            case gsCMYK:
++                if (pprocs == &DeviceCMYK_procs) {
++                    return true;
++                }
++                break;
++            default:
++                break;
++        }
++    } 
++    return false;
++}
+
+Modified: trunk/gs/base/gxcmap.h
+===================================================================
+--- trunk/gs/base/gxcmap.h	2011-01-06 23:48:14 UTC (rev 12004)
++++ trunk/gs/base/gxcmap.h	2011-01-07 04:49:42 UTC (rev 12005)
+@@ -284,5 +284,11 @@
+  * [0,1]
+  */
+ frac gx_unit_frac(float fvalue);
++/* Determine if the device is using the standard color mapping procs.  In
++   such a case, we can make use of the faster icc color conversions for 
++   images */
++bool gx_device_uses_std_cmap_procs(gx_device * dev);
++bool fwd_uses_fwd_cmap_procs(gx_device * dev);
++const gx_cm_color_map_procs* fwd_get_target_cmap_procs(gx_device * dev);
+ 
+ #endif /* gxcmap_INCLUDED */
+
+Modified: trunk/gs/base/gxi12bit.c
+===================================================================
+--- trunk/gs/base/gxi12bit.c	2011-01-06 23:48:14 UTC (rev 12004)
++++ trunk/gs/base/gxi12bit.c	2011-01-07 04:49:42 UTC (rev 12005)
+@@ -113,6 +113,8 @@
+ irender_proc_t
+ gs_image_class_2_fracs(gx_image_enum * penum)
+ {
++    bool std_cmap_procs;
++
+     if (penum->bps > 8) {
+ 	if (penum->use_mask_color) {
+ 	    /* Convert color mask values to fracs. */
+@@ -122,9 +124,14 @@
+ 		penum->mask_color.values[i] =
+ 		    bits2frac(penum->mask_color.values[i], 12);
+ 	}
++        /* If the device has some unique color mapping procs due to its color space,
++           then we will need to use those and go through pixel by pixel instead
++           of blasting through buffers.  This is true for example with many of 
++           the color spaces for CUPs */
++        std_cmap_procs = gx_device_uses_std_cmap_procs(penum->dev);
+         if ( (gs_color_space_get_index(penum->pcs) == gs_color_space_index_DeviceN &&
+             penum->pcs->cmm_icc_profile_data == NULL) || penum->use_mask_color || 
+-            penum->bps != 16 || 
++            penum->bps != 16 || !std_cmap_procs ||
+             gs_color_space_get_index(penum->pcs) == gs_color_space_index_DevicePixel) { 
+             /* DevicePixel color space used in mask from 3x type.  Basically
+                a simple color space that just is scaled to the device bit 
+
+Modified: trunk/gs/base/gxicolor.c
+===================================================================
+--- trunk/gs/base/gxicolor.c	2011-01-06 23:48:14 UTC (rev 12004)
++++ trunk/gs/base/gxicolor.c	2011-01-07 04:49:42 UTC (rev 12005)
+@@ -97,6 +97,8 @@
+ irender_proc_t
+ gs_image_class_4_color(gx_image_enum * penum)
+ {
++    bool std_cmap_procs;
++
+     if (penum->use_mask_color) {
+ 	/*
+ 	 * Scale the mask colors to match the scaling of each sample to
+@@ -128,8 +130,14 @@
+ 	penum->mask_color.mask = 0;
+ 	penum->mask_color.test = ~0;
+     }
++    /* If the device has some unique color mapping procs due to its color space,
++       then we will need to use those and go through pixel by pixel instead
++       of blasting through buffers.  This is true for example with many of 
++       the color spaces for CUPs */
++    std_cmap_procs = gx_device_uses_std_cmap_procs(penum->dev);
+     if ( (gs_color_space_get_index(penum->pcs) == gs_color_space_index_DeviceN &&
+-        penum->pcs->cmm_icc_profile_data == NULL) || penum->use_mask_color ) {
++        penum->pcs->cmm_icc_profile_data == NULL) || penum->use_mask_color ||
++        !std_cmap_procs) {
+         return &image_render_color_DeviceN;
+     } else {
+         /* Set up the link now */
+
+Modified: trunk/gs/base/gxiscale.c
+===================================================================
+--- trunk/gs/base/gxiscale.c	2011-01-06 23:48:14 UTC (rev 12004)
++++ trunk/gs/base/gxiscale.c	2011-01-07 04:49:42 UTC (rev 12005)
+@@ -104,6 +104,13 @@
+         != penum->dev->color_info.num_components) {
+         use_icc = false;
+     }
++    /* If the device has some unique color mapping procs due to its color space,
++       then we will need to use those and go through pixel by pixel instead
++       of blasting through buffers.  This is true for example with many of 
++       the color spaces for CUPs */
++    if(!gx_device_uses_std_cmap_procs(penum->dev)) {
++        use_icc = false;
++    }
+ /*
+  * USE_CONSERVATIVE_INTERPOLATION_RULES is normally NOT defined since
+  * the MITCHELL digital filter seems OK as long as we are going out to
+
+Modified: trunk/gs/base/lib.mak
+===================================================================
+--- trunk/gs/base/lib.mak	2011-01-06 23:48:14 UTC (rev 12004)
++++ trunk/gs/base/lib.mak	2011-01-07 04:49:42 UTC (rev 12005)
+@@ -602,7 +602,7 @@
+  $(gxalpha_h) $(gxcspace_h) $(gxfarith_h) $(gxfrac_h)\
+  $(gxdcconv_h) $(gxdevice_h) $(gxcmap_h) $(gsnamecl_h) $(gxlum_h)\
+  $(gzstate_h) $(gxdither_h) $(gxcdevn_h) $(string__h)\
+- $(gsicc_manage_h) $(gdevdevn_h) $(gsicc_cache_h)
++ $(gsicc_manage_h) $(gdevdevn_h) $(gsicc_cache_h) $(gscms_h)
+ 	$(GLCC) $(GLO_)gxcmap.$(OBJ) $(C_) $(GLSRC)gxcmap.c
+ 
+ $(GLOBJ)gxcpath.$(OBJ) : $(GLSRC)gxcpath.c $(GXERR)\
+

Copied: ghostscript/repos/testing-x86_64/svn_rev11948.diff (from rev 148047, ghostscript/repos/staging-x86_64/svn_rev11948.diff)
===================================================================
--- testing-x86_64/svn_rev11948.diff	                        (rev 0)
+++ testing-x86_64/svn_rev11948.diff	2012-01-30 18:46:15 UTC (rev 148111)
@@ -0,0 +1,16 @@
+Modified: trunk/gs/base/gximag3x.c
+===================================================================
+--- trunk/gs/base/gximag3x.c	2010-12-10 19:50:53 UTC (rev 11947)
++++ trunk/gs/base/gximag3x.c	2010-12-11 23:02:25 UTC (rev 11948)
+@@ -241,7 +241,9 @@
+ 	    const gs_image3x_mask_t *pixm =
+ 		(i == 0 ? &pim->Opacity : &pim->Shape);
+ 
+-	    *(gs_data_image_t *)&mask[i].image = pixm->MaskDict;
++            /* Use memcpy because direct assignment breaks ANSI aliasing */
++            /* rules and causes SEGV with gcc 4.5.1 */
++            memcpy(&mask[i].image, &pixm->MaskDict, sizeof(pixm->MaskDict));
+ 	    mask[i].image.type = type1;
+ 	    mask[i].image.BitsPerComponent = pixm->MaskDict.BitsPerComponent;
+ 	}
+




More information about the arch-commits mailing list