ports/76731: [PATCH] make cups-pstoraster GHOSTSCRIPT_PORT aware

Jose M Rodriguez josemi at freebsd.jazztel.es
Thu Jan 27 11:06:48 UTC 2005


El Jueves, 27 de Enero de 2005 11:20, KATO Tsuguru escribió:
> The following reply was made to PR ports/76731; it has been noted by GNATS.
>
> From: KATO Tsuguru <tkato432 at yahoo.com>
> To: FreeBSD-gnats-submit at 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

--- patch-ghostscript-gpl begins here ---
diff -Nru /usr/HEAD/ports/print/ghostscript-gpl/Makefile 
print/ghostscript-gpl/Makefile
--- /usr/HEAD/ports/print/ghostscript-gpl/Makefile	Sat Oct 16 09:28:33 2004
+++ print/ghostscript-gpl/Makefile	Wed Jan 26 22:42:06 2005
@@ -114,6 +114,9 @@
 GS_SRCS=	${DISTNAME}${EXTRACT_SUFX}
 CIDFONTDIR=	${PREFIX}/share/ghostscript/${GS_VERSION}/Resource
 
+# normalize WRKSRC so things like cups-pstoraster may work
+WRKSRC=		${WRKDIR}/ghostscript
+
 # Additional Drivers:
 
 # HP8XX - additional driver for HP DeskJet 812C/815C/832C/880C/882C/895C
@@ -223,6 +226,8 @@
 
 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 
print/ghostscript-gpl/Makefile.inc
--- /usr/HEAD/ports/print/ghostscript-gpl/Makefile.inc	Sat Oct 16 09:28:33 
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 
07:28:33 krion Exp $
 
 GS_VERSION=	8.15
-GS_REVISION=	0
+GS_REVISION=	1
 GS_EPOCH=	0
diff -Nru /usr/HEAD/ports/print/ghostscript-gpl/files/patch-lib:gs_init.ps 
print/ghostscript-gpl/files/patch-lib:gs_init.ps
--- /usr/HEAD/ports/print/ghostscript-gpl/files/patch-lib:gs_init.ps	Wed Apr  
3 04:59:13 2002
+++ print/ghostscript-gpl/files/patch-lib:gs_init.ps	Wed Jan 26 20:34:51 2005
@@ -1,6 +1,14 @@
---- lib/gs_init.ps.orig	Fri Feb  1 12:25:45 2002
-+++ lib/gs_init.ps	Sat Feb  9 01:42:10 2002
-@@ -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>
-@@ -1874,3 +1874,7 @@
- userdict /AGM_preserve_spots false put
+@@ -2018,6 +2019,10 @@
+ % Set up GridFitTT :
  
- % 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 
print/ghostscript-gpl/files/patch-lib:gs_setpd.ps
--- /usr/HEAD/ports/print/ghostscript-gpl/files/patch-lib:gs_setpd.ps	Thu Jan  
1 01:00:00 1970
+++ print/ghostscript-gpl/files/patch-lib:gs_setpd.ps	Wed Jan 26 20:35:50 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
+ 
+-% 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
+ 
+ % 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 } 
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.) = pstack flush } if
--- patch-ghostscript-gpl ends here ---

--- patch-ghostscript-afpl begins here ---
diff -Nru /usr/HEAD/ports/print/ghostscript-afpl/Makefile 
print/ghostscript-afpl/Makefile
--- /usr/HEAD/ports/print/ghostscript-afpl/Makefile	Sun Jan  2 14:55:03 2005
+++ print/ghostscript-afpl/Makefile	Thu Jan 27 00:33:58 2005
@@ -116,6 +116,9 @@
 GS_SRCS=	${DISTNAME}${EXTRACT_SUFX}
 CIDFONTDIR=	${PREFIX}/share/ghostscript/${GS_VERSION}/Resource
 
+# normalize WRKSRC so things like cups-pstoraster may work
+WRKSRC=		${WRKDIR}/ghostscript
+
 # Additional Drivers:
 
 # HP8XX - additional driver for HP DeskJet 812C/815C/832C/880C/882C/895C
@@ -227,6 +230,8 @@
 
 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 
print/ghostscript-afpl/Makefile.inc
--- /usr/HEAD/ports/print/ghostscript-afpl/Makefile.inc	Sun Jan  2 14:55:03 
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 
13:32:24 krion Exp $
 
 GS_VERSION=	8.50
-GS_REVISION=	0
+GS_REVISION=	1
 GS_EPOCH=	1
diff -Nru /usr/HEAD/ports/print/ghostscript-afpl/files/patch-lib:gs_init.ps 
print/ghostscript-afpl/files/patch-lib:gs_init.ps
--- /usr/HEAD/ports/print/ghostscript-afpl/files/patch-lib:gs_init.ps	Wed Apr  
3 04:59:13 2002
+++ print/ghostscript-afpl/files/patch-lib:gs_init.ps	Thu Jan 27 00:34:35 2005
@@ -1,6 +1,14 @@
---- lib/gs_init.ps.orig	Fri Feb  1 12:25:45 2002
-+++ lib/gs_init.ps	Sat Feb  9 01:42:10 2002
-@@ -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>
-@@ -1874,3 +1874,7 @@
- userdict /AGM_preserve_spots false put
+@@ -2023,6 +2024,10 @@
+ % Set up GridFitTT :
  
- % 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.ps 
print/ghostscript-afpl/files/patch-lib:gs_setpd.ps
--- /usr/HEAD/ports/print/ghostscript-afpl/files/patch-lib:gs_setpd.ps	Thu Jan  
1 01:00:00 1970
+++ print/ghostscript-afpl/files/patch-lib:gs_setpd.ps	Thu Jan 27 00:34:41 
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
+ 
+-% 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
+ 
+ % 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 } 
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.) = pstack flush } if
--- patch-ghostscript-afpl ends here ---



More information about the freebsd-ports-bugs mailing list