X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=rpm-perl_req-INC_dirs.patch;fp=rpm-perl_req-INC_dirs.patch;h=f15d4010c867505cf5ef90b0668adc6c64962479;hb=6fce50075952edfa510790ca6be81e6d3fb9e214;hp=0000000000000000000000000000000000000000;hpb=e8194500fe8808a194e9ceeb3f8433e24464001a;p=packages%2Frpm.git diff --git a/rpm-perl_req-INC_dirs.patch b/rpm-perl_req-INC_dirs.patch new file mode 100644 index 0000000..f15d401 --- /dev/null +++ b/rpm-perl_req-INC_dirs.patch @@ -0,0 +1,34 @@ +--- scripts/perl.req~ 2004-04-16 13:27:10.000000000 +0200 ++++ scripts/perl.req 2004-04-26 23:54:42.128568344 +0200 +@@ -39,9 +39,18 @@ + eval { require version; $HAVE_VERSION = 1; }; + + ++# *inc variables are used to track dependencies on directories for modules. ++# These directories (especially arch-dependent) are likely to change some day. ++my @inc = sort { length $b cmp length $a } ++ map { s#/*$##; $_ } ++ grep m#^/.#, @INC; ++my %inc = map { $_ => 0 } @inc; ++my $inc = join '|', map "\Q$_\E", @inc; ++ + foreach ( @ARGV ? @ARGV : <> ) { +- chomp; +- if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) { ++ chomp; ++ $inc{$1}++ if m#($inc)/#; # can't anchor on ^ ++ if (m=/usr/(sbin|bin|lib|lib64|libx32|share|X11R6/(lib|lib64|libx32|bin))/=) { + if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) { + process_file($_) if -f; + } +@@ -53,7 +64,9 @@ + foreach $perlver (sort keys %perlreq) { + print "perl >= $perlver\n"; + } ++print "$_\n" for sort grep $inc{$_}, keys %inc; ++ +-foreach $module (sort keys %require) { ++foreach my $module (sort grep length, keys %require) { + if (length($require{$module}) == 0) { + print "perl($module)\n"; + } else {