]>
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 | |
04ad64ec | 42 | @@ -0,0 +1,12 @@ |
003cac49 JR |
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) | |
04ad64ec | 53 | +%define perl_privlib %(eval "`perl -V:installprivlib`"; echo $installprivlib) |
003cac49 JR |
54 | + |
55 | diff -urN rpm-3.0.5.orig/scripts/Makefile.am rpm-3.0.5/scripts/Makefile.am | |
56 | --- rpm-3.0.5.orig/scripts/Makefile.am Sun Jul 9 17:36:20 2000 | |
57 | +++ rpm-3.0.5/scripts/Makefile.am Sun Jul 30 00:07:51 2000 | |
4703c2f4 | 58 | @@ -8,7 +8,8 @@ |
003cac49 JR |
59 | find-prov.pl find-req.pl cpanflute find-provides.perl \ |
60 | find-requires.perl get_magic.pl getpo.sh http.req \ | |
61 | magic.prov magic.req perl.prov perl.req rpmdiff rpmdiff.cgi u_pkg.sh \ | |
4703c2f4 AF |
62 | - vpkg-provides.sh vpkg-provides2.sh |
63 | + vpkg-provides.sh vpkg-provides2.sh \ | |
64 | + find-perl-requires find-perl-provides | |
edf87823 | 65 | |
66 | installprefix = $(DESTDIR) | |
67 | ||
4703c2f4 | 68 | @@ -21,4 +22,5 @@ |
003cac49 JR |
69 | find-prov.pl find-req.pl cpanflute find-provides.perl \ |
70 | find-requires.perl get_magic.pl getpo.sh http.req \ | |
71 | magic.prov magic.req perl.prov perl.req rpmdiff rpmdiff.cgi u_pkg.sh \ | |
4703c2f4 AF |
72 | - vpkg-provides.sh vpkg-provides2.sh |
73 | + vpkg-provides.sh vpkg-provides2.sh \ | |
74 | + find-perl-requires find-perl-provides | |
003cac49 JR |
75 | diff -urN rpm-3.0.5.orig/scripts/find-perl-provides rpm-3.0.5/scripts/find-perl-provides |
76 | --- rpm-3.0.5.orig/scripts/find-perl-provides Thu Jan 1 01:00:00 1970 | |
77 | +++ rpm-3.0.5/scripts/find-perl-provides Sun Jul 30 00:07:06 2000 | |
78 | @@ -0,0 +1,8 @@ | |
79 | +#!/bin/sh | |
80 | +ulimit -c 0 | |
81 | + | |
82 | +filelist=`sed "s/['\"]/\\\&/g"` | |
83 | + | |
84 | +echo $filelist|/usr/lib/rpm/find-provides | |
85 | +/usr/lib/rpm/perl.prov $filelist | |
86 | + | |
87 | diff -urN rpm-3.0.5.orig/scripts/find-perl-requires rpm-3.0.5/scripts/find-perl-requires | |
88 | --- rpm-3.0.5.orig/scripts/find-perl-requires Thu Jan 1 01:00:00 1970 | |
89 | +++ rpm-3.0.5/scripts/find-perl-requires Sun Jul 30 00:07:06 2000 | |
90 | @@ -0,0 +1,11 @@ | |
91 | +#!/bin/sh | |
92 | +ulimit -c 0 | |
93 | + | |
94 | +filelist=`sed "s/['\"]/\\\&/g"` | |
95 | + | |
96 | +requires="`echo $filelist|/usr/lib/rpm/find-requires`" | |
97 | +requires_perl="`/usr/lib/rpm/perl.req $filelist`" | |
98 | +requires_mod="`rpm -q --whatprovides --qf "%{NAME}\n" $requires_perl 2>/dev/null`" | |
99 | +echo "$requires | |
100 | +$requires_perl | |
101 | +$requires_mod"| sort -u | |
102 | diff -urN rpm-3.0.5.orig/scripts/perl.prov rpm-3.0.5/scripts/perl.prov | |
103 | --- rpm-3.0.5.orig/scripts/perl.prov Wed Jun 14 14:34:50 2000 | |
104 | +++ rpm-3.0.5/scripts/perl.prov Sun Jul 30 00:07:06 2000 | |
105 | @@ -47,7 +47,9 @@ | |
106 | ||
107 | if ("@ARGV") { | |
108 | foreach (@ARGV) { | |
109 | - process_file($_); | |
110 | + if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod|h|html)$)=) { | |
111 | + process_file($_); | |
112 | + } | |
113 | } | |
114 | } else { | |
115 | ||
116 | @@ -55,7 +57,9 @@ | |
117 | # contents of the file. | |
118 | ||
119 | foreach (<>) { | |
120 | - process_file($_); | |
121 | + if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod|h|html)$)=) { | |
122 | + process_file($_); | |
123 | + } | |
124 | } | |
125 | } | |
126 | ||
127 | diff -urN rpm-3.0.5.orig/scripts/perl.req rpm-3.0.5/scripts/perl.req | |
128 | --- rpm-3.0.5.orig/scripts/perl.req Wed Jun 14 14:34:50 2000 | |
129 | +++ rpm-3.0.5/scripts/perl.req Sun Jul 30 00:07:06 2000 | |
2fa5aec3 AF |
130 | @@ -1,4 +1,4 @@ |
131 | -#!/usr/bin/perl | |
132 | +#!@PERL@ | |
4703c2f4 AF |
133 | |
134 | # RPM (and it's source code) is covered under two separate licenses. | |
135 | ||
136 | @@ -41,7 +41,11 @@ | |
2fa5aec3 AF |
137 | |
138 | if ("@ARGV") { | |
139 | foreach (@ARGV) { | |
140 | - process_file($_); | |
20a6d548 | 141 | + if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) { |
2eb651d8 | 142 | + if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) { |
2fa5aec3 AF |
143 | + process_file($_); |
144 | + } | |
145 | + } | |
146 | } | |
147 | } else { | |
148 | ||
4703c2f4 | 149 | @@ -49,14 +53,22 @@ |
2fa5aec3 AF |
150 | # contents of the file. |
151 | ||
152 | foreach (<>) { | |
153 | - process_file($_); | |
4703c2f4 AF |
154 | + if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) { |
155 | + if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) { | |
156 | + process_file($_); | |
157 | + } | |
158 | + } | |
2fa5aec3 AF |
159 | } |
160 | } | |
edf87823 | 161 | |
162 | ||
163 | foreach $module (sort keys %require) { | |
edf87823 | 164 | if (length($require{$module}) == 0) { |
165 | - print "perl($module)\n"; | |
4703c2f4 AF |
166 | + if ($module =~ /^[0-9._]+$/) { |
167 | + print "perl >= $module\n"; | |
168 | + } else { | |
169 | + print "perl($module)\n"; | |
170 | + } | |
edf87823 | 171 | } else { |
2fa5aec3 | 172 | |
4703c2f4 AF |
173 | # I am not using rpm3.0 so I do not want spaces arround my |
174 | @@ -183,7 +195,31 @@ | |
3ce8984f | 175 | # will be included with the name sys/systeminfo.ph so only use the |
176 | # basename of *.ph files | |
177 | ||
178 | - ($module =~ m/\.ph$/) && ($module =~ s!.*/!!g ); | |
179 | + # ($module =~ m/\.ph$/) && ($module =~ s!.*/!!g ); | |
cfd811fa | 180 | + |
852c3a98 | 181 | + # there is no need to generate dependencies for ph, pl or test files |
4a19987c | 182 | + # so let's just skip them. |
4703c2f4 | 183 | + |
852c3a98 | 184 | + ($module =~ m/\.(ph|pl|t)$/) && next; |
cfd811fa | 185 | + |
4a19987c | 186 | + # skip all modules for platforms other than linux. |
92b19143 | 187 | + |
188 | + ($module =~ m/Mac|OS2|MSDOS|Win32|VMS|vmsish/) && next; | |
189 | + | |
4a19987c | 190 | + # if the module name starts in a dot it is not a module name. |
4d8fb4e3 | 191 | + |
192 | + ($module =~ m/^\./) && next; | |
193 | + | |
4a19987c | 194 | + # if the module ends with .pm strip it to leave only basename. |
5e855029 | 195 | + |
4a19987c | 196 | + $module =~ s/\.pm$//; |
5e855029 | 197 | + |
cb87a980 | 198 | + $module =~ s/\//::/; |
199 | + | |
4a19987c | 200 | + # trim off trailing parenthesis if any. Sometimes people pass |
201 | + # the module an empty list. | |
202 | + | |
203 | + $module =~ s/\(\s*\)$//; | |
cfd811fa | 204 | |
4703c2f4 | 205 | |
3ce8984f | 206 | $require{$module}=$version; |