Date: Thu, 27 Jan 2005 12:06:51 +0100 From: Jose M Rodriguez <josemi@freebsd.jazztel.es> To: freebsd-ports-bugs@freebsd.org, KATO Tsuguru <tkato432@yahoo.com> Subject: Re: ports/76731: [PATCH] make cups-pstoraster GHOSTSCRIPT_PORT aware Message-ID: <200501271206.51309.josemi@freebsd.jazztel.es> In-Reply-To: <200501271020.j0RAK4gI044945@freefall.freebsd.org> References: <200501271020.j0RAK4gI044945@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
El Jueves, 27 de Enero de 2005 11:20, KATO Tsuguru escribi=F3: > The following reply was made to PR ports/76731; it has been noted by GNAT= S. > > From: KATO Tsuguru <tkato432@yahoo.com> > To: FreeBSD-gnats-submit@FreeBSD.org > Cc: > Subject: Re: ports/76731: [PATCH] make cups-pstoraster GHOSTSCRIPT_PORT > aware > Date: Thu, 27 Jan 2005 19:12:16 +0900 > > Though looks pretty good in general, there are a few things > to repair. > > Here is a reworked patchset. > Yes, seems patches against gs-gpl and gs-afpl are messed up. Those are what I'm using =2D-- patch-ghostscript-gpl begins here --- diff -Nru /usr/HEAD/ports/print/ghostscript-gpl/Makefile=20 print/ghostscript-gpl/Makefile =2D-- /usr/HEAD/ports/print/ghostscript-gpl/Makefile Sat Oct 16 09:28:33 20= 04 +++ print/ghostscript-gpl/Makefile Wed Jan 26 22:42:06 2005 @@ -114,6 +114,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 812C/815C/832C/880C/882C/895C @@ -223,6 +226,8 @@ =20 post-extract: ${ECHO_MSG} ">>> in post-extract ..." +# normazile WRKSRC so things like cups-pstoraster may work + ${MV} ${WRKDIR}/${DISTNAME} ${WRKDIR}/ghostscript # ** 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! diff -Nru /usr/HEAD/ports/print/ghostscript-gpl/Makefile.inc=20 print/ghostscript-gpl/Makefile.inc =2D-- /usr/HEAD/ports/print/ghostscript-gpl/Makefile.inc Sat Oct 16 09:28:3= 3=20 2004 +++ print/ghostscript-gpl/Makefile.inc Wed Jan 26 20:47:40 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 /usr/HEAD/ports/print/ghostscript-gpl/files/patch-lib:gs_init.ps= =20 print/ghostscript-gpl/files/patch-lib:gs_init.ps =2D-- /usr/HEAD/ports/print/ghostscript-gpl/files/patch-lib:gs_init.ps Wed = Apr =20 3 04:59:13 2002 +++ print/ghostscript-gpl/files/patch-lib:gs_init.ps Wed Jan 26 20:34:51 20= 05 @@ -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 -Nru /usr/HEAD/ports/print/ghostscript-gpl/files/patch-lib:gs_setpd.ps= =20 print/ghostscript-gpl/files/patch-lib:gs_setpd.ps =2D-- /usr/HEAD/ports/print/ghostscript-gpl/files/patch-lib:gs_setpd.ps Thu= Jan =20 1 01:00:00 1970 +++ print/ghostscript-gpl/files/patch-lib:gs_setpd.ps Wed Jan 26 20:35:50 2= 005 @@ -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) media ++% selection policies for setpagedevice. This is used by CUPS to 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 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 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) media ++% selection policies for setpagedevice. This is used by CUPS to 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 =2D-- patch-ghostscript-gpl ends here --- =2D-- patch-ghostscript-afpl begins here --- diff -Nru /usr/HEAD/ports/print/ghostscript-afpl/Makefile=20 print/ghostscript-afpl/Makefile =2D-- /usr/HEAD/ports/print/ghostscript-afpl/Makefile Sun Jan 2 14:55:03 2= 005 +++ print/ghostscript-afpl/Makefile Thu Jan 27 00:33:58 2005 @@ -116,6 +116,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 812C/815C/832C/880C/882C/895C @@ -227,6 +230,8 @@ =20 post-extract: ${ECHO_MSG} ">>> in post-extract ..." +# normazile WRKSRC so things like cups-pstoraster may work + ${MV} ${WRKDIR}/${DISTNAME} ${WRKDIR}/ghostscript # ** 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! diff -Nru /usr/HEAD/ports/print/ghostscript-afpl/Makefile.inc=20 print/ghostscript-afpl/Makefile.inc =2D-- /usr/HEAD/ports/print/ghostscript-afpl/Makefile.inc Sun Jan 2 14:55:= 03=20 2005 +++ print/ghostscript-afpl/Makefile.inc Thu Jan 27 00:34:12 2005 @@ -1,5 +1,5 @@ # $FreeBSD: ports/print/ghostscript-afpl/Makefile.inc,v 1.15 2004/12/31=20 13:32:24 krion Exp $ =20 GS_VERSION=3D 8.50 =2DGS_REVISION=3D 0 +GS_REVISION=3D 1 GS_EPOCH=3D 1 diff -Nru /usr/HEAD/ports/print/ghostscript-afpl/files/patch-lib:gs_init.ps= =20 print/ghostscript-afpl/files/patch-lib:gs_init.ps =2D-- /usr/HEAD/ports/print/ghostscript-afpl/files/patch-lib:gs_init.ps Wed= Apr =20 3 04:59:13 2002 +++ print/ghostscript-afpl/files/patch-lib:gs_init.ps Thu Jan 27 00:34:35 2= 005 @@ -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:44:07 2005 ++++ lib/gs_init.ps Wed Jan 26 20:43:38 2005 +@@ -145,6 +145,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 +@@ -1425,7 +1426,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 +@@ -2023,6 +2024,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 -Nru /usr/HEAD/ports/print/ghostscript-afpl/files/patch-lib:gs_setpd.p= s=20 print/ghostscript-afpl/files/patch-lib:gs_setpd.ps =2D-- /usr/HEAD/ports/print/ghostscript-afpl/files/patch-lib:gs_setpd.ps Th= u Jan =20 1 01:00:00 1970 +++ print/ghostscript-afpl/files/patch-lib:gs_setpd.ps Thu Jan 27 00:34:41= =20 2005 @@ -0,0 +1,98 @@ +--- lib/gs_setpd.ps.orig Tue Sep 14 00:33:15 2004 ++++ lib/gs_setpd.ps Wed Jan 26 20:43:38 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) media ++% selection policies for setpagedevice. This is used by CUPS to 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 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 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) media ++% selection policies for setpagedevice. This is used by CUPS to 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 =2D-- patch-ghostscript-afpl ends here ---
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501271206.51309.josemi>