]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-perl-macros.patch
- find perl requires only in bin|lib|share dirs
[packages/rpm.git] / rpm-perl-macros.patch
1 diff -ruN rpm-3.0.3/macros.in rpm-3.0.3.new/macros.in
2 --- rpm-3.0.3/macros.in Sat Oct 30 11:59:36 1999
3 +++ rpm-3.0.3.new/macros.in     Sat Oct 30 11:24:39 1999
4 @@ -248,6 +248,8 @@
5  #      %{perl_sitearch}/Image
6  #      %dir %{perl_sitearch}/auto/Image
7  #
8 +#
9 +# NOTE: %{perl_sitearch}, %{perl_archlib} and %{perl_sitelib} macros 
10 +#      has been moved to macros.perl (see info in this file for details).
11 +#
12  %requires_eq() %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} = %%{VERSION}' %1| grep -v "is not")
13 -%perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch)
14 -%perl_archlib  %(eval "`perl -V:installarchlib`"; echo $installarchlib)
15 diff -ruN rpm-3.0.3/macros.perl.in rpm-3.0.3.new/macros.perl.in
16 --- rpm-3.0.3/macros.perl.in    Thu Jan  1 01:00:00 1970
17 +++ rpm-3.0.3.new/macros.perl.in        Sat Oct 30 11:24:39 1999
18 @@ -0,0 +1,11 @@
19 +# Perl specific macro definitions.
20 +# To make use of these macros insert the following line into your spec file:
21 +# %include @RPMCONFIGDIR@/macros.perl
22 +
23 +%define                __find_requires @RPMCONFIGDIR@/find-perl-requires
24 +%define                __find_provides @RPMCONFIGDIR@/find-perl-provides
25 +
26 +%define                perl_sitelib    %(eval "`perl -V:installsitelib`"; echo $installsitelib)
27 +%define                perl_sitearch   %(eval "`perl -V:installsitearch`"; echo $installsitearch)
28 +%define                perl_archlib    %(eval "`perl -V:installarchlib`"; echo $installarchlib)
29 +
30 diff -ruN rpm-3.0.3/scripts/Makefile.am rpm-3.0.3.new/scripts/Makefile.am
31 --- rpm-3.0.3/scripts/Makefile.am       Sat Jun  5 22:52:30 1999
32 +++ rpm-3.0.3.new/scripts/Makefile.am   Sat Oct 30 11:24:39 1999
33 @@ -4,7 +4,8 @@
34  
35  EXTRA_DIST = \
36         convertrpmrc.sh find-lang.sh freshen.sh getpo.sh \
37 -       perl.prov perl.req vpkg-provides.sh
38 +       perl.prov perl.req find-perl-requires find-perl-provides \
39 +       vpkg-provides.sh
40  
41  installprefix = $(DESTDIR)
42  
43 @@ -13,5 +14,6 @@
44  configdir = ${prefix}/lib/rpm
45  config_SCRIPTS = \
46         convertrpmrc.sh find-lang.sh freshen.sh getpo.sh \
47 -       perl.prov perl.req vpkg-provides.sh
48 +       perl.prov perl.req find-perl-requires find-perl-provides \
49 +       vpkg-provides.sh
50  
51 diff -ruN rpm-3.0.3/scripts/find-perl-provides rpm-3.0.3.new/scripts/find-perl-provides
52 --- rpm-3.0.3/scripts/find-perl-provides        Thu Jan  1 01:00:00 1970
53 +++ rpm-3.0.3.new/scripts/find-perl-provides    Sat Oct 30 11:24:39 1999
54 @@ -0,0 +1,8 @@
55 +#!/bin/sh
56 +ulimit -c 0
57 +
58 +filelist=`sed "s/['\"]/\\\&/g"`
59 +
60 +echo $filelist|/usr/lib/rpm/find-provides
61 +/usr/lib/rpm/perl.prov $filelist
62 +
63 diff -ruN rpm-3.0.3/scripts/find-perl-requires rpm-3.0.3.new/scripts/find-perl-requires
64 --- rpm-3.0.3/scripts/find-perl-requires        Thu Jan  1 01:00:00 1970
65 +++ rpm-3.0.3.new/scripts/find-perl-requires    Sat Oct 30 11:24:39 1999
66 @@ -0,0 +1,11 @@
67 +#!/bin/sh
68 +ulimit -c 0
69 +
70 +filelist=`sed "s/['\"]/\\\&/g"`
71 +
72 +requires="`echo $filelist|/usr/lib/rpm/find-requires`"
73 +requires_perl="`/usr/lib/rpm/perl.req $filelist`"
74 +requires_mod="`rpm -q --whatprovides --qf "%{NAME}\n"  $requires_perl 2>/dev/null`"
75 +echo "$requires
76 +$requires_perl
77 +$requires_mod"|  sort -u
78 diff -ruN rpm-3.0.3/scripts/perl.prov rpm-3.0.3.new/scripts/perl.prov
79 --- rpm-3.0.3/scripts/perl.prov Sat Jun  5 22:52:31 1999
80 +++ rpm-3.0.3.new/scripts/perl.prov     Sat Oct 30 11:24:39 1999
81 @@ -1,4 +1,4 @@
82 -#!/usr/bin/perl
83 +#!@PERL@
84  
85  # a simple script to print the proper name for perl libraries.
86  
87 @@ -30,12 +30,12 @@
88    if (length($require{$module}) == 0) {
89      print "perl($module)\n";
90    } else {
91 -    print "perl($module)=$require{$module}\n";
92 +    print "perl($module) = $require{$module}\n";
93  
94      # we need to print it without the version number until the
95      # requires syntax accepts version numbers correctly.
96  
97 -    print "perl($module)\n";
98 +#    print "perl($module)\n";
99    }
100  }
101  
102 diff -ruN rpm-3.0.3/scripts/perl.req rpm-3.0.3.new/scripts/perl.req
103 --- rpm-3.0.3/scripts/perl.req  Sat Jun  5 22:52:31 1999
104 +++ rpm-3.0.3.new/scripts/perl.req      Sat Oct 30 11:50:03 1999
105 @@ -1,4 +1,4 @@
106 -#!/usr/bin/perl
107 +#!@PERL@
108  
109  # a simple makedepends like script for perl.
110  
111 @@ -12,7 +12,11 @@
112  
113  if ("@ARGV") {
114    foreach (@ARGV) {
115 -    process_file($_);
116 +    if (m=/usr/(bin|lib|share|X11R6/(lib|bin))/=) {
117 +      if (! m=(/((doc|man|info)|/usr/src)/)\.so$)=) {
118 +        process_file($_);
119 +      }
120 +    }
121    }
122  } else {
123    
124 @@ -20,22 +24,30 @@
125    # contents of the file.
126    
127    foreach (<>) {
128 -    process_file($_);
129 +    if (m=/usr/(bin|lib|share|X11R6/(lib|bin))/=) {
130 +      if (! m=(/((doc|man|info)|/usr/src)/)\.so$)=) {
131 +        process_file($_);
132 +      }
133 +    }
134    }
135  }
136  
137  
138  foreach $module (sort keys %require) {
139    if (length($require{$module}) == 0) {
140 -    print "perl($module)\n";
141 +    if ($module =~ /^[0-9._]+$/) {
142 +      print "perl >= $module\n";
143 +    } else {
144 +      print "perl($module)\n";
145 +    }
146    } else {
147  
148 -    print "perl($module)>=$require{$module}\n";
149 +    print "perl($module) >= $require{$module}\n";
150  
151      # we need to print it without the version number until the
152      # requires syntax accepts version numbers correctly.
153  
154 -    print "perl($module)\n";
155 +#    print "perl($module)\n";
156    }
157  }
158  
159 @@ -54,7 +66,7 @@
160    while (<FILE>) {
161      
162      # skip the documentation
163 -    if ( (m/^=(head1|head2|pod)/) .. (m/^=(cut)/) ) {
164 +    if ( (m/^=(head1|head2|pod|item)/) .. (m/^=(cut)/) ) {
165        next;
166      }
167  
This page took 0.046391 seconds and 4 git commands to generate.