ea5d11
diff -up ghostscript-9.06/Resource/Init/gs_fonts.ps.runlibfileifexists ghostscript-9.06/Resource/Init/gs_fonts.ps
ea5d11
--- ghostscript-9.06/Resource/Init/gs_fonts.ps.runlibfileifexists	2012-08-08 09:01:36.000000000 +0100
ea5d11
+++ ghostscript-9.06/Resource/Init/gs_fonts.ps	2012-08-09 08:23:46.750732348 +0100
ea5d11
@@ -95,10 +95,19 @@ userdict /Fontmap .FontDirectory maxleng
ea5d11
                 % stack: dict file fontname filename|aliasname
ea5d11
       1 index type /stringtype eq
ea5d11
       1 index type /nametype eq and 1 index xcheck and
ea5d11
-      1 index /run eq 2 index /.runlibfile eq or and {
ea5d11
+      1 index /run eq 2 index /.runlibfile eq 3 index /.runlibfileifexists eq or or and {
ea5d11
                 % This is an inclusion entry.
ea5d11
-        pop findlibfile { exch pop } { file } ifelse
ea5d11
-        2 index exch .readFontmap pop
ea5d11
+        0 index /.runlibfileifexists eq {
ea5d11
+          pop findlibfile {
ea5d11
+            exch pop
ea5d11
+            2 index exch .readFontmap pop
ea5d11
+          } {
ea5d11
+            pop
ea5d11
+          } ifelse
ea5d11
+        } {
ea5d11
+          pop findlibfile { exch pop } { file } ifelse
ea5d11
+          2 index exch .readFontmap pop
ea5d11
+        } ifelse
ea5d11
       } {
ea5d11
                 % This is a real entry.
ea5d11
                 % Read and pop tokens until a semicolon.
ea5d11
diff -up ghostscript-9.06/Resource/Init/gs_init.ps.runlibfileifexists ghostscript-9.06/Resource/Init/gs_init.ps
ea5d11
--- ghostscript-9.06/Resource/Init/gs_init.ps.runlibfileifexists	2012-08-08 09:01:36.000000000 +0100
ea5d11
+++ ghostscript-9.06/Resource/Init/gs_init.ps	2012-08-09 08:23:46.750732348 +0100
ea5d11
@@ -678,6 +678,14 @@ systemdict /internaldict dup .makeintern
ea5d11
            { /undefinedfilename signalerror }
ea5d11
           ifelse
ea5d11
         } bind def
ea5d11
+/runlibfileifexists
ea5d11
+        {		% We don't want to bind 'run' into this procedure,
ea5d11
+                        % since run may get redefined.
ea5d11
+          findlibfile
ea5d11
+           { exch pop /run .systemvar exec }
ea5d11
+           { pop }
ea5d11
+          ifelse
ea5d11
+        } bind def
ea5d11
 /selectdevice
ea5d11
         { finddevice setdevice .setdefaultscreen } bind def
ea5d11
 /signalerror		% <object> <errorname> signalerror -
ea5d11
@@ -846,6 +854,7 @@ userdict /.currentresourcefile //null pu
ea5d11
         } bind def
ea5d11
 % Temporarily substitute it for the real runlibfile.
ea5d11
 /.runlibfile /runlibfile load def
ea5d11
+/.runlibfileifexists /runlibfileifexists load def
ea5d11
 /runlibfile /runlibfile0 load def
ea5d11
 
ea5d11
 % Create the error handling machinery.