ports/76731: [PATCH] make cups-pstoraster GHOSTSCRIPT_PORT aware
KATO Tsuguru
tkato432 at yahoo.com
Thu Jan 27 10:20:05 UTC 2005
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.
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# print_cups-pstoraster.diff
# print_ghostscript-afpl.diff
# print_ghostscript-gnu.diff
# print_ghostscript-gpl.diff
#
echo x - print_cups-pstoraster.diff
sed 's/^X//' >print_cups-pstoraster.diff << 'END-of-print_cups-pstoraster.diff'
Xdiff -urN /usr/ports/print/cups-pstoraster/Makefile print/cups-pstoraster/Makefile
X--- /usr/ports/print/cups-pstoraster/Makefile Fri Dec 17 13:57:42 2004
X+++ print/cups-pstoraster/Makefile Thu Jan 27 19:05:36 2005
X@@ -6,27 +6,26 @@
X #
X
X PORTNAME= cups-pstoraster
X-PORTVERSION= 7.07
X-PORTREVISION= 3
X+PORTVERSION= ${CUPS_PORTVER}
X+PORTREVISION= ${CUPS_PORTREV}
X+PORTEPOCH= 1
X CATEGORIES= print
X-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
X- ftp://ftp.easysw.com/pub/ghostscript/
X-MASTER_SITE_SUBDIR= ghostscript espgs
X-DISTFILES= ghostscript-${PORTVERSION}${EXTRACT_SUFX} \
X- espgs-${ESPGS_VER}-source${EXTRACT_SUFX}
X-DIST_SUBDIR= ghostscript
X+MASTER_SITES= ${CUPS_MASTER_SITES}
X
X MAINTAINER= ports at FreeBSD.org
X-COMMENT= GNU Postscript interpreter for CUPS printing to non-PS printers
X+COMMENT= Postscript interpreter for CUPS printing to non-PS printers
X
X+PATCH_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/${GHOSTSCRIPT_PORT}:patch
X LIB_DEPENDS= cups.2:${PORTSDIR}/print/cups-base
X-RUN_DEPENDS= ${LOCALBASE}/share/ghostscript/${PORTVERSION}/lib/gs_init.ps:${PORTSDIR}/print/ghostscript-gnu
X
X-ESPGS_VER= 7.07.1
X-ESPGS_WRKSRC= ${WRKDIR}/espgs-${ESPGS_VER}/pstoraster
X-WRKSRC= ${WRKDIR}/ghostscript-${PORTVERSION}
X+EXTRACT_AFTER_ARGS= | ${TAR} -xf - cups-${CUPS_VERSION}/pstoraster
X+
X+MD5_FILE= ${.CURDIR}/../../print/cups/distinfo
X+ESPGS_WRKSRC= ${WRKDIR}/cups-${CUPS_VERSION}/pstoraster
X+WRKSRC= ${WRKDIRPREFIX}${PORTSDIR}/${GHOSTSCRIPT_PORT}/work/ghostscript
X
X USE_BZIP2= yes
X+USE_GHOTSCRIPT_RUN= yes
X USE_REINPLACE= yes
X USE_GMAKE= yes
X GNU_CONFIGURE= yes
X@@ -71,5 +70,12 @@
X .endfor
X
X .include "${.CURDIR}/../../print/cups/Makefile.common"
X+
X+.if ${CUPS_REVISION} < 1
X+DISTNAME= cups-${CUPS_VERSION}-source
X+.else
X+DISTNAME= cups-${CUPS_VERSION}-${CUPS_REVISION}-source
X+.endif
X+
X .include <bsd.port.pre.mk>
X .include <bsd.port.post.mk>
Xdiff -urN /usr/ports/print/cups-pstoraster/distinfo print/cups-pstoraster/distinfo
X--- /usr/ports/print/cups-pstoraster/distinfo Mon Nov 15 14:25:11 2004
X+++ print/cups-pstoraster/distinfo Thu Jan 1 09:00:00 1970
X@@ -1,4 +0,0 @@
X-MD5 (ghostscript/ghostscript-7.07.tar.bz2) = 85fd16cdc8232e5e3679a3a7e30a3359
X-SIZE (ghostscript/ghostscript-7.07.tar.bz2) = 4138372
X-MD5 (ghostscript/espgs-7.07.1-source.tar.bz2) = d30bf5c09f2c7caa8291f6305cf03044
X-SIZE (ghostscript/espgs-7.07.1-source.tar.bz2) = 5400198
Xdiff -urN /usr/ports/print/cups-pstoraster/files/patch-src:genarch.c print/cups-pstoraster/files/patch-src:genarch.c
X--- /usr/ports/print/cups-pstoraster/files/patch-src:genarch.c Thu Jul 25 12:00:17 2002
X+++ print/cups-pstoraster/files/patch-src:genarch.c Thu Jan 1 09:00:00 1970
X@@ -1,34 +0,0 @@
X---- src/genarch.c.orig Tue Jun 5 15:38:57 2001
X-+++ src/genarch.c Wed Jun 20 04:17:42 2001
X-@@ -41,6 +41,7 @@
X- fprintf(f, "\n\t /* ---------------- %s ---------------- */\n\n", str);
X- }
X-
X-+#ifndef __FreeBSD__
X- private clock_t
X- time_clear(char *buf, int bsize, int nreps)
X- {
X-@@ -51,6 +52,7 @@
X- memset(buf, 0, bsize);
X- return clock() - t;
X- }
X-+#endif /* __FreeBSD__ */
X-
X- private void
X- define(FILE *f, const char *str)
X-@@ -181,6 +183,7 @@
X- fprintf(f, "((unsigned long)~0L + (unsigned long)0)\n");
X- #undef PRINT_MAX
X-
X-+#ifndef __FreeBSD__
X- section(f, "Cache sizes");
X-
X- /*
X-@@ -241,6 +244,7 @@
X- }
X- define_int(f, "ARCH_CACHE2_SIZE", bsize >> 1);
X- }
X-+#endif /* __FreeBSD__ */
X-
X- section(f, "Miscellaneous");
X-
Xdiff -urN /usr/ports/print/cups-pstoraster/files/patch-src:gxobj.h print/cups-pstoraster/files/patch-src:gxobj.h
X--- /usr/ports/print/cups-pstoraster/files/patch-src:gxobj.h Sat Nov 27 15:18:02 2004
X+++ print/cups-pstoraster/files/patch-src:gxobj.h Thu Jan 1 09:00:00 1970
X@@ -1,17 +0,0 @@
X---- src/gxobj.h.orig Fri Feb 22 19:45:59 2002
X-+++ src/gxobj.h Thu Dec 19 00:16:57 2002
X-@@ -99,10 +99,14 @@
X- * The final | is because back pointer values are divided by obj_back_scale,
X- * so objects must be aligned at least 0 mod obj_back_scale.
X- */
X-+#if !defined(__ia64__) && !defined(__amd64__)
X- #define obj_align_mod\
X- (((arch_align_long_mod - 1) | (arch_align_ptr_mod - 1) |\
X- (arch_align_double_mod - 1) | (align_bitmap_mod - 1) |\
X- (obj_back_scale - 1)) + 1)
X-+#else
X-+#define obj_align_mod 16
X-+#endif
X- /* The only possible values for obj_align_mod are 4, 8, or 16.... */
X- #if obj_align_mod == 4
X- # define log2_obj_align_mod 2
Xdiff -urN /usr/ports/print/cups-pstoraster/pkg-descr print/cups-pstoraster/pkg-descr
X--- /usr/ports/print/cups-pstoraster/pkg-descr Thu Jul 25 12:00:14 2002
X+++ print/cups-pstoraster/pkg-descr Thu Jan 27 18:00:45 2005
X@@ -1,12 +1,4 @@
X-Ghostscript is the well-known PostScript interpreter which is available for
X-all common and most esoteric platforms and supports many different printers
X-and some displays.
X+This package provides the pstoraster facility, which allows CUPS to convert
X+PostScript data into CUPS raster data.
X
X-Versions entitled "GNU Ghostscript" are distributed with the GNU General
X-Public License, which allows free use, and free copying and redistribution
X-under certain conditions (including, in some cases, commercial distribution).
X-
X-This distribution is based on GNU Ghostscript and provides the "driver" for
X-CUPS that supports non-PostScript printer drivers within CUPS.
X-
X-WWW: http://www.cups.org/ghostscript.html
X+WWW: http://www.cups.org/
END-of-print_cups-pstoraster.diff
echo x - print_ghostscript-afpl.diff
sed 's/^X//' >print_ghostscript-afpl.diff << 'END-of-print_ghostscript-afpl.diff'
Xdiff -urN /usr/ports/print/ghostscript-afpl/Makefile print/ghostscript-afpl/Makefile
X--- /usr/ports/print/ghostscript-afpl/Makefile Sat Jan 1 05:28:12 2005
X+++ print/ghostscript-afpl/Makefile Thu Jan 27 17:37:18 2005
X@@ -55,6 +55,9 @@
X
X NO_CDROM= "Can only be distributed for free"
X
X+# normalize WRKSRC so things like cups-pstoraster may work
X+WRKSRC= ${WRKDIR}/${PORTNAME}
X+
X CONFLICTS= ghostscript-gnu* ghostscript-gpl*
X USE_BZIP2= yes
X USE_REINPLACE= yes
X@@ -227,6 +230,8 @@
X
X post-extract:
X ${ECHO_MSG} ">>> in post-extract ..."
X+# normazile WRKSRC so things like cups-pstoraster may work
X+ ${LN} -sf ${WRKDIR}/${DISTNAME} ${WRKDIR}/${PORTNAME}
X # ** 3rd party driver **
X # Note: don't forget to add those devices in scripts/configure,
X # which update unix-gcc.mak to build gs with these new devices!
Xdiff -urN /usr/ports/print/ghostscript-afpl/Makefile.inc print/ghostscript-afpl/Makefile.inc
X--- /usr/ports/print/ghostscript-afpl/Makefile.inc Sat Jan 1 05:28:12 2005
X+++ print/ghostscript-afpl/Makefile.inc Thu Jan 27 17:34:34 2005
X@@ -1,5 +1,5 @@
X # $FreeBSD: ports/print/ghostscript-afpl/Makefile.inc,v 1.15 2004/12/31 13:32:24 krion Exp $
X
X GS_VERSION= 8.50
X-GS_REVISION= 0
X+GS_REVISION= 1
X GS_EPOCH= 1
Xdiff -urN /usr/ports/print/ghostscript-afpl/files/patch-lib:gs_init.ps print/ghostscript-afpl/files/patch-lib:gs_init.ps
X--- /usr/ports/print/ghostscript-afpl/files/patch-lib:gs_init.ps Wed Apr 3 11:59:13 2002
X+++ print/ghostscript-afpl/files/patch-lib:gs_init.ps Thu Jan 27 18:36:59 2005
X@@ -1,6 +1,14 @@
X---- lib/gs_init.ps.orig Fri Feb 1 12:25:45 2002
X-+++ lib/gs_init.ps Sat Feb 9 01:42:10 2002
X-@@ -1274,7 +1274,7 @@
X+--- lib/gs_init.ps.orig Sat Dec 11 08:22:44 2004
X++++ lib/gs_init.ps Thu Jan 27 18:36:46 2005
X+@@ -146,6 +146,7 @@
X+ currentdict /NOGC known /NOGC exch def
X+ currentdict /NOINTERPOLATE .knownget { /INTERPOLATE exch not def } if
X+ currentdict /NOOUTERSAVE known /NOOUTERSAVE exch def
X++currentdict /NOMEDIAATTRS known /NOMEDIAATTRS exch def
X+ currentdict /NOPAGEPROMPT known /NOPAGEPROMPT exch def
X+ currentdict /NOPAUSE known /NOPAUSE exch def
X+ currentdict /NOPLATFONTS known /NOPLATFONTS exch def
X+@@ -1425,7 +1426,7 @@
X % Set the default screen and BG/UCR.
X /.setdefaultbgucr {
X systemdict /setblackgeneration known {
X@@ -9,11 +17,14 @@
X } if
X } bind def
X /.useloresscreen { % - .useloresscreen <bool>
X-@@ -1874,3 +1874,7 @@
X- userdict /AGM_preserve_spots false put
X+@@ -2023,6 +2024,10 @@
X+ % Set up GridFitTT :
X
X- % The interpreter will run the initial procedure (start).
X+ /GridFitTT where {
X +
X +% unofficial patch:
X +% make it possible to print from within acroread pdf viewer
X +/Default currenthalftone /Halftone defineresource pop
X+ mark /GridFitTT 2 index /GridFitTT get .dicttomark setuserparams
X+ /GridFitTT undef
X+ } if
Xdiff -urN /usr/ports/print/ghostscript-afpl/files/patch-lib:gs_setpd.ps print/ghostscript-afpl/files/patch-lib:gs_setpd.ps
X--- /usr/ports/print/ghostscript-afpl/files/patch-lib:gs_setpd.ps Thu Jan 1 09:00:00 1970
X+++ print/ghostscript-afpl/files/patch-lib:gs_setpd.ps Thu Jan 27 18:37:44 2005
X@@ -0,0 +1,98 @@
X+--- lib/gs_setpd.ps.orig Tue Sep 14 07:32:19 2004
X++++ lib/gs_setpd.ps Thu Jan 27 18:33:39 2005
X+@@ -377,21 +377,42 @@
X+ /MediaPosition { dup //null ne { pop //null } if } bind
X+ .dicttomark readonly def
X+
X+-% Define the keys used in input attribute matching.
X+-/.inputattrkeys [
X+- /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet
X+- % The following are documented in Adobe's supplement for v2017.
X+- /LeadingEdge /MediaClass
X+-] readonly def
X+-% Define other keys used in media selection.
X+-/.inputselectionkeys [
X+- /MediaPosition /Orientation
X+-] readonly def
X+-
X+-% Define the keys used in output attribute matching.
X+-/.outputattrkeys [
X+- /OutputType
X+-] readonly def
X++% M. Sweet, Easy Software Products:
X++%
X++% Define NOMEDIAATTRS to turn off the default (but unimplementable) media
X++% selection policies for setpagedevice. This is used by CUPS to support
X++% the standard Adobe media attributes.
X++NOMEDIAATTRS {
X++ % Define only PageSize for input attribute matching.
X++ /.inputattrkeys [
X++ /PageSize
X++ ] readonly def
X++ % Define no other keys used in media selection.
X++ /.inputselectionkeys [
X++ /noInputSelectionsKeys
X++ ] readonly def
X++
X++ % Define no keys used in output attribute matching.
X++ /.outputattrkeys [
X++ /noOutputAttrKeys
X++ ] readonly def
X++} {
X++ % Define the keys used in input attribute matching.
X++ /.inputattrkeys [
X++ /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet
X++ % The following are documented in Adobe's supplement for v2017.
X++ /LeadingEdge /MediaClass
X++ ] readonly def
X++ % Define other keys used in media selection.
X++ /.inputselectionkeys [
X++ /MediaPosition /Orientation
X++ ] readonly def
X++
X++ % Define the keys used in output attribute matching.
X++ /.outputattrkeys [
X++ /OutputType
X++ ] readonly def
X++} ifelse
X+
X+ % Define all the parameters that should always be copied to the merged
X+ % dictionary.
X+@@ -420,7 +441,13 @@
X+ /PageSize //false % obsolete alias for .MediaSize
X+ /InputAttributes //false
X+ .inputattrkeys
X+- { dup /PageSize eq
X++ % M. Sweet, Easy Software Products:
X++ %
X++ % Treat LeadingEdge like PageSize so that a common Ghostscript driver
X++ % doesn't need the NOMEDIAATTRS definition.
X++ %
X++ % { dup /PageSize eq
X++ { dup dup /PageSize eq exch /LeadingEdge eq or
X+ { pop }
X+ { { 2 index /InputAttributes .knownget { //null eq } { //true } ifelse } }
X+ ifelse
X+@@ -501,11 +528,22 @@
X+ % They are expected to consume the top 2 operands.
X+ % NOTE: we currently treat all values other than 0, 1, or 7 (for PageSize)
X+ % the same as 0, i.e., we signal an error.
X++%
X++% M. Sweet, Easy Software Products:
X++%
X++% Define NOMEDIAATTRS to turn off the default (but unimplementable) media
X++% selection policies for setpagedevice. This is used by CUPS to support
X++% the standard Adobe media attributes.
X+ 0 { % Set errorinfo and signal a configurationerror.
X++ NOMEDIAATTRS {
X++ % NOMEDIAATTRS means that the default policy is 7...
X++ pop 2 index exch 7 put
X++ } {
X+ pop dup 4 index exch get 2 array astore
X+ $error /errorinfo 3 -1 roll put
X+ cleartomark
X+ /setpagedevice load /configurationerror signalerror
X++ } ifelse
X+ } bind
X+ 1 { % Roll back the failed request to its previous status.
X+ SETPDDEBUG { (Rolling back.) = pstack flush } if
END-of-print_ghostscript-afpl.diff
echo x - print_ghostscript-gnu.diff
sed 's/^X//' >print_ghostscript-gnu.diff << 'END-of-print_ghostscript-gnu.diff'
Xdiff -urN /usr/ports/print/ghostscript-gnu/Makefile print/ghostscript-gnu/Makefile
X--- /usr/ports/print/ghostscript-gnu/Makefile Tue Jan 25 14:41:55 2005
X+++ print/ghostscript-gnu/Makefile Thu Jan 27 17:39:29 2005
X@@ -59,6 +59,9 @@
X png.5:${PORTSDIR}/graphics/png
X RUN_DEPENDS= ${LOCALBASE}/share/ghostscript/fonts/a010013l.pfb:${PORTSDIR}/print/gsfonts
X
X+# normazile WRKSRC so things like cups-pstoraster may work
X+WRKSRC= ${WRKDIR}/${PORTNAME}
X+
X CONFLICTS= ghostscript-afpl* ghostscript-gpl*
X USE_BZIP2= yes
X USE_REINPLACE= yes
X@@ -263,6 +266,8 @@
X
X post-extract:
X ${ECHO_MSG} ">>> in post-extract ..."
X+# normazile WRKSRC so things like cups-pstoraster may work
X+ ${LN} -sf ${WRKDIR}/${DISTNAME} ${WRKDIR}/${PORTNAME}
X # ** 3rd party driver **
X # Note: don't forget to add those devices in scripts/configure,
X # which update unix-gcc.mak to build gs with these new devices!
END-of-print_ghostscript-gnu.diff
echo x - print_ghostscript-gpl.diff
sed 's/^X//' >print_ghostscript-gpl.diff << 'END-of-print_ghostscript-gpl.diff'
Xdiff -urN /usr/ports/print/ghostscript-gpl/Makefile print/ghostscript-gpl/Makefile
X--- /usr/ports/print/ghostscript-gpl/Makefile Sat Oct 16 16:28:33 2004
X+++ print/ghostscript-gpl/Makefile Thu Jan 27 17:38:19 2005
X@@ -53,6 +53,9 @@
X png.5:${PORTSDIR}/graphics/png
X RUN_DEPENDS= ${LOCALBASE}/share/ghostscript/fonts/a010013l.pfb:${PORTSDIR}/print/gsfonts
X
X+# normalize WRKSRC so things like cups-pstoraster may work
X+WRKSRC= ${WRKDIR}/${PORTNAME}
X+
X CONFLICTS= ghostscript-afpl* ghostscript-gnu*
X USE_BZIP2= yes
X USE_REINPLACE= yes
X@@ -223,6 +226,8 @@
X
X post-extract:
X ${ECHO_MSG} ">>> in post-extract ..."
X+# normazile WRKSRC so things like cups-pstoraster may work
X+ ${LN} -sf ${WRKDIR}/${DISTNAME} ${WRKDIR}/${PORTNAME}
X # ** 3rd party driver **
X # Note: don't forget to add those devices in scripts/configure,
X # which update unix-gcc.mak to build gs with these new devices!
Xdiff -urN /usr/ports/print/ghostscript-gpl/Makefile.inc print/ghostscript-gpl/Makefile.inc
X--- /usr/ports/print/ghostscript-gpl/Makefile.inc Sat Oct 16 16:28:33 2004
X+++ print/ghostscript-gpl/Makefile.inc Thu Jan 27 17:34:42 2005
X@@ -1,5 +1,5 @@
X # $FreeBSD: ports/print/ghostscript-gpl/Makefile.inc,v 1.13 2004/10/16 07:28:33 krion Exp $
X
X GS_VERSION= 8.15
X-GS_REVISION= 0
X+GS_REVISION= 1
X GS_EPOCH= 0
Xdiff -urN /usr/ports/print/ghostscript-gpl/files/patch-lib:gs_init.ps print/ghostscript-gpl/files/patch-lib:gs_init.ps
X--- /usr/ports/print/ghostscript-gpl/files/patch-lib:gs_init.ps Wed Apr 3 11:59:13 2002
X+++ print/ghostscript-gpl/files/patch-lib:gs_init.ps Thu Jan 27 18:31:37 2005
X@@ -1,6 +1,14 @@
X---- lib/gs_init.ps.orig Fri Feb 1 12:25:45 2002
X-+++ lib/gs_init.ps Sat Feb 9 01:42:10 2002
X-@@ -1274,7 +1274,7 @@
X+--- lib/gs_init.ps.orig Tue Sep 7 00:40:52 2004
X++++ lib/gs_init.ps Thu Jan 27 18:31:25 2005
X+@@ -140,6 +140,7 @@
X+ currentdict /NOFONTPATH known /NOFONTPATH exch def
X+ currentdict /NOGC known /NOGC exch def
X+ currentdict /NOINTERPOLATE .knownget { /INTERPOLATE exch not def } if
X++currentdict /NOMEDIAATTRS known /NOMEDIAATTRS exch def
X+ currentdict /NOOUTERSAVE known /NOOUTERSAVE exch def
X+ currentdict /NOPAGEPROMPT known /NOPAGEPROMPT exch def
X+ currentdict /NOPAUSE known /NOPAUSE exch def
X+@@ -1420,7 +1421,7 @@
X % Set the default screen and BG/UCR.
X /.setdefaultbgucr {
X systemdict /setblackgeneration known {
X@@ -9,11 +17,14 @@
X } if
X } bind def
X /.useloresscreen { % - .useloresscreen <bool>
X-@@ -1874,3 +1874,7 @@
X- userdict /AGM_preserve_spots false put
X+@@ -2018,6 +2019,10 @@
X+ % Set up GridFitTT :
X
X- % The interpreter will run the initial procedure (start).
X+ /GridFitTT where {
X +
X +% unofficial patch:
X +% make it possible to print from within acroread pdf viewer
X +/Default currenthalftone /Halftone defineresource pop
X+ mark /GridFitTT 2 index /GridFitTT get .dicttomark setuserparams
X+ /GridFitTT undef
X+ } if
Xdiff -urN /usr/ports/print/ghostscript-gpl/files/patch-lib:gs_setpd.ps print/ghostscript-gpl/files/patch-lib:gs_setpd.ps
X--- /usr/ports/print/ghostscript-gpl/files/patch-lib:gs_setpd.ps Thu Jan 1 09:00:00 1970
X+++ print/ghostscript-gpl/files/patch-lib:gs_setpd.ps Thu Jan 27 18:34:03 2005
X@@ -0,0 +1,98 @@
X+--- lib/gs_setpd.ps.orig Tue Sep 14 07:32:19 2004
X++++ lib/gs_setpd.ps Thu Jan 27 18:33:39 2005
X+@@ -377,21 +377,42 @@
X+ /MediaPosition { dup //null ne { pop //null } if } bind
X+ .dicttomark readonly def
X+
X+-% Define the keys used in input attribute matching.
X+-/.inputattrkeys [
X+- /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet
X+- % The following are documented in Adobe's supplement for v2017.
X+- /LeadingEdge /MediaClass
X+-] readonly def
X+-% Define other keys used in media selection.
X+-/.inputselectionkeys [
X+- /MediaPosition /Orientation
X+-] readonly def
X+-
X+-% Define the keys used in output attribute matching.
X+-/.outputattrkeys [
X+- /OutputType
X+-] readonly def
X++% M. Sweet, Easy Software Products:
X++%
X++% Define NOMEDIAATTRS to turn off the default (but unimplementable) media
X++% selection policies for setpagedevice. This is used by CUPS to support
X++% the standard Adobe media attributes.
X++NOMEDIAATTRS {
X++ % Define only PageSize for input attribute matching.
X++ /.inputattrkeys [
X++ /PageSize
X++ ] readonly def
X++ % Define no other keys used in media selection.
X++ /.inputselectionkeys [
X++ /noInputSelectionsKeys
X++ ] readonly def
X++
X++ % Define no keys used in output attribute matching.
X++ /.outputattrkeys [
X++ /noOutputAttrKeys
X++ ] readonly def
X++} {
X++ % Define the keys used in input attribute matching.
X++ /.inputattrkeys [
X++ /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet
X++ % The following are documented in Adobe's supplement for v2017.
X++ /LeadingEdge /MediaClass
X++ ] readonly def
X++ % Define other keys used in media selection.
X++ /.inputselectionkeys [
X++ /MediaPosition /Orientation
X++ ] readonly def
X++
X++ % Define the keys used in output attribute matching.
X++ /.outputattrkeys [
X++ /OutputType
X++ ] readonly def
X++} ifelse
X+
X+ % Define all the parameters that should always be copied to the merged
X+ % dictionary.
X+@@ -420,7 +441,13 @@
X+ /PageSize //false % obsolete alias for .MediaSize
X+ /InputAttributes //false
X+ .inputattrkeys
X+- { dup /PageSize eq
X++ % M. Sweet, Easy Software Products:
X++ %
X++ % Treat LeadingEdge like PageSize so that a common Ghostscript driver
X++ % doesn't need the NOMEDIAATTRS definition.
X++ %
X++ % { dup /PageSize eq
X++ { dup dup /PageSize eq exch /LeadingEdge eq or
X+ { pop }
X+ { { 2 index /InputAttributes .knownget { //null eq } { //true } ifelse } }
X+ ifelse
X+@@ -501,11 +528,22 @@
X+ % They are expected to consume the top 2 operands.
X+ % NOTE: we currently treat all values other than 0, 1, or 7 (for PageSize)
X+ % the same as 0, i.e., we signal an error.
X++%
X++% M. Sweet, Easy Software Products:
X++%
X++% Define NOMEDIAATTRS to turn off the default (but unimplementable) media
X++% selection policies for setpagedevice. This is used by CUPS to support
X++% the standard Adobe media attributes.
X+ 0 { % Set errorinfo and signal a configurationerror.
X++ NOMEDIAATTRS {
X++ % NOMEDIAATTRS means that the default policy is 7...
X++ pop 2 index exch 7 put
X++ } {
X+ pop dup 4 index exch get 2 array astore
X+ $error /errorinfo 3 -1 roll put
X+ cleartomark
X+ /setpagedevice load /configurationerror signalerror
X++ } ifelse
X+ } bind
X+ 1 { % Roll back the failed request to its previous status.
X+ SETPDDEBUG { (Rolling back.) = pstack flush } if
END-of-print_ghostscript-gpl.diff
exit
More information about the freebsd-ports-bugs
mailing list