Compare commits

...

23 Commits
f10 ... f8

Author SHA1 Message Date
Fedora Release Engineering
e0f5d0cd65 dist-git conversion 2010-07-28 15:36:21 +00:00
Bill Nottingham
9ea89454f0 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:56:18 +00:00
Tim Waugh
97f0d0d5ef - 8.63. No longer need r8591 or incomplete-ccittfax patches.
- Compile without strict aliasing opts due to warnings across several
    files.
- Don't run autogen.sh for main package, just for ijs which doesn't ship
    with a configure script.
2008-08-27 11:07:20 +00:00
Tim Waugh
9221bc8ae5 - Really build with jasper (bug #433897). 2008-08-27 10:52:05 +00:00
Tim Waugh
25541ea305 8.62-4 2008-06-23 15:50:39 +00:00
Tim Waugh
3a09eb8408 - Applied patch to work around bug #229174. 2008-06-23 14:14:05 +00:00
Tim Waugh
148e9e7339 - Applied patch from upstream to fix box_fill_path for shfill (bug
#452348).
2008-06-23 12:02:14 +00:00
Tim Waugh
c48711d98a - Fix pksmraw output (bug #308211). 2008-03-31 16:42:40 +00:00
Tim Waugh
424a52a07b - No longer need CVE-2008-0411 patch.
- Don't ship URW fonts; we already have them.
2008-03-04 18:01:57 +00:00
Tim Waugh
f7a5c92c65 - No longer need CVE-2008-0411 patch. 2008-03-04 17:44:08 +00:00
Tim Waugh
4ebb1e751f - 8.62. No longer need IJS KRGB patch, or patch for gs bug 689577. 2008-03-04 12:24:49 +00:00
Tim Waugh
058b6c1949 - Applied patch to fix CVE-2008-0411 (bug #431536). 2008-02-27 17:15:34 +00:00
Tim Waugh
6110f94e91 - Build with jasper again (bug #433897). Build requires jasper-devel, and a
patch to remove jas_set_error_cb reference.
2008-02-22 14:32:48 +00:00
Tim Waugh
206e1dbac7 - Don't build with jasper support. 2008-01-28 15:31:08 +00:00
Tim Waugh
4041cbf7b3 - Build requires jasper-devel.
- Remove bundled libraries.
2008-01-28 15:23:44 +00:00
Tim Waugh
048c41006a - Applied upstream patch for bug #416321. 2007-12-11 16:16:01 +00:00
Tim Waugh
e9e80ae376 - Fixed runlibfileifexists patch. 2007-11-30 11:02:31 +00:00
Tim Waugh
639b8d11a8 8.61-3 2007-11-30 09:09:14 +00:00
Tim Waugh
bc983c9c46 - Revert previous change, but define .runlibfileifexists not just
runlibfileifexists.
2007-11-30 09:08:18 +00:00
Tim Waugh
ead143509d - Fixed cidfmap (bug #402481). 2007-11-29 10:31:51 +00:00
Tim Waugh
11938abb22 - 8.61 (bug #402481).
- Build with --disable-compile-inits (bug #402501).
- Add %{_datadir}/fonts to fontpath (bug #402481).
- Restore the cidfmap-switching bits (bug #402481).
2007-11-28 13:49:07 +00:00
Tim Waugh
859144bcc7 - Applied patch from upstream to fix CVE-2007-2721 (bug #346511). 2007-10-23 13:36:29 +00:00
Jesse Keating
22b4256471 Initialize branch F-8 for ghostscript 2007-10-20 06:36:12 +00:00
11 changed files with 169 additions and 977 deletions

View File

@ -20,3 +20,6 @@ espgs-8.15.3-source.tar.bz2
espgs-8.15.4-source.tar.bz2
ghostscript-8.60-r8117.tar.bz2
ghostscript-8.60.tar.bz2
ghostscript-8.61.tar.bz2
ghostscript-8.62.tar.bz2
ghostscript-8.63.tar.bz2

View File

@ -1,10 +0,0 @@
%!
% Don't change following line. We should ensure that the original one is surely loaded.
(FAPIcidfmap.GS) .runlibfile
% following lines are for CJK fonts.
(FAPIcidfmap.ja) .runlibfileifexists
(FAPIcidfmap.ko) .runlibfileifexists
(FAPIcidfmap.zh_CN) .runlibfileifexists
(FAPIcidfmap.zh_TW) .runlibfileifexists
% must be at the bottom of line to allow people overriding everything.
(FAPIcidfmap.local) .runlibfileifexists

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: ghostscript
# $Id: Makefile,v 1.1 2004/09/09 05:07:56 cvsdist Exp $
NAME := ghostscript
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -1,729 +0,0 @@
diff -uraN gs-orig/src/gdevijs.c gs-krgb/src/gdevijs.c
--- gs-orig/src/gdevijs.c 2007-04-24 13:00:22.000000000 +0100
+++ gs-krgb/src/gdevijs.c 2007-04-27 14:44:05.000000000 +0100
@@ -23,15 +23,50 @@
* which is a security risk, since any program can be run.
* You should use -dSAFER which sets .LockSafetyParams to true
* before opening this device.
+ *
+ * 11/26/03 David Suffield (gdevijs-krgb-1.0.patch)
+ * (c) 2003-2004 Copyright Hewlett-Packard Development Company, LP
+ *
+ * 1. Removed hpijs 1.0-1.0.2 workarounds, use hpijs 1.0.3 or higher.
+ * 2. Added krgb support.
+ *
+ * 02/21/05 David Suffield (gdevijs-krgb-1.1.patch)
+ * 1. Fixed segfault issue with 1-bit color space.
+ * 2. Fixed z-order issue with colored text on black rectangle.
+ *
+ * 02/22/06 David Suffield (gdevijs-krgb-1.2.patch)
+ * 1. Fixed krgb buffer overflow issue with out-of-band data in fill_rectangle and copy_mono.
+ * This buffer overflow condition occurred with fullbleed print jobs that had k-band images.
+ * 2. Added Dan Coby (artifex) fix for gsijs_read_string_malloc gs_free *str memory leak.
+ *
+ * 06/02/06 David Suffield (gdevijs-krgb-1.3.patch)
+ * 1. Revisited the krgb buffer overflow issue with out-of-band data in fill_rectangle and
+ * copy_mono. Changed the fill_rectangle and copy_mono to an inner loop buffer check
+ * instead of a outer loop x/y extent check.
+ * 2. As requested by Ralph Giles, added K 1-bit and 8-bit support for krgb, but only 1-bit is
+ * implemented for now.
+ *
+ * KRGB definition:
+ * 1. K=1-bit or 8-bit black plane, RGB=24 bit color raster.
+ * 2. K-plane will only contain objects that are black text and black line drawings.
+ * 3. RGB raster will not contain K-plane objects.
+ * 4. K resolution and RGB resolution will be equal.
+ * 5. K-plane will be byte aligned.
+ * 6. K-plane 1-bit definition; 1=black, 0=nothing (KRGB).
+ * 7. K-plane 8-bit definition; 255=black, 0=nothing (KxRGB).
+ *
*/
#include "unistd_.h" /* for dup() */
#include <stdlib.h>
+#include <fcntl.h>
#include "gdevprn.h"
#include "gp.h"
#include "ijs.h"
#include "ijs_client.h"
+//#define KRGB_DEBUG
+
/* This should go into gdevprn.h, or, better yet, gdevprn should
acquire an API for changing resolution. */
int gdev_prn_maybe_realloc_memory(gx_device_printer *pdev,
@@ -49,6 +84,14 @@
private dev_proc_put_params(gsijs_put_params);
private dev_proc_finish_copydevice(gsijs_finish_copydevice);
+/* Following definitions are for krgb support. */
+private dev_proc_create_buf_device(gsijs_create_buf_device);
+private dev_proc_fill_rectangle(gsijs_fill_rectangle);
+private dev_proc_copy_mono(gsijs_copy_mono);
+private dev_proc_fill_mask(gsijs_fill_mask);
+private dev_proc_fill_path(gsijs_fill_path);
+private dev_proc_stroke_path(gsijs_stroke_path);
+
private const gx_device_procs gsijs_procs = {
gsijs_open,
NULL, /* get_initial_matrix */
@@ -123,6 +166,15 @@
IjsClientCtx *ctx;
int ijs_version;
+
+ /* Additional parameters for krgb support. */
+ int krgb_mode; /* 0=false, 1=true */
+ int k_bits; /* number of bits in k plane, 1 or 8 */
+ int k_path; /* k plane path, 0=false, 1=true */
+ int k_width; /* k plane width in pixels */
+ int k_band_size; /* k plane buffer size in bytes, byte aligned */
+ unsigned char *k_band; /* k plane buffer */
+ gx_device_procs prn_procs; /* banding playback procedures */
};
#define DEFAULT_DPI 74 /* See gsijs_set_resolution() below. */
@@ -150,7 +202,13 @@
FALSE, /* Tumble_set */
NULL, /* IjsClient *ctx */
- 0 /* ijs_version */
+ 0, /* ijs_version */
+ 0, /* krgb_mode */
+ 0, /* k_bits */
+ 0, /* k_path */
+ 0, /* k_width */
+ 0, /* k_band_size */
+ NULL /* k_band buffer */
};
@@ -166,12 +224,299 @@
/**************************************************************************/
-/* ------ Private definitions ------ */
+/* ---------------- Low-level graphic procedures ---------------- */
+
+static unsigned char xmask[] =
+{
+ 0x80, /* x=0 */
+ 0x40, /* 1 */
+ 0x20, /* 2 */
+ 0x10, /* 3 */
+ 0x08, /* 4 */
+ 0x04, /* 5 */
+ 0x02, /* 6 */
+ 0x01 /* 7 */
+};
+
+private int gsijs_fill_rectangle(gx_device * dev, int x, int y, int w, int h,
+ gx_color_index color)
+{
+ gx_device_ijs *ijsdev = (gx_device_ijs *)((gx_device_forward *)dev)->target;
+
+ if (ijsdev->krgb_mode && ijsdev->k_path && y >= 0 && x >= 0)
+ {
+ int raster = (ijsdev->k_width+7) >> 3;
+ register unsigned char *dest;
+ int dest_start_bit;
+ int band_height = ijsdev->k_band_size/raster;
+ int i,j;
+ unsigned char *beg = ijsdev->k_band;
+ unsigned char *end = ijsdev->k_band+ijsdev->k_band_size;
+ unsigned char *p;
+
+ if (h <= 0 || w <= 0)
+ return 0;
+
+ /* Check for out-of-band graphic. */
+ if (x >= ijsdev->k_width || y >= band_height)
+ return 0; /* out-of-band */
+
+ dest_start_bit = x & 7;
+ dest=ijsdev->k_band+(raster*y)+(x >> 3);
+
+ /* Note x,y orgin 0,0 is stored first byte 0 left to right. */
+
+ if (color==0x0)
+ {
+ /* Color is black, store in k plane band instead of regular band. */
+ for (j=0; j<h; j++)
+ {
+ for (i=0; i<w; i++)
+ {
+ p = &dest[(dest_start_bit+i)>>3];
+ if (p >= beg && p <= end)
+ *p |= xmask[(dest_start_bit+i)&7];
+ }
+ dest+=raster;
+ }
+ return 0;
+ }
+ else
+ {
+ /* Color is not black, remove any k plane bits for z-order dependencies, store in regular band. */
+ for (j=0; j<h; j++)
+ {
+ for (i=0; i<w; i++)
+ {
+ p = &dest[(dest_start_bit+i)>>3];
+ if (p >= beg && p <= end)
+ *p &= ~xmask[(dest_start_bit+i)&7];
+ }
+ dest+=raster;
+ }
+ }
+ }
+
+ return (*ijsdev->prn_procs.fill_rectangle)(dev, x, y, w, h, color);
+}
+
+private int gsijs_copy_mono(gx_device * dev, const byte * data,
+ int dx, int draster, gx_bitmap_id id,
+ int x, int y, int w, int height, gx_color_index zero, gx_color_index one)
+{
+ gx_device_ijs *ijsdev = (gx_device_ijs *)((gx_device_forward *)dev)->target;
+
+ // if (ijsdev->krgb_mode && ijsdev->k_path && one==0x0)
+ if (ijsdev->krgb_mode && ijsdev->k_path)
+ {
+ /* Store in k plane band instead of regular band. */
+ int raster = (ijsdev->k_width+7) >> 3; /* raster width in bytes, byte aligned */
+ register unsigned char *dest;
+ register const unsigned char *scan;
+ int dest_start_bit;
+ int scan_start_bit;
+ int band_height = ijsdev->k_band_size/raster;
+ int i,h=height;
+ unsigned char *beg = ijsdev->k_band;
+ unsigned char *end = ijsdev->k_band+ijsdev->k_band_size;
+ unsigned char *p;
+
+ if (h <= 0 || w <= 0)
+ return 0;
+
+ /* Check for out-of-band graphic. */
+ if (x >= ijsdev->k_width || y >= band_height)
+ return 0; /* out-of-band */
+
+ scan=data+(dx >> 3);
+ dest_start_bit = x & 7;
+ scan_start_bit = dx & 7;
+ dest=ijsdev->k_band+(raster*y)+(x >> 3);
+
+ if (one==0x0)
+ {
+ /* Color is black, store in k plane band instead of regular band. */
+ while (h-- > 0)
+ {
+ for (i=0; i<w; i++)
+ {
+ if (scan[(scan_start_bit+i)>>3] & xmask[(scan_start_bit+i)&7])
+ {
+ p = &dest[(dest_start_bit+i)>>3];
+ if (p >= beg && p <= end)
+ *p |= xmask[(dest_start_bit+i)&7];
+ }
+ }
+ scan+=draster;
+ dest+=raster;
+ }
+ return 0;
+ }
+ else
+ {
+ /* Color is not black, remove any k plane bits for z-order dependencies, store in regular band. */
+ while (h-- > 0)
+ {
+ for (i=0; i<w; i++)
+ {
+ if (scan[(scan_start_bit+i)>>3] & xmask[(scan_start_bit+i)&7])
+ {
+ p = &dest[(dest_start_bit+i)>>3];
+ if (p >= beg && p <= end)
+ *p &= ~xmask[(dest_start_bit+i)&7];
+ }
+ }
+ scan+=draster;
+ dest+=raster;
+ }
+ }
+ }
+
+ return (*ijsdev->prn_procs.copy_mono)(dev, data, dx, draster, id, x, y, w, height, zero, one);
+}
+
+/* ---------------- High-level graphic procedures ---------------- */
+
+private int gsijs_fill_mask(gx_device * dev,
+ const byte * data, int dx, int raster, gx_bitmap_id id,
+ int x, int y, int w, int h,
+ const gx_drawing_color * pdcolor, int depth,
+ gs_logical_operation_t lop, const gx_clip_path * pcpath)
+{
+ gx_device_ijs *ijsdev = (gx_device_ijs *)((gx_device_forward *)dev)->target;
+ int code;
+
+ ijsdev->k_path = 1;
+
+ code = (*ijsdev->prn_procs.fill_mask)(dev, data, dx, raster, id, x, y, w, h, pdcolor, depth, lop, pcpath);
-/* Versions 1.0 through 1.0.2 of hpijs report IJS version 0.29, and
- require some workarounds. When more up-to-date hpijs versions
- become ubiquitous, all these workarounds should be removed. */
-#define HPIJS_1_0_VERSION 29
+ ijsdev->k_path = 0;
+
+ return code;
+}
+
+private int gsijs_fill_path(gx_device * dev, const gs_imager_state * pis,
+ gx_path * ppath, const gx_fill_params * params,
+ const gx_drawing_color * pdcolor,
+ const gx_clip_path * pcpath)
+{
+ gx_device_ijs *ijsdev = (gx_device_ijs *)((gx_device_forward *)dev)->target;
+ int code;
+
+ ijsdev->k_path = 1;
+
+ code = (*ijsdev->prn_procs.fill_path)(dev, pis, ppath, params, pdcolor, pcpath);
+
+ ijsdev->k_path = 0;
+
+ return 0;
+}
+
+private int gsijs_stroke_path(gx_device * dev, const gs_imager_state * pis,
+ gx_path * ppath, const gx_stroke_params * params,
+ const gx_drawing_color * pdcolor,
+ const gx_clip_path * pcpath)
+{
+ gx_device_ijs *ijsdev = (gx_device_ijs *)((gx_device_forward *)dev)->target;
+ int code;
+
+ ijsdev->k_path = 1;
+
+ code = (*ijsdev->prn_procs.stroke_path)(dev, pis, ppath, params, pdcolor, pcpath);
+
+ ijsdev->k_path = 0;
+
+ return code;
+}
+
+/* ---------------- krgb banding playback procedures ---------------- */
+
+private int gsijs_get_bits(gx_device_printer * pdev, int y, byte * str, byte ** actual_data)
+{
+ gx_device_ijs *ijsdev = (gx_device_ijs *)pdev;
+ gx_device_clist_common *cdev = (gx_device_clist_common *)pdev;
+ int band_height = cdev->page_info.band_params.BandHeight;
+ int band_number = y/band_height;
+ int raster = (ijsdev->k_width+7) >> 3; /* raster width in bytes, byte aligned */
+ int y1=raster*(y-(band_height*band_number));
+
+ if (y1 == 0)
+ {
+ /* First raster for band, clear k_band. Banding playback occurs on first raster. */
+ memset(ijsdev->k_band, 0, ijsdev->k_band_size);
+ }
+
+ return gdev_prn_get_bits(pdev, y, str, actual_data); /* get raster from regular band */
+}
+
+private int gsijs_k_get_bits(gx_device_printer * pdev, int y, byte ** actual_data)
+{
+ gx_device_ijs *ijsdev = (gx_device_ijs *)pdev;
+ gx_device_clist_common *cdev = (gx_device_clist_common *)pdev;
+ int band_height = cdev->page_info.band_params.BandHeight;
+ int band_number = y/band_height;
+ int raster = (ijsdev->k_width+7) >> 3; /* raster width in bytes, byte aligned */
+ int y1=raster*(y-(band_height*band_number));
+
+ *actual_data = ijsdev->k_band+y1;
+
+ return 0;
+}
+
+private int gsijs_create_buf_device(gx_device **pbdev, gx_device *target,
+ const gx_render_plane_t *render_plane, gs_memory_t *mem, gx_band_complexity_t *band_complexity)
+{
+ gx_device_ijs *ijsdev = (gx_device_ijs *)target;
+ int n_chan = ijsdev->color_info.num_components;
+ int code = gx_default_create_buf_device(pbdev, target, render_plane, mem, band_complexity);
+ if (code < 0 || n_chan != 3)
+ return code;
+
+ /* Save buffer (vector) procedures so that we can hook them during banding playback. */
+ ijsdev->prn_procs = (*pbdev)->procs;
+
+ /* Replace buffer procedures with krgb procedures. */
+ set_dev_proc(*pbdev, fill_rectangle, gsijs_fill_rectangle);
+ set_dev_proc(*pbdev, copy_mono, gsijs_copy_mono);
+ set_dev_proc(*pbdev, fill_mask, gsijs_fill_mask);
+ set_dev_proc(*pbdev, fill_path, gsijs_fill_path);
+ set_dev_proc(*pbdev, stroke_path, gsijs_stroke_path);
+
+ return code;
+}
+
+/* See if IJS server supports krgb. */
+private int
+gsijs_set_krgb_mode(gx_device_ijs *ijsdev)
+{
+ char buf[256];
+ int n_chan = ijsdev->color_info.num_components;
+ int code;
+
+ ijsdev->krgb_mode = 0; /* default is no krgb */
+
+ if (n_chan != 3)
+ return 0; /* no krgb support, not RGB colorspace */
+
+ buf[0] = 0;
+ code = ijs_client_enum_param(ijsdev->ctx, 0, "ColorSpace", buf, sizeof(buf)-1);
+ if (code >= 0)
+ buf[code] = 0;
+ if (strstr(buf, "KRGB") != NULL)
+ {
+ ijsdev->krgb_mode = 1; /* yes KRGB is supported */
+ ijsdev->k_bits = 1; /* KRGB = 1x8x8x8 */
+ }
+ else if (strstr(buf, "KxRGB") != NULL)
+ {
+ ijsdev->krgb_mode = 1; /* yes KRGB is supported */
+ ijsdev->k_bits = 8; /* KRGB = 8x8x8x8 */
+ }
+
+ return 0;
+}
+
+/* ------ Private definitions ------ */
private int
gsijs_parse_wxh (const char *val, int size, double *pw, double *ph)
@@ -209,34 +554,6 @@
}
/**
- * gsijs_set_generic_params_hpijs: Set generic IJS parameters.
- *
- * This version is specialized for hpijs 1.0 through 1.0.2, and
- * accommodates a number of quirks.
- **/
-private int
-gsijs_set_generic_params_hpijs(gx_device_ijs *ijsdev)
-{
- char buf[256];
- int code = 0;
-
- /* IjsParams, Duplex, and Tumble get set at this point because
- they may affect margins. */
- if (ijsdev->IjsParams) {
- code = gsijs_client_set_param(ijsdev, "IjsParams", ijsdev->IjsParams);
- }
-
- if (code == 0 && ijsdev->Duplex_set) {
- int duplex_val;
-
- duplex_val = ijsdev->Duplex ? (ijsdev->IjsTumble ? 1 : 2) : 0;
- sprintf (buf, "%d", duplex_val);
- code = gsijs_client_set_param(ijsdev, "Duplex", buf);
- }
- return code;
-}
-
-/**
* gsijs_set_generic_params: Set generic IJS parameters.
**/
private int
@@ -247,9 +564,6 @@
int i, j;
char *value;
- if (ijsdev->ijs_version == HPIJS_1_0_VERSION)
- return gsijs_set_generic_params_hpijs(ijsdev);
-
/* Split IjsParams into separate parameters and send to ijs server */
value = NULL;
for (i=0, j=0; (j < ijsdev->IjsParams_size) && (i < sizeof(buf)-1); j++) {
@@ -290,68 +604,6 @@
}
/**
- * gsijs_set_margin_params_hpijs: Do margin negotiation with IJS server.
- *
- * This version is specialized for hpijs 1.0 through 1.0.2, and
- * accommodates a number of quirks.
- **/
-private int
-gsijs_set_margin_params_hpijs(gx_device_ijs *ijsdev)
-{
- char buf[256];
- int code = 0;
-
- if (code == 0) {
- sprintf(buf, "%d", ijsdev->width);
- code = gsijs_client_set_param(ijsdev, "Width", buf);
- }
- if (code == 0) {
- sprintf(buf, "%d", ijsdev->height);
- code = gsijs_client_set_param(ijsdev, "Height", buf);
- }
-
- if (code == 0) {
- double printable_width, printable_height;
- double printable_left, printable_top;
- float m[4];
-
- code = ijs_client_get_param(ijsdev->ctx, 0, "PrintableArea",
- buf, sizeof(buf));
- if (code == IJS_EUNKPARAM)
- /* IJS server doesn't support margin negotiations.
- That's ok. */
- return 0;
- else if (code >= 0) {
- code = gsijs_parse_wxh(buf, code,
- &printable_width, &printable_height);
- }
-
- if (code == 0) {
- code = ijs_client_get_param(ijsdev->ctx, 0, "PrintableTopLeft",
- buf, sizeof(buf));
- if (code == IJS_EUNKPARAM)
- return 0;
- else if (code >= 0) {
- code = gsijs_parse_wxh(buf, code,
- &printable_left, &printable_top);
- }
- }
-
- if (code == 0) {
- m[0] = printable_left;
- m[1] = ijsdev->MediaSize[1] * (1.0 / 72) -
- printable_top - printable_height;
- m[2] = ijsdev->MediaSize[0] * (1.0 / 72) -
- printable_left - printable_width;
- m[3] = printable_top;
- gx_device_set_margins((gx_device *)ijsdev, m, true);
- }
- }
-
- return code;
-}
-
-/**
* gsijs_set_margin_params: Do margin negotiation with IJS server.
**/
private int
@@ -362,9 +614,6 @@
int i, j;
char *value;
- if (ijsdev->ijs_version == HPIJS_1_0_VERSION)
- return gsijs_set_margin_params_hpijs(ijsdev);
-
/* Split IjsParams into separate parameters and send to ijs server */
value = NULL;
for (i=0, j=0; (j < ijsdev->IjsParams_size) && (i < sizeof(buf)-1); j++) {
@@ -531,12 +780,18 @@
char buf[256];
bool use_outputfd;
int fd = -1;
+ long max_bitmap = ijsdev->space_params.MaxBitmap;
if (strlen(ijsdev->IjsServer) == 0) {
eprintf("ijs server not specified\n");
return gs_note_error(gs_error_ioerror);
}
+ ijsdev->space_params.MaxBitmap = 0; /* force banding */
+
+ /* Set create_buf_device in printer device, so that we can hook the banding playback procedures. */
+ ijsdev->printer_procs.buf_procs.create_buf_device = gsijs_create_buf_device;
+
/* Decide whether to use OutputFile or OutputFD. Note: how to
determine this is a tricky question, so we just allow the
user to set it.
@@ -551,6 +806,8 @@
if (code < 0)
return code;
+ ijsdev->space_params.MaxBitmap = max_bitmap;
+
if (use_outputfd) {
/* Note: dup() may not be portable to all interesting IJS
platforms. In that case, this branch should be #ifdef'ed out.
@@ -610,6 +867,9 @@
if (code >= 0)
code = gsijs_set_margin_params(ijsdev);
+ if (code >= 0)
+ code = gsijs_set_krgb_mode(ijsdev);
+
return code;
}
@@ -690,21 +950,6 @@
return min(width, end);
}
-private int ijs_all_white(unsigned char *data, int size)
-{
- int clean = 1;
- int i;
- for (i = 0; i < size; i++)
- {
- if (data[i] != 0xFF)
- {
- clean = 0;
- break;
- }
- }
- return clean;
-}
-
/* Print a page. Don't use normal printer gdev_prn_output_page
* because it opens the output file.
*/
@@ -715,8 +960,10 @@
gx_device_printer *pdev = (gx_device_printer *)dev;
int raster = gdev_prn_raster(pdev);
int ijs_width, ijs_height;
- int row_bytes;
+ int row_bytes, k_row_bytes=0;
int n_chan = pdev->color_info.num_components;
+ int krgb_mode = ijsdev->krgb_mode;
+ int k_bits = ijsdev->k_bits;
unsigned char *data;
char buf[256];
double xres = pdev->HWResolution[0];
@@ -732,13 +979,23 @@
/* Determine bitmap width and height */
ijs_height = gdev_prn_print_scan_lines(dev);
- if (ijsdev->ijs_version == HPIJS_1_0_VERSION) {
- ijs_width = pdev->width;
- } else {
ijs_width = gsijs_raster_width(dev);
- }
+
row_bytes = (ijs_width * pdev->color_info.depth + 7) >> 3;
+ if (krgb_mode)
+ {
+ gx_device_clist_common *cdev = (gx_device_clist_common *)dev;
+ int band_height = cdev->page_info.band_params.BandHeight;
+ k_row_bytes = (ijs_width + 7) >> 3;
+
+ /* Create banding buffer for k plane. */
+ ijsdev->k_width = ijs_width;
+ ijsdev->k_band_size = band_height * k_row_bytes;
+ if ((ijsdev->k_band = gs_malloc(pdev->memory, ijsdev->k_band_size, 1, "gsijs_output_page")) == (unsigned char *)NULL)
+ return gs_note_error(gs_error_VMerror);
+ }
+
/* Required page parameters */
sprintf(buf, "%d", n_chan);
gsijs_client_set_param(ijsdev, "NumChan", buf);
@@ -747,44 +1004,71 @@
/* This needs to become more sophisticated for DeviceN. */
strcpy(buf, (n_chan == 4) ? "DeviceCMYK" :
- ((n_chan == 3) ? "DeviceRGB" : "DeviceGray"));
+ ((n_chan == 3) ? (krgb_mode ? ((k_bits == 1) ? "KRGB" : "KxRGB") : "DeviceRGB") : "DeviceGray"));
gsijs_client_set_param(ijsdev, "ColorSpace", buf);
- /* If hpijs 1.0, don't set width and height here, because it
- expects them to be the paper size. */
- if (ijsdev->ijs_version != HPIJS_1_0_VERSION) {
- sprintf(buf, "%d", ijs_width);
- gsijs_client_set_param(ijsdev, "Width", buf);
- sprintf(buf, "%d", ijs_height);
- gsijs_client_set_param(ijsdev, "Height", buf);
- }
+ sprintf(buf, "%d", ijs_width);
+ gsijs_client_set_param(ijsdev, "Width", buf);
+ sprintf(buf, "%d", ijs_height);
+ gsijs_client_set_param(ijsdev, "Height", buf);
sprintf(buf, "%gx%g", xres, yres);
gsijs_client_set_param(ijsdev, "Dpi", buf);
+#ifdef KRGB_DEBUG
+ int kfd, rgbfd;
+ char sz[128];
+ kfd = open("/tmp/k.pbm", O_CREAT | O_TRUNC | O_RDWR, 0644);
+ rgbfd = open("/tmp/rgb.ppm", O_CREAT | O_TRUNC | O_RDWR, 0644);
+ snprintf(sz, sizeof(sz), "P4\n#gdevijs test\n%d\n%d\n", ijs_width, ijs_height);
+ write(kfd, sz, strlen(sz));
+ snprintf(sz, sizeof(sz), "P6\n#gdevijs test\n%d\n%d\n255\n", ijs_width, ijs_height);
+ write(rgbfd, sz, strlen(sz));
+#endif
+
for (i=0; i<num_copies; i++) {
unsigned char *actual_data;
ijs_client_begin_cmd (ijsdev->ctx, IJS_CMD_BEGIN_PAGE);
status = ijs_client_send_cmd_wait(ijsdev->ctx);
for (y = 0; y < ijs_height; y++) {
- code = gdev_prn_get_bits(pdev, y, data, &actual_data);
- if (code < 0)
- break;
+ if (krgb_mode)
+ code = gsijs_get_bits(pdev, y, data, &actual_data);
+ else
+ code = gdev_prn_get_bits(pdev, y, data, &actual_data);
+ if (code < 0)
+ break;
+#ifdef KRGB_DEBUG
+ write(rgbfd, actual_data, row_bytes);
+#endif
+ status = ijs_client_send_data_wait(ijsdev->ctx, 0, (char *)actual_data, row_bytes);
+ if (status)
+ break;
- if (ijsdev->ijs_version == HPIJS_1_0_VERSION &&
- ijs_all_white(actual_data, row_bytes))
- status = ijs_client_send_data_wait(ijsdev->ctx, 0, NULL, 0);
- else
- status = ijs_client_send_data_wait(ijsdev->ctx, 0,
- (char *)actual_data, row_bytes);
- if (status)
- break;
+ if (krgb_mode) {
+ code = gsijs_k_get_bits(pdev, y, &actual_data);
+ if (code < 0)
+ break;
+#ifdef KRGB_DEBUG
+ write(kfd, actual_data, k_row_bytes);
+#endif
+ status = ijs_client_send_data_wait(ijsdev->ctx, 0, (char *)actual_data, k_row_bytes);
+ if (status)
+ break;
+ }
}
ijs_client_begin_cmd(ijsdev->ctx, IJS_CMD_END_PAGE);
status = ijs_client_send_cmd_wait(ijsdev->ctx);
}
+#ifdef KRGB_DEBUG
+ close(kfd);
+ close(rgbfd);
+#endif
+
+ if(krgb_mode)
+ gs_free(pdev->memory, ijsdev->k_band, ijsdev->k_band_size, 1, "gsijs_output_page");
+
gs_free_object(pdev->memory, data, "gsijs_output_page");
endcode = (pdev->buffer_space && !pdev->is_async_renderer ?
@@ -1090,7 +1374,6 @@
dprintf2("ijs: Can't set parameter %s=%s\n", key, value);
return code;
}
-
private int
gsijs_set_color_format(gx_device_ijs *ijsdev)

View File

@ -1,166 +0,0 @@
From: alexcher <alexcher@a1074d23-0009-0410-80fe-cf8c14f379e6>
Date: Sat, 8 Sep 2007 22:31:20 +0000 (+0000)
Subject: Declare Ghostscript as _LARGEFILE64_SOURCE program, i.e. request transitional
X-Git-Url: http://git.infradead.org/?p=ghostscript.git;a=commitdiff_plain;h=0513d1b9542d37e7134d36e49222b12ef469b722
Declare Ghostscript as _LARGEFILE64_SOURCE program, i.e. request transitional
interface to large file support. Check for mkstemp64() availability specially.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs@8232 a1074d23-0009-0410-80fe-cf8c14f379e6
---
diff --git a/src/Makefile.in b/src/Makefile.in
index c1e3c3b..5590f9a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -120,8 +120,11 @@ GENOPT=
#
# -DHAVE_FILE64
# use marked versions of the stdio FILE calls, fopen64() et al.
+#
+# -DHAVE_MKSTEMP64
+# use non-standard function mkstemp64()
-CAPOPT= @HAVE_MKSTEMP@ @HAVE_HYPOT@ @HAVE_FILE64@ @HAVE_FONTCONFIG@
+CAPOPT= @HAVE_MKSTEMP@ @HAVE_HYPOT@ @HAVE_FILE64@ @HAVE_MKSTEMP64@ @HAVE_FONTCONFIG@
# Define the name of the executable file.
diff --git a/src/configure.ac b/src/configure.ac
index 10658c5..ffde250 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -924,6 +924,9 @@ AC_SUBST(HAVE_HYPOT)
AC_CHECK_FUNCS([fopen64], [HAVE_FILE64=-DHAVE_FILE64])
AC_SUBST(HAVE_FILE64)
+AC_CHECK_FUNCS([mkstemp64], [HAVE_MKSTEMP64=-DHAVE_MKSTEMP64])
+AC_SUBST(HAVE_MKSTEMP64)
+
AC_PROG_GCC_TRADITIONAL
dnl NB: We don't actually provide autoconf-switched fallbacks for any
diff --git a/src/gp_unifs.c b/src/gp_unifs.c
index 6b6a85c..ac555b5 100644
--- a/src/gp_unifs.c
+++ b/src/gp_unifs.c
@@ -88,18 +88,22 @@ gp_open_scratch_file_generic(const char *prefix, char fname[gp_file_name_sizeof]
/* save the old filename template in case mkstemp fails */
memcpy(ofname, fname, gp_file_name_sizeof);
-#if defined(HAVE_FILE64) && !defined(_LARGEFILE64_SOURCE)
- if (b64)
- file = mkstemp64(fname);
- else
+#ifdef HAVE_MKSTEMP64
+ file = (b64 ? mkstemp64 : mkstemp)(fname);
+#else
+ file = mkstemp(fname);
#endif
- file = mkstemp(fname);
-
- /* Fixme : what to do with b64 and 32-bit mkstemp? Unimplemented. */
if (file < -1) {
eprintf1("**** Could not open temporary file %s\n", ofname);
return NULL;
}
+#if defined(O_LARGEFILE) && defined(__hpux)
+ if (b64)
+ fcntl(file, F_SETFD, fcntl(file, F_GETFD) | O_LARGEFILE);
+#else
+ /* Fixme : what to do with b64 and 32-bit mkstemp? Unimplemented. */
+#endif
+
fp = fdopen(file, mode);
if (fp == NULL)
close(file);
@@ -479,10 +483,10 @@ gp_enumerate_files_close(file_enum * pfen)
FILE *gp_fopen_64(const char *filename, const char *mode)
{
-#if defined(_LARGEFILE64_SOURCE) || !defined(HAVE_FILE64)
- return fopen(filename, mode);
-#else
+#if defined(HAVE_FILE64)
return fopen64(filename, mode);
+#else
+ return fopen(filename, mode);
#endif
}
@@ -497,22 +501,22 @@ FILE *gp_open_scratch_file_64(const char *prefix,
int64_t gp_ftell_64(FILE *strm)
{
-#if defined(_LARGEFILE64_SOURCE) || !defined(HAVE_FILE64)
- return ftello(strm);
-#else
+#if defined(HAVE_FILE64)
return ftello64(strm);
+#else
+ return ftello(strm);
#endif
}
int gp_fseek_64(FILE *strm, int64_t offset, int origin)
{
-#if defined(_LARGEFILE64_SOURCE) || !defined(HAVE_FILE64)
+#if defined(HAVE_FILE64)
+ return fseeko64(strm, offset, origin);
+#else
off_t offset1 = (off_t)offset;
if (offset != offset1)
return -1;
return fseeko(strm, offset1, origin);
-#else
- return fseeko64(strm, offset, origin);
#endif
}
diff --git a/src/stdpre.h b/src/stdpre.h
index acb61c1..c17cdbf 100644
--- a/src/stdpre.h
+++ b/src/stdpre.h
@@ -17,6 +17,9 @@
#ifndef stdpre_INCLUDED
# define stdpre_INCLUDED
+/* Ghostscript uses transitional LFS functions. */
+#define _LARGEFILE64_SOURCE 1
+
/*
* Here we deal with the vagaries of various C compilers. We assume that:
* ANSI-standard Unix compilers define __STDC__.
From: alexcher <alexcher@a1074d23-0009-0410-80fe-cf8c14f379e6>
Date: Wed, 5 Sep 2007 19:21:05 +0000 (+0000)
Subject: Replace non-standard function call fdopen64() with fdopen(). The former
X-Git-Url: http://git.infradead.org/?p=ghostscript.git;a=commitdiff_plain;h=dc01761c07d210974d829c35c33a8886c33b0488
Replace non-standard function call fdopen64() with fdopen(). The former
is not available on most platforms and not needed anyway because O_LARGEFILE
flag is set earlier in the code. Bug 689175.
DIFFERENCES:
None
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs@8229 a1074d23-0009-0410-80fe-cf8c14f379e6
---
diff --git a/src/gpmisc.c b/src/gpmisc.c
index f963d82..303fac2 100644
--- a/src/gpmisc.c
+++ b/src/gpmisc.c
@@ -93,11 +93,7 @@ gp_fopentemp_generic(const char *fname, const char *mode, bool b64)
* fdopen as (char *), rather than following the POSIX.1 standard,
* which defines it as (const char *). Patch this here.
*/
-#if defined (O_LARGEFILE)
- file = (b64 ? fdopen64 : fdopen)(fildes, (char *)mode); /* still really const */
-#else
file = fdopen(fildes, (char *)mode); /* still really const */
-#endif
if (file == 0)
close(fildes);
return file;

View File

@ -1,6 +1,8 @@
--- ghostscript-8.60-r8112/ijs/ijs-config.in.multilib 2002-01-31 19:09:46.000000000 +0000
+++ ghostscript-8.60-r8112/ijs/ijs-config.in 2007-07-10 17:46:44.000000000 +0100
@@ -43,8 +43,7 @@
diff -up ghostscript-8.61/ijs/Makefile.am.multilib ghostscript-8.61/ijs/Makefile.am
diff -up ghostscript-8.61/ijs/ijs-config.in.multilib ghostscript-8.61/ijs/ijs-config.in
--- ghostscript-8.61/ijs/ijs-config.in.multilib 2002-01-31 19:09:46.000000000 +0000
+++ ghostscript-8.61/ijs/ijs-config.in 2007-11-23 09:19:18.000000000 +0000
@@ -43,8 +43,7 @@ while test $# -gt 0; do
echo $includes
;;
--libs)
@ -10,14 +12,3 @@
;;
*)
echo "${usage}" 1>&2
--- ghostscript-8.60-r8112/ijs/Makefile.am.multilib 2007-07-10 18:00:36.000000000 +0100
+++ ghostscript-8.60-r8112/ijs/Makefile.am 2007-07-10 18:00:39.000000000 +0100
@@ -34,7 +34,7 @@
pkgincludedir=$(includedir)/ijs
m4datadir = $(datadir)/aclocal
-pkgconfigdatadir = $(prefix)/lib/pkgconfig
+pkgconfigdatadir = $(libdir)/pkgconfig
lib_LTLIBRARIES = libijs.la

12
ghostscript-pksmraw.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up ghostscript-8.62/src/gxclrast.c.pksmraw ghostscript-8.62/src/gxclrast.c
--- ghostscript-8.62/src/gxclrast.c.pksmraw 2008-03-31 17:24:32.000000000 +0100
+++ ghostscript-8.62/src/gxclrast.c 2008-03-31 17:25:33.000000000 +0100
@@ -2606,8 +2606,6 @@ static int apply_create_compositor(gx_de
rc_increment(tdev);
*ptarget = tdev;
}
- if (code < 0)
- return code;
/* Perform any updates for the clist device required */
code = pcomp->type->procs.clist_compositor_read_update(pcomp,

View File

@ -0,0 +1,26 @@
diff -up ghostscript-8.61/lib/gs_init.ps.runlibfileifexists ghostscript-8.61/lib/gs_init.ps
--- ghostscript-8.61/lib/gs_init.ps.runlibfileifexists 2007-10-31 17:00:55.000000000 +0000
+++ ghostscript-8.61/lib/gs_init.ps 2007-11-30 09:02:19.000000000 +0000
@@ -671,6 +671,14 @@ systemdict /internaldict dup .makeintern
{ /undefinedfilename signalerror }
ifelse
} bind def
+/runlibfileifexists
+ { % We don't want to bind 'run' into this procedure,
+ % since run may get redefined.
+ findlibfile
+ { exch pop /run .systemvar exec }
+ { pop }
+ ifelse
+ } bind def
/selectdevice
{ finddevice setdevice .setdefaultscreen } bind def
/signalerror % <object> <errorname> signalerror -
@@ -839,6 +847,7 @@ userdict /.currentresourcefile //null pu
} bind def
% Temporarily substitute it for the real runlibfile.
/.runlibfile /runlibfile load def
+/.runlibfileifexists /runlibfileifexists load def
/runlibfile /runlibfile0 load def
% Create the error handling machinery.

View File

@ -0,0 +1,26 @@
diff -up ghostscript-8.61/src/sjpx.c.system-jasper ghostscript-8.61/src/sjpx.c
--- ghostscript-8.61/src/sjpx.c.system-jasper 2008-02-22 14:10:00.000000000 +0000
+++ ghostscript-8.61/src/sjpx.c 2008-02-22 14:10:15.000000000 +0000
@@ -34,14 +34,6 @@ static void s_jpxd_set_defaults(stream_s
private_st_jpxd_state(); /* creates a gc object for our state,
defined in sjpx.h */
-/* error reporting callback for the jpx library */
-static void
-s_jpx_jas_error_cb(jas_error_t err, char *msg)
-{
- dprintf2("jasper (code %d) %s", (int)err, msg);
-}
-
-
/* initialize the steam.
this involves allocating the stream and image structures, and
initializing the decoder.
@@ -59,7 +51,6 @@ s_jpxd_init(stream_state * ss)
}
status = jas_init();
- jas_set_error_cb(s_jpx_jas_error_cb);
#ifdef JPX_DEBUG
/* raise the error reporting threshold from the default (0) */
jas_setdbglevel(1);

View File

@ -1,17 +1,16 @@
%define gs_ver 8.60
%define gs_dot_ver 8.60
%define gs_ver 8.63
%define gs_dot_ver 8.63
%{expand: %%define build_with_freetype %{?_with_freetype:1}%{!?_with_freetype:0}}
Summary: A PostScript(TM) interpreter and renderer.
Name: ghostscript
Version: %{gs_ver}
Release: 4%{?dist}
Release: 1%{?dist}
License: GPLv2
URL: http://www.ghostscript.com/
Group: Applications/Publishing
Source0: ghostscript-%{gs_ver}.tar.bz2
Source1: FAPIcidfmap
Source2: CIDFnmap
Source4: cidfmap
@ -19,8 +18,9 @@ Patch1: ghostscript-multilib.patch
Patch2: ghostscript-scripts.patch
Patch3: ghostscript-noopt.patch
Patch4: ghostscript-fPIC.patch
Patch5: http://www.openprinting.org/download/printing/esp-gpl-ghostscript-merge/ghostscript-8.57-ijs-krgb.patch
Patch6: ghostscript-mkstemp64.patch
Patch5: ghostscript-runlibfileifexists.patch
Patch6: ghostscript-system-jasper.patch
Patch7: ghostscript-pksmraw.patch
Requires: urw-fonts >= 1.1, ghostscript-fonts
BuildRequires: libjpeg-devel, libXt-devel
@ -31,6 +31,7 @@ BuildRequires: libxml2-devel
BuildRequires: libtiff-devel
BuildRequires: cups-devel >= 1.1.13
BuildRequires: libtool
BuildRequires: jasper-devel
%{?_with_freetype:BuildRequires: freetype-devel}
BuildRoot: %{_tmppath}/%{name}-%{gs_ver}-root
@ -73,6 +74,7 @@ A GTK-enabled version of Ghostscript, called 'gsx'.
%prep
%setup -q -n %{name}-%{gs_ver}
rm -rf libpng zlib jpeg jasper
# Fix ijs-config not to have multilib conflicts (bug #192672)
%patch1 -p1 -b .multilib
@ -86,10 +88,13 @@ A GTK-enabled version of Ghostscript, called 'gsx'.
# Fix shared library build.
%patch4 -p1 -b .fPIC
# IJS KRGB patch.
%patch5 -p1 -b .ijs-krgb
# Define .runlibfileifexists.
%patch5 -p1 -b .runlibfileifexists
%patch6 -p1 -b .mkstemp64
%patch6 -p1 -b .system-jasper
# Fix pksmraw output (bug #308211). Still needed in 8.63.
%patch7 -p1 -b .pksmraw
# Convert manual pages to UTF-8
from8859_1() {
@ -98,21 +103,25 @@ from8859_1() {
}
for i in man/de/*.1; do from8859_1 "$i"; done
if [ -x autogen.sh ]; then
./autogen.sh
pushd ijs
./autogen.sh
popd
fi
%build
# Compile without strict aliasing opts due to these files:
# gdevescv.c gdevl4v.c gdevopvp.c gdevbbox.c gdevdbit.c gdevddrw.c
# gdevp14.c gdevpdfd.c gdevpdfi.c gdevpdfo.c gdevpdft.c gdevpdfv.c
# gdevpdte.c gdevpdtt.c gdevps.c gdevpx.c gscoord.c gscparam.c gscrd.c
# gsdps1.c gsimage.c gspath1.c gsptype1.c gsptype2.c gstype2.c
# gstype42.c gxccache.c gxchar.c gxclimag.c gxclpath.c gxfcopy.c
# gximag3x.c gximage3.c gxipixel.c gxshade1.c gxstroke.c gxtype1.c
# ibnum.c iscanbin.c zchar1.c zchar.c zcharx.c zfapi.c zfont32.c
# zfunc0.c zfunc3.c zfunc4.c zpcolor.c zshade.c
EXTRACFLAGS="-fno-strict-aliasing"
FONTPATH=
for path in \
%{_datadir}/fonts/default/%{name} \
%{_datadir}/fonts/default/Type1 \
%{_datadir}/fonts/default/amspsfnt/pfb \
%{_datadir}/fonts/default/cmpsfont/pfb \
%{_datadir}/fonts/japanese \
%{_datadir}/fonts \
%{_datadir}/%{name}/conf.d \
%{_sysconfdir}/%{name} \
%{_sysconfdir}/%{name}/%{gs_dot_ver}
@ -120,24 +129,25 @@ do
FONTPATH="$FONTPATH${FONTPATH:+:}$path"
done
%configure --with-ijs --enable-dynamic --with-fontpath="$FONTPATH" \
--with-drivers=ALL
--with-drivers=ALL --disable-compile-inits \
CFLAGS="$CFLAGS $EXTRACFLAGS"
# Build IJS
cd ijs
automake --add-missing --copy || : # Ships with broken symlinks
./autogen.sh
%configure --enable-shared --enable-static
make
cd ..
%if %{build_with_freetype}
FT_CFLAGS=$(pkg-config --cflags freetype2)
make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS" prefix=%{_prefix} \
make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRAFLAGS" prefix=%{_prefix} \
FT_BRIDGE=1 FT_CFLAGS="$FT_CFLAGS" FT_LIB=freetype
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" prefix=%{_prefix} \
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRAFLAGS" prefix=%{_prefix} \
FT_BRIDGE=1 FT_CFLAGS="$FT_CFLAGS" FT_LIB=freetype
%else
make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS" prefix=%{_prefix}
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" prefix=%{_prefix}
make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRAFLAGS" prefix=%{_prefix}
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRAFLAGS" prefix=%{_prefix}
%endif
%install
@ -151,14 +161,15 @@ make install soinstall \
prefix=$RPM_BUILD_ROOT%{_prefix} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
datadir=$RPM_BUILD_ROOT%{_datadir} \
gsincludedir=$RPM_BUILD_ROOT%{_includedir}/ghostscript \
bindir=$RPM_BUILD_ROOT%{_bindir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{gs_dot_ver} \
gsdir=$RPM_BUILD_ROOT%{_datadir}/%{name} \
gsdatadir=$RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver} \
gssharedir=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{gs_dot_ver} \
CUPSSERVER=$RPM_BUILD_ROOT`cups-config --serverbin` \
CUPSCONFIG=$RPM_BUILD_ROOT`cups-config --serverroot` \
CUPSSERVERROOT=$RPM_BUILD_ROOT`cups-config --serverroot` \
CUPSSERVERBIN=$RPM_BUILD_ROOT`cups-config --serverbin` \
CUPSDATA=$RPM_BUILD_ROOT`cups-config --datadir`
mv -f $RPM_BUILD_ROOT%{_bindir}/gsc $RPM_BUILD_ROOT%{_bindir}/gs
@ -170,20 +181,12 @@ cd ..
echo ".so man1/gs.1" > $RPM_BUILD_ROOT/%{_mandir}/man1/ghostscript.1
ln -sf gs $RPM_BUILD_ROOT/usr/bin/ghostscript
###
### None of this works at the moment because runlibfileifexists is missing
###
if false; then
# Rename an original FAPIcidfmap to FAPIcidfmap.GS
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/lib/FAPIcidfmap{,.GS}
# Rename an original cidfmap to cidfmap.GS
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/lib/cidfmap{,.GS}
# Install our own FAPIcidfmap/cidfmap to allow the separated
# FAPIcidfmap/cidfmap which the font packages own.
install -m0644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/lib/FAPIcidfmap
# Install our own cidfmap to allow the separated
# cidfmap which the font packages own.
install -m0644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/lib/CIDFnmap
install -m0644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/lib/cidfmap
fi #false
# Header files.
mkdir -p $RPM_BUILD_ROOT%{_includedir}/ghostscript
@ -206,10 +209,12 @@ rm -f $RPM_BUILD_ROOT/usr/lib/cups/filter/pstoraster
# Don't ship two copies of Resource. Just the versioned one will do.
rm -rf $RPM_BUILD_ROOT%{_datadir}/ghostscript/Resource
# Don't ship URW fonts; we already have them.
rm -rf $RPM_BUILD_ROOT%{_datadir}/ghostscript/%{gs_dot_ver}/Resource/Font
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/conf.d
mkdir -p $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}
touch $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}/Fontmap.local
touch $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}/FAPIfontmap.local
touch $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}/cidfmap.local
touch $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}/CIDFnmap.local
@ -269,6 +274,61 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libgs.so
%changelog
* Wed Aug 27 2008 Tim Waugh <twaugh@redhat.com>
- 8.63. No longer need r8591 or incomplete-ccittfax patches.
- Compile without strict aliasing opts due to warnings across several
files.
- Don't run autogen.sh for main package, just for ijs which doesn't
ship with a configure script.
- Really build with jasper (bug #433897).
* Mon Jun 23 2008 Tim Waugh <twaugh@redhat.com> 8.62-4
- Applied patch to work around bug #229174.
- Applied patch from upstream to fix box_fill_path for shfill (bug #452348).
* Mon Mar 31 2008 Tim Waugh <twaugh@redhat.com> 8.62-3
- Fix pksmraw output (bug #308211).
* Tue Mar 4 2008 Tim Waugh <twaugh@redhat.com> 8.62-2
- No longer need CVE-2008-0411 patch.
- Don't ship URW fonts; we already have them.
* Tue Mar 4 2008 Tim Waugh <twaugh@redhat.com> 8.62-1
- 8.62. No longer need IJS KRGB patch, or patch for gs bug 689577.
* Wed Feb 27 2008 Tim Waugh <twaugh@redhat.com> 8.61-8
- Applied patch to fix CVE-2008-0411 (bug #431536).
* Fri Feb 22 2008 Tim Waugh <twaugh@redhat.com> 8.61-7
- Build with jasper again (bug #433897). Build requires jasper-devel, and
a patch to remove jas_set_error_cb reference.
* Mon Jan 28 2008 Tim Waugh <twaugh@redhat.com> 8.61-6
- Don't build with jasper support.
- Remove bundled libraries.
* Tue Dec 11 2007 Tim Waugh <twaugh@redhat.com> 8.61-5
- Applied upstream patch for bug #416321.
* Fri Nov 30 2007 Tim Waugh <twaugh@redhat.com> 8.61-4
- Fixed runlibfileifexists patch.
* Fri Nov 30 2007 Tim Waugh <twaugh@redhat.com> 8.61-3
- Revert previous change, but define .runlibfileifexists not just
runlibfileifexists.
* Thu Nov 29 2007 Tim Waugh <twaugh@redhat.com> 8.61-2
- Fixed cidfmap (bug #402481).
* Wed Nov 28 2007 Tim Waugh <twaugh@redhat.com> 8.61-1
- 8.61 (bug #402481).
- Build with --disable-compile-inits (bug #402501).
- Add %%{_datadir}/fonts to fontpath (bug #402481).
- Restore the cidfmap-switching bits (bug #402481).
* Tue Oct 23 2007 Tim Waugh <twaugh@redhat.com> 8.60-5
- Applied patch from upstream to fix CVE-2007-2721 (bug #346511).
* Tue Oct 9 2007 Tim Waugh <twaugh@redhat.com> 8.60-4
- Marked localized man pages as %%lang (bug #322321).

View File

@ -1,3 +1,3 @@
2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz
dfc93dd2aaaf2b86d2fd55f654c13261 adobe-cmaps-200406.tar.gz
89fc0a90e67caf151a9d6855200c68ca ghostscript-8.60.tar.bz2
c770eedfdd846a53e211e3ba5339de21 ghostscript-8.63.tar.bz2