summaryrefslogtreecommitdiff
path: root/print/html2ps/patches/patch-aa
blob: 793d2cff01c9b8ca5d2efc7cb9c2bba21938d64b (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
$NetBSD: patch-aa,v 1.8 2011/11/18 21:59:01 ryoon Exp $

--- install.orig	2005-03-03 12:25:29.000000000 +0000
+++ install
@@ -17,7 +17,9 @@ if(-e '/dev/null') {
     $pathsep = ':';
     $dirsep = '/';
     $sys = 'unix';
-    $prefix = '/usr/local';
+    $prefix = $ARGV[0];
+    $mandir = $ARGV[1];
+    $iprefix = $ARGV[2];
 } elsif (-e 'nul') {
     $pathsep = ';';
     $dirsep = '\\';
@@ -57,8 +59,8 @@ where the abovementioned packages are. Y
 the directories where the files should be placed.
 EOD
 
-&getval($goon, "y", "\nDo you want to proceed with the installation?");
-die "\n" if($goon!~/^y/i);
+#&getval($goon, "y", "\nDo you want to proceed with the installation?");
+#die "\n" if($goon!~/^y/i);
 
 print "\n";
 for $req (@perl) {
@@ -134,19 +136,22 @@ if(@reqpath) {
 
 chop ($cd = `pwd`);
 
-&getval($ans, "y",
- "\nBy default all files will be installed in subdirectories 'bin', 'lib',\n"
- ."and 'man' in a common directory. Is this OK?");
-$def = $ans=~/^y/i;
+$sharedir = "share";
 
-if($def) {
-    &getval($prefix, "$prefix", "\nEnter the name of this directory");
-    &fixdir($prefix);
-    while(!&goodprefix) {
-	&getval($prefix, "$prefix", "\nEnter a new directory name");
-    }
-    &makedir($prefix,0);
-}
+#&getval($ans, "y",
+# "\nBy default all files will be installed in subdirectories 'bin', '$sharedir',\n"
+# ."and 'man' in a common directory. Is this OK?");
+#$def = $ans=~/^y/i;
+$def = 1;
+
+#if($def) {
+#    &getval($prefix, "$prefix", "\nEnter the name of this directory");
+#    &fixdir($prefix);
+#    while(!&goodprefix) {
+#	&getval($prefix, "$prefix", "\nEnter a new directory name");
+#    }
+#    &makedir($prefix,0);
+#}
 
 if($def) {
     $bindir = "$prefix${dirsep}bin";
@@ -159,9 +164,9 @@ if($def) {
 &makedir($bindir,$def);
 
 if($def) {
-    $glob = "$prefix${dirsep}lib${dirsep}html2ps";
+    $glob = "$prefix${dirsep}${sharedir}${dirsep}html2ps";
 } else {
-    &getval($glob, "$prefix${dirsep}lib${dirsep}html2ps",
+    &getval($glob, "$prefix${dirsep}${sharedir}${dirsep}html2ps",
      "\nEnter the the directory where the global configuration file for\n"
     ."html2ps should be put");
     $glob =~ s|/$||g;
@@ -174,7 +179,7 @@ if(-f "$glob${dirsep}html2psrc") {
 }
 
 if($def) {
-    $man1 = "$prefix${dirsep}man${dirsep}man1";
+    $man1 = "$prefix${dirsep}${mandir}${dirsep}man1";
 } else {
     &getval($man1, "$prefix${dirsep}man${dirsep}man1",
      "\nEnter the directory for the html2ps manual page");
@@ -183,7 +188,7 @@ if($def) {
 &makedir($man1,$def);
 
 if($def) {
-    $man5 = "$prefix${dirsep}man${dirsep}man5";
+    $man5 = "$prefix${dirsep}${mandir}${dirsep}man5";
 } else {
     &getval($man5, "$prefix${dirsep}man${dirsep}man5",
      "\nEnter the directory for the manual page describing the configuration\n"
@@ -198,7 +203,7 @@ $cophy = 1;
 if($exist{'TeX'}) {
     $hfile = "";
     ($texdir = $dir{'TeX'}) =~ s|/bin$||;
-    SW:for("texmf/tex/generic/hyphen","macros","inputs","lib/macros",
+    SW:for("share/texmf/tex/generic/hyphen","macros","inputs","lib/macros",
         "lib/inputs","lib/tex/macros","lib/tex/inputs") {
         if(-f "$texdir/$_/ushyph1.tex") {
             $hyph = "$texdir/$_";
@@ -212,15 +217,15 @@ if($exist{'TeX'}) {
         }
     }
     if($hfile) {
-        &getval($hdef, "y", "$ht I believe that I have found\nthe pattern "
-         ."file for English in your TeX installation:\n\n  "
-         ."$hfile\n\nWould you like to use this instead of the "
-         ."file included with html2ps?");
-        if($hdef=~/^y/i) {
+#        &getval($hdef, "y", "$ht I believe that I have found\nthe pattern "
+#         ."file for English in your TeX installation:\n\n  "
+#         ."$hfile\n\nWould you like to use this instead of the "
+#         ."file included with html2ps?");
+#        if($hdef=~/^y/i) {
             $cophy = 0;
-        } else {
-            $hfile = "";
-        }
+#        } else {
+#            $hfile = "";
+#        }
     } else {
         &getval($hfile, "", "$ht I cannot find the pattern\nfile for English "
          ."in your TeX installation. (It should be called\n'hyphen.tex', "
@@ -236,9 +241,9 @@ if($exist{'TeX'}) {
     }
     if(!$hfile) {
         if($def) {
-            $hyph = "$prefix${dirsep}lib${dirsep}html2ps";
+            $hyph = "$prefix${dirsep}${sharedir}${dirsep}html2ps";
         } else {
-            &getval($hyph, "$prefix${dirsep}lib${dirsep}html2ps",
+            &getval($hyph, "$prefix${dirsep}${sharedir}${dirsep}html2ps",
              "\nOK, I will use the supplied pattern file for English. Enter "
             ."the directory\nwhere this file should be put");
             &fixdir($hyph);
@@ -246,9 +251,9 @@ if($exist{'TeX'}) {
     }
 } else {
     if($def) {
-        $hyph = "$prefix${dirsep}lib${dirsep}html2ps";
+        $hyph = "$prefix${dirsep}${sharedir}${dirsep}html2ps";
     } else {
-    &getval($hyph, "$prefix${dirsep}lib${dirsep}html2ps", "$ht A pattern file for English is\n"
+    &getval($hyph, "$prefix${dirsep}${sharedir}${dirsep}html2ps", "$ht A pattern file for English is\n"
      ."included with html2ps (see the documentation how to install pattern\n"
      ."files for other languages). Enter the directory where this file\n"
      ."should be put");
@@ -260,20 +265,21 @@ if($cophy) {
 }
 
 if($def) {
-    $html = "$prefix${dirsep}lib${dirsep}html2ps";
+    $html = "$prefix${dirsep}${sharedir}${dirsep}html2ps";
 } else {
-    &getval($html, "$prefix${dirsep}lib${dirsep}html2ps",
+    &getval($html, "$prefix${dirsep}${sharedir}${dirsep}html2ps",
      "\nEnter a directory where to put the HTML document describing\nhtml2ps");
     &fixdir($html);
 }
 &makedir($html,$def);
 
-$paper = "";
-&getval($format, "A4",
- "\nEnter the default paper type, possible choices are:\nA0, A1, A2, A3, A4,"
- ." A5, A6, A7, A8, A9, A10,\nB0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10,\n"
- ."letter, legal, arche, archd, archc, archb, archa,\nflsa, flse, halfletter,"
- ." 11x17, ledger, other");
+$format = "letter";
+#$paper = "";
+#&getval($format, "A4",
+# "\nEnter the default paper type, possible choices are:\nA0, A1, A2, A3, A4,"
+# ." A5, A6, A7, A8, A9, A10,\nB0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10,\n"
+# ."letter, legal, arche, archd, archc, archb, archa,\nflsa, flse, halfletter,"
+# ." 11x17, ledger, other");
 if($format !~ /^other$/i) {
     $paper .= "    type: $format;";
 } else {
@@ -292,9 +298,9 @@ close RC;
 
 undef $/;
 open(HTML2PS,"html2ps") || die "*** Error opening html2ps\n";
-($code = <HTML2PS>) =~ s|\$globrc=.*|\$globrc='$glob${dirsep}html2psrc';|;
+($code = <HTML2PS>) =~ s|\$globrc=.*|\$globrc='$iprefix${dirsep}${sharedir}${dirsep}html2ps${dirsep}html2psrc';|;
 $code =~ s/exec \S+/exec $^X/;
-$code =~ s|\$ug=.*|\$ug='$html${dirsep}html2ps.html';|;
+$code =~ s|\$ug=.*|\$ug='$iprefix${dirsep}${sharedir}${dirsep}html2ps.html';|;
 close HTML2PS;
 open(HTML2PS,">html2ps") || die "*** Error opening html2ps\n";
 print HTML2PS $code;
@@ -431,7 +437,7 @@ sub inst {
     copy $from => $_[0].$dirsep.$_[1] or die "*** Cannot write to $_[0]\n";
 }
 sub goodprefix {
-    for ($prefix, "$prefix${dirsep}bin", "$prefix${dirsep}lib",
+    for ($prefix, "$prefix${dirsep}bin", "$prefix${dirsep}${sharedir}",
 	 "$prefix${dirsep}man")
     {
 	if (-d $_ && !-w $_) {