[arch-commits] Commit in ghostscript/trunk (2 files)

Andreas Radke andyrtr at archlinux.org
Wed Sep 5 08:06:07 UTC 2018


    Date: Wednesday, September 5, 2018 @ 08:06:06
  Author: andyrtr
Revision: 333422

upgpkg: ghostscript 9.24-2

fix ICC profile validation - FS#59888

Added:
  ghostscript/trunk/0001_ICC_profile_validation.patch
Modified:
  ghostscript/trunk/PKGBUILD

-----------------------------------+
 0001_ICC_profile_validation.patch |   80 ++++++++++++++++++++++++++++++++++++
 PKGBUILD                          |   11 +++-
 2 files changed, 88 insertions(+), 3 deletions(-)

Added: 0001_ICC_profile_validation.patch
===================================================================
--- 0001_ICC_profile_validation.patch	                        (rev 0)
+++ 0001_ICC_profile_validation.patch	2018-09-05 08:06:06 UTC (rev 333422)
@@ -0,0 +1,80 @@
+From bc3df0773fccf4b4906a3e59652ad646ea0fee91 Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell at artifex.com>
+Date: Tue, 4 Sep 2018 17:01:08 +0100
+Subject: [PATCH] For ICC profile validation, have cups id iteself as DeviceN
+
+Give the range of color spaces and models that cups supports, we can't
+reasonably provide (or expect others to provide) output ICC profiles for all
+cases.
+
+For the purpose of profile validation, have it claim to be DeviceN and benefit
+from the extra tolerance in profiles allowed for that class of device.
+---
+ cups/gdevcups.c  | 15 ++++++++++++++-
+ devices/devs.mak |  2 +-
+ 2 files changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/cups/gdevcups.c b/cups/gdevcups.c
+index c1574f8..decd8eb 100644
+--- a/cups/gdevcups.c
++++ b/cups/gdevcups.c
+@@ -70,6 +70,7 @@
+ #include "std.h"                /* to stop stdlib.h redefining types */
+ #include "gdevprn.h"
+ #include "gsparam.h"
++#include "gxdevsop.h"
+ #include "arch.h"
+ #include "gsicc_manage.h"
+ 
+@@ -252,6 +253,7 @@ private int cups_put_params(gx_device *, gs_param_list *);
+ private int cups_set_color_info(gx_device *);
+ private dev_proc_sync_output(cups_sync_output);
+ private prn_dev_proc_get_space_params(cups_get_space_params);
++private int cups_spec_op(gx_device *dev_, int op, void *data, int datasize);
+ 
+ #ifdef dev_t_proc_encode_color
+ private cm_map_proc_gray(cups_map_gray);
+@@ -392,7 +394,7 @@ private gx_device_procs	cups_procs =
+    NULL,				/* push_transparency_state */
+    NULL,				/* pop_transparency_state */
+    NULL,                                /* put_image */
+-
++   cups_spec_op
+ };
+ 
+ #define prn_device_body_copies(dtype, procs, dname, w10, h10, xdpi, ydpi, lo, to, lm, bm, rm, tm, ncomp, depth, mg, mc, dg, dc, print_pages)\
+@@ -5927,6 +5929,17 @@ cups_print_planar(gx_device_printer *pdev,
+   return (0);
+ }
+ 
++private int
++cups_spec_op(gx_device *dev_, int op, void *data, int datasize)
++{
++    /* Although not strictly DeviceN, the range of color models
++       this device supports presets similar issues.
++     */
++    if (op == gxdso_supports_devn) {
++        return true;
++    }
++    return gx_default_dev_spec_op(dev_, op, data, datasize);
++}
+ 
+ /*
+  */
+diff --git a/devices/devs.mak b/devices/devs.mak
+index c85604c..e8654e5 100644
+--- a/devices/devs.mak
++++ b/devices/devs.mak
+@@ -1860,7 +1860,7 @@ $(DD)pwgraster.dev : $(lcups_dev) $(lcupsi_dev) $(cups_) $(GDEV) \
+ 	$(ADDMOD) $(DD)pwgraster -include $(lcups_dev)
+ 	$(ADDMOD) $(DD)pwgraster -include $(lcupsi_dev)
+ 
+-$(DEVOBJ)gdevcups.$(OBJ) : $(LCUPSSRCDIR)$(D)gdevcups.c $(std_h) $(DEVS_MAK) $(MAKEDIRS)
++$(DEVOBJ)gdevcups.$(OBJ) : $(LCUPSSRCDIR)$(D)gdevcups.c $(std_h) $(gxdevsop_h) $(DEVS_MAK) $(MAKEDIRS)
+ 	$(CUPS_CC) $(DEVO_)gdevcups.$(OBJ) $(C_) $(CFLAGS) $(CUPSCFLAGS) \
+ 	    $(I_)$(GLSRC) \
+ 	    $(I_)$(DEVSRC) \
+-- 
+2.9.1
+
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-09-05 06:48:13 UTC (rev 333421)
+++ PKGBUILD	2018-09-05 08:06:06 UTC (rev 333422)
@@ -4,7 +4,7 @@
 pkgbase=ghostscript
 pkgname=(ghostscript ghostxps ghostpcl)
 pkgver=9.24
-pkgrel=1
+pkgrel=2
 pkgdesc="An interpreter for the PostScript language"
 url="https://www.ghostscript.com/"
 arch=('x86_64')
@@ -13,8 +13,10 @@
          'libtiff' 'lcms2' 'dbus' 'libpaper' 'ijs' 'openjpeg2')
 makedepends=('gtk3' 'gnutls' 'glu' 'freeglut')
 # https://github.com/ArtifexSoftware/ghostpdl-downloads/releases
-source=(https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${pkgver/./}/ghostpdl-${pkgver}.tar.gz)
-sha512sums=('d3aae0d6f9d4f56392078d5034e278afa4f436f4b0977aeab0b9fbba8282e6598bf4532494f7df28f752d4cd1ea4c985e8f3e47db9be40cdf885b17f16731d75')
+source=(https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${pkgver/./}/ghostpdl-${pkgver}.tar.gz
+       0001_ICC_profile_validation.patch)
+sha512sums=('d3aae0d6f9d4f56392078d5034e278afa4f436f4b0977aeab0b9fbba8282e6598bf4532494f7df28f752d4cd1ea4c985e8f3e47db9be40cdf885b17f16731d75'
+            '6cfdd351e8e84968c20cf8f15e01a09a215b6132af89ca0e392716638d925a0f750dab3dbcbdf44f200fb9cc419be5dadccffc226c9a405e888f3580f98cf4ea')
 
 prepare() {
   cd ghostpdl-${pkgver}
@@ -23,6 +25,9 @@
   rm -r cups/libs expat ijs jbig2dec jpeg lcms2mt libpng openjpeg tiff zlib
   # using tree freetype because of https://bugs.archlinux.org/task/56849
   # lcms2mt is the new lcms2 fork aimed to replace lcms2 in a thread safe way
+
+  # https://bugs.ghostscript.com/show_bug.cgi?id=699713
+  patch -Np1 -i ../0001_ICC_profile_validation.patch
 }
 
 build() {



More information about the arch-commits mailing list