summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schweizer <genstef@gentoo.org>2006-05-23 21:16:15 +0000
committerStefan Schweizer <genstef@gentoo.org>2006-05-23 21:16:15 +0000
commit9005e5c4902d433d4afea53ecb1f4369ba745f7f (patch)
treee44ddb09919e309d563126fdde743914ef2d1649 /app-text
parentStable on x86. (diff)
downloadgentoo-2-9005e5c4902d433d4afea53ecb1f4369ba745f7f.tar.gz
gentoo-2-9005e5c4902d433d4afea53ecb1f4369ba745f7f.tar.bz2
gentoo-2-9005e5c4902d433d4afea53ecb1f4369ba745f7f.zip
Version bump, fixes among others #133842
(Portage version: 2.1_rc2)
Diffstat (limited to 'app-text')
-rw-r--r--app-text/ghostscript-afpl/ChangeLog13
-rw-r--r--app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.158
-rw-r--r--app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.53-r310
-rw-r--r--app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.5415
-rw-r--r--app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-big-cmap-post.patch198
-rw-r--r--app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-cups-lib.patch114
-rw-r--r--app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-destdir.diff295
-rw-r--r--app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-gtk2.patch11
-rw-r--r--app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-ps2epsi-afpl.diff13
-rw-r--r--app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-rinkj.patch19
-rw-r--r--app-text/ghostscript-afpl/ghostscript-afpl-8.54.ebuild140
11 files changed, 833 insertions, 3 deletions
diff --git a/app-text/ghostscript-afpl/ChangeLog b/app-text/ghostscript-afpl/ChangeLog
index c22c77fcc743..26ee002d3656 100644
--- a/app-text/ghostscript-afpl/ChangeLog
+++ b/app-text/ghostscript-afpl/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for app-text/ghostscript-afpl
# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-afpl/ChangeLog,v 1.45 2006/04/08 20:50:50 halcy0n Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-afpl/ChangeLog,v 1.46 2006/05/23 21:16:15 genstef Exp $
+
+*ghostscript-afpl-8.54 (23 May 2006)
+
+ 23 May 2006; Stefan Schweizer <genstef@gentoo.org>
+ +files/ghostscript-afpl-8.54-big-cmap-post.patch,
+ +files/ghostscript-afpl-8.54-cups-lib.patch,
+ +files/ghostscript-afpl-8.54-destdir.diff,
+ +files/ghostscript-afpl-8.54-gtk2.patch,
+ +files/ghostscript-afpl-8.54-ps2epsi-afpl.diff,
+ +files/ghostscript-afpl-8.54-rinkj.patch, +ghostscript-afpl-8.54.ebuild:
+ Version bump, fixes among others #133842
08 Apr 2006; Mark Loeser <halcy0n@gentoo.org>
ghostscript-afpl-8.53-r4.ebuild:
diff --git a/app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.15 b/app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.15
index 13a79fe85a79..79a34ecabfe9 100644
--- a/app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.15
+++ b/app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.15
@@ -1,4 +1,8 @@
-MD5 742dfdb324cc2bb66b116a74577a99f6 ghostscript-8.15.tar.gz 8232686
-MD5 a3bf430a7e21cd82401258a2ec3b8afb adobe-cmaps-200204.tar.gz 4360486
MD5 2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz 631653
+RMD160 c723afc2207157a434988b46bcf0a458281c29a4 acro5-cmaps-2001.tar.gz 631653
+SHA256 80abec481fd4b5e59ac3d3f5790542dbfabe3c9269a6ac17064160d6dab38ee4 acro5-cmaps-2001.tar.gz 631653
+MD5 a3bf430a7e21cd82401258a2ec3b8afb adobe-cmaps-200204.tar.gz 4360486
+RMD160 14f436cb2869788f249c0eaf5dd6a31295c5ada7 adobe-cmaps-200204.tar.gz 4360486
+SHA256 510f29086630db1a581ab77e46c3a6b9b4ee4bf8c7717c209e5125794a59480a adobe-cmaps-200204.tar.gz 4360486
MD5 09d0be2bad1b0617bc0eba6eef81f6e9 cups-1.1.20-source.tar.bz2 3741510
+MD5 742dfdb324cc2bb66b116a74577a99f6 ghostscript-8.15.tar.gz 8232686
diff --git a/app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.53-r3 b/app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.53-r3
index 7dc3d47711fc..b33dbd0b9729 100644
--- a/app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.53-r3
+++ b/app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.53-r3
@@ -1,5 +1,15 @@
MD5 2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz 631653
+RMD160 c723afc2207157a434988b46bcf0a458281c29a4 acro5-cmaps-2001.tar.gz 631653
+SHA256 80abec481fd4b5e59ac3d3f5790542dbfabe3c9269a6ac17064160d6dab38ee4 acro5-cmaps-2001.tar.gz 631653
MD5 a3bf430a7e21cd82401258a2ec3b8afb adobe-cmaps-200204.tar.gz 4360486
+RMD160 14f436cb2869788f249c0eaf5dd6a31295c5ada7 adobe-cmaps-200204.tar.gz 4360486
+SHA256 510f29086630db1a581ab77e46c3a6b9b4ee4bf8c7717c209e5125794a59480a adobe-cmaps-200204.tar.gz 4360486
MD5 4ce09b1dce09b6b9398af0daae9adf63 cups-1.1.23-source.tar.bz2 8705521
+RMD160 255ec4c22422b14f2367d69f3ec7e590dc46bea5 cups-1.1.23-source.tar.bz2 8705521
+SHA256 87da0f7b1e03236e183045f1e787957132658ead56c4b0f80ac7f86c1574a85e cups-1.1.23-source.tar.bz2 8705521
MD5 ecf57b4597f1d8c54ba8e6068a9119ab gdevhl12.c.gz 7613
+RMD160 3adffbf7df824abd02242dadf847b09246f411bb gdevhl12.c.gz 7613
+SHA256 3905677ab494a1b82ee2a6cc78975a5fdc08d81a65c12af35746bb3d2889b3e2 gdevhl12.c.gz 7613
MD5 7b2fca7021a093ce593c04332bcbdfb2 ghostscript-8.53.tar.gz 11745494
+RMD160 ee535f9ae570818d1dd9f5750c177d789fbaccc9 ghostscript-8.53.tar.gz 11745494
+SHA256 7b09fdcd8573bdf976cc8319834ee08f65ccf39f63a437dbbbffe6aab4b41f26 ghostscript-8.53.tar.gz 11745494
diff --git a/app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.54 b/app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.54
new file mode 100644
index 000000000000..e072fcf895c1
--- /dev/null
+++ b/app-text/ghostscript-afpl/files/digest-ghostscript-afpl-8.54
@@ -0,0 +1,15 @@
+MD5 2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz 631653
+RMD160 c723afc2207157a434988b46bcf0a458281c29a4 acro5-cmaps-2001.tar.gz 631653
+SHA256 80abec481fd4b5e59ac3d3f5790542dbfabe3c9269a6ac17064160d6dab38ee4 acro5-cmaps-2001.tar.gz 631653
+MD5 dfc93dd2aaaf2b86d2fd55f654c13261 adobe-cmaps-200406.tar.gz 5001983
+RMD160 284b943b3476f6f7e2bc49842fd027c6f7f57552 adobe-cmaps-200406.tar.gz 5001983
+SHA256 0f397255506cda4b20e362ab5e3f6cdacba09e0a0cca7f4d93afd980977c5689 adobe-cmaps-200406.tar.gz 5001983
+MD5 4ce09b1dce09b6b9398af0daae9adf63 cups-1.1.23-source.tar.bz2 8705521
+RMD160 255ec4c22422b14f2367d69f3ec7e590dc46bea5 cups-1.1.23-source.tar.bz2 8705521
+SHA256 87da0f7b1e03236e183045f1e787957132658ead56c4b0f80ac7f86c1574a85e cups-1.1.23-source.tar.bz2 8705521
+MD5 ecf57b4597f1d8c54ba8e6068a9119ab gdevhl12.c.gz 7613
+RMD160 3adffbf7df824abd02242dadf847b09246f411bb gdevhl12.c.gz 7613
+SHA256 3905677ab494a1b82ee2a6cc78975a5fdc08d81a65c12af35746bb3d2889b3e2 gdevhl12.c.gz 7613
+MD5 58f688190dcc5e9e337edad22b23fc0d ghostscript-8.54.tar.bz2 12385895
+RMD160 01e4f2e7132ad59b83211594913410483a42d99c ghostscript-8.54.tar.bz2 12385895
+SHA256 2d363fd56dcebf2f97ce445b0628d3715aa24b4aa386d9f481023c8efacc0fa1 ghostscript-8.54.tar.bz2 12385895
diff --git a/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-big-cmap-post.patch b/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-big-cmap-post.patch
new file mode 100644
index 000000000000..f0f72fcbd4ed
--- /dev/null
+++ b/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-big-cmap-post.patch
@@ -0,0 +1,198 @@
+diff -ur ghostscript-8.54.orig/lib/gs_ttf.ps ghostscript-8.54/lib/gs_ttf.ps
+--- ghostscript-8.54.orig/lib/gs_ttf.ps 2006-05-23 19:31:05.000000000 +0200
++++ ghostscript-8.54/lib/gs_ttf.ps 2006-05-23 19:33:32.000000000 +0200
+@@ -273,6 +273,54 @@
+ } for pop exch pop
+ } bind def
+
++/.biglength { % <str>|<array of str> .biglength <integer>
++ dup type /arraytype eq { 0 exch { length add } forall } { length } ifelse
++} bind def
++
++/concats { % [str ...] concats str
++ () exch dup length 1 sub -1 0 {
++ 1 index exch get dup type /stringtype ne { dup length string cvs } if
++ 3 -1 roll exch dup length 2 index length add string
++ dup dup 4 2 roll copy length 4 -1 roll putinterval exch
++ } for pop
++} bind def
++
++% <str>|<array of str> <index> <count> .biggetinterval <str>|<array of str>
++/.biggetinterval {
++ 3 dict begin
++ 2 index type /arraytype eq {
++ /c exch def
++ /i exch def
++ [ exch {
++ dup length /l exch def
++ i c add l gt {
++ i l lt {
++ i l i sub getinterval
++ /c i c add l sub def
++ /i 0 def
++ } {
++ pop
++ /i i l sub def
++ } ifelse
++ } {
++ i c getinterval exit
++ } ifelse
++ } forall
++ ] dup .biglength 65535 le { concats } if
++ } { getinterval } ifelse
++ end
++} bind def
++
++% <str>|<array of str> <index> getu16 <integer>
++/.biggetu16 {
++ 2 .biggetinterval 0 getu16
++} bind def
++
++% <str>|<array of str> <index> getu32 <integer>
++/.biggetu32 {
++ 4 .biggetinterval 0 getu32
++} bind def
++
+ % Each procedure in this dictionary is called as follows:
+ % <encodingtable> proc <glypharray>
+ /cmapformats mark
+@@ -363,14 +411,14 @@
+ } bind
+ 4 { % Microsoft/Adobe segmented mapping.
+ /etab exch def
+- /nseg2 etab 6 getu16 def
+- 14 /endc etab 2 index nseg2 getinterval def
++ /nseg2 etab 6 .biggetu16 def
++ 14 /endc etab 2 index nseg2 .biggetinterval def
+ % The Apple TrueType documentation omits the 2-byte
+ % 'reserved pad' that follows the endCount vector!
+ 2 add
+- nseg2 add /startc etab 2 index nseg2 getinterval def
+- nseg2 add /iddelta etab 2 index nseg2 getinterval def
+- nseg2 add /idroff etab 2 index nseg2 getinterval def
++ nseg2 add /startc etab 2 index nseg2 .biggetinterval def
++ nseg2 add /iddelta etab 2 index nseg2 .biggetinterval def
++ nseg2 add /idroff etab 2 index nseg2 .biggetinterval def
+ % The following hack allows us to properly handle
+ % idiosyncratic fonts that start at 0xf000:
+ pop
+@@ -382,8 +430,8 @@
+ /numcodes 0 def /glyphs 0 0 2 nseg2 3 sub {
+ % Stack: /glyphs numglyphs i2
+ /i2 exch def
+- /scode startc i2 getu16 def
+- /ecode endc i2 getu16 def
++ /scode startc i2 .biggetu16 def
++ /ecode endc i2 .biggetu16 def
+ numcodes scode firstcode sub
+ % Hack for fonts that have only 0x0000 and 0xf000 ranges
+ %dup 16#e000 ge { 255 and } if
+@@ -404,8 +452,8 @@
+ /numcodes 0 def /code 0 def
+ 0 2 nseg2 3 sub {
+ /i2 exch def
+- /scode startc i2 getu16 def
+- /ecode endc i2 getu16 def
++ /scode startc i2 .biggetu16 def
++ /ecode endc i2 .biggetu16 def
+ numcodes scode firstcode sub
+ % Hack for fonts that have only 0x0000 and 0xf000 ranges
+ %dup 16#e000 ge { 255 and } if
+@@ -417,15 +465,15 @@
+ (scode=) print scode =only
+ ( ecode=) print ecode =only
+ ( delta=) print delta =only
+- ( droff=) print idroff i2 getu16 =
++ ( droff=) print idroff i2 .biggetu16 =
+ } if
+- idroff i2 getu16 dup 0 eq {
++ idroff i2 .biggetu16 dup 0 eq {
+ pop scode delta add 65535 and 1 ecode delta add 65535 and
+ { putglyph } for
+ } { % The +2 is for the 'reserved pad'.
+ /gloff exch 14 nseg2 3 mul add 2 add i2 add add def
+ 0 1 ecode scode sub {
+- 2 mul gloff add etab exch getu16
++ 2 mul gloff add etab exch .biggetu16
+ dup 0 ne { delta add 65535 and } if putglyph
+ } for
+ } ifelse
+@@ -448,12 +496,12 @@
+
+ % <cmaptab> cmaparray <glypharray>
+ /cmaparray {
+- dup 0 getu16 cmapformats exch .knownget {
++ dup 0 .biggetu16 cmapformats exch .knownget {
+ TTFDEBUG {
+- (cmap: format ) print 1 index 0 getu16 = flush
++ (cmap: format ) print 1 index 0 .biggetu16 = flush
+ } if exec
+ } {
+- (Can't handle format ) print 0 getu16 = flush
++ (Can't handle format ) print 0 .biggetu16 = flush
+ 0 1 255 { } for 256 packedarray
+ } ifelse
+ TTFDEBUG {
+@@ -591,7 +639,7 @@
+ % Adobe requirement that each sfnts entry have even length.
+ /readtables mark
+ % Ordinary tables
+- (cmap) //call.readtable
++ (cmap) //call.readbigtable
+ (head) 1 index
+ (hhea) 1 index
+ (maxp) 1 index
+@@ -964,10 +1012,17 @@
+ } ifelse
+ % Stack: ... /FontInfo mark key1 value1 ...
+ post null ne {
+- /ItalicAngle first_post_string 4 gets32 65536.0 div
+- /isFixedPitch first_post_string 12 getu32 0 ne
+- /UnderlinePosition first_post_string 8 gets16 upem div
+- /UnderlineThickness first_post_string 10 gets16 upem div
++ post type /arraytype eq {
++ % this post table is a big table. /post should be [(...) ...]
++ % data we actually need here should be first one in array.
++ /posttable post 1 get def
++ } {
++ /posttable post def
++ } ifelse
++ /ItalicAngle posttable 4 gets32 65536.0 div
++ /isFixedPitch posttable 12 getu32 0 ne
++ /UnderlinePosition posttable 8 gets16 upem div
++ /UnderlineThickness posttable 10 gets16 upem div
+ } if
+ counttomark 0 ne { .dicttomark } { pop pop } ifelse
+ /XUID [orgXUID 42 curxuid]
+@@ -1026,22 +1081,22 @@
+ } if
+ tabdict /cmap get % bool [] i PlatID SpecID (cmap)
+ dup /cmaptab exch def % temporary
+- 0 1 2 index 2 getu16 1 sub { % bool [] i PlatID SpecID (cmap) j
+- 8 mul 4 add 1 index exch 8 getinterval % bool [] i PlatID SpecID (cmap) (cmapsub)
++ 0 1 2 index 2 .biggetu16 1 sub { % bool [] i PlatID SpecID (cmap) j
++ 8 mul 4 add 1 index exch 8 .biggetinterval % bool [] i PlatID SpecID (cmap) (cmapsub)
+ TTFDEBUG {
+- (cmap: platform ) print dup 0 getu16 =only
+- ( encoding ) print dup 2 getu16 = flush
++ (cmap: platform ) print dup 0 .biggetu16 =only
++ ( encoding ) print dup 2 .biggetu16 = flush
+ } if
+- dup 0 getu16 4 index eq {
+- dup 2 getu16 3 index eq { % bool [] i PlatID SpecID (cmap) (cmapsub)
++ dup 0 .biggetu16 4 index eq {
++ dup 2 .biggetu16 3 index eq { % bool [] i PlatID SpecID (cmap) (cmapsub)
+ TTFDEBUG {
+ (Choosen a cmap for platform=) print 3 index =only
+ ( encoding=) print 2 index =
+ } if
+ /cmapsub 1 index def
+- dup 4 getu32 % bool [] i PlatID SpecID (cmap) (cmapsub) p
+- cmaptab length 1 index sub % bool [] i PlatID SpecID (cmap) (cmapsub) p l
+- cmaptab 3 1 roll getinterval
++ dup 4 .biggetu32 % bool [] i PlatID SpecID (cmap) (cmapsub) p
++ cmaptab .biglength 1 index sub % bool [] i PlatID SpecID (cmap) (cmapsub) p l
++ cmaptab 3 1 roll .biggetinterval
+ /cmaptab exch def % bool [] i PlatID SpecID (cmap) (cmapsub)
+ 5 index 5 index 1 add get % bool [] i PlatID SpecID (cmap) (cmapsub) /Decoding
+ /Decoding exch def % bool [] i PlatID SpecID (cmap) (cmapsub)
diff --git a/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-cups-lib.patch b/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-cups-lib.patch
new file mode 100644
index 000000000000..0271fd996376
--- /dev/null
+++ b/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-cups-lib.patch
@@ -0,0 +1,114 @@
+diff -u lib/gs_init.ps.orig lib/gs_init.ps
+--- lib/gs_init.ps.orig 2006-02-21 22:29:07.000000000 +0100
++++ lib/gs_init.ps 2006-05-17 22:31:11.000000000 +0200
+@@ -152,6 +152,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
+diff -u lib/gs_setpd.ps.orig lib/gs_setpd.ps
+--- lib/gs_setpd.ps.orig 2005-12-28 20:56:24.000000000 +0100
++++ lib/gs_setpd.ps 2006-05-17 22:33:54.000000000 +0200
+@@ -375,21 +375,42 @@
+ } bind
+ .dicttomark readonly def
+
+-% Define the keys used in input attribute matching.
+-/.inputattrkeys [
+- /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet /ManualFeed
+- % 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 /ManualFeed
++ % 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.
+@@ -418,7 +439,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
+@@ -499,11 +526,23 @@
+ % 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.
++ SETPDDEBUG { (Rolling back.) = pstack flush } if
+ 0 { % Set errorinfo and signal a configurationerror.
+- pop dup 4 index exch get 2 array astore
+- $error /errorinfo 3 -1 roll put
+- cleartomark
++ 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 .systemvar /configurationerror signalerror
++ } ifelse
+ } bind
+ 1 { % Roll back the failed request to its previous status.
+ SETPDDEBUG { (Rolling back.) = pstack flush } if
diff --git a/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-destdir.diff b/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-destdir.diff
new file mode 100644
index 000000000000..93b5a2457ec1
--- /dev/null
+++ b/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-destdir.diff
@@ -0,0 +1,295 @@
+diff -ur ghostscript-8.54.orig/pstoraster/cups.mak ghostscript-8.54/pstoraster/cups.mak
+--- ghostscript-8.54.orig/pstoraster/cups.mak 2006-05-23 19:59:45.000000000 +0200
++++ ghostscript-8.54/pstoraster/cups.mak 2006-05-23 20:32:44.000000000 +0200
+@@ -24,9 +24,9 @@
+
+ cups_= $(GLOBJ)gdevcups.$(OBJ)
+
+-CUPSSERVER= $(install_prefix)`cups-config --serverbin`
+-CUPSCONFIG= $(install_prefix)`cups-config --serverroot`
+-CUPSDATA= $(install_prefix)`cups-config --datadir`
++CUPSSERVER= $(DESTDIR)`cups-config --serverbin`
++CUPSCONFIG= $(DESTDIR)`cups-config --serverroot`
++CUPSDATA= $(DESTDIR)`cups-config --datadir`
+
+ $(DD)cups.dev: $(cups_) $(GLD)page.dev
+ $(ADDMOD) $(DD)cups -lib cupsimage -lib cups
+diff -ur ghostscript-8.54.orig/src/all-arch.mak ghostscript-8.54/src/all-arch.mak
+--- ghostscript-8.54.orig/src/all-arch.mak 2006-05-23 19:59:45.000000000 +0200
++++ ghostscript-8.54/src/all-arch.mak 2006-05-23 20:32:44.000000000 +0200
+@@ -295,24 +295,24 @@
+ # Remove the old gs binary first, so as to preserve the previous
+ # gs-x.yy version, if any.
+ install-binary:
+- -$(RM) $(BINDIR)/$(GS)
++ -$(RM) $(DESTDIR)$(BINDIR)/$(GS)
+ @$(MAKE) $(ARGS) install GS=$(GS) XLIBDIRS=$(XLIBDIRSALL) ; \
+ d=`pwd` ; \
+ d=`basename $$d` ; \
+ d=`echo $$d | sed -e s/gs/gs-/` ; \
+- $(RM) $(BINDIR)/$$d ; \
+- ln $(BINDIR)/$(GS) $(BINDIR)/$$d ; \
+- ls -l $(BINDIR)/$(GS) $(BINDIR)/$$d
++ $(RM) $(DESTDIR)$(BINDIR)/$$d ; \
++ ln $(DESTDIR)$(BINDIR)/$(GS) $(DESTDIR)$(BINDIR)/$$d ; \
++ ls -l $(DESTDIR)$(BINDIR)/$(GS) $(DESTDIR)$(BINDIR)/$$d
+
+ install-binary-gnu-readline:
+- -$(RM) $(BINDIR)/$(GS)
++ -$(RM) $(DESTDIR)$(BINDIR)/$(GS)
+ @$(MAKE) $(ARGS) install GS=$(GS) XLIBDIRS=$(XLIBDIRSALL) $(GNU_READLINE_ARGS) ; \
+ d=`pwd` ; \
+ d=`basename $$d` ; \
+ d=`echo $$d | sed -e s/gs/gs-/` ; \
+- $(RM) $(BINDIR)/$$d ; \
+- ln $(BINDIR)/$(GS) $(BINDIR)/$$d ; \
+- ls -l $(BINDIR)/$(GS) $(BINDIR)/$$d
++ $(RM) $(DESTDIR)$(BINDIR)/$$d ; \
++ ln $(DESTDIR)$(BINDIR)/$(GS) $(DESTDIR)$(BINDIR)/$$d ; \
++ ls -l $(DESTDIR)$(BINDIR)/$(GS) $(DESTDIR)$(BINDIR)/$$d
+
+ install-fontmap:
+ @d=`pwd` ; \
+@@ -320,14 +320,14 @@
+ d=`echo $$d | sed -e s/gs//` ; \
+ if test -f $(GS_SRC_DIR)/Fontmap.new ; \
+ then \
+- if test -f $(GS_SHARE_DIR)/$$d/lib/Fontmap.org ; \
++ if test -f $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/Fontmap.org ; \
+ then \
+ true ; \
+ else \
+- mv $(GS_SHARE_DIR)/$$d/lib/Fontmap $(GS_SHARE_DIR)/$$d/lib/Fontmap.org ; \
++ mv $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/Fontmap $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/Fontmap.org ; \
+ fi ; \
+- $(CP) $(GS_SRC_DIR)/Fontmap.new $(GS_SHARE_DIR)/$$d/lib/Fontmap ; \
+- ls -l $(GS_SHARE_DIR)/$$d/lib/Fontmap* ; \
++ $(CP) $(GS_SRC_DIR)/Fontmap.new $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/Fontmap ; \
++ ls -l $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/Fontmap* ; \
+ fi
+
+ install-pdfsec:
+@@ -336,9 +336,9 @@
+ d=`echo $$d | sed -e s/gs//` ; \
+ if test -f $(GS_SRC_DIR)/lib/pdf_sec.ps ; \
+ then \
+- $(MV) $(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps $(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps.org ; \
+- $(CP) lib/pdf_sec.ps $(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps ; \
+- $(CHMOD) 664 $(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps ; \
++ $(MV) $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps.org ; \
++ $(CP) lib/pdf_sec.ps $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps ; \
++ $(CHMOD) 664 $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps ; \
+ fi
+
+ #=======================================================================
+Only in ghostscript-8.54/src: all-arch.mak.orig
+diff -ur ghostscript-8.54.orig/src/macos-fw.mak ghostscript-8.54/src/macos-fw.mak
+--- ghostscript-8.54.orig/src/macos-fw.mak 2006-05-23 19:59:45.000000000 +0200
++++ ghostscript-8.54/src/macos-fw.mak 2006-05-23 20:32:44.000000000 +0200
+@@ -100,19 +100,19 @@
+ $(MAKE) $(SODEFS) GENOPT='-DDEBUG' CFLAGS='$(CFLAGS_DEBUG) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' $(GSSOC) $(GSSOX)
+
+ install-so: so
+- -mkdir $(prefix)
+- -mkdir $(datadir)
+- -mkdir $(gsdir)
+- -mkdir $(gsdatadir)
+- -mkdir $(bindir)
+- -mkdir $(libdir)
+- $(INSTALL_PROGRAM) $(GSSOC) $(bindir)/$(GSSOC_XENAME)
+- $(INSTALL_PROGRAM) $(GSSOX) $(bindir)/$(GSSOX_XENAME)
+- $(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME_MAJOR_MINOR)
+- $(RM_) $(libdir)/$(GS_SONAME)
+- ln -s $(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME)
+- $(RM_) $(libdir)/$(GS_SONAME_MAJOR)
+- ln -s $(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME_MAJOR)
++ -mkdir $(DESTDIR)$(prefix)
++ -mkdir $(DESTDIR)$(datadir)
++ -mkdir $(DESTDIR)$(gsdir)
++ -mkdir $(DESTDIR)$(gsdatadir)
++ -mkdir $(DESTDIR)$(bindir)
++ -mkdir $(DESTDIR)$(libdir)
++ $(INSTALL_PROGRAM) $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME)
++ $(INSTALL_PROGRAM) $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME)
++ $(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR)
++ $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME)
++ ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME)
++ $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
++ ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
+
+ soinstall: install-so install-scripts install-data
+
+@@ -141,8 +141,8 @@
+ cp -r doc $(GS_FRAMEWORK)/Versions/Current
+
+ framework_install : framework
+- rm -rf $(prefix)
+- cp -r $(GS_FRAMEWORK) $(prefix)
++ rm -rf $(DESTDIR)$(prefix)
++ cp -r $(GS_FRAMEWORK) $(DESTDIR)$(prefix)
+
+ # Make the build directories
+ SODIRS: STDDIRS
+Only in ghostscript-8.54/src: macos-fw.mak.orig
+diff -ur ghostscript-8.54.orig/src/unix-dll.mak ghostscript-8.54/src/unix-dll.mak
+--- ghostscript-8.54.orig/src/unix-dll.mak 2006-05-23 19:59:45.000000000 +0200
++++ ghostscript-8.54/src/unix-dll.mak 2006-05-23 20:32:49.000000000 +0200
+@@ -93,19 +93,19 @@
+ $(MAKE) $(SODEFS) GENOPT='-DDEBUG' CFLAGS='$(CFLAGS_DEBUG) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' $(GSSOC) $(GSSOX)
+
+ install-so: so
+- -mkdir -p $(prefix)
+- -mkdir -p $(datadir)
+- -mkdir -p $(gsdir)
+- -mkdir -p $(gsdatadir)
+- -mkdir -p $(bindir)
+- -mkdir -p $(libdir)
+- $(INSTALL_PROGRAM) $(GSSOC) $(bindir)/$(GSSOC_XENAME)
+- $(INSTALL_PROGRAM) $(GSSOX) $(bindir)/$(GSSOX_XENAME)
+- $(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME_MAJOR_MINOR)
+- $(RM_) $(libdir)/$(GS_SONAME)
+- ln -s $(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME)
+- $(RM_) $(libdir)/$(GS_SONAME_MAJOR)
+- ln -s $(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME_MAJOR)
++ -mkdir -p $(DESTDIR)$(prefix)
++ -mkdir -p $(DESTDIR)$(datadir)
++ -mkdir -p $(DESTDIR)$(gsdir)
++ -mkdir -p $(DESTDIR)$(gsdatadir)
++ -mkdir -p $(DESTDIR)$(bindir)
++ -mkdir -p $(DESTDIR)$(libdir)
++ $(INSTALL_PROGRAM) $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME)
++ $(INSTALL_PROGRAM) $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME)
++ $(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR)
++ $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME)
++ ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME)
++ $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
++ ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
+
+ soinstall: install-so install-scripts install-data
+
+Only in ghostscript-8.54/src: unix-dll.mak.orig
+diff -ur ghostscript-8.54.orig/src/unixinst.mak ghostscript-8.54/src/unixinst.mak
+--- ghostscript-8.54.orig/src/unixinst.mak 2006-05-23 19:59:45.000000000 +0200
++++ ghostscript-8.54/src/unixinst.mak 2006-05-23 20:39:35.000000000 +0200
+@@ -25,17 +25,17 @@
+ # rules, just in case bindir or scriptdir is a subdirectory of any of these.
+
+ install-exec: STDDIRS $(GS_XE)
+- -mkdir -p $(datadir)
+- -mkdir -p $(gsdir)
+- -mkdir -p $(gsdatadir)
+- -mkdir -p $(bindir)
+- $(INSTALL_PROGRAM) $(GS_XE) $(bindir)/$(GS)
++ -mkdir -p $(DESTDIR)$(datadir)
++ -mkdir -p $(DESTDIR)$(gsdir)
++ -mkdir -p $(DESTDIR)$(gsdatadir)
++ -mkdir -p $(DESTDIR)$(bindir)
++ $(INSTALL_PROGRAM) $(GS_XE) $(DESTDIR)$(bindir)/$(GS)
+
+ install-scripts: $(PSLIBDIR)/gsnd
+- -mkdir -p $(datadir)
+- -mkdir -p $(gsdir)
+- -mkdir -p $(gsdatadir)
+- -mkdir -p $(scriptdir)
++ -mkdir -p $(DESTDIR)$(datadir)
++ -mkdir -p $(DESTDIR)$(gsdir)
++ -mkdir -p $(DESTDIR)$(gsdatadir)
++ -mkdir -p $(DESTDIR)$(scriptdir)
+ $(SH) -c 'for f in \
+ gsbj gsdj gsdj500 gslj gslp gsnd \
+ bdftops dumphint dvipdf eps2eps font2c \
+@@ -44,7 +44,7 @@
+ fixmswrd.pl lprsetup.sh pj-gs.sh pv.sh sysvlp.sh unix-lpr.sh ;\
+ do if ( test -f $(PSLIBDIR)/$$f ); then \
+ (cat $(PSLIBDIR)/$$f | sed -e "s/GS_EXECUTABLE=[^ \t]*/GS_EXECUTABLE=$(GS)/" > $(PSOBJDIR)/$$f); \
+- $(INSTALL_PROGRAM) $(PSOBJDIR)/$$f $(scriptdir)/$$f; \
++ $(INSTALL_PROGRAM) $(PSOBJDIR)/$$f $(DESTDIR)$(scriptdir)/$$f; \
+ fi;\
+ done'
+
+@@ -59,10 +59,10 @@
+ # one file from each subdirectory just as a sanity check.
+
+ install-libdata:
+- -mkdir -p $(datadir)
+- -mkdir -p $(gsdir)
+- -mkdir -p $(gsdatadir)
+- -mkdir -p $(gsdatadir)/lib
++ -mkdir -p $(DESTDIR)$(datadir)
++ -mkdir -p $(DESTDIR)$(gsdir)
++ -mkdir -p $(DESTDIR)$(gsdatadir)
++ -mkdir -p $(DESTDIR)$(gsdatadir)/lib
+ $(SH) -c 'for f in \
+ $(EXTRA_INIT_FILES) Fontmap.GS \
+ ht_ccsto.ps \
+@@ -78,24 +78,24 @@
+ viewpcx.ps viewpbm.ps viewps2a.ps \
+ winmaps.ps wftopfa.ps wrfont.ps zeroline.ps \
+ pdf2dsc.ps pdfopt.ps ;\
+- do if ( test -f $(PSLIBDIR)/$$f ); then $(INSTALL_DATA) $(PSLIBDIR)/$$f $(gsdatadir)/lib; fi;\
++ do if ( test -f $(PSLIBDIR)/$$f ); then $(INSTALL_DATA) $(PSLIBDIR)/$$f $(DESTDIR)$(gsdatadir)/lib; fi;\
+ done'
+ $(SH) -c 'for f in $(PSLIBDIR)/gs_*.ps $(PSLIBDIR)/pdf*.ps;\
+- do $(INSTALL_DATA) $$f $(gsdatadir)/lib ;\
++ do $(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)/lib ;\
+ done'
+ $(SH) -c 'for f in $(PSLIBDIR)/*.ppd $(PSLIBDIR)/*.rpd $(PSLIBDIR)/*.upp $(PSLIBDIR)/*.xbm $(PSLIBDIR)/*.xpm;\
+- do $(INSTALL_DATA) $$f $(gsdatadir)/lib ;\
++ do $(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)/lib ;\
+ done'
+
+ # install the default resource files
+ # copy in every category (directory) but CVS
+ RES_CATEGORIES=`ls $(PSRESDIR) | grep -v CVS`
+ install-resdata: $(PSRESDIR)/Decoding/Unicode
+- -mkdir -p $(datadir)
+- -mkdir -p $(gsdir)
+- -mkdir -p $(gsdatadir)/Resource
++ -mkdir -p $(DESTDIR)$(datadir)
++ -mkdir -p $(DESTDIR)$(gsdir)
++ -mkdir -p $(DESTDIR)$(gsdatadir)/Resource
+ $(SH) -c 'for dir in $(RES_CATEGORIES); do \
+- rdir=$(gsdatadir)/Resource/$$dir ; \
++ rdir=$(DESTDIR)$(gsdatadir)/Resource/$$dir ; \
+ test -d $$rdir || mkdir -p $$rdir ; \
+ for file in $(PSRESDIR)/$$dir/*; do \
+ if test -f $$file; then $(INSTALL_DATA) $$file $$rdir ; fi \
+@@ -119,9 +119,9 @@
+ Source.htm Testing.htm Unix-lpr.htm \
+ Use.htm Xfonts.htm
+ install-doc: $(PSDOCDIR)/News.htm
+- -mkdir -p $(docdir)
++ -mkdir -p $(DESTDIR)$(docdir)
+ $(SH) -c 'for f in $(DOC_PAGES) ;\
+- do if ( test -f $(PSDOCDIR)/$$f ); then $(INSTALL_DATA) $(PSDOCDIR)/$$f $(docdir); fi;\
++ do if ( test -f $(PSDOCDIR)/$$f ); then $(INSTALL_DATA) $(PSDOCDIR)/$$f $(DESTDIR)$(docdir); fi;\
+ done'
+
+ # install the man pages for each locale
+@@ -130,9 +130,9 @@
+ MAN1_LINKS_PS2PDF=ps2pdf12 ps2pdf13
+ MAN1_LINKS_GSLP=gsbj gsdj gsdj500 gslj
+ install-man: $(PSMANDIR)/gs.1
+- $(SH) -c 'test -d $(mandir) || mkdir -p $(mandir)'
++ $(SH) -c 'test -d $(DESTDIR)$(mandir) || mkdir -p $(DESTDIR)$(mandir)'
+ $(SH) -c 'for d in $(MAN_LCDIRS) ;\
+- do man1dir=$(mandir)/$$d/man$(man1ext) ;\
++ do man1dir=$(DESTDIR)$(mandir)/$$d/man$(man1ext) ;\
+ ( test -d $$man1dir || mkdir -p $$man1dir ) ;\
+ for f in $(PSMANDIR)/$$d/*.1 ;\
+ do $(INSTALL_DATA) $$f $$man1dir ;\
+@@ -159,10 +159,10 @@
+
+ # install the example files
+ install-examples:
+- -mkdir -p $(exdir)
++ -mkdir -p $(DESTDIR)$(exdir)
+ for f in \
+ alphabet.ps annots.pdf chess.ps colorcir.ps doretree.ps escher.ps \
+ golfer.eps grayalph.ps snowflak.ps tiger.eps vasarely.ps waterfal.ps \
+ ridt91.eps ;\
+- do $(INSTALL_DATA) $(PSEXDIR)/$$f $(exdir) ;\
++ do $(INSTALL_DATA) $(PSEXDIR)/$$f $(DESTDIR)$(exdir) ;\
+ done
+Only in ghostscript-8.54/src: unixinst.mak.orig
+Only in ghostscript-8.54/src: unixinst.mak.rej
diff --git a/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-gtk2.patch b/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-gtk2.patch
new file mode 100644
index 000000000000..6a70be4c34d3
--- /dev/null
+++ b/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-gtk2.patch
@@ -0,0 +1,11 @@
+--- espgs-8.15rc3/src/unix-dll.mak.gtk2 2005-01-19 04:08:41.000000000 +0000
++++ espgs-8.15rc3/src/unix-dll.mak 2005-06-03 12:31:56.000000000 +0100
+@@ -67,7 +67,7 @@
+ # Build the small Ghostscript loaders, with Gtk+ and without
+
+ $(GSSOX_XE): $(GS_SO) $(GLSRC)dxmain.c
+- $(GLCC) -g `gtk-config --cflags` -o $(GSSOX_XE) $(GLSRC)dxmain.c -L$(BINDIR) -l$(GS) `gtk-config --libs`
++ $(GLCC) -g `pkg-config gtk+-2.0 --cflags` -o $(GSSOX_XE) $(GLSRC)dxmain.c -L$(BINDIR) -l$(GS) `pkg-config gtk+-2.0 --libs`
+
+ $(GSSOC_XE): $(GS_SO) $(GLSRC)dxmainc.c
+ $(GLCC) -g -o $(GSSOC_XE) $(GLSRC)dxmainc.c -L$(BINDIR) -l$(GS)
diff --git a/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-ps2epsi-afpl.diff b/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-ps2epsi-afpl.diff
new file mode 100644
index 000000000000..63e499dbfaba
--- /dev/null
+++ b/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-ps2epsi-afpl.diff
@@ -0,0 +1,13 @@
+--- ghostscript-8.53/lib/ps2epsi.orig 2006-04-03 18:22:05.000000000 +0200
++++ ghostscript-8.53/lib/ps2epsi 2006-04-03 18:23:00.000000000 +0200
+@@ -62,8 +62,8 @@
+ BEGINEPS
+
+ cat "${infile}" |
+-sed -e '/^%%BeginPreview:/,/^%%EndPreview[^!-~]*$/d' -e '/^%!PS-Adobe/d'\
+- -e '/^%%[A-Za-z][A-Za-z]*[^!-~]*$/d' -e '/^%%[A-Za-z][A-Za-z]*: /d'
++sed -e '/^%%BeginPreview:/,/^%%EndPreview[^!-\~]*$/d' -e '/^%!PS-Adobe/d'\
++ -e '/^%%[A-Za-z][A-Za-z]*[^!-\~]*$/d' -e '/^%%[A-Za-z][A-Za-z]*: /d'
+
+ cat << ENDEPS
+ %%Trailer
diff --git a/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-rinkj.patch b/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-rinkj.patch
new file mode 100644
index 000000000000..ef309d92ce56
--- /dev/null
+++ b/app-text/ghostscript-afpl/files/ghostscript-afpl-8.54-rinkj.patch
@@ -0,0 +1,19 @@
+--- ghostscript-8.54.orig/src/gdevrinkj.c 2006-03-13 17:18:19.000000000 +0100
++++ ghostscript-8.54/src/gdevrinkj.c 2006-05-18 09:38:00.000000000 +0200
+@@ -214,6 +214,7 @@
+ /* DeviceN device specific parameters */
+ RINKJ_DEVICE_CMYK, /* Color model */
+ 8, /* Bits per color - must match ncomp, depth, etc. above */
++ 0,
+ (&DeviceCMYKComponents), /* Names of color model colorants */
+ 4, /* Number colorants for CMYK */
+ {0}, /* SeparationNames */
+@@ -757,7 +758,7 @@
+ * number if the name is found. It returns a negative value if not found.
+ */
+ private int
+-rinkj_get_color_comp_index(const gx_device * dev, const char * pname, int name_size, int src_index)
++rinkj_get_color_comp_index(gx_device * dev, const char * pname, int name_size, int src_index)
+ {
+ /* TO_DO_DEVICEN This routine needs to include the effects of the SeparationOrder array */
+ const fixed_colorant_names_list * list = ((const rinkj_device *)dev)->std_colorant_names;
diff --git a/app-text/ghostscript-afpl/ghostscript-afpl-8.54.ebuild b/app-text/ghostscript-afpl/ghostscript-afpl-8.54.ebuild
new file mode 100644
index 000000000000..4b2ba4156ad8
--- /dev/null
+++ b/app-text/ghostscript-afpl/ghostscript-afpl-8.54.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-afpl/ghostscript-afpl-8.54.ebuild,v 1.1 2006/05/23 21:16:15 genstef Exp $
+
+inherit eutils autotools versionator
+
+DESCRIPTION="AFPL Ghostscript"
+HOMEPAGE="http://www.cs.wisc.edu/~ghost/"
+
+CUPS_PV=1.1.23
+MY_P=ghostscript-${PV}
+PVM=$(get_version_component_range 1-2)
+SRC_URI="cjk? ( ftp://ftp.gyve.org/pub/gs-cjk/adobe-cmaps-200406.tar.gz
+ ftp://ftp.gyve.org/pub/gs-cjk/acro5-cmaps-2001.tar.gz )
+ cups? ( mirror://gentoo/cups-${CUPS_PV}-source.tar.bz2 )
+ mirror://sourceforge/ghostscript/${MY_P}.tar.bz2
+ mirror://gentoo/gdevhl12.c.gz"
+
+LICENSE="Aladdin"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="X cups cjk emacs gtk jpeg2k"
+
+DEP="virtual/libc
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.2.5
+ >=sys-libs/zlib-1.1.4
+ >=media-libs/tiff-3.7
+ X? ( || ( x11-libs/libXt virtual/x11 ) )
+ gtk? ( >=x11-libs/gtk+-2.0 )
+ cups? ( >=net-print/cups-1.1.20 )
+ jpeg2k? ( media-libs/jasper )
+ !app-text/ghostscript-esp
+ !app-text/ghostscript-gnu"
+
+RDEPEND="${DEP}
+ cjk? ( media-fonts/arphicfonts
+ media-fonts/kochi-substitute
+ media-fonts/baekmuk-fonts )
+ media-fonts/gnu-gs-fonts-std"
+
+DEPEND="${DEP}
+ gtk? ( dev-util/pkgconfig )"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A/adobe-cmaps-200406.tar.gz acro5-cmaps-2001.tar.gz}
+ if use cjk; then
+ cat ${FILESDIR}/ghostscript-esp-8.15.2-cidfmap.cjk >> ${S}/lib/cidfmap
+ cat ${FILESDIR}/ghostscript-esp-8.15.2-FAPIcidfmap.cjk >> ${S}/lib/FAPIcidfmap
+ cd ${S}/Resource
+ unpack adobe-cmaps-200406.tar.gz
+ unpack acro5-cmaps-2001.tar.gz
+ cd ${WORKDIR}
+ fi
+
+ # cups support
+ if use cups; then
+ cp -r cups-${CUPS_PV}/pstoraster ${S}
+ cd ${S}/pstoraster
+ sed -e 's:@prefix@:/usr:' -e 's:@exec_prefix@:${prefix}:' -e \
+ 's:@bindir@:${exec_prefix}/bin:' -e 's:@GS@:gs:' \
+ pstopxl.in > pstopxl || die "pstopxlsed failed"
+ sed -i -e 's:OUTPUTFILE="%stdout" $profile $6$:\0 -:' \
+ -e 's:/usr/local:/usr:' pstoraster || die "pstorastersed failed"
+ sed -i -e "s:pstopcl6:pstopxl:" cups.mak || die "cupssed failed"
+ cd ..
+ epatch ${FILESDIR}/gdevcups.patch
+
+ echo 'include pstoraster/cups.mak' >> src/Makefile.in
+ sed -i -e 's:DEVICE_DEVS17=:\0$(DD)cups.dev:' src/Makefile.in || die "sed failed"
+ sed -i -e 's:EXTRALIBS=.*:\0 -lcups -lcupsimage:' src/Makefile.in || die "sed failed"
+ fi
+ cd ${S}
+ epatch ${FILESDIR}/ghostscript-afpl-8.54-cups-lib.patch
+ epatch ${FILESDIR}/ghostscript-afpl-8.54-big-cmap-post.patch
+
+ # enable cfax device (bug #56704) and rinkj device
+ sed -i -e 's:DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev:\0 $(DD)cfax.dev $(DD)rinkj.dev:' ${S}/src/Makefile.in || die "sed failed"
+
+ # http://www.linuxprinting.org/download/printing/ghostscript-8.x/drivers/hl1250
+ # http://bugs.ghostscript.com/show_bug.cgi?id=687484
+ cp ${WORKDIR}/gdevhl12.c ${S}/src/gdevhl12.c || die
+ cat ${FILESDIR}/gdevhl12-hl1250.mak >> ${S}/src/contrib.mak || die
+ sed -e 's#^\(DEVICE_DEVS6=.*\)$#\1 $(DD)hl1240.dev $(DD)hl1250.dev#' \
+ -i "${S}"/src/Makefile.in || die
+ sed -i -e "s:#if 1:#if 0:" "${S}"/src/gdevhl12.c || die
+
+ # already fixed inSVN, http://bugs.ghostscript.com/show_bug.cgi?id=688702
+ epatch ${FILESDIR}/ghostscript-afpl-8.54-gtk2.patch
+ if ! use gtk; then
+ sed -i "s:\$(GSSOX)::" src/*.mak || die "gsx sed failed"
+ sed -i "s:.*\$(GSSOX_XENAME)$::" src/*.mak || die "gsxso sed failed"
+ fi
+
+ # #128650, #128645, http://bugs.ghostscript.com/show_bug.cgi?id=688703
+ epatch ${FILESDIR}/ghostscript-afpl-8.54-ps2epsi-afpl.diff
+ epatch ${FILESDIR}/ghostscript-afpl-8.54-rinkj.patch
+ epatch ${FILESDIR}/ghostscript-afpl-8.54-destdir.diff
+
+ # search path fix
+ sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
+ src/Makefile.in || die "sed failed"
+ sed -i -e 's:$(gsdir)/fonts:/usr/share/fonts/default/ghostscript/:' \
+ src/Makefile.in || die "sed failed"
+ sed -i -e "s:exdir=[^ ]*:exdir=/usr/share/doc/${PF}/examples:" \
+ src/Makefile.in || die "sed failed"
+}
+
+src_compile() {
+ local myconf
+ myconf="--with-ijs --with-jbig2dec"
+
+ econf $(use_with X x) \
+ $(use_with jpeg2k jasper) \
+ ${myconf} || die "econf failed"
+ emake so all || die "emake failed"
+
+ cd ijs
+ econf || die "ijs econf failed"
+ emake || die "ijs emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install soinstall || die "make install failed"
+
+ rm -fr ${D}/usr/share/ghostscript/${PVM}/doc
+ dodoc doc/README
+ dohtml doc/*.html doc/*.htm
+ ln -s /usr/share/doc/${PF}/html ${D}/usr/share/ghostscript/${PVM}/doc
+
+ if use emacs; then
+ insinto /usr/share/emacs/site-lisp
+ doins doc/gsdoc.el
+ fi
+
+ cd ${S}/ijs
+ make DESTDIR="${D}" install || die "ijs install failed"
+}