Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jun 2005 15:43:26 +0200
From:      Jose M Rodriguez <josemi@freebsd.jazztel.es>
To:        freebsd-ports-bugs@freebsd.org
Cc:        "Pedro F. Giffuni" <giffunip@asme.org>, Simon Barner <barner@freebsd.org>
Subject:   Re: ports/77185: (re)add PCL3 driver to print/ghostscript-gpl port
Message-ID:  <200506061543.27158.josemi@redesjm.local>
In-Reply-To: <20050606124634.GC74356@zi025.glhnet.mhn.de>
References:  <200506061213.j56CD6GA080693@freefall.freebsd.org> <20050606124634.GC74356@zi025.glhnet.mhn.de>

next in thread | previous in thread | raw e-mail | index | archive | help
El Lunes, 6 de Junio de 2005 14:46, Simon Barner escribi=F3:
> Pedro,
>
> the master site seem to have moved to:
> http://home.vrweb.de/martin.lottermoser/pcl3.html
> http://home.vrweb.de/~martin.lottermoser/pcl3dist/  (*)
> <snip/>

This is the patch I tested here for weeks.  The pcl3 patch come form the=20
same source (Till), but without the text header.

The other changes are allready applied to gs-gnu (unless the minimal=20
cups-pstoraster change).

If this can be take, I'll supersede the previous PR with a new patch=20
only to cups-pstoraster. I've test this with both gnu and gpl versions=20
of gs, but can't work arround -afpl big changes.

I'll rework also the bsd.port.mk thing in another new PR, but with=20
gs-gnu as default, until we can get more feedback of gs-gpl with pcl3=20
and the pdf patches.

=2D-
  josemi

=2D-- patch-gs-gpl begins here ---
diff -Nru /home/josemi/wk/ports/print/ghostscript-gpl/Makefile=20
print/ghostscript-gpl/Makefile
=2D-- /home/josemi/wk/ports/print/ghostscript-gpl/Makefile	Sat Oct 16=20
09:28:33 2004
+++ print/ghostscript-gpl/Makefile	Mon Apr 25 11:52:27 2005
@@ -12,6 +12,7 @@
 CATEGORIES=3D	print
 MASTER_SITES=3D	${MASTER_SITE_SOURCEFORGE:S/$/:gs_srcs,bjc250/} \
 		http://www.gelhaus.net/hp880c/1.4beta/:hp8xx \
+		http://home.t-online.de/home/Martin.Lottermoser/pcl3dist/:pcl3 \
 		http://www.harsch.net/Download/:dj970 \
 		http://plaza26.mbn.or.jp/~higamasa/gdevmd2k/:md2k \
 		${MASTER_SITE_PORTS_JP:S/$/:ports_jp,ports_jp_gs/} \
@@ -29,6 +30,7 @@
 PKGNAMESUFFIX=3D	-gpl
 DISTFILES=3D	${GS_SRCS}:gs_srcs \
 		${HP8XX_SRCS}:hp8xx \
+		${PCL3_SRCS}:pcl3 \
 		${DJ970_SRCS}:dj970 \
 		${MD2K_SRCS}:md2k \
 		${ALPS_SRCS}:ports_jp_gs \
@@ -59,6 +61,9 @@
 USE_GMAKE=3D	yes
 MAKE_ENV=3D	CC=3D"${CC}" CXX=3D"${CXX}" CFLAGS_STANDARD=3D"${CFLAGS}" \
 		XCFLAGS=3D"${XCFLAGS}"
+ALL_TARGET=3D	all
+INSTALL_TARGET=3D install
+
 PLIST_SUB=3D	GS_VERSION=3D"${GS_VERSION}" \
 		CIDFONTDIR=3D${CIDFONTDIR}
=20
@@ -114,6 +119,9 @@
 GS_SRCS=3D	${DISTNAME}${EXTRACT_SUFX}
 CIDFONTDIR=3D	${PREFIX}/share/ghostscript/${GS_VERSION}/Resource
=20
+# normalize WRKSRC so things like cups-pstoraster may work
+WRKSRC=3D		${WRKDIR}/ghostscript
+
 # Additional Drivers:
=20
 # HP8XX - additional driver for HP DeskJet=20
812C/815C/832C/880C/882C/895C
@@ -121,6 +129,19 @@
 HP8XX=3D		cdj880
 HP8XX_SRCS=3D	gdevcd8.tar.gz
