]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-perl-macros.patch
- updated for 4.0.1.
[packages/rpm.git] / rpm-perl-macros.patch
1 diff -Nru rpm-4.0.1/configure.in rpm-4.0.1.new/configure.in
2 --- rpm-4.0.1/configure.in      Wed Jan 31 13:37:21 2001
3 +++ rpm-4.0.1.new/configure.in  Wed Jan 31 13:49:25 2001
4 @@ -185,6 +185,7 @@
5      AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH)
6      AC_PATH_PROG(__MV, mv, /bin/mv, $MYPATH)
7      AC_PATH_PROG(__PATCH, patch, /usr/bin/patch, $MYPATH)
8 +    AC_PATH_PROG(PERL, perl, /usr/bin/perl, $MYPATH)
9      AC_MSG_CHECKING(old version of patch)
10      PATCHVERSION=`patch --version 2>&1`
11  
12 @@ -1043,6 +1044,7 @@
13  
14  AC_CONFIG_SUBDIRS(popt)
15  AC_OUTPUT([Doxyfile Makefile rpmrc macros macros.pld platform rpmpopt rpm.spec scripts/brp-redhat
16 +       macros.perl scripts/perl.req scripts/perl.prov
17         rpmio/Makefile lib/Makefile build/Makefile tools/Makefile
18         scripts/Makefile
19         tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile
20 diff -Nru rpm-4.0.1/macros.in rpm-4.0.1.new/macros.in
21 --- rpm-4.0.1/macros.in Wed Jan 31 13:37:21 2001
22 +++ rpm-4.0.1.new/macros.in     Wed Jan 31 13:38:04 2001
23 @@ -629,9 +629,11 @@
24  #      %{perl_sitearch}/Image
25  #      %dir %{perl_sitearch}/auto/Image
26  #
27 +#
28 +# NOTE: %{perl_sitearch}, %{perl_archlib} and %{perl_sitelib} macros 
29 +#      has been moved to macros.perl (see info in this file for details).
30 +#
31  %requires_eq() %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} = %%{VERSION}' %1| grep -v "is not")
32 -%perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch)
33 -%perl_archlib  %(eval "`perl -V:installarchlib`"; echo $installarchlib)
34  
35  #------------------------------------------------------------------------------
36  # arch macro for all Intel i?86 compatibile processors
37 diff -Nru rpm-4.0.1/scripts/Makefile.am rpm-4.0.1.new/scripts/Makefile.am
38 --- rpm-4.0.1/scripts/Makefile.am       Wed Jan 31 13:37:21 2001
39 +++ rpm-4.0.1.new/scripts/Makefile.am   Wed Jan 31 14:27:28 2001
40 @@ -9,7 +9,8 @@
41         find-prov.pl find-req.pl cpanflute find-provides.perl \
42         find-requires.perl get_magic.pl getpo.sh http.req \
43         magic.prov magic.req perl.prov perl.req rpmdiff rpmdiff.cgi \
44 -       trpm u_pkg.sh vpkg-provides.sh vpkg-provides2.sh
45 +       trpm u_pkg.sh vpkg-provides.sh vpkg-provides2.sh \
46 +       find-perl-requires find-perl-provides
47  
48  installprefix = $(DESTDIR)
49  
50 @@ -23,4 +24,5 @@
51         find-prov.pl find-req.pl cpanflute find-provides.perl \
52         find-requires.perl get_magic.pl getpo.sh http.req \
53         magic.prov magic.req perl.prov perl.req rpmdiff rpmdiff.cgi u_pkg.sh \
54 -       vpkg-provides.sh vpkg-provides2.sh
55 +       vpkg-provides.sh vpkg-provides2.sh \
56 +       find-perl-requires find-perl-provides
57 diff -Nru rpm-4.0.1/scripts/perl.prov rpm-4.0.1.new/scripts/perl.prov
58 --- rpm-4.0.1/scripts/perl.prov Wed Jan 31 13:37:21 2001
59 +++ rpm-4.0.1.new/scripts/perl.prov     Wed Jan 31 13:38:04 2001
60 @@ -47,7 +47,9 @@
61  
62  if ("@ARGV") {
63    foreach (@ARGV) {
64 -    process_file($_);
65 +     if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod|h|html)$)=) {
66 +      process_file($_);
67 +    }
68    }
69  } else {
70  
71 @@ -55,7 +57,9 @@
72    # contents of the file.
73  
74    foreach (<>) {
75 -    process_file($_);
76 +     if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod|h|html)$)=) {
77 +      process_file($_);
78 +    }
79    }
80  }
81  
82 diff -Nru rpm-4.0.1/scripts/perl.req rpm-4.0.1.new/scripts/perl.req
83 --- rpm-4.0.1/scripts/perl.req  Wed Jan 31 13:37:21 2001
84 +++ rpm-4.0.1.new/scripts/perl.req      Wed Jan 31 13:38:04 2001
85 @@ -1,4 +1,4 @@
86 -#!/usr/bin/perl
87 +#!@PERL@
88  
89  # RPM (and it's source code) is covered under two separate licenses. 
90  
91 @@ -41,7 +41,11 @@
92  
93  if ("@ARGV") {
94    foreach (@ARGV) {
95 -    process_file($_);
96 +    if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
97 +      if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
98 +        process_file($_);
99 +      }
100 +    }
101    }
102  } else {
103    
104 @@ -49,14 +53,22 @@
105    # contents of the file.
106    
107    foreach (<>) {
108 -    process_file($_);
109 +     if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
110 +       if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
111 +         process_file($_);
112 +       }
113 +     }
114    }
115  }
116  
117  
118  foreach $module (sort keys %require) {
119    if (length($require{$module}) == 0) {
120 -    print "perl($module)\n";
121 +     if ($module =~ /^[0-9._]+$/) {
122 +       print "perl >= $module\n";
123 +     } else {
124 +         print "perl($module)\n";
125 +     }
126    } else {
127  
128      # I am not using rpm3.0 so I do not want spaces arround my
129 @@ -183,7 +195,31 @@
130        # will be included with the name sys/systeminfo.ph so only use the
131        # basename of *.ph files
132  
133 -      ($module  =~ m/\.ph$/) && ($module =~ s!.*/!!g );
134 +      # ($module  =~ m/\.ph$/) && ($module =~ s!.*/!!g );
135 +
136 +      # there is no need to generate dependencies for ph, pl or test files
137 +      # so let's just skip them.
138 +
139 +      ($module =~ m/\.(ph|pl|t)$/) && next;
140 +
141 +      # skip all modules for platforms other than linux.
142 +
143 +      ($module =~ m/Mac|OS2|MSDOS|Win32|VMS|vmsish/) && next;
144 +
145 +      # if the module name starts in a dot it is not a module name.
146 +
147 +      ($module =~ m/^\./) && next;
148 +
149 +      # if the module ends with .pm strip it to leave only basename.
150 +
151 +      $module =~ s/\.pm$//;
152 +
153 +      $module =~ s/\//::/;
154 +
155 +      # trim off trailing parenthesis if any.  Sometimes people pass
156 +      # the module an empty list.
157 +
158 +      $module =~ s/\(\s*\)$//;
159  
160  
161        $require{$module}=$version;
This page took 0.038303 seconds and 4 git commands to generate.