]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-perl-macros.patch
- fix: skip *.ph and *.pl files when generating requirements
[packages/rpm.git] / rpm-perl-macros.patch
1 --- rpm-3.0.3.perl/configure.in Fri Oct 22 14:23:17 1999
2 +++ rpm-3.0.3/configure.in      Fri Oct 22 14:47:01 1999
3 @@ -906,7 +906,7 @@
4  export LIBS INCPATH CONFIG_SITE
5  
6  AC_CONFIG_SUBDIRS(popt)
7 -AC_OUTPUT([Makefile rpmrc macros macros.pld lib/Makefile
8 +AC_OUTPUT([Makefile rpmrc macros macros.pld macros.perl lib/Makefile
9         build/Makefile tools/Makefile scripts/Makefile
10         tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile
11         misc/Makefile po/Makefile.in intl/Makefile
12 --- rpm-3.0.3.perl/macros.in    Fri Oct 22 14:23:17 1999
13 +++ rpm-3.0.3/macros.in Fri Oct 22 14:59:08 1999
14 @@ -248,6 +248,8 @@
15  #      %{perl_sitearch}/Image
16  #      %dir %{perl_sitearch}/auto/Image
17  #
18 +#
19 +# NOTE: %{perl_sitearch}, %{perl_archlib} and %{perl_sitelib} macros 
20 +#      has been moved to macros.perl (see info in this file for details).
21 +#
22  %requires_eq() %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} = %%{VERSION}' %1| grep -v "is not")
23 -%perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch)
24 -%perl_archlib  %(eval "`perl -V:installarchlib`"; echo $installarchlib)
25 --- rpm-3.0.3.perl/macros.perl.in       Thu Jan  1 01:00:00 1970
26 +++ rpm-3.0.3/macros.perl.in    Fri Oct 22 15:08:15 1999
27 @@ -0,0 +1,11 @@
28 +# Perl specific macro definitions.
29 +# To make use of these macros insert the following line into your spec file:
30 +# %include @RPMCONFIGDIR@/macros.perl
31 +
32 +%define                __find_requires @RPMCONFIGDIR@/find-perl-requires
33 +%define                __find_provides @RPMCONFIGDIR@/find-perl-provides
34 +
35 +%define                perl_sitelib    %(eval "`perl -V:installsitelib`"; echo $installsitelib)
36 +%define                perl_sitearch   %(eval "`perl -V:installsitearch`"; echo $installsitearch)
37 +%define                perl_archlib    %(eval "`perl -V:installarchlib`"; echo $installarchlib)
38 +
39 --- rpm-3.0.3.perl/scripts/Makefile.am  Sat Jun  5 22:52:30 1999
40 +++ rpm-3.0.3/scripts/Makefile.am       Fri Oct 22 15:12:12 1999
41 @@ -4,7 +4,8 @@
42  
43  EXTRA_DIST = \
44         convertrpmrc.sh find-lang.sh freshen.sh getpo.sh \
45 -       perl.prov perl.req vpkg-provides.sh
46 +       perl.prov perl.req find-perl-requires find-perl-provides \
47 +       vpkg-provides.sh
48  
49  installprefix = $(DESTDIR)
50  
51 @@ -13,5 +14,6 @@
52  configdir = ${prefix}/lib/rpm
53  config_SCRIPTS = \
54         convertrpmrc.sh find-lang.sh freshen.sh getpo.sh \
55 -       perl.prov perl.req vpkg-provides.sh
56 +       perl.prov perl.req find-perl-requires find-perl-provides \
57 +       vpkg-provides.sh
58  
59 --- rpm-3.0.3.perl/scripts/find-perl-provides   Thu Jan  1 01:00:00 1970
60 +++ rpm-3.0.3/scripts/find-perl-provides        Fri Oct 22 12:21:39 1999
61 @@ -0,0 +1,8 @@
62 +#!/bin/sh
63 +ulimit -c 0
64 +
65 +filelist=`sed "s/['\"]/\\\&/g"`
66 +
67 +echo $filelist|/usr/lib/rpm/find-provides
68 +/usr/lib/rpm/perl.prov $filelist
69 +
70 --- rpm-3.0.3.perl/scripts/find-perl-requires   Thu Jan  1 01:00:00 1970
71 +++ rpm-3.0.3/scripts/find-perl-requires        Fri Oct 22 12:21:36 1999
72 @@ -0,0 +1,11 @@
73 +#!/bin/sh
74 +ulimit -c 0
75 +
76 +filelist=`sed "s/['\"]/\\\&/g"`
77 +
78 +requires="`echo $filelist|/usr/lib/rpm/find-requires`"
79 +requires_perl="`/usr/lib/rpm/perl.req $filelist`"
80 +requires_mod="`rpm -q --whatprovides --qf "%{NAME}\n"  $requires_perl 2>/dev/null`"
81 +echo "$requires
82 +$requires_perl
83 +$requires_mod"|  sort -u
84 --- rpm-3.0.3.perl/scripts/perl.prov    Sat Jun  5 22:52:31 1999
85 +++ rpm-3.0.3/scripts/perl.prov Fri Oct 22 14:34:50 1999
86 @@ -30,12 +30,12 @@
87    if (length($require{$module}) == 0) {
88     print "perl($module)\n";
89    } else {
90 -    print "perl($module)=$require{$module}\n";
91 +    print "perl($module) = $require{$module}\n";
92  
93      # we need to print it without the version number until the
94      # requires syntax accepts version numbers correctly.
95  
96 -    print "perl($module)\n";
97 +#    print "perl($module)\n";
98    }
99  }
100  
101 --- rpm-3.0.3.perl/scripts/perl.req     Sat Jun  5 22:52:31 1999
102 +++ rpm-3.0.3/scripts/perl.req  Fri Oct 22 12:21:33 1999
103 @@ -26,16 +26,22 @@
104  
105  
106  foreach $module (sort keys %require) {
107    if (length($require{$module}) == 0) {
108 -    print "perl($module)\n";
109 +    if ($module =~ /^[0-9._]+$/) {
110 +      print "perl >= $module\n";
111 +    } else {
112 +      if ($module !~ /\.ph$/ && $module !~ /\.pl/) {
113 +        print "perl($module)\n";
114 +      }
115 +    }
116    } else {
117  
118 -    print "perl($module)>=$require{$module}\n";
119 +    print "perl($module) >= $require{$module}\n";
120  
121      # we need to print it without the version number until the
122      # requires syntax accepts version numbers correctly.
123  
124 -    print "perl($module)\n";
125 +#    print "perl($module)\n";
126    }
127  }
128  
This page took 0.060187 seconds and 4 git commands to generate.