diff options
author | Patrick Li <pat@FreeBSD.org> | 2005-06-13 04:46:55 +0000 |
---|---|---|
committer | Patrick Li <pat@FreeBSD.org> | 2005-06-13 04:46:55 +0000 |
commit | 383906694dde2935c591e53791504f8bcc4d9f97 (patch) | |
tree | 090c35ddd7692beaa1db5a19a4b7281bfde95c95 /print | |
parent | d6f84a188c0bb94b0a3c7a1083e2443f9376ae7c (diff) | |
download | ports-383906694dde2935c591e53791504f8bcc4d9f97.tar.gz ports-383906694dde2935c591e53791504f8bcc4d9f97.zip |
Notes
Diffstat (limited to 'print')
-rw-r--r-- | print/ghostscript-afpl/Makefile | 10 | ||||
-rw-r--r-- | print/ghostscript-afpl/Makefile.inc | 2 | ||||
-rw-r--r-- | print/ghostscript-afpl/distinfo | 4 | ||||
-rw-r--r-- | print/ghostscript-afpl/files/patch-epag:gdevepag.c | 6 | ||||
-rw-r--r-- | print/ghostscript-afpl/files/patch-lxm3200:gdevlx32.c | 7 | ||||
-rw-r--r-- | print/ghostscript-afpl/files/patch-src-gdevijs.c | 659 | ||||
-rw-r--r-- | print/ghostscript-afpl/pkg-descr | 4 | ||||
-rw-r--r-- | print/ghostscript-afpl/scripts/configure | 6 |
8 files changed, 684 insertions, 14 deletions
diff --git a/print/ghostscript-afpl/Makefile b/print/ghostscript-afpl/Makefile index 81051de7ff55..522f03ba2d10 100644 --- a/print/ghostscript-afpl/Makefile +++ b/print/ghostscript-afpl/Makefile @@ -13,7 +13,7 @@ CATEGORIES= print MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:gs_srcs,bjc250/} \ http://www.gelhaus.net/hp880c/1.4beta/:hp8xx \ http://www.harsch.net/Download/:dj970 \ - http://plaza26.mbn.or.jp/~higamasa/gdevmd2k/:md2k \ + http://www33.ocn.ne.jp/~higamasa/gdevmd2k/:md2k \ ${MASTER_SITE_PORTS_JP:S/$/:ports_jp,ports_jp_gs/} \ ftp://download.canon-sales.co.jp/pub/driver/lasershot/linux/:cpca \ http://www.ucatv.ne.jp/~taeko/software/gs/:lips \ @@ -129,7 +129,7 @@ DJ970= gdevdj9 DJ970_SRCS= ${DJ970}.c.gz # MD2K - additional driver for Alps MD-2000/2010/4000/1300/1500/5000 -# http://plaza26.mbn.or.jp/~higamasa/gdevmd2k/ +# http://www33.ocn.ne.jp/~higamasa/gdevmd2k/ MD2K= md2k MD2K_VERS= 0.2a MD2K_NAME= gdevmd2k-${MD2K_VERS} @@ -169,14 +169,13 @@ LIPS_SRCS= ${LIPS_NAME}.tar.gz # EPAG - additional driver for Epson ESC/Page printers # http://www.humblesoft.com/gdevepag.html -# XXX FIXME EPAG= epag EPAG_VERS= 3.09 EPAG_NAME= ${EPAG}-${EPAG_VERS} EPAG_SRCS= ${EPAG_NAME}.tar.gz -# EPLASER - additional driver for ESC/Page printers (Epson Kowa developed) -# http://www.epkowa.co.jp/english/linux_e/index.html +# EPLASER - additional driver for ESC/Page printers, by EPSON AVASYS Corp. +# http://www.avasys.jp/english/linux_e/index.html EPLASER= eplaser EPLASER_VERS= 3.1.4 EPLASER_NAME= ${EPLASER}-${EPLASER_VERS} @@ -194,7 +193,6 @@ GDI_NAME= Samsung-SmartGDI-all-GS GDI_SRCS= ${GDI_NAME}.orig.tar.gz # LXM3200 - additional driver for Lexmark 3200/Z12/Z22/Z31/Z32 -# XXX FIXME LXM3200= lxm3200 LXM3200_VERS= 20030501 LXM3200_NAME= ${LXM3200}-tweaked-${LXM3200_VERS} diff --git a/print/ghostscript-afpl/Makefile.inc b/print/ghostscript-afpl/Makefile.inc index 9a49ba4042d6..bc9edabb9f1d 100644 --- a/print/ghostscript-afpl/Makefile.inc +++ b/print/ghostscript-afpl/Makefile.inc @@ -1,5 +1,5 @@ # $FreeBSD$ GS_VERSION= 8.51 -GS_REVISION= 0 +GS_REVISION= 1 GS_EPOCH= 1 diff --git a/print/ghostscript-afpl/distinfo b/print/ghostscript-afpl/distinfo index 3983a4fd133c..0b8f69fc898c 100644 --- a/print/ghostscript-afpl/distinfo +++ b/print/ghostscript-afpl/distinfo @@ -2,6 +2,8 @@ MD5 (ghostscript/ghostscript-8.51.tar.bz2) = 8b328b47cce3b7f97f35296aae8e7b77 SIZE (ghostscript/ghostscript-8.51.tar.bz2) = 8377372 MD5 (ghostscript/gdevcd8.tar.gz) = 5ce48bff6082a023199c8ede4aae63a0 SIZE (ghostscript/gdevcd8.tar.gz) = 24803 +MD5 (ghostscript/pcl3-3.3.tar.gz) = 34e664c2a98b847598f8441f8cac7ab6 +SIZE (ghostscript/pcl3-3.3.tar.gz) = 301470 MD5 (ghostscript/gdevdj9.c.gz) = 3a9c20c34b79ffab434abfbcc31d1c27 SIZE (ghostscript/gdevdj9.c.gz) = 20139 MD5 (ghostscript/gdevmd2k-0.2a.tar.gz) = 5ed2b4218b8f77cb411f3d2e4509ed24 @@ -16,6 +18,8 @@ MD5 (ghostscript/canon-lips4-1.0.0-651.tgz) = 3105272a9351ea632416b53367e2f38a SIZE (ghostscript/canon-lips4-1.0.0-651.tgz) = 38835 MD5 (ghostscript/gdevlips-2.4.0.tar.gz) = 89327cac37665f3fdbae0da5f2c8a89f SIZE (ghostscript/gdevlips-2.4.0.tar.gz) = 67683 +MD5 (ghostscript/dmprt-2.01.tar.gz) = c7a9fb127fde5d888a798bf5e1822b88 +SIZE (ghostscript/dmprt-2.01.tar.gz) = 44232 MD5 (ghostscript/epag-3.09.tar.gz) = 63304a6afe44842124d2d880bf24dbe3 SIZE (ghostscript/epag-3.09.tar.gz) = 12858 MD5 (ghostscript/eplaser-3.1.4-705.tgz) = 94246b034af171b4336d90198e9f4bd8 diff --git a/print/ghostscript-afpl/files/patch-epag:gdevepag.c b/print/ghostscript-afpl/files/patch-epag:gdevepag.c index e0009a57b348..f3823f24998b 100644 --- a/print/ghostscript-afpl/files/patch-epag:gdevepag.c +++ b/print/ghostscript-afpl/files/patch-epag:gdevepag.c @@ -1,5 +1,5 @@ --- epag/gdevepag.c.orig Sat Jul 8 13:33:09 2000 -+++ epag/gdevepag.c Fri Dec 31 19:59:24 2004 ++++ epag/gdevepag.c Thu May 26 00:12:48 2005 @@ -417,15 +417,15 @@ cont->maxY = epag_cont.cRowBuf / cont->bh * cont->bh ; if(cont->maxY < cont->bh) cont->maxY = cont->bh; @@ -20,13 +20,15 @@ bbtbl = (EpagBubble *)cont->bubbleBuffer; for(i=0;i<cont->maxBx-1;i++) bbtbl[i].next = &bbtbl[i+1]; -@@ -436,9 +436,9 @@ +@@ -436,9 +436,11 @@ private void epag_page_close(EpagPageCont *cont) { - gs_free(cont->bp, bpl, cont->maxY, "epag_skip_blank_init(bp)"); - gs_free(cont->bp2, bpl*3/2+1, cont->maxY, "epag_skip_blank_init(bp2)"); - gs_free(cont->bubbleBuffer, sizeof(EpagBubble), cont->maxBx,"bubbleBuffer"); ++ gx_device* pdev; ++ + gs_free(pdev->memory, cont->bp, bpl, cont->maxY, "epag_skip_blank_init(bp)"); + gs_free(pdev->memory, cont->bp2, bpl*3/2+1, cont->maxY, "epag_skip_blank_init(bp2)"); + gs_free(pdev->memory, cont->bubbleBuffer, sizeof(EpagBubble), cont->maxBx,"bubbleBuffer"); diff --git a/print/ghostscript-afpl/files/patch-lxm3200:gdevlx32.c b/print/ghostscript-afpl/files/patch-lxm3200:gdevlx32.c index bafbc2dde9b5..e4b45a4bece2 100644 --- a/print/ghostscript-afpl/files/patch-lxm3200:gdevlx32.c +++ b/print/ghostscript-afpl/files/patch-lxm3200:gdevlx32.c @@ -1,5 +1,5 @@ --- lxm3200/gdevlx32.c.orig Wed Apr 23 01:06:20 2003 -+++ lxm3200/gdevlx32.c Fri Dec 17 19:46:04 2004 ++++ lxm3200/gdevlx32.c Thu May 26 00:11:50 2005 @@ -422,9 +422,11 @@ * of the nearest color. */ @@ -36,9 +36,12 @@ "lxm3200_print_page(outdata)"); if(gendata.scanbuf == NULL || -@@ -944,11 +946,11 @@ +@@ -943,12 +945,14 @@ + private void freeresources(void) { ++ gx_device *pdev; ++ if(gendata.scanbuf) - gs_free((char *)gendata.scanbuf, gendata.numbytes, gendata.numblines, + gs_free(pdev->memory, (char *)gendata.scanbuf, gendata.numbytes, gendata.numblines, diff --git a/print/ghostscript-afpl/files/patch-src-gdevijs.c b/print/ghostscript-afpl/files/patch-src-gdevijs.c new file mode 100644 index 000000000000..3788e967996c --- /dev/null +++ b/print/ghostscript-afpl/files/patch-src-gdevijs.c @@ -0,0 +1,659 @@ +--- src/gdevijs.c.orig Thu Mar 10 23:57:23 2005 ++++ src/gdevijs.c Fri May 27 02:56:55 2005 +@@ -27,15 +27,29 @@ + * 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 ++ * (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 ++ * 1. Fixed segfault issue with 1-bit color space. ++ * 2. Fixed z-order issue with colored text on black rectangle. ++ * + */ + + #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, +@@ -52,6 +66,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 */
+@@ -126,6 +148,14 @@ + + IjsClientCtx *ctx; + int ijs_version; ++ ++ /* Additional parameters for krgb support. */ ++ int krgb_mode; /* 0=false, 1=true */ ++ 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. */ +@@ -153,7 +183,12 @@ + FALSE, /* Tumble_set */ + + NULL, /* IjsClient *ctx */ +- 0 /* ijs_version */ ++ 0, /* ijs_version */ ++ 0, /* krgb_mode */ ++ 0, /* k_path */ ++ 0, /* k_width */ ++ 0, /* k_band_size */ ++ NULL /* k_band buffer */ + }; + + +@@ -169,12 +204,254 @@ + + /**************************************************************************/ + +-/* ------ 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=ijsdev->k_band+(raster*y)+(x >> 3); ++ int dest_start_bit = x & 7; ++ int i,j,w1; ++ ++ if (h <= 0 || w <= 0) ++ return 0; ++ ++ if ((x+w) > ijsdev->k_width) ++ w1 = ijsdev->k_width - x; ++ else ++ w1 = w; ++ ++ /* 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<w1; i++) ++ dest[(dest_start_bit+i)>>3] |= 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<w1; i++) ++ dest[(dest_start_bit+i)>>3] &= ~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=ijsdev->k_band+(raster*y)+(x >> 3); ++ register const unsigned char *scan=data+(dx >> 3); ++ int dest_start_bit = x & 7; ++ int scan_start_bit = dx & 7; ++ int i, h=height; ++ ++ if (h <= 0 || w <= 0) ++ return 0; ++ ++ 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]) ++ dest[(dest_start_bit+i)>>3] |= 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]) ++ dest[(dest_start_bit+i)>>3] &= ~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); ++ ++ 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; + +-/* 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 ++ 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, bool for_band) ++{ ++ 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, for_band); ++ 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. Return value: 0=false, 1=true. */ ++private int ++gsijs_set_krgb_mode(gx_device_ijs *ijsdev) ++{ ++ char buf[256]; ++ int n_chan = ijsdev->color_info.num_components; ++ int code; ++ ++ 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) ++ return 0; /* no krgb support */ ++ ++ return 1; /* krgb is supported */ ++} ++ ++/* ------ Private definitions ------ */ + + private int + gsijs_parse_wxh (const char *val, int size, double *pw, double *ph) +@@ -212,34 +489,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 +@@ -250,9 +499,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++) { +@@ -293,68 +539,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 +@@ -365,9 +549,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++) { +@@ -534,12 +715,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. +@@ -554,6 +741,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. +@@ -613,6 +802,9 @@ + if (code >= 0) + code = gsijs_set_margin_params(ijsdev); + ++ if (code >= 0) ++ ijsdev->krgb_mode = gsijs_set_krgb_mode(ijsdev); ++ + return code; + } + +@@ -695,21 +887,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. + */ +@@ -720,8 +897,9 @@ + 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; + unsigned char *data; + char buf[256]; + double xres = pdev->HWResolution[0]; +@@ -737,13 +915,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); +@@ -752,44 +940,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 ? "KRGB" : "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 ? +@@ -1093,7 +1308,6 @@ + dprintf2("ijs: Can't set parameter %s=%s\n", key, value); + return code; + } +- + + private int + gsijs_set_color_format(gx_device_ijs *ijsdev) diff --git a/print/ghostscript-afpl/pkg-descr b/print/ghostscript-afpl/pkg-descr index 6f086df47f0b..e3d97f845b58 100644 --- a/print/ghostscript-afpl/pkg-descr +++ b/print/ghostscript-afpl/pkg-descr @@ -7,8 +7,8 @@ from the GPL. Read the file PUBLIC in the work/gsX.Y directory or in ${PREFIX}/share/ghostscript/X.Y/doc/PUBLIC after installation for details ! This port includes add-on packages (not part of the official gs release) - o HP2200 driver for HP DeskJet 8xx and Business Inkjet 2200 - - http://hp.sourceforge.net/gs-hp2200.php + o HP8XX driver for HP DeskJet 880C/882C/895C + - http://www.gelhaus.net/hp880c/ o DJ970 driver for HP DeskJet 970CXi - http://www.harsch.net/Ghostscript/ghostscript.html o Special drivers for verious printer models diff --git a/print/ghostscript-afpl/scripts/configure b/print/ghostscript-afpl/scripts/configure index 5f7fdd275ec9..34a1f8b598bf 100644 --- a/print/ghostscript-afpl/scripts/configure +++ b/print/ghostscript-afpl/scripts/configure @@ -32,6 +32,7 @@ else lips2p lips3 lips4 bjc880j lips4v \ m8510 coslw2p coslwxl uniprint \ lj250 declj250 ap3250 epson eps9mid eps9high lp8000 \ + epag \ escpage lp2000 \ alc8600 alc8500 alc2000 alc4000 alc1900 alc4100 \ lp9800c lp9000c lp9500c lp8800c lp8300c lp8500c lp3000c \ @@ -51,7 +52,7 @@ else pj pjetxl pjxl paintjet \ pjxl300 pxlmono pxlcolor \ ijs ibmpro jetp3852 imagen fs600 lxm5700m \ - lx5000 lex2050 lex3200 lex5700 lex7000 \ + lxm3200 lx5000 lex2050 lex3200 lex5700 lex7000 \ cp50 necp6 \ npdl \ oce9050 oki182 okiibm atx23 atx24 atx38 r4081 \ @@ -60,6 +61,7 @@ else sj48 t4693d2 t4693d4 t4693d8 tek4696 \ bmpmono bmpgray bmp16 bmp256 bmp16m bmp32b bmpsep1 bmpsep8 \ ccr \ + cgmmono cgm8 cgm24 \ cif \ dfaxhigh dfaxlow \ xcf xcfcmyk \ @@ -149,6 +151,7 @@ Have fun with this new configuration style ! -andreas \n\n\ "eps9mid" "Epson-compatible 9-pin, interleaved lines, medium resol" "$status_eps9mid" \ "eps9high" "Epson-compatible 9-pin, interleaved lines, triple resol" "$status_eps9high" \ "lp8000" "Epson LP-8000 line printer" "$status_lp8000" \ + "epag" "Epson ESC/Page laser printer (generic) [EPAG]" "$status_epag" \ "escpage" "Epson ESC/Page laser printer (generic) [LIPS]" "$status_escpage" \ "lp2000" "Epson LP-2000/3000/7000/7000G laser printer [LIPS]" "$status_lp2000" \ "alc8600" "Epson AL-C8600 color laser printer [EPLASER]" "$status_alc8600" \ @@ -246,6 +249,7 @@ Have fun with this new configuration style ! -andreas \n\n\ "imagen" "Imagen ImPress printers" "$status_imagen" \ "fs600" "Kyocera FS-600 (600 dpi)" "$status_fs600" \ "lxm5700m" "Lexmark 5700 monotone" "$status_lxm5700m" \ + "lxm3200" "Lexmark 3200/Z12/Z22/Z31/Z32 [LXM3200]" "$status_lxm3200" \ "lx5000" "Lexmark 5000/Z51/Z82 [LX5000]" "$status_lx5000" \ "lex2050" "Lexmark 2050 [LEX7000]" "$status_lex2050" \ "lex3200" "Lexmark 3200 [LEX7000]" "$status_lex3200" \ |