]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-perl-macros.patch
- fixed generating requirements for shell scripts
[packages/rpm.git] / rpm-perl-macros.patch
index f4dbf2278a2c6fc9a95a408585142307cb5d84c4..dfaa50e6d203cd76a31152eadfa761d607e6d1c2 100644 (file)
 +echo "$requires
 +$requires_perl
 +$requires_mod"|  sort -u
---- rpm-3.0.3/scripts/perl.prov.wiget  Sat Jun  5 22:52:31 1999
-+++ rpm-3.0.3/scripts/perl.prov        Sat Oct 30 12:28:50 1999
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl
-+#!@PERL@
- # a simple script to print the proper name for perl libraries.
-@@ -30,12 +30,12 @@
-   if (length($require{$module}) == 0) {
-     print "perl($module)\n";
-   } else {
--    print "perl($module)=$require{$module}\n";
-+    print "perl($module) = $require{$module}\n";
-     # we need to print it without the version number until the
-     # requires syntax accepts version numbers correctly.
--    print "perl($module)\n";
-+#    print "perl($module)\n";
-   }
- }
 --- rpm-3.0.3/macros.in.wiget  Sat Oct 30 12:28:50 1999
 +++ rpm-3.0.3/macros.in        Sat Oct 30 12:28:50 1999
 @@ -248,6 +248,8 @@
        next;
      }
  
-@@ -108,8 +120,17 @@
+@@ -108,8 +120,28 @@
        # will be included with the name sys/systeminfo.ph so only use the
        # basename of *.ph files
  
 +
 +      ($module =~ m/\.(ph|pl)$/) && next;
 +
-+      # we don't provide platform specific modules for platforms other 
-+      # than unix so we also shouldn't require them
-+      ($module =~ m/(Mac|OS2|MSDOS)::/) && next;
++      # skip all modules for oparating systems other than linux
++
++      ($module =~ m/Mac|OS2|MSDOS|Win32|VMS|vmsish/) && next;
++
++      # if the module name starts in a dot it is not a module name
++
++      ($module =~ m/^\./) && next;
++
++      # if the module ends with .pm strip it to leave only basename
++
++      ($module =~ m/\.pm$/) && ($module =~ s/\.pm//g);
++
++      # strip () from module name ( ex. Carp() )
+
++      ($module =~m/\(\)$/) && ($module =~ s/\(\)//g);
  
        $require{$module}=$version;
        $line{$module}=$_;
+--- rpm-3.0.3/scripts/perl.prov.pld    Sat Jun  5 22:52:31 1999
++++ rpm-3.0.3/scripts/perl.prov        Sun Oct 31 02:17:45 1999
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl
++#!@PERL@
+ # a simple script to print the proper name for perl libraries.
+@@ -13,7 +13,9 @@
+ if ("@ARGV") {
+   foreach (@ARGV) {
+-    process_file($_);
++     if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod)$)=) {
++      process_file($_);
++    }
+   }
+ } else {
+@@ -21,7 +23,9 @@
+   # contents of the file.
+   foreach (<>) {
+-    process_file($_);
++     if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod)$)=) {
++      process_file($_);
++    }
+   }
+ }
+@@ -30,12 +34,12 @@
+   if (length($require{$module}) == 0) {
+     print "perl($module)\n";
+   } else {
+-    print "perl($module)=$require{$module}\n";
++    print "perl($module) = $require{$module}\n";
+     # we need to print it without the version number until the
+     # requires syntax accepts version numbers correctly.
+-    print "perl($module)\n";
++#    print "perl($module)\n";
+   }
+ }
This page took 0.057356 seconds and 4 git commands to generate.