mjg / rpms / ghostscript

Forked from rpms/ghostscript 4 years ago
Clone
2982191
diff -up ghostscript-9.04/Resource/Init/gs_fonts.ps.runlibfileifexists ghostscript-9.04/Resource/Init/gs_fonts.ps
2982191
--- ghostscript-9.04/Resource/Init/gs_fonts.ps.runlibfileifexists	2011-08-09 17:05:39.736485415 +0100
2982191
+++ ghostscript-9.04/Resource/Init/gs_fonts.ps	2011-08-09 17:06:08.615943187 +0100
a70c402
@@ -96,10 +96,19 @@ userdict /Fontmap .FontDirectory maxleng
a70c402
                 % stack: dict file fontname filename|aliasname
a70c402
       1 index type /stringtype eq
a70c402
       1 index type /nametype eq and 1 index xcheck and
a70c402
-      1 index /run eq 2 index /.runlibfile eq or and {
a70c402
+      1 index /run eq 2 index /.runlibfile eq 3 index /.runlibfileifexists eq or or and {
a70c402
                 % This is an inclusion entry.
a70c402
-        pop findlibfile { exch pop } { file } ifelse
a70c402
-        2 index exch .readFontmap pop
a70c402
+        0 index /.runlibfileifexists eq {
a70c402
+          pop findlibfile {
a70c402
+            exch pop
a70c402
+            2 index exch .readFontmap pop
a70c402
+          } {
a70c402
+            pop
a70c402
+          } ifelse
a70c402
+        } {
a70c402
+          pop findlibfile { exch pop } { file } ifelse
a70c402
+          2 index exch .readFontmap pop
a70c402
+        } ifelse
a70c402
       } {
a70c402
                 % This is a real entry.
a70c402
                 % Read and pop tokens until a semicolon.
2982191
diff -up ghostscript-9.04/Resource/Init/gs_init.ps.runlibfileifexists ghostscript-9.04/Resource/Init/gs_init.ps
2982191
--- ghostscript-9.04/Resource/Init/gs_init.ps.runlibfileifexists	2011-08-09 17:05:44.395397937 +0100
2982191
+++ ghostscript-9.04/Resource/Init/gs_init.ps	2011-08-09 17:06:15.238818843 +0100
2982191
@@ -674,6 +674,14 @@ systemdict /internaldict dup .makeintern
2982191
            { /undefinedfilename signalerror }
2982191
           ifelse
2982191
         } bind def
3e4c6fe
+/runlibfileifexists
2982191
+        {		% We don't want to bind 'run' into this procedure,
2982191
+                        % since run may get redefined.
2982191
+          findlibfile
2982191
+           { exch pop /run .systemvar exec }
2982191
+           { pop }
2982191
+          ifelse
2982191
+        } bind def
3e4c6fe
 /selectdevice
2982191
         { finddevice setdevice .setdefaultscreen } bind def
3e4c6fe
 /signalerror		% <object> <errorname> signalerror -
2982191
@@ -842,6 +850,7 @@ userdict /.currentresourcefile //null pu
2982191
         } bind def
3e4c6fe
 % Temporarily substitute it for the real runlibfile.
3e4c6fe
 /.runlibfile /runlibfile load def
2050c98
+/.runlibfileifexists /runlibfileifexists load def
3e4c6fe
 /runlibfile /runlibfile0 load def
3e4c6fe
 
3e4c6fe
 % Create the error handling machinery.