=20
+# PCL3 (hpdj successor now in RELEASE quality)
+# additional driver for HP PCL3 printers, by Martin Lottermoser
+# http://home.t-online.de/home/Martin.Lottermoser/pcl3.html
+ALL_TARGET+=3D	pcl3opts
+INSTALL_TARGET+=3D	pcl3-install
+PCL3=3D		pcl3
+PCL3_VERS=3D	3.3
+PCL3_NAME=3D	${PCL3}-${PCL3_VERS}
+PCL3_SRCS=3D	${PCL3_NAME}.tar.gz
+PCL3_MAN1=3D	gs-pcl3.1 pcl3opts.1
+MAN1+=3D		${PCL3_MAN1}
+
+#
 # DJ970 - additional driver for HP DeskJet 970, supports duplex=20
printing
 # http://www.harsch.net/Ghostscript/ghostscript.html
 DJ970=3D		gdevdj9
@@ -223,6 +244,8 @@
=20
 post-extract:
 	${ECHO_MSG} ">>> in post-extract ..."
+# normazile WRKSRC so things like cups-pstoraster may work
+	${LN} -sf ${WRKDIR}/${DISTNAME} ${WRKDIR}/${PORTNAME}
 # ** 3rd party driver **
 # Note: don't forget to add those devices in scripts/configure,
 # which update unix-gcc.mak to build gs with these new devices!
@@ -230,6 +253,12 @@
 # for HP8XX driver
 	${ECHO_MSG} ">>>   extracting ${HP8XX_SRCS} ..."
 	${TAR} -C ${WRKSRC}/src -xzf ${DISTDIR}/${DIST_SUBDIR}/${HP8XX_SRCS}
