summaryrefslogtreecommitdiff
path: root/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-02-PERL
blob: 2887e44e7ebf6694eb0735350baea56bf98cd27c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
diff -ur psutils-1.17.orig/fixmacps.man psutils-1.17/fixmacps.man
--- psutils-1.17.orig/fixmacps.man	1997-03-11 23:52:54.000000000 +0100
+++ psutils-1.17/fixmacps.man	2006-01-17 22:16:42.000000000 +0100
@@ -16,7 +16,7 @@
 .B psutils
 package.
 .SH FILES
-@INCLUDE@/md68_0.ps, @INCLUDE@/md71_0.ps - sanitised versions of the md
+md68_0.ps, md71_0.ps - sanitised versions of the md
 prologue.
 .SH AUTHOR
 Copyright (C) Angus J. C. Duggan 1991-1995
diff -ur psutils-1.17.orig/fixmacps.pl psutils-1.17/fixmacps.pl
--- psutils-1.17.orig/fixmacps.pl	1997-03-11 23:52:54.000000000 +0100
+++ psutils-1.17/fixmacps.pl	2010-12-13 15:04:50.000000000 +0100
@@ -4,8 +4,11 @@
 # Copyright (C) Angus J. C. Duggan 1991-1995
 # See file LICENSE for details.
 
+use File::Basename;
+
 $line = 0;			# keep line count
-$dir = "@INCLUDE@";
+$predir = `kpsewhich -progname=dvips -format="other text files" md71_0.ps`;
+$dir=`dirname $predir`;
 $prefix = "md";
 $default = "md71_0.ps";
 
diff -ur psutils-1.17.orig/includeres.man psutils-1.17/includeres.man
--- psutils-1.17.orig/includeres.man	1997-03-11 23:52:57.000000000 +0100
+++ psutils-1.17/includeres.man	2006-01-17 22:16:42.000000000 +0100
@@ -26,8 +26,6 @@
 or 
 .I pstops
 safely.
-.SH FILES
-@INCLUDE@ - system resource directory.
 .SH AUTHOR
 Copyright (C) Angus J. C. Duggan 1991-1995
 .SH "SEE ALSO"
diff -ur psutils-1.17.orig/includeres.pl psutils-1.17/includeres.pl
--- psutils-1.17.orig/includeres.pl	1997-03-11 23:52:58.000000000 +0100
+++ psutils-1.17/includeres.pl	2006-01-17 22:16:42.000000000 +0100
@@ -4,6 +4,11 @@
 # Copyright (C) Angus J. C. Duggan 1991-1995
 # See file LICENSE for details.
 
+use File::Basename;
+
+$predir = `kpsewhich -progname=dvips -format="other text files" md71_0.ps`;
+$inc=`dirname $predir`;
+
 $prog = ($0 =~ s=.*/==);
 
 %extn = ("font", ".pfa", "file", ".ps", "procset", ".ps", # resource extns
@@ -28,7 +33,6 @@
       local($comment, @res) = split(/\s+/);
       local($type) = defined($type{$comment}) ? $type{$comment} : shift(@res);
       local($name) = &filename(@res);
-      local($inc) = "@INCLUDE@"; # system include directory
       if (open(RES, $name) || open(RES, "$name$extn{$type}") ||
 	  open(RES, "$inc/$name") || open(RES, "$inc/$name$extn{$type}")) {
 	 while (<RES>) {
diff -ur psutils-1.17.orig/maketext psutils-1.17/maketext
--- psutils-1.17.orig/maketext	1997-03-11 23:52:59.000000000 +0100
+++ psutils-1.17/maketext	2006-01-17 22:16:42.000000000 +0100
@@ -1,7 +1,4 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
-   & eval 'exec perl -S $0 $argv:q'
-   if 0;
-
+#!/usr/bin/env perl
 # maketext: perl filter to substitute names in scripts and man pages.
 
 %change = ();			# names -> substitutions
@@ -15,14 +12,16 @@
 
 $os = "" ;
 
-%perlstart = ("UNIX", "\#!PERL\neval 'exec perl -S \$0 \"\$\@\"'\n\tif \$running_under_some_shell;\n",
+%perlstart = ("UNIX", "\#!PERL",
 	      "DOS", "\@rem = '-*- Perl -*-\n\@echo off\nPERL -S %0.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9\ngoto endofperl\n';\n",
 	      "WINNT", "\@rem = '-*- Perl -*-\n\@echo off\nPERL -S %0.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9\ngoto endofperl\n';\n",
+	      "Win32", "\@rem = '-*- Perl -*-\n\@echo off\nPERL -S %0.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9\ngoto endofperl\n';\n",
 	      "OS2", "extproc PERL -x\n\#! PERL\n",
 	      "", "PSUTILS MAKEFILE CONFIGURATION ERROR") ;
 %perlend = ("UNIX", "",
 	    "DOS", "__END__\n:endofperl\n",
 	    "WINNT", "__END__\n:endofperl\n",
+	    "Win32", "__END__\n:endofperl\n",
 	    "OS2", "\# End of Script",
 	    "", "PSUTILS MAKEFILE CONFIGURATION ERROR");