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