]>
Commit | Line | Data |
---|---|---|
cfd811fa AF |
1 | --- rpm-3.0.3/scripts/Makefile.am.wiget Sat Jun 5 22:52:30 1999 |
2 | +++ rpm-3.0.3/scripts/Makefile.am Sat Oct 30 12:28:50 1999 | |
edf87823 | 3 | @@ -4,7 +4,8 @@ |
4 | ||
5 | EXTRA_DIST = \ | |
6 | convertrpmrc.sh find-lang.sh freshen.sh getpo.sh \ | |
7 | - perl.prov perl.req vpkg-provides.sh | |
8 | + perl.prov perl.req find-perl-requires find-perl-provides \ | |
9 | + vpkg-provides.sh | |
10 | ||
11 | installprefix = $(DESTDIR) | |
12 | ||
13 | @@ -13,5 +14,6 @@ | |
14 | configdir = ${prefix}/lib/rpm | |
15 | config_SCRIPTS = \ | |
16 | convertrpmrc.sh find-lang.sh freshen.sh getpo.sh \ | |
17 | - perl.prov perl.req vpkg-provides.sh | |
18 | + perl.prov perl.req find-perl-requires find-perl-provides \ | |
19 | + vpkg-provides.sh | |
20 | ||
cfd811fa AF |
21 | --- rpm-3.0.3/scripts/find-perl-provides.wiget Sat Oct 30 12:28:50 1999 |
22 | +++ rpm-3.0.3/scripts/find-perl-provides Sat Oct 30 12:28:50 1999 | |
edf87823 | 23 | @@ -0,0 +1,8 @@ |
24 | +#!/bin/sh | |
25 | +ulimit -c 0 | |
26 | + | |
27 | +filelist=`sed "s/['\"]/\\\&/g"` | |
28 | + | |
29 | +echo $filelist|/usr/lib/rpm/find-provides | |
30 | +/usr/lib/rpm/perl.prov $filelist | |
31 | + | |
cfd811fa AF |
32 | --- rpm-3.0.3/scripts/find-perl-requires.wiget Sat Oct 30 12:28:50 1999 |
33 | +++ rpm-3.0.3/scripts/find-perl-requires Sat Oct 30 12:28:50 1999 | |
edf87823 | 34 | @@ -0,0 +1,11 @@ |
35 | +#!/bin/sh | |
36 | +ulimit -c 0 | |
37 | + | |
38 | +filelist=`sed "s/['\"]/\\\&/g"` | |
39 | + | |
40 | +requires="`echo $filelist|/usr/lib/rpm/find-requires`" | |
41 | +requires_perl="`/usr/lib/rpm/perl.req $filelist`" | |
42 | +requires_mod="`rpm -q --whatprovides --qf "%{NAME}\n" $requires_perl 2>/dev/null`" | |
43 | +echo "$requires | |
44 | +$requires_perl | |
45 | +$requires_mod"| sort -u | |
3ce8984f | 46 | --- rpm-3.0.3/macros.in.wiget Sat Oct 30 12:28:50 1999 |
47 | +++ rpm-3.0.3/macros.in Sat Oct 30 12:28:50 1999 | |
48 | @@ -248,6 +248,8 @@ | |
49 | # %{perl_sitearch}/Image | |
50 | # %dir %{perl_sitearch}/auto/Image | |
51 | # | |
52 | +# | |
53 | +# NOTE: %{perl_sitearch}, %{perl_archlib} and %{perl_sitelib} macros | |
54 | +# has been moved to macros.perl (see info in this file for details). | |
55 | +# | |
56 | %requires_eq() %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} = %%{VERSION}' %1| grep -v "is not") | |
57 | -%perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch) | |
58 | -%perl_archlib %(eval "`perl -V:installarchlib`"; echo $installarchlib) | |
59 | --- rpm-3.0.3/macros.perl.in.wiget Sat Oct 30 12:28:50 1999 | |
60 | +++ rpm-3.0.3/macros.perl.in Sat Oct 30 12:28:50 1999 | |
61 | @@ -0,0 +1,11 @@ | |
62 | +# Perl specific macro definitions. | |
63 | +# To make use of these macros insert the following line into your spec file: | |
64 | +# %include @RPMCONFIGDIR@/macros.perl | |
65 | + | |
66 | +%define __find_requires @RPMCONFIGDIR@/find-perl-requires | |
67 | +%define __find_provides @RPMCONFIGDIR@/find-perl-provides | |
68 | + | |
69 | +%define perl_sitelib %(eval "`perl -V:installsitelib`"; echo $installsitelib) | |
70 | +%define perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch) | |
71 | +%define perl_archlib %(eval "`perl -V:installarchlib`"; echo $installarchlib) | |
72 | + | |
73 | --- rpm-3.0.3/configure.in.wiget Sat Oct 30 13:17:49 1999 | |
74 | +++ rpm-3.0.3/configure.in Sat Oct 30 13:18:52 1999 | |
75 | @@ -181,6 +181,7 @@ | |
76 | AC_MSG_RESULT(patch later then 2.2 found) | |
77 | fi | |
78 | ||
79 | + AC_PATH_PROG(PERL, perl, /usr/bin/perl, $MYPATH) | |
80 | AC_PATH_PROG(PGPBIN, pgp, /usr/bin/pgp, $MYPATH) | |
81 | AC_PATH_PROG(__RM, rm, /bin/rm, $MYPATH) | |
82 | AC_PATH_PROG(__TAR, tar, /bin/tar, $MYPATH) | |
83 | @@ -906,8 +907,9 @@ | |
84 | export LIBS INCPATH CONFIG_SITE | |
85 | ||
86 | AC_CONFIG_SUBDIRS(popt) | |
87 | -AC_OUTPUT([Makefile rpmrc macros macros.pld lib/Makefile | |
88 | - build/Makefile tools/Makefile scripts/Makefile | |
89 | +AC_OUTPUT([Makefile rpmrc macros macros.pld macros.perl lib/Makefile | |
90 | + build/Makefile tools/Makefile | |
91 | + scripts/Makefile scripts/perl.req scripts/perl.prov | |
92 | tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile | |
93 | misc/Makefile po/Makefile.in intl/Makefile | |
94 | doc/Makefile doc/manual/Makefile doc/pl/Makefile doc/ru/Makefile | |
4a19987c | 95 | --- rpm-3.0.3/scripts/perl.req.pius Sat Jun 5 22:52:31 1999 |
96 | +++ rpm-3.0.3/scripts/perl.req Sun Dec 5 02:38:42 1999 | |
2fa5aec3 AF |
97 | @@ -1,4 +1,4 @@ |
98 | -#!/usr/bin/perl | |
99 | +#!@PERL@ | |
4a19987c | 100 | |
2fa5aec3 | 101 | # a simple makedepends like script for perl. |
4a19987c | 102 | |
2fa5aec3 AF |
103 | @@ -12,7 +12,11 @@ |
104 | ||
105 | if ("@ARGV") { | |
106 | foreach (@ARGV) { | |
107 | - process_file($_); | |
20a6d548 | 108 | + if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) { |
2eb651d8 | 109 | + if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) { |
2fa5aec3 AF |
110 | + process_file($_); |
111 | + } | |
112 | + } | |
113 | } | |
114 | } else { | |
115 | ||
4a19987c | 116 | @@ -20,22 +24,24 @@ |
2fa5aec3 AF |
117 | # contents of the file. |
118 | ||
119 | foreach (<>) { | |
120 | - process_file($_); | |
20a6d548 | 121 | + if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) { |
2eb651d8 | 122 | + if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) { |
2fa5aec3 AF |
123 | + process_file($_); |
124 | + } | |
125 | + } | |
126 | } | |
127 | } | |
edf87823 | 128 | |
129 | ||
130 | foreach $module (sort keys %require) { | |
edf87823 | 131 | if (length($require{$module}) == 0) { |
132 | - print "perl($module)\n"; | |
133 | + if ($module =~ /^[0-9._]+$/) { | |
134 | + print "perl >= $module\n"; | |
135 | + } else { | |
cfd811fa | 136 | + print "perl($module)\n"; |
edf87823 | 137 | + } |
138 | } else { | |
4a19987c | 139 | - |
edf87823 | 140 | - print "perl($module)>=$require{$module}\n"; |
4a19987c | 141 | - |
142 | - # we need to print it without the version number until the | |
143 | - # requires syntax accepts version numbers correctly. | |
144 | - | |
edf87823 | 145 | - print "perl($module)\n"; |
4a19987c | 146 | + print "perl($module) >= $require{$module}\n"; |
edf87823 | 147 | } |
148 | } | |
149 | ||
4a19987c | 150 | @@ -49,12 +55,16 @@ |
151 | chomp $file; | |
152 | ||
153 | open(FILE, "<$file")|| | |
154 | - die("Could not open file: '$file' : $!\n"); | |
155 | + die("$0: Could not open file: '$file' : $!\n"); | |
156 | ||
2fa5aec3 AF |
157 | while (<FILE>) { |
158 | ||
159 | # skip the documentation | |
160 | - if ( (m/^=(head1|head2|pod)/) .. (m/^=(cut)/) ) { | |
161 | + if ( (m/^=(head1|head2|pod|item)/) .. (m/^=(cut)/) ) { | |
4a19987c | 162 | + next; |
163 | + } | |
164 | + | |
165 | + if ( (m/^=(over)/) .. (m/^=(back)/) ) { | |
2fa5aec3 AF |
166 | next; |
167 | } | |
168 | ||
cb87a980 | 169 | @@ -108,13 +118,40 @@ |
3ce8984f | 170 | # will be included with the name sys/systeminfo.ph so only use the |
171 | # basename of *.ph files | |
172 | ||
173 | - ($module =~ m/\.ph$/) && ($module =~ s!.*/!!g ); | |
174 | + # ($module =~ m/\.ph$/) && ($module =~ s!.*/!!g ); | |
cfd811fa | 175 | + |
852c3a98 | 176 | + # there is no need to generate dependencies for ph, pl or test files |
4a19987c | 177 | + # so let's just skip them. |
178 | ||
852c3a98 | 179 | + ($module =~ m/\.(ph|pl|t)$/) && next; |
cfd811fa | 180 | + |
4a19987c | 181 | + # skip all modules for platforms other than linux. |
92b19143 | 182 | + |
183 | + ($module =~ m/Mac|OS2|MSDOS|Win32|VMS|vmsish/) && next; | |
184 | + | |
4a19987c | 185 | + # if the module name starts in a dot it is not a module name. |
4d8fb4e3 | 186 | + |
187 | + ($module =~ m/^\./) && next; | |
188 | + | |
4a19987c | 189 | + # if the module ends with .pm strip it to leave only basename. |
5e855029 | 190 | + |
4a19987c | 191 | + $module =~ s/\.pm$//; |
5e855029 | 192 | + |
cb87a980 | 193 | + $module =~ s/\//::/; |
194 | + | |
4a19987c | 195 | + # trim off trailing parenthesis if any. Sometimes people pass |
196 | + # the module an empty list. | |
197 | + | |
198 | + $module =~ s/\(\s*\)$//; | |
cfd811fa | 199 | |
3ce8984f | 200 | $require{$module}=$version; |
201 | $line{$module}=$_; | |
4a19987c | 202 | } |
203 | ||
204 | } | |
205 | - | |
206 | + | |
207 | + close(FILE)|| | |
208 | + die("$0: Could not close file: '$file' : $!\n"); | |
209 | + | |
210 | + return ; | |
211 | } | |
212 | --- rpm-3.0.3/scripts/perl.prov.pius Sat Jun 5 22:52:31 1999 | |
213 | +++ rpm-3.0.3/scripts/perl.prov Sun Dec 5 02:31:33 1999 | |
40e8d3f7 | 214 | @@ -1,4 +1,4 @@ |
215 | -#!/usr/bin/perl | |
216 | +#!@PERL@ | |
4a19987c | 217 | |
40e8d3f7 | 218 | # a simple script to print the proper name for perl libraries. |
4a19987c | 219 | |
40e8d3f7 | 220 | @@ -13,7 +13,9 @@ |
221 | ||
222 | if ("@ARGV") { | |
223 | foreach (@ARGV) { | |
224 | - process_file($_); | |
cebd7a08 | 225 | + if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod|h|html)$)=) { |
40e8d3f7 | 226 | + process_file($_); |
227 | + } | |
228 | } | |
229 | } else { | |
230 | ||
231 | @@ -21,7 +23,9 @@ | |
232 | # contents of the file. | |
233 | ||
234 | foreach (<>) { | |
235 | - process_file($_); | |
cebd7a08 | 236 | + if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod|h|html)$)=) { |
40e8d3f7 | 237 | + process_file($_); |
238 | + } | |
239 | } | |
240 | } | |
241 | ||
4a19987c | 242 | @@ -30,12 +34,7 @@ |
40e8d3f7 | 243 | if (length($require{$module}) == 0) { |
244 | print "perl($module)\n"; | |
245 | } else { | |
246 | - print "perl($module)=$require{$module}\n"; | |
4a19987c | 247 | - |
248 | - # we need to print it without the version number until the | |
249 | - # requires syntax accepts version numbers correctly. | |
250 | - | |
251 | - print "perl($module)\n"; | |
40e8d3f7 | 252 | + print "perl($module) = $require{$module}\n"; |
4a19987c | 253 | } |
254 | } | |
40e8d3f7 | 255 | |
4a19987c | 256 | @@ -49,14 +48,18 @@ |
257 | chomp $file; | |
258 | ||
259 | open(FILE, "<$file")|| | |
260 | - die("Could not open file: '$file' : $!\n"); | |
261 | + die("$0: Could not open file: '$file' : $!\n"); | |
40e8d3f7 | 262 | |
4a19987c | 263 | my ($package, $version) = (); |
264 | ||
265 | while (<FILE>) { | |
266 | ||
267 | # skip the documentation | |
268 | - if ( (m/^=(head1|head2|pod)/) .. (m/^=(cut)/) ) { | |
269 | + if ( (m/^=(head1|head2|pod|item)/) .. (m/^=(cut)/) ) { | |
270 | + next; | |
271 | + } | |
272 | + | |
273 | + if ( (m/^=(over)/) .. (m/^=(back)/) ) { | |
274 | next; | |
275 | } | |
276 | ||
277 | @@ -88,7 +91,7 @@ | |
278 | ||
279 | if ( | |
280 | ($package) && | |
281 | - (m/^\s*\$VERSION\s+=\s+/) | |
282 | + (m/^\s*\$VERSION\s*=\s+/) | |
283 | ) { | |
284 | ||
285 | # first see if the version string contains the string | |
286 | @@ -107,6 +110,9 @@ | |
287 | } | |
288 | ||
40e8d3f7 | 289 | } |
4a19987c | 290 | + |
291 | + close(FILE)|| | |
292 | + die("$0: Could not close file: '$file' : $!\n"); | |
40e8d3f7 | 293 | |
4a19987c | 294 | return ; |
295 | } |