+# for PCL3 driver
+	${ECHO_MSG} ">>>   extracting ${PCL3_SRCS} ..."
+	${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${DIST_SUBDIR}/${PCL3_SRCS}
+	${LN} -sf ${PCL3_NAME} ${WRKSRC}/${PCL3}
+	${TAR} -C ${WRKSRC}/${PCL3_NAME} -xf \
+		${WRKSRC}/${PCL3_NAME}/${PCL3}.tar
 # for DJ970 driver
 	${ECHO_MSG} ">>>   extracting ${DJ970_SRCS} ..."
 	${CP} ${DISTDIR}/${DIST_SUBDIR}/${DJ970_SRCS} ${WRKSRC}/src
@@ -301,6 +330,10 @@
 	${ECHO_MSG} ">>>   adding ${HP8XX} driver to contrib.mak ..."
 	${CAT} ${FILESDIR}/cdj850.contrib.mak \
 		>> ${WRKSRC}/src/contrib.mak
+# for PCL3 driver
+	${ECHO_MSG} ">>>   adding ${PCL3} driver to contrib.mak ..."
+	${CAT} ${WRKSRC}/${PCL3_NAME}/src/contrib.mak-7.00.add \
+		>> ${WRKSRC}/src/contrib.mak
 # for DJ970 driver
 	${ECHO_MSG} ">>>   adding ${DJ970} driver to contrib.mak ..."
 	${CAT} ${FILESDIR}/dj970.contrib.mak \
@@ -447,6 +480,18 @@
 .else
 	${STRIP_CMD} ${PREFIX}/bin/gs
 .endif
+# for PCL3 driver, stuff which might be interesting for runtime
+	${ECHO_MSG} ">>>   creating ${PCL3} destdir ..."
+	${MKDIR} ${DATADIR}/${GS_VERSION}/${PCL3}
+	${ECHO_MSG} ">>>   installing files in ${PCL3} destdir ..."
+.for i in NEWS BUGS README lib/example.mcf lib/if-pcl3 ps/calign.ps \
+	ps/dumppdd.ps ps/levels-test.ps ps/margins-A4.ps \
+	ps/margins-A4Rotated.ps ps/margins-Env10Rotated.ps \
+	ps/margins-EnvDLRotated.ps ps/margins-Letter.ps \
+	ps/margins-LetterRotated.ps
+	${INSTALL_DATA} ${WRKSRC}/${PCL3_NAME}/${i} \
+		${DATADIR}/${GS_VERSION}/${PCL3}
+.endfor
 # for EPAG driver
 	${ECHO_MSG} ">>>   installing ${EPAG} utility in bindir ..."
 	${INSTALL_PROGRAM} ${WRKSRC}/${EPAG_NAME}/ert ${PREFIX}/bin
@@ -462,6 +507,13 @@
 .if !defined(NOPORTDOCS)
 	${ECHO_MSG} ">>> installing PORTDOC stuff ..."
 	${MKDIR} ${DOCSDIR}/${GS_VERSION}
+# for PCL3 driver
+	${ECHO_MSG} ">>>   installing ${PCL3} docs ..."
+	${MKDIR} ${DOCSDIR}/${GS_VERSION}/${PCL3}
+.for i in NEWS doc/how-to-report.txt
+	${INSTALL_DATA} ${WRKSRC}/${PCL3_NAME}/${i} \
+		${DOCSDIR}/${GS_VERSION}/${PCL3}
+.endfor
 # for MD2K driver
 	${ECHO_MSG} ">>>   installing ${MD2K} docs ..."
 	${MKDIR} ${DOCSDIR}/${GS_VERSION}/${MD2K}
diff -Nru /home/josemi/wk/ports/print/ghostscript-gpl/Makefile.inc=20
print/ghostscript-gpl/Makefile.inc
=2D-- /home/josemi/wk/ports/print/ghostscript-gpl/Makefile.inc	Sat Oct 16=20
09:28:33 2004
+++ print/ghostscript-gpl/Makefile.inc	Mon Apr 25 11:52:27 2005
@@ -1,5 +1,5 @@
 # $FreeBSD: ports/print/ghostscript-gpl/Makefile.inc,v 1.13 2004/10/16=20
07:28:33 krion Exp $
=20
 GS_VERSION=3D	8.15
=2DGS_REVISION=3D	0
+GS_REVISION=3D	1
 GS_EPOCH=3D	0
diff -Nru /home/josemi/wk/ports/print/ghostscript-gpl/distinfo=20
print/ghostscript-gpl/distinfo
=2D-- /home/josemi/wk/ports/print/ghostscript-gpl/distinfo	Sat Oct 16=20
09:28:33 2004
+++ print/ghostscript-gpl/distinfo	Mon Apr 25 11:52:27 2005
@@ -2,6 +2,8 @@
 SIZE (ghostscript/ghostscript-8.15.tar.bz2) =3D 6931694
 MD5 (ghostscript/gdevcd8.tar.gz) =3D 5ce48bff6082a023199c8ede4aae63a0
 SIZE (ghostscript/gdevcd8.tar.gz) =3D 24803
+MD5 (ghostscript/pcl3-3.3.tar.gz) =3D 34e664c2a98b847598f8441f8cac7ab6
+SIZE (ghostscript/pcl3-3.3.tar.gz) =3D 301470
 MD5 (ghostscript/gdevdj9.c.gz) =3D 3a9c20c34b79ffab434abfbcc31d1c27
 SIZE (ghostscript/gdevdj9.c.gz) =3D 20139
 MD5 (ghostscript/gdevmd2k-0.2a.tar.gz) =3D=20
5ed2b4218b8f77cb411f3d2e4509ed24
diff=20
=2DNru /home/josemi/wk/ports/print/ghostscript-gpl/files/patch-lib:gs_init.=
ps=20
print/ghostscript-gpl/files/patch-lib:gs_init.ps
=2D-- /home/josemi/wk/ports/print/ghostscript-gpl/files/patch-lib:gs_init.p=
s=09
Wed Apr  3 04:59:13 2002
+++ print/ghostscript-gpl/files/patch-lib:gs_init.ps	Mon Apr 25 11:52:27=20
2005
@@ -1,6 +1,14 @@
=2D--- lib/gs_init.ps.orig	Fri Feb  1 12:25:45 2002
=2D+++ lib/gs_init.ps	Sat Feb  9 01:42:10 2002
=2D@@ -1274,7 +1274,7 @@
+--- lib/gs_init.ps.orig	Wed Jan 26 20:32:16 2005
++++ lib/gs_init.ps	Wed Jan 26 20:31:34 2005
+@@ -140,6 +140,7 @@
+ currentdict /NOFONTPATH known   /NOFONTPATH exch def
+ currentdict /NOGC known   /NOGC exch def
+ currentdict /NOINTERPOLATE .knownget { /INTERPOLATE exch not def } if
++currentdict /NOMEDIAATTRS known /NOMEDIAATTRS exch def
+ currentdict /NOOUTERSAVE known   /NOOUTERSAVE exch def
+ currentdict /NOPAGEPROMPT known   /NOPAGEPROMPT exch def
+ currentdict /NOPAUSE known   /NOPAUSE exch def
+@@ -1420,7 +1421,7 @@
  % Set the default screen and BG/UCR.
  /.setdefaultbgucr {
    systemdict /setblackgeneration known {
@@ -9,11 +17,14 @@
    } if
  } bind def
  /.useloresscreen {	% - .useloresscreen <bool>
=2D@@ -1874,3 +1874,7 @@
=2D userdict /AGM_preserve_spots false put
+@@ -2018,6 +2019,10 @@
+ % Set up GridFitTT :
 =20
=2D % The interpreter will run the initial procedure (start).
+ /GridFitTT where {
 +
 +% unofficial patch:
 +% make it possible to print from within acroread pdf viewer
 +/Default currenthalftone /Halftone defineresource pop
+   mark /GridFitTT 2 index /GridFitTT get .dicttomark setuserparams
+   /GridFitTT undef
+ } if
diff=20
=2DNru /home/josemi/wk/ports/print/ghostscript-gpl/files/patch-lib:gs_setpd=
=2Eps=20
print/ghostscript-gpl/files/patch-lib:gs_setpd.ps
=2D-- /home/josemi/wk/ports/print/ghostscript-gpl/files/patch-lib:gs_setpd.=
ps=09
Thu Jan  1 01:00:00 1970
+++ print/ghostscript-gpl/files/patch-lib:gs_setpd.ps	Mon Apr 25=20
11:52:27 2005
@@ -0,0 +1,98 @@
+--- lib/gs_setpd.ps.orig	Tue Sep 14 00:32:19 2004
++++ lib/gs_setpd.ps	Wed Jan 26 20:31:34 2005
+@@ -377,21 +377,42 @@
+   /MediaPosition { dup //null ne { pop //null } if } bind
+ .dicttomark readonly def
+=20
+-% Define the keys used in input attribute matching.
+-/.inputattrkeys [
+-  /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet
+-	% The following are documented in Adobe's supplement for v2017.
+-  /LeadingEdge /MediaClass
+-] readonly def
+-% Define other keys used in media selection.
+-/.inputselectionkeys [
+-  /MediaPosition /Orientation
+-] readonly def
+-
+-% Define the keys used in output attribute matching.
+-/.outputattrkeys [
+-  /OutputType
+-] readonly def
++% M. Sweet, Easy Software Products:
++%
++% Define NOMEDIAATTRS to turn off the default (but unimplementable)=20
media
++% selection policies for setpagedevice.  This is used by CUPS to=20
support
++% the standard Adobe media attributes.
++NOMEDIAATTRS {
++  % Define only PageSize for input attribute matching.
++  /.inputattrkeys [
++    /PageSize
++  ] readonly def
++  % Define no other keys used in media selection.
++  /.inputselectionkeys [
++    /noInputSelectionsKeys
++  ] readonly def
++
++  % Define no keys used in output attribute matching.
++  /.outputattrkeys [
++    /noOutputAttrKeys
++  ] readonly def
++} {
++  % Define the keys used in input attribute matching.
++  /.inputattrkeys [
++    /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet
++	  % The following are documented in Adobe's supplement for v2017.
++    /LeadingEdge /MediaClass
++  ] readonly def
++  % Define other keys used in media selection.
++  /.inputselectionkeys [
++    /MediaPosition /Orientation
++  ] readonly def
++
++  % Define the keys used in output attribute matching.
++  /.outputattrkeys [
++    /OutputType
++  ] readonly def
++} ifelse
+=20
+ % Define all the parameters that should always be copied to the merged
+ % dictionary.
+@@ -420,7 +441,13 @@
+   /PageSize //false		% obsolete alias for .MediaSize
+   /InputAttributes //false
+   .inputattrkeys
+-    { dup /PageSize eq
++    % M. Sweet, Easy Software Products:
++    %
++    % Treat LeadingEdge like PageSize so that a common Ghostscript=20
driver
++    % doesn't need the NOMEDIAATTRS definition.
++    %
++    % { dup /PageSize eq
++    { dup dup /PageSize eq exch /LeadingEdge eq or
+        { pop }
+        { { 2 index /InputAttributes .knownget { //null eq } { //true }=20
ifelse } }
+       ifelse
+@@ -501,11 +528,22 @@
+ % They are expected to consume the top 2 operands.
+ % NOTE: we currently treat all values other than 0, 1, or 7 (for=20
PageSize)
+ % the same as 0, i.e., we signal an error.
++%
++% M. Sweet, Easy Software Products:
++%
++% Define NOMEDIAATTRS to turn off the default (but unimplementable)=20
media
++% selection policies for setpagedevice.  This is used by CUPS to=20
support
++% the standard Adobe media attributes.
+   0 {		% Set errorinfo and signal a configurationerror.
++      NOMEDIAATTRS {
++        % NOMEDIAATTRS means that the default policy is 7...
++        pop 2 index exch 7 put
++      } {
+ 	pop dup 4 index exch get 2 array astore
+ 	$error /errorinfo 3 -1 roll put
+ 	cleartomark
+ 	/setpagedevice load /configurationerror signalerror
++      } ifelse
+   } bind
+   1 {		% Roll back the failed request to its previous status.
+ SETPDDEBUG { (Rolling back.) =3D pstack flush } if
diff=20
=2DNru /home/josemi/wk/ports/print/ghostscript-gpl/files/patch-pcl3:eprn:ep=
rnrend.c=20
print/ghostscript-gpl/files/patch-pcl3:eprn:eprnrend.c
=2D-- /home/josemi/wk/ports/print/ghostscript-gpl/files/patch-pcl3:eprn:epr=
nrend.c=09
Thu Jan  1 01:00:00 1970
+++ print/ghostscript-gpl/files/patch-pcl3:eprn:eprnrend.c	Mon Apr 25=20
11:52:27 2005
@@ -0,0 +1,170 @@
+--- pcl3/eprn/eprnrend.c.orig	Wed Aug  1 07:12:56 2001
++++ pcl3/eprn/eprnrend.c	Sun Mar 20 15:36:38 2005
+@@ -161,8 +161,10 @@
+=20
***************************************************************************=
***/
+=20
+ gx_color_index eprn_map_rgb_color_for_RGB(gx_device *device,
+-  gx_color_value red, gx_color_value green, gx_color_value blue)
++  const gx_color_value cv[])
+ {
++  gx_color_value red, green, blue;
++  red =3D cv[0]; green =3D cv[1]; blue =3D cv[2];
+   static const gx_color_value half =3D gx_max_color_value/2;
+   gx_color_index value =3D 0;
+   const eprn_Device *dev =3D (eprn_Device *)device;
+@@ -197,8 +199,10 @@
+=20
***************************************************************************=
***/
+=20
+ gx_color_index eprn_map_rgb_color_for_CMY_or_K(gx_device *device,
+-  gx_color_value red, gx_color_value green, gx_color_value blue)
++  const gx_color_value cv[])
+ {
++  gx_color_value red, green, blue;
++  red =3D cv[0]; green =3D cv[1]; blue =3D cv[2];
+   static const gx_color_value half =3D gx_max_color_value/2;
+   gx_color_index value =3D (CYAN_BIT | MAGENTA_BIT | YELLOW_BIT);
+   const eprn_Device *dev =3D (eprn_Device *)device;
+@@ -240,8 +244,10 @@
+=20
***************************************************************************=
***/
+=20
+ gx_color_index eprn_map_rgb_color_for_RGB_flex(gx_device *device,
+-  gx_color_value red, gx_color_value green, gx_color_value blue)
++  const gx_color_value cv[])
+ {
++  gx_color_value red, green, blue;
++  red =3D cv[0]; green =3D cv[1]; blue =3D cv[2];
+   gx_color_index value =3D 0;
+   gx_color_value step;
+   unsigned int level;
+@@ -284,8 +290,10 @@
+=20
***************************************************************************=
***/
+=20
+ gx_color_index eprn_map_rgb_color_for_CMY_or_K_flex(gx_device *device,
+-  gx_color_value red, gx_color_value green, gx_color_value blue)
++  const gx_color_value cv[])
+ {
++  gx_color_value red, green, blue;
++  red =3D cv[0]; green =3D cv[1]; blue =3D cv[2];
+   const eprn_Device *dev =3D (eprn_Device *)device;
+=20
+ #ifdef EPRN_TRACE
+@@ -298,11 +306,18 @@
+   /* Treat pure grey levels differently if we have black. This implies=20
that for
+      CMY+K only "true" grey shades will be printed with black ink, all=20
others
+      will be mixed from CMY. */
+-  if (dev->eprn.colour_model !=3D eprn_DeviceCMY && red =3D=3D green &&=20
green =3D=3D blue)
+-    return eprn_map_cmyk_color_flex(device, 0, 0, 0,=20
gx_max_color_value - red);
++  gx_color_value tmpcv[4];
++  if (dev->eprn.colour_model !=3D eprn_DeviceCMY && red =3D=3D green &&=20
green =3D=3D blue) {
++    tmpcv[0] =3D 0; tmpcv[1] =3D 0; tmpcv[2] =3D 0;
++    tmpcv[3] =3D gx_max_color_value - red;
++    return eprn_map_cmyk_color_flex(device, tmpcv);
+=20
+-  return eprn_map_cmyk_color_flex(device, gx_max_color_value - red,
+-    gx_max_color_value - green, gx_max_color_value - blue, 0);
++  }
++  tmpcv[0] =3D gx_max_color_value - red;=20
++  tmpcv[1] =3D gx_max_color_value - green;=20
++  tmpcv[2] =3D gx_max_color_value - blue;=20
++  tmpcv[3] =3D 0;
++  return eprn_map_cmyk_color_flex(device, tmpcv);
+ }
+=20
+ /************************************************************************=
******
+@@ -315,8 +330,10 @@
+=20
***************************************************************************=
***/
+=20
+ gx_color_index eprn_map_rgb_color_for_RGB_max(gx_device *device,
+-  gx_color_value red, gx_color_value green, gx_color_value blue)
++  const gx_color_value cv[])
+ {
++  gx_color_value red, green, blue;
++  red =3D cv[0]; green =3D cv[1]; blue =3D cv[2];
+   gx_color_index value;
+=20
+ #ifdef EPRN_TRACE
+@@ -345,8 +362,10 @@
+=20
***************************************************************************=
***/
+=20
+ gx_color_index eprn_map_rgb_color_for_CMY_or_K_max(gx_device *device,
+-  gx_color_value red, gx_color_value green, gx_color_value blue)
++  const gx_color_value cv[])
+ {
++  gx_color_value red, green, blue;
++  red =3D cv[0]; green =3D cv[1]; blue =3D cv[2];
+   const eprn_Device *dev =3D (eprn_Device *)device;
+=20
+ #ifdef EPRN_TRACE
+@@ -356,13 +375,19 @@
+     red, green, blue);
+ #endif
+=20
+-  if (dev->eprn.colour_model =3D=3D eprn_DeviceGray)
+-    return eprn_map_cmyk_color_max(device, 0, 0, 0, gx_max_color_value=20
=2D red);
+-
++  gx_color_value tmpcv[4];
++  if (dev->eprn.colour_model =3D=3D eprn_DeviceGray) {
++    tmpcv[0] =3D 0; tmpcv[1] =3D 0; tmpcv[2] =3D 0;
++    tmpcv[3] =3D gx_max_color_value - red;
++    return eprn_map_cmyk_color_max(device, tmpcv);
++  }
+   /* Note that the conversion from composite black to true black for=20
CMY+K can
+      only happen at the output pixel level, not here. */
+-  return eprn_map_cmyk_color_max(device, gx_max_color_value - red,
+-    gx_max_color_value - green, gx_max_color_value - blue, 0);
++  tmpcv[0] =3D gx_max_color_value - red;=20
++  tmpcv[1] =3D gx_max_color_value - green;=20
++  tmpcv[2] =3D gx_max_color_value - blue;=20
++  tmpcv[3] =3D 0;
++  return eprn_map_cmyk_color_max(device, tmpcv);
+ }
+=20
+ /************************************************************************=
******
+@@ -389,7 +414,7 @@
+=20
***************************************************************************=
***/
+=20
+ int eprn_map_color_rgb(gx_device *device, gx_color_index color,
+-  gx_color_value rgb[3])
++  gx_color_value rgb[])
+ {
+ #ifdef EPRN_TRACE
+   if_debug1(EPRN_TRACE_CHAR,
+@@ -415,9 +440,10 @@
+=20
***************************************************************************=
***/
+=20
+ gx_color_index eprn_map_cmyk_color(gx_device *device,
+-  gx_color_value cyan, gx_color_value magenta, gx_color_value yellow,
+-  gx_color_value black)
++  const gx_color_value cv[])
+ {
++  gx_color_value cyan, magenta, yellow, black;
++  cyan =3D cv[0]; magenta =3D cv[1]; yellow =3D cv[2]; black =3D cv[3];
+   gx_color_index value =3D 0;
+   static const gx_color_value threshold =3D gx_max_color_value/2;
+=20
+@@ -449,9 +475,10 @@
+=20
***************************************************************************=
***/
+=20
+ gx_color_index eprn_map_cmyk_color_flex(gx_device *device,
+-  gx_color_value cyan, gx_color_value magenta, gx_color_value yellow,
+-  gx_color_value black)
++  const gx_color_value cv[])
+ {
++  gx_color_value cyan, magenta, yellow, black;
++  cyan =3D cv[0]; magenta =3D cv[1]; yellow =3D cv[2]; black =3D cv[3];
+   gx_color_index value =3D 0;
+   gx_color_value step;
+   unsigned int level;
+@@ -530,9 +557,10 @@
+=20
***************************************************************************=
***/
+=20
+ gx_color_index eprn_map_cmyk_color_max(gx_device *device,
+-  gx_color_value cyan, gx_color_value magenta, gx_color_value yellow,
+-  gx_color_value black)
++  const gx_color_value cv[])
+ {
++  gx_color_value cyan, magenta, yellow, black;
++  cyan =3D cv[0]; magenta =3D cv[1]; yellow =3D cv[2]; black =3D cv[3];
+   gx_color_index value;
+=20
+ #ifdef EPRN_TRACE
diff -Nru /home/josemi/wk/ports/print/ghostscript-gpl/pkg-descr=20
print/ghostscript-gpl/pkg-descr
=2D-- /home/josemi/wk/ports/print/ghostscript-gpl/pkg-descr	Sat Oct 16=20
09:28:33 2004
+++ print/ghostscript-gpl/pkg-descr	Mon Apr 25 11:52:27 2005
@@ -7,6 +7,8 @@
 under certain conditions (including, in some cases, commercial=20
distribution).
=20
 This port includes add-on packages (not part of the official gs=20
release)
+	o PCL driver for HP DeskJet printers
+	  - http://home.t-online.de/home/Martin.Lottermoser/pcl3.html
 	o HP2200 driver for HP DeskJet 8xx and Business Inkjet 2200
 	  - http://hp.sourceforge.net/gs-hp2200.php
 	o DJ970 driver for HP DeskJet 970CXi
diff -Nru /home/josemi/wk/ports/print/ghostscript-gpl/pkg-plist=20
print/ghostscript-gpl/pkg-plist
=2D-- /home/josemi/wk/ports/print/ghostscript-gpl/pkg-plist	Sat Oct 16=20
09:28:33 2004
+++ print/ghostscript-gpl/pkg-plist	Mon Jun  6 15:27:11 2005
@@ -15,6 +15,7 @@
 bin/gsnd
 %%SHLIB%%bin/gsx
 bin/lprsetup.sh
+bin/pcl3opts
 bin/pdf2dsc
 bin/pdf2ps
 bin/pdfopt
@@ -53,6 +54,8 @@
 %%PORTDOCS%%%%DOCSDIR%%/%%GS_VERSION%%/mjc/README.mje
 %%PORTDOCS%%%%DOCSDIR%%/%%GS_VERSION%%/mjc/README.noz
 %%PORTDOCS%%%%DOCSDIR%%/%%GS_VERSION%%/mjc/cpem.doc
+%%PORTDOCS%%%%DOCSDIR%%/%%GS_VERSION%%/pcl3/NEWS
+%%PORTDOCS%%%%DOCSDIR%%/%%GS_VERSION%%/pcl3/how-to-report.txt
 %%DATADIR%%/%%GS_VERSION%%/Resource/CMap/78-EUC-H
 %%DATADIR%%/%%GS_VERSION%%/Resource/CMap/78-EUC-V
 %%DATADIR%%/%%GS_VERSION%%/Resource/CMap/78-H
@@ -238,6 +241,8 @@
 %%DATADIR%%/%%GS_VERSION%%/doc/Use.htm
 %%DATADIR%%/%%GS_VERSION%%/doc/Xfonts.htm
 %%DATADIR%%/%%GS_VERSION%%/doc/gs.css
+%%DATADIR%%/%%GS_VERSION%%/doc/gs-pcl3.html
+%%DATADIR%%/%%GS_VERSION%%/doc/pcl3opts.html
 %%DATADIR%%/%%GS_VERSION%%/doc/index.html
 %%DATADIR%%/%%GS_VERSION%%/examples/alphabet.ps
 %%DATADIR%%/%%GS_VERSION%%/examples/chess.ps
@@ -481,6 +486,21 @@
 %%DATADIR%%/%%GS_VERSION%%/lib/wrfont.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/xlatmap
 %%DATADIR%%/%%GS_VERSION%%/lib/zeroline.ps
+%%DATADIR%%/%%GS_VERSION%%/pcl3/BUGS
+%%DATADIR%%/%%GS_VERSION%%/pcl3/NEWS
+%%DATADIR%%/%%GS_VERSION%%/pcl3/README
+%%DATADIR%%/%%GS_VERSION%%/pcl3/calign.ps
+%%DATADIR%%/%%GS_VERSION%%/pcl3/dumppdd.ps
+%%DATADIR%%/%%GS_VERSION%%/pcl3/example.mcf
+%%DATADIR%%/%%GS_VERSION%%/pcl3/if-pcl3
+%%DATADIR%%/%%GS_VERSION%%/pcl3/levels-test.ps
+%%DATADIR%%/%%GS_VERSION%%/pcl3/margins-A4.ps
+%%DATADIR%%/%%GS_VERSION%%/pcl3/margins-A4Rotated.ps
+%%DATADIR%%/%%GS_VERSION%%/pcl3/margins-Env10Rotated.ps
+%%DATADIR%%/%%GS_VERSION%%/pcl3/margins-EnvDLRotated.ps
+%%DATADIR%%/%%GS_VERSION%%/pcl3/margins-Letter.ps
+%%DATADIR%%/%%GS_VERSION%%/pcl3/margins-LetterRotated.ps
+@dirrm %%DATADIR%%/%%GS_VERSION%%/pcl3
 @exec ln -s -f %D/share/fonts/CIDFont %%CIDFONTDIR%%/CIDFont
 @unexec rm -f %%CIDFONTDIR%%/CIDFont
 @dirrm %%DATADIR%%/%%GS_VERSION%%/lib
@@ -492,6 +512,7 @@
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource
 @unexec rmdir %D/%%DATADIR%%/%%GS_VERSION%% 2>/dev/null || true
 @unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/%%GS_VERSION%%/pcl3
 %%PORTDOCS%%@dirrm %%DOCSDIR%%/%%GS_VERSION%%/mjc
 %%PORTDOCS%%@dirrm %%DOCSDIR%%/%%GS_VERSION%%/md2k
 %%PORTDOCS%%@dirrm %%DOCSDIR%%/%%GS_VERSION%%/lxm3200
diff -Nru /home/josemi/wk/ports/print/ghostscript-gpl/scripts/configure=20
print/ghostscript-gpl/scripts/configure
=2D-- /home/josemi/wk/ports/print/ghostscript-gpl/scripts/configure	Mon=20
Nov 22 17:27:50 2004
+++ print/ghostscript-gpl/scripts/configure	Mon Apr 25 11:52:27 2005
@@ -50,6 +50,7 @@
 		laserjet ljetplus ljet2p ljet3 ljet3d ljet4 ljet4d lj4dith \
 		cljet5 cljet5c cljet5pr lj5mono lj5gray \
 		pj pjetxl pjxl paintjet \
+		pcl3 \
 		pjxl300 pxlmono pxlcolor \
 		ijs ibmpro jetp3852 imagen fs600 lxm5700m \
 		lxm3200 lx5000 lex2050 lex3200 lex5700 lex7000 \
@@ -240,6 +241,7 @@
   "pjxl"     "HP PaintJet XL color printer" "$status_pjxl" \
   "paintjet" "HP PaintJet color printer (alternate)" "$status_paintjet"=20
\
   "pjxl300"  "HP PaintJet XL300, DeskJet 1200C color printer, HP=20
CopyJet" "$status_pjxl300" \
+  "pcl3"     "HP PCL 3 (generic) [PCL3]" "$status_pcl3" \
   "pxlmono"  "HP PCL XL black-and-white printers (LaserJet 5 and 6=20
family)" "$status_pxlmono" \
   "pxlcolor" "HP PCL XL color printers (Color LaserJet 4500/5000)"=20
"$status_pxlcolor" \
   "ijs"      "HP Inkjet and other raster devices" "$status_ijs" \
=2D-- patch-gs-gpl ends here ---

=2D-- patch-gs-gnu begins here ---
diff -Nru /home/josemi/wk/ports/print/ghostscript-gnu/Makefile=20
print/ghostscript-gnu/Makefile
=2D-- /home/josemi/wk/ports/print/ghostscript-gnu/Makefile	Mon Jan 24=20
21:21:14 2005
+++ print/ghostscript-gnu/Makefile	Mon Apr 25 11:52:27 2005
@@ -114,6 +114,9 @@
=20
 GS_SRCS=3D	${DISTNAME}${EXTRACT_SUFX}
=20
+# normalize WRKSRC so things like cups-pstoraster may work
+WRKSRC=3D		${WRKDIR}/ghostscript
+
 # Additional Drivers:
=20
 # HP8XX - additional driver for HP DeskJet=20
812C/815C/832C/880C/882C/895C
@@ -263,6 +266,8 @@
=20
 post-extract:
 	${ECHO_MSG} ">>> in post-extract ..."
+# normazile WRKSRC so things like cups-pstoraster may work
+	${LN} -sf ${WRKDIR}/${DISTNAME} ${WRKDIR}/${PORTNAME}
 # ** 3rd party driver **
 # Note: don't forget to add those devices in scripts/configure,
 # which update unix-gcc.mak to build gs with these new devices!
=2D-- patch-gs-gnu ends here ---



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506061543.27158.josemi>