1 diff -urN perl-5.6.1/find-perl-provides perl-5.6.1-grabba/find-perl-provides
2 --- perl-5.6.1/find-perl-provides Thu Jan 1 00:00:00 1970
3 +++ perl-5.6.1-grabba/find-perl-provides Sun Mar 3 14:41:39 2002
8 +export LD_LIBRARY_PATH="FPPATH"
10 +filelist=`sed "s/['\"]/\\\&/g"`
11 +if [ -f __rpm_noautoprovfiles ] ; then
12 + for i in `cat __rpm_noautoprovfiles`; do
13 + filelist=`echo $filelist | sed "s![[:space:]]*$i[[:space:]]*!!g"`
18 +echo $filelist|/usr/lib/rpm/find-provides
19 +provides_perl=`FPPATH/find-perl.prov $filelist`
20 +if [ -f __rpm_noautoprov ] ; then
21 + for i in `cat __rpm_noautoprov`; do
22 + provides_perl=`echo $provides_perl | sed "s!\<$i[[:space:]]*!!g"`
26 +echo "$provides_perl" | grep -v '^perl(DynaLoader)$'
28 diff -urN perl-5.6.1/find-perl.prov perl-5.6.1-grabba/find-perl.prov
29 --- perl-5.6.1/find-perl.prov Thu Jan 1 00:00:00 1970
30 +++ perl-5.6.1-grabba/find-perl.prov Sun Mar 3 14:37:16 2002
34 +# RPM (and it's source code) is covered under two separate licenses.
36 +# The entire code base may be distributed under the terms of the GNU
37 +# General Public License (GPL), which appears immediately below.
38 +# Alternatively, all of the source code in the lib subdirectory of the
39 +# RPM source code distribution as well as any code derived from that
40 +# code may instead be distributed under the GNU Library General Public
41 +# License (LGPL), at the choice of the distributor. The complete text
42 +# of the LGPL appears at the bottom of this file.
44 +# This alternative is allowed to enable applications to be linked
45 +# against the RPM library (commonly called librpm) without forcing
46 +# such applications to be distributed under the GPL.
48 +# Any questions regarding the licensing of RPM should be addressed to
49 +# Erik Troan <ewt@redhat.com>.
51 +# a simple script to print the proper name for perl libraries.
53 +# To save development time I do not parse the perl grammmar but
54 +# instead just lex it looking for what I want. I take special care to
55 +# ignore comments and pod's.
57 +# it would be much better if perl could tell us the proper name of a
60 +# The filenames to scan are either passed on the command line or if
61 +# that is empty they are passed via stdin.
63 +# If there are lines in the file which match the pattern
64 +# (m/^\s*\$VERSION\s*=\s+/)
65 +# then these are taken to be the version numbers of the modules.
66 +# Special care is taken with a few known idioms for specifying version
67 +# numbers of files under rcs/cvs control.
69 +# If there are strings in the file which match the pattern
70 +# m/^\s*\$RPM_Provides\s*=\s*["'](.*)['"]/i
71 +# then these are treated as additional names which are provided by the
72 +# file and are printed as well.
74 +# I plan to rewrite this in C so that perl is not required by RPM at
77 +# by Ken Estes Mail.com kestes@staff.mail.com
81 + if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod|h|html|al|ix)$)=) {
82 + process_file($_) if -f "$_";
87 + # notice we are passed a list of filenames NOT as common in unix the
88 + # contents of the file.
91 + if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod|h|html|al|ix)$)=) {
92 + process_file($_) if -f "$_";
98 +foreach $module (sort keys %require) {
99 + if (length($require{$module}) == 0) {
100 + print "perl($module)\n";
103 + # I am not using rpm3.0 so I do not want spaces arround my
104 + # operators. Also I will need to change the processing of the
105 + # $RPM_* vairable when I upgrade.
107 + print "perl($module) = $require{$module}\n";
120 + open(FILE, "<$file")||
121 + die("$0: Could not open file: '$file' : $!\n");
123 + my ($package, $version) = ();
127 + # skip the documentation
129 + # we should not need to have item in this if statement (it
130 + # properly belongs in the over/back section) but people do not
131 + # read the perldoc.
133 + if ( (m/^=(head1|head2|pod|item)/) .. (m/^=(cut)/ || eof) ) {
137 + if ( (m/^=(over)/) .. (m/^=(back)/ || eof) ) {
141 + # skip the data section
142 + if (m/^__(DATA|END)__$/) {
146 + # not everyone puts the package name of the file as the first
147 + # package name so we report all namespaces as if they were
148 + # provided packages (really ugly).
150 + if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/ && !$require{$1}) {
153 + $require{$package}=undef;
156 + # after we found the package name take the first assignment to
157 + # $VERSION as the version number. Exporter requires that the
158 + # variable be called VERSION so we are safe.
160 + # here are examples of VERSION lines from the perl distribution
162 + #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
163 + #ExtUtils/Install.pm:$VERSION = substr q$Revision$, 10;
164 + #CGI/Apache.pm:$VERSION = (qw$Revision$)[1];
165 + #DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning
166 + #Cwd.pm:our $VERSION = '2.04';
168 + # here is example of VERSION line from RPC::PlClient module
170 + # RPC/PlClient.pm:$RPC::PlClient::VERSION = '0.2016';
174 + (m/^\s*(our)?\s*\$(${package}::)?VERSION\s*=/)
177 + # first see if the version string contains the string
178 + # '$Revision' this often causes bizzare strings and is the most
179 + # common method of non static numbering.
181 + if (m/(\$Revision: (\d+[.0-9]+))/) {
183 + } elsif (m/[\'\"]?(\d+[.0-9]+)[\'\"]?/) {
185 + # look for a static number hard coded in the script
189 + $require{$package}=$version;
192 + # Each keyword can appear multiple times. Don't
193 + # bother with datastructures to store these strings,
194 + # if we need to print it print it now.
196 + if ( m/^\s*\$RPM_Provides\s*=\s*["'](.*)['"]/i) {
197 + foreach $_ (spit(/\s+/, $1)) {
205 + die("$0: Could not close file: '$file' : $!\n");