]>
Commit | Line | Data |
---|---|---|
003cac49 JR |
1 | diff -urN rpm-3.0.5.orig/configure.in rpm-3.0.5/configure.in |
2 | --- rpm-3.0.5.orig/configure.in Sun Jul 30 00:05:48 2000 | |
3 | +++ rpm-3.0.5/configure.in Sun Jul 30 00:07:06 2000 | |
4 | @@ -181,6 +181,7 @@ | |
5 | AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH) | |
6 | AC_PATH_PROG(__MV, mv, /bin/mv, $MYPATH) | |
7 | AC_PATH_PROG(__PATCH, patch, /usr/bin/patch, $MYPATH) | |
8 | + AC_PATH_PROG(PERL, perl, /usr/bin/perl, $MYPATH) | |
9 | AC_MSG_CHECKING(old version of patch) | |
10 | PATCHVERSION=`patch --version 2>&1` | |
11 | ||
12 | @@ -913,7 +914,8 @@ | |
13 | dnl export LIBS INCPATH CONFIG_SITE | |
14 | ||
15 | AC_CONFIG_SUBDIRS(popt) | |
16 | -AC_OUTPUT([Doxyfile Makefile rpmrc macros macros.pld platform rpmpopt scripts/brp-redhat | |
17 | +AC_OUTPUT([Doxyfile Makefile rpmrc macros macros.pld platform rpmpopt | |
18 | + scripts/brp-redhat macros.perl scripts/perl.req scripts/perl.prov | |
19 | lib/Makefile build/Makefile tools/Makefile scripts/Makefile | |
20 | tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile | |
21 | misc/Makefile po/Makefile.in intl/Makefile | |
22 | diff -urN rpm-3.0.5.orig/macros.in rpm-3.0.5/macros.in | |
23 | --- rpm-3.0.5.orig/macros.in Sun Jul 30 00:05:48 2000 | |
24 | +++ rpm-3.0.5/macros.in Sun Jul 30 00:07:06 2000 | |
25 | @@ -569,9 +569,11 @@ | |
26 | # %{perl_sitearch}/Image | |
27 | # %dir %{perl_sitearch}/auto/Image | |
28 | # | |
29 | +# | |
30 | +# NOTE: %{perl_sitearch}, %{perl_archlib} and %{perl_sitelib} macros | |
31 | +# has been moved to macros.perl (see info in this file for details). | |
32 | +# | |
33 | %requires_eq() %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} = %%{VERSION}' %1| grep -v "is not") | |
34 | -%perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch) | |
35 | -%perl_archlib %(eval "`perl -V:installarchlib`"; echo $installarchlib) | |
36 | ||
37 | #------------------------------------------------------------------------------ | |
38 | # arch macro for all Intel i?86 compatibile processors | |
39 | diff -urN rpm-3.0.5.orig/macros.perl.in rpm-3.0.5/macros.perl.in | |
40 | --- rpm-3.0.5.orig/macros.perl.in Thu Jan 1 01:00:00 1970 | |
41 | +++ rpm-3.0.5/macros.perl.in Sun Jul 30 00:07:06 2000 | |
42 | @@ -0,0 +1,11 @@ | |
43 | +# Perl specific macro definitions. | |
44 | +# To make use of these macros insert the following line into your spec file: | |
45 | +# %include @RPMCONFIGDIR@/macros.perl | |
46 | + | |
47 | +%define __find_requires @RPMCONFIGDIR@/find-perl-requires | |
48 | +%define __find_provides @RPMCONFIGDIR@/find-perl-provides | |
49 | + | |
50 | +%define perl_sitelib %(eval "`perl -V:installsitelib`"; echo $installsitelib) | |
51 | +%define perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch) | |
52 | +%define perl_archlib %(eval "`perl -V:installarchlib`"; echo $installarchlib) | |
53 | + | |
54 | diff -urN rpm-3.0.5.orig/scripts/Makefile.am rpm-3.0.5/scripts/Makefile.am | |
55 | --- rpm-3.0.5.orig/scripts/Makefile.am Sun Jul 9 17:36:20 2000 | |
56 | +++ rpm-3.0.5/scripts/Makefile.am Sun Jul 30 00:07:51 2000 | |
4703c2f4 | 57 | @@ -8,7 +8,8 @@ |
003cac49 JR |
58 | find-prov.pl find-req.pl cpanflute find-provides.perl \ |
59 | find-requires.perl get_magic.pl getpo.sh http.req \ | |
60 | magic.prov magic.req perl.prov perl.req rpmdiff rpmdiff.cgi u_pkg.sh \ | |
4703c2f4 AF |
61 | - vpkg-provides.sh vpkg-provides2.sh |
62 | + vpkg-provides.sh vpkg-provides2.sh \ | |
63 | + find-perl-requires find-perl-provides | |
edf87823 | 64 | |
65 | installprefix = $(DESTDIR) | |
66 | ||
4703c2f4 | 67 | @@ -21,4 +22,5 @@ |
003cac49 JR |
68 | find-prov.pl find-req.pl cpanflute find-provides.perl \ |
69 | find-requires.perl get_magic.pl getpo.sh http.req \ | |
70 | magic.prov magic.req perl.prov perl.req rpmdiff rpmdiff.cgi u_pkg.sh \ | |
4703c2f4 AF |
71 | - vpkg-provides.sh vpkg-provides2.sh |
72 | + vpkg-provides.sh vpkg-provides2.sh \ | |
73 | + find-perl-requires find-perl-provides | |
003cac49 JR |
74 | diff -urN rpm-3.0.5.orig/scripts/find-perl-provides rpm-3.0.5/scripts/find-perl-provides |
75 | --- rpm-3.0.5.orig/scripts/find-perl-provides Thu Jan 1 01:00:00 1970 | |
76 | +++ rpm-3.0.5/scripts/find-perl-provides Sun Jul 30 00:07:06 2000 | |
77 | @@ -0,0 +1,8 @@ | |
78 | +#!/bin/sh | |
79 | +ulimit -c 0 | |
80 | + | |
81 | +filelist=`sed "s/['\"]/\\\&/g"` | |
82 | + | |
83 | +echo $filelist|/usr/lib/rpm/find-provides | |
84 | +/usr/lib/rpm/perl.prov $filelist | |
85 | + | |
86 | diff -urN rpm-3.0.5.orig/scripts/find-perl-requires rpm-3.0.5/scripts/find-perl-requires | |
87 | --- rpm-3.0.5.orig/scripts/find-perl-requires Thu Jan 1 01:00:00 1970 | |
88 | +++ rpm-3.0.5/scripts/find-perl-requires Sun Jul 30 00:07:06 2000 | |
89 | @@ -0,0 +1,11 @@ | |
90 | +#!/bin/sh | |
91 | +ulimit -c 0 | |
92 | + | |
93 | +filelist=`sed "s/['\"]/\\\&/g"` | |
94 | + | |
95 | +requires="`echo $filelist|/usr/lib/rpm/find-requires`" | |
96 | +requires_perl="`/usr/lib/rpm/perl.req $filelist`" | |
97 | +requires_mod="`rpm -q --whatprovides --qf "%{NAME}\n" $requires_perl 2>/dev/null`" | |
98 | +echo "$requires | |
99 | +$requires_perl | |
100 | +$requires_mod"| sort -u | |
101 | diff -urN rpm-3.0.5.orig/scripts/perl.prov rpm-3.0.5/scripts/perl.prov | |
102 | --- rpm-3.0.5.orig/scripts/perl.prov Wed Jun 14 14:34:50 2000 | |
103 | +++ rpm-3.0.5/scripts/perl.prov Sun Jul 30 00:07:06 2000 | |
104 | @@ -47,7 +47,9 @@ | |
105 | ||
106 | if ("@ARGV") { | |
107 | foreach (@ARGV) { | |
108 | - process_file($_); | |
109 | + if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod|h|html)$)=) { | |
110 | + process_file($_); | |
111 | + } | |
112 | } | |
113 | } else { | |
114 | ||
115 | @@ -55,7 +57,9 @@ | |
116 | # contents of the file. | |
117 | ||
118 | foreach (<>) { | |
119 | - process_file($_); | |
120 | + if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod|h|html)$)=) { | |
121 | + process_file($_); | |
122 | + } | |
123 | } | |
124 | } | |
125 | ||
126 | diff -urN rpm-3.0.5.orig/scripts/perl.req rpm-3.0.5/scripts/perl.req | |
127 | --- rpm-3.0.5.orig/scripts/perl.req Wed Jun 14 14:34:50 2000 | |
128 | +++ rpm-3.0.5/scripts/perl.req Sun Jul 30 00:07:06 2000 | |
2fa5aec3 AF |
129 | @@ -1,4 +1,4 @@ |
130 | -#!/usr/bin/perl | |
131 | +#!@PERL@ | |
4703c2f4 AF |
132 | |
133 | # RPM (and it's source code) is covered under two separate licenses. | |
134 | ||
135 | @@ -41,7 +41,11 @@ | |
2fa5aec3 AF |
136 | |
137 | if ("@ARGV") { | |
138 | foreach (@ARGV) { | |
139 | - process_file($_); | |
20a6d548 | 140 | + if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) { |
2eb651d8 | 141 | + if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) { |
2fa5aec3 AF |
142 | + process_file($_); |
143 | + } | |
144 | + } | |
145 | } | |
146 | } else { | |
147 | ||
4703c2f4 | 148 | @@ -49,14 +53,22 @@ |
2fa5aec3 AF |
149 | # contents of the file. |
150 | ||
151 | foreach (<>) { | |
152 | - process_file($_); | |
4703c2f4 AF |
153 | + if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) { |
154 | + if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) { | |
155 | + process_file($_); | |
156 | + } | |
157 | + } | |
2fa5aec3 AF |
158 | } |
159 | } | |
edf87823 | 160 | |
161 | ||
162 | foreach $module (sort keys %require) { | |
edf87823 | 163 | if (length($require{$module}) == 0) { |
164 | - print "perl($module)\n"; | |
4703c2f4 AF |
165 | + if ($module =~ /^[0-9._]+$/) { |
166 | + print "perl >= $module\n"; | |
167 | + } else { | |
168 | + print "perl($module)\n"; | |
169 | + } | |
edf87823 | 170 | } else { |
2fa5aec3 | 171 | |
4703c2f4 AF |
172 | # I am not using rpm3.0 so I do not want spaces arround my |
173 | @@ -183,7 +195,31 @@ | |
3ce8984f | 174 | # will be included with the name sys/systeminfo.ph so only use the |
175 | # basename of *.ph files | |
176 | ||
177 | - ($module =~ m/\.ph$/) && ($module =~ s!.*/!!g ); | |
178 | + # ($module =~ m/\.ph$/) && ($module =~ s!.*/!!g ); | |
cfd811fa | 179 | + |
852c3a98 | 180 | + # there is no need to generate dependencies for ph, pl or test files |
4a19987c | 181 | + # so let's just skip them. |
4703c2f4 | 182 | + |
852c3a98 | 183 | + ($module =~ m/\.(ph|pl|t)$/) && next; |
cfd811fa | 184 | + |
4a19987c | 185 | + # skip all modules for platforms other than linux. |
92b19143 | 186 | + |
187 | + ($module =~ m/Mac|OS2|MSDOS|Win32|VMS|vmsish/) && next; | |
188 | + | |
4a19987c | 189 | + # if the module name starts in a dot it is not a module name. |
4d8fb4e3 | 190 | + |
191 | + ($module =~ m/^\./) && next; | |
192 | + | |
4a19987c | 193 | + # if the module ends with .pm strip it to leave only basename. |
5e855029 | 194 | + |
4a19987c | 195 | + $module =~ s/\.pm$//; |
5e855029 | 196 | + |
cb87a980 | 197 | + $module =~ s/\//::/; |
198 | + | |
4a19987c | 199 | + # trim off trailing parenthesis if any. Sometimes people pass |
200 | + # the module an empty list. | |
201 | + | |
202 | + $module =~ s/\(\s*\)$//; | |
cfd811fa | 203 | |
4703c2f4 | 204 | |
3ce8984f | 205 | $require{$module}=$version; |