]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-perl-req-perlfile.patch
- fix building python bindings (force librarries from build tree)
[packages/rpm.git] / rpm-perl-req-perlfile.patch
index e5579a069784c4ddde60df9213ac183a3e4f56ac..16ad595114be3d0be9e782727e16bdac52d0e75b 100644 (file)
@@ -1,29 +1,53 @@
---- rpm-4.0.4/scripts/perl.req.wiget   Tue Feb 12 21:49:36 2002
-+++ rpm-4.0.4/scripts/perl.req Tue Feb 12 21:51:41 2002
-@@ -61,6 +61,11 @@
-   }
+--- rpm-4.2/scripts/perl.req.wigperl   Tue Apr  1 13:33:52 2003
++++ rpm-4.2/scripts/perl.req   Tue Apr  1 13:39:47 2003
+@@ -39,28 +39,19 @@
+ eval { require version; $HAVE_VERSION = 1; };
+-if ("@ARGV") {
+-  foreach (@ARGV) {
++foreach ( @ARGV ? @ARGV : <> ) {
++      chomp;
+     if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
+       if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
+-        process_file($_);
++        process_file($_) if -f;
+       }
+     }
+-  }
+-} else {
+-
+-  # notice we are passed a list of filenames NOT as common in unix the
+-  # contents of the file.
+-
+-  foreach (<>) {
+-     if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
+-       if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
+-         process_file($_);
+-       }
+-     }
+-  }
  }
  
 +foreach (sort keys %provide) {
 +    delete $require{$_};
 +}
 +delete $require{the}; # don't count "use the sth" as perl module  
-+
- foreach $module (sort keys %require) {
-   if (length($require{$module}) == 0) {
-@@ -82,6 +87,53 @@
- exit 0;
  
+ foreach $perlver (sort keys %perlreq) {
+   print "perl >= $perlver\n";
+@@ -82,6 +74,53 @@
+   }
+ }
  
 +sub is_perlfile {
 +    my $file = shift;
 +    my $fh = shift;
-+    
++
 +    my $fl = <$fh>;
 +
 +    my $is_perl = 0;
-+  
++
 +    my $nw = 0;
 +
 +    if ($file =~ /\.(so|ph|h|html|pod|gz|bz2|png|gif|jpg|xpm|a|patch|o|mo)$/) {
 +          last if ($. > 30);
 +      }
 +    }
-+    
++
 +    seek($fh, 0, 0);
-+    
++
 +    $is_perl = 1 if ($nw > 1);  # propably perl file
-+    
++
 +    #if (!$is_perl) {
 +    #   print STDERR "NOPERL $file\n";
 +    #   return 0;
 +    return $is_perl;
 +}
 +
  sub process_file {
-   
-@@ -90,6 +142,8 @@
-   
-   open(FILE, "<$file") || return;
-   
+   my ($file) = @_;
+@@ -90,6 +129,8 @@
+     return;
+   }
 +  return if (!is_perlfile($file, \*FILE));
 +
    while (<FILE>) {
-     
-     # skip the documentation
-@@ -111,6 +165,10 @@
+     # skip the "= <<" block
+@@ -111,6 +152,10 @@
        last;
      }
  
      # Each keyword can appear multiple times.  Don't
      #  bother with datastructures to store these strings,
      #  if we need to print it print it now.
-@@ -229,6 +287,10 @@
+@@ -236,6 +281,10 @@
  
        ($module =~ m/^\./) && next;
  
This page took 0.048973 seconds and 4 git commands to generate.