summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorbouyer <bouyer@pkgsrc.org>2010-11-13 17:03:00 +0000
committerbouyer <bouyer@pkgsrc.org>2010-11-13 17:03:00 +0000
commitee7cab7d550743e752cc3f905bab51480abf2d35 (patch)
tree9bf5e233789c10c0b739dbf7531f290b828c9444 /print
parenta5389e3586df7d05d3d7d271e0fa644698d8ac32 (diff)
downloadpkgsrc-ee7cab7d550743e752cc3f905bab51480abf2d35.tar.gz
Apply patch from official repository:
- Fixed memory reallocation on bitmap size change. Reallocation is not only needed when dimendions and margins change, but also when the color depth changes. Fixes bugs #691029 and #691108. - Fixed arrayoption() macro in cups_put_params() function. Array values did not get actually set in cups.header data structure. Bug only showed via a compiler warning. - Silenced compiler warning by presetting c0..c3 in cups_map_cmyk() to zero. makes my epson USB printer work again with 2010Q3 cups+ghostscript PKGREVISION++
Diffstat (limited to 'print')
-rw-r--r--print/ghostscript/Makefile4
-rw-r--r--print/ghostscript/distinfo3
-rw-r--r--print/ghostscript/patches/patch-bd98
3 files changed, 102 insertions, 3 deletions
diff --git a/print/ghostscript/Makefile b/print/ghostscript/Makefile
index 9ed949aa1d8..20a7ce106f2 100644
--- a/print/ghostscript/Makefile
+++ b/print/ghostscript/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.80 2010/06/30 12:44:55 tron Exp $
+# $NetBSD: Makefile,v 1.81 2010/11/13 17:03:00 bouyer Exp $
DISTNAME= ghostscript-8.71
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ghostscript/}
MASTER_SITES+= http://ghostscript.com/releases/
diff --git a/print/ghostscript/distinfo b/print/ghostscript/distinfo
index 4497b546d01..2e2b250e06e 100644
--- a/print/ghostscript/distinfo
+++ b/print/ghostscript/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.34 2010/06/30 12:44:55 tron Exp $
+$NetBSD: distinfo,v 1.35 2010/11/13 17:03:00 bouyer Exp $
SHA1 (ghostscript-8.71.tar.gz) = 629299140f612fac32f6289be0904107dfd1b555
RMD160 (ghostscript-8.71.tar.gz) = efce74cf22cf99b2b1a145df466e79a86e3dfefb
@@ -18,3 +18,4 @@ SHA1 (patch-an) = 875360319e486f4606627d8cfa3dbffd48d76130
SHA1 (patch-ba) = 9c9f9aa27bcbcb43c9eb3b7f7ae6d70fb6545057
SHA1 (patch-bb) = 6487b61fafe39a4ac8141b9f84044fc210df66ac
SHA1 (patch-bc) = c35ee6c3075b89714fbb74956d68747d3c17bf9c
+SHA1 (patch-bd) = f7a0448317118bd46d84d9cbc8f4c553175f1e74
diff --git a/print/ghostscript/patches/patch-bd b/print/ghostscript/patches/patch-bd
new file mode 100644
index 00000000000..28c27361072
--- /dev/null
+++ b/print/ghostscript/patches/patch-bd
@@ -0,0 +1,98 @@
+$NetBSD: patch-bd,v 1.3 2010/11/13 17:03:00 bouyer Exp $
+
+From 6d26e9b1c38d8c0f0ab4af42c513cb23f3ae1656 Mon Sep 17 00:00:00 2001
+From: till <till@a1074d23-0009-0410-80fe-cf8c14f379e6>
+Date: Tue, 9 Mar 2010 16:35:06 +0000
+Subject: [PATCH] Fixes on CUPS Raster output device:
+ - Fixed memory reallocation on bitmap size change. Reallocation is not only
+ needed when dimendions and margins change, but also when the color depth
+ changes. Fixes bugs #691029 and #691108.
+ - Fixed arrayoption() macro in cups_put_params() function. Array values did
+ not get actually set in cups.header data structure. Bug only showed via
+ a compiler warning.
+ - Silenced compiler warning by presetting c0..c3 in cups_map_cmyk() to zero.
+
+git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs@10890 a1074d23-0009-0410-80fe-cf8c14f379e6
+---
+ cups/gdevcups.c | 32 +++++++++++++++++++++++---------
+ 1 files changed, 23 insertions(+), 9 deletions(-)
+
+diff --git a/cups/gdevcups.c b/cups/gdevcups.c
+index 551b806..4000abf 100644
+--- a/cups/gdevcups.c
++++ cups/gdevcups.c
+@@ -975,7 +975,8 @@ cups_map_cmyk(gx_device *pdev, /* I - Device info */
+ frac k, /* I - Black value */
+ frac *out) /* O - Device colors */
+ {
+- int c0, c1, c2, c3; /* Temporary color values */
++ int c0 = 0, c1 = 0,
++ c2 = 0, c3 = 0; /* Temporary color values */
+ float rr, rg, rb, /* Real RGB colors */
+ ciex, ciey, ciez, /* CIE XYZ colors */
+ ciey_yn, /* Normalized luminance */
+@@ -2703,9 +2704,13 @@ cups_put_params(gx_device *pdev, /* I - Device info */
+ int color_set; /* Were the color attrs set? */
+ gdev_prn_space_params sp; /* Space parameter data */
+ int width, /* New width of page */
+- height; /* New height of page */
++ height, /* New height of page */
++ colorspace, /* New color space */
++ bitspercolor; /* New bits per color */
+ static int width_old = 0, /* Previous width */
+- height_old = 0; /* Previous height */
++ height_old = 0, /* Previous height */
++ colorspace_old = 0,/* Previous color space */
++ bitspercolor_old = 0;/* Previous bits per color */
+ ppd_attr_t *backside = NULL,
+ *backsiderequiresflippedmargins = NULL;
+ float swap;
+@@ -2800,9 +2805,10 @@ cups_put_params(gx_device *pdev, /* I - Device info */
+ else if (code == 0) \
+ { \
+ dprintf1("DEBUG: Setting %s to", sname); \
+- for (i = 0; i < count; i ++) \
+- dprintf1(" %d", (unsigned)(arrayval.data[i])); \
+- cups->header.name[i] = (unsigned)arrayval.data[i]; \
++ for (i = 0; i < count; i ++) { \
++ dprintf1(" %d", (unsigned)(arrayval.data[i])); \
++ cups->header.name[i] = (unsigned)(arrayval.data[i]); \
++ } \
+ dprintf("...\n"); \
+ }
+
+@@ -3243,23 +3249,31 @@ cups_put_params(gx_device *pdev, /* I - Device info */
+ }
+ #endif /* CUPS_RASTER_SYNCv1 */
+
++ colorspace = cups->header.cupsColorSpace;
++ bitspercolor = cups->header.cupsBitsPerColor;
++
+ /*
+ * Don't reallocate memory unless the device has been opened...
+ * Also reallocate only if the size has actually changed...
+ */
+
+- if (pdev->is_open && (width != width_old || height != height_old))
++ if (pdev->is_open &&
++ (width != width_old || height != height_old ||
++ colorspace != colorspace_old || bitspercolor != bitspercolor_old))
+ {
+
+ width_old = width;
+ height_old = height;
++ colorspace_old = colorspace;
++ bitspercolor_old = bitspercolor;
+
+ /*
+ * Device is open and size has changed, so reallocate...
+ */
+
+- dprintf4("DEBUG2: Reallocating memory, [%.0f %.0f] = %dx%d pixels...\n",
+- pdev->MediaSize[0], pdev->MediaSize[1], width, height);
++ dprintf6("DEBUG2: Reallocating memory, [%.0f %.0f] = %dx%d pixels, color space: %d, bits per color: %d...\n",
++ pdev->MediaSize[0], pdev->MediaSize[1], width, height,
++ colorspace, bitspercolor);
+
+ sp = ((gx_device_printer *)pdev)->space_params;
+