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