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