]>
Commit | Line | Data |
---|---|---|
ebe974a8 AF |
1 | --- rpm-5.3.1/configure.ac.wiget 2010-05-22 17:15:11.000000000 +0200 |
2 | +++ rpm-5.3.1/configure.ac 2010-05-30 16:37:59.526924459 +0200 | |
6ecfe7c2 JR |
3 | @@ -1100,7 +1100,7 @@ AC_CONFIG_FILES([ po/Makefile.in |
4 | ||
5 | AC_CONFIG_FILES([Makefile | |
6 | rpmio/Makefile lib/Makefile build/Makefile sign/Makefile | |
7 | - po/Makefile.in scripts/Makefile fileattrs/Makefile | |
8 | + po/Makefile.in scripts/Makefile scripts/perl.req scripts/perl.prov fileattrs/Makefile | |
9 | misc/Makefile | |
10 | doc/Makefile | |
11 | python/Makefile | |
ebe974a8 AF |
12 | --- rpm-5.3.1/scripts/perl.req.wiget 2008-10-26 10:50:53.000000000 +0100 |
13 | +++ rpm-5.3.1/scripts/perl.req 2010-05-30 16:35:36.999438206 +0200 | |
89c3f91f | 14 | @@ -45,7 +45,11 @@ |
2fa5aec3 AF |
15 | |
16 | if ("@ARGV") { | |
17 | foreach (@ARGV) { | |
18 | - process_file($_); | |
20a6d548 | 19 | + if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) { |
2eb651d8 | 20 | + if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) { |
2fa5aec3 AF |
21 | + process_file($_); |
22 | + } | |
23 | + } | |
24 | } | |
25 | } else { | |
6ecfe7c2 | 26 | |
89c3f91f | 27 | @@ -53,7 +57,11 @@ |
2fa5aec3 | 28 | # contents of the file. |
6ecfe7c2 | 29 | |
2fa5aec3 AF |
30 | foreach (<>) { |
31 | - process_file($_); | |
4703c2f4 AF |
32 | + if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) { |
33 | + if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) { | |
34 | + process_file($_); | |
35 | + } | |
36 | + } | |
2fa5aec3 AF |
37 | } |
38 | } | |
edf87823 | 39 | |
89c3f91f | 40 | @@ -261,19 +269,41 @@ |
edf87823 | 41 | |
fe3cefac JB |
42 | $module =~ s/\(\s*\)$//; |
43 | ||
44 | - if ( $module =~ m/^v?([0-9._]+)$/ ) { | |
45 | + if ( $module =~ m/^(v?)([0-9._]+)$/ ) { | |
46 | # if module is a number then both require and use interpret that | |
47 | # to mean that a particular version of perl is specified | |
48 | ||
6ecfe7c2 | 49 | - my $ver = $1; |
fe3cefac | 50 | - if ($ver =~ /5.00/) { |
6ecfe7c2 | 51 | - $perlreq{"0:$ver"} = 1; |
fe3cefac JB |
52 | - next; |
53 | - } | |
54 | - else { | |
6ecfe7c2 | 55 | - $perlreq{"1:$ver"} = 1; |
fe3cefac JB |
56 | - next; |
57 | - } | |
58 | + my $ver=$2; | |
59 | + if (($1 eq 'v') or ($ver =~ /[0-9]+\.[0-9]+\.[0-9]+/)) { | |
60 | + # $V-style | |
61 | + if ($ver =~ m/5\.([0-5])(\.([0-9]+))?$/) { | |
62 | + if (defined $3) { | |
63 | + print "perl-base >= 0:5.00$1_$3\n"; | |
64 | + } else { | |
65 | + print "perl-base >= 0:5.00$1\n"; | |
66 | + } | |
67 | + } else { | |
68 | + print "perl-base >= 1:$ver\n"; | |
69 | + } | |
70 | + } else { | |
71 | + # $]-style | |
72 | + if ($ver =~ m/5\.(00[0-5])_?([0-9]+)?$/) { | |
73 | + if (defined $2) { | |
74 | + print "perl-base >= 0:5.$1_$2\n"; | |
75 | + } else { | |
76 | + print "perl-base >= 0:5.$1\n"; | |
77 | + } | |
78 | + } else { | |
79 | + # expand to M.NNN_nnn form | |
80 | + $ver =~ s/^([0-9])$/$1./; | |
81 | + $ver =~ s/^([0-9]\.[0-9]{0,5}|[0-9]\.[0-9]{3}_[0-9]{0,2})$/${1}000000/; | |
82 | + $ver =~ s/^([0-9]\.[0-9]{3})_?([0-9]{3})0*$/$1_$2/; | |
83 | + # match trimming leading 0s | |
84 | + $ver =~ m/^([0-9])\.0*([1-9][0-9]*|0)_0*([1-9][0-9]*|0)$/; | |
85 | + print "perl-base >= 1:$1.$2.$3\n"; | |
86 | + } | |
87 | + } | |
88 | + next; | |
89 | ||
90 | }; | |
2fa5aec3 | 91 | |
89c3f91f JR |
92 | @@ -290,7 +320,31 @@ |
93 | # will be included with the name sys/systeminfo.ph so only use the | |
3ce8984f | 94 | # basename of *.ph files |
95 | ||
6ecfe7c2 | 96 | - ($module =~ m/\.ph$/) && next; |
3ce8984f | 97 | + # ($module =~ m/\.ph$/) && ($module =~ s!.*/!!g ); |
6ecfe7c2 | 98 | + |
852c3a98 | 99 | + # there is no need to generate dependencies for ph, pl or test files |
4a19987c | 100 | + # so let's just skip them. |
4703c2f4 | 101 | + |
852c3a98 | 102 | + ($module =~ m/\.(ph|pl|t)$/) && next; |
cfd811fa | 103 | + |
4a19987c | 104 | + # skip all modules for platforms other than linux. |
92b19143 | 105 | + |
106 | + ($module =~ m/Mac|OS2|MSDOS|Win32|VMS|vmsish/) && next; | |
107 | + | |
4a19987c | 108 | + # if the module name starts in a dot it is not a module name. |
4d8fb4e3 | 109 | + |
110 | + ($module =~ m/^\./) && next; | |
111 | + | |
4a19987c | 112 | + # if the module ends with .pm strip it to leave only basename. |
5e855029 | 113 | + |
4a19987c | 114 | + $module =~ s/\.pm$//; |
5e855029 | 115 | + |
cb87a980 | 116 | + $module =~ s/\//::/; |
117 | + | |
4a19987c | 118 | + # trim off trailing parenthesis if any. Sometimes people pass |
119 | + # the module an empty list. | |
120 | + | |
121 | + $module =~ s/\(\s*\)$//; | |
cfd811fa | 122 | |
6ecfe7c2 JR |
123 | # use base|parent qw(Foo) dependencies |
124 | if ($statement eq "use" && ($module eq "base" || $module eq "parent")) { |