]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-perl-macros.patch
- skip Mac|OS2|MSDOS modules in requirements
[packages/rpm.git] / rpm-perl-macros.patch
CommitLineData
cfd811fa
AF
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
edf87823 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
cfd811fa
AF
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
edf87823 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+
cfd811fa
AF
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
edf87823 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
cfd811fa
AF
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
2fa5aec3
AF
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
83bd3403 54@@ -30,12 +30,12 @@
edf87823 55 if (length($require{$module}) == 0) {
2fa5aec3 56 print "perl($module)\n";
edf87823 57 } else {
58- print "perl($module)=$require{$module}\n";
83bd3403 59+ print "perl($module) = $require{$module}\n";
edf87823 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
3ce8984f 69--- rpm-3.0.3/macros.in.wiget Sat Oct 30 12:28:50 1999
70+++ rpm-3.0.3/macros.in Sat Oct 30 12:28:50 1999
71@@ -248,6 +248,8 @@
72 # %{perl_sitearch}/Image
73 # %dir %{perl_sitearch}/auto/Image
74 #
75+#
76+# NOTE: %{perl_sitearch}, %{perl_archlib} and %{perl_sitelib} macros
77+# has been moved to macros.perl (see info in this file for details).
78+#
79 %requires_eq() %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} = %%{VERSION}' %1| grep -v "is not")
80-%perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch)
81-%perl_archlib %(eval "`perl -V:installarchlib`"; echo $installarchlib)
82--- rpm-3.0.3/macros.perl.in.wiget Sat Oct 30 12:28:50 1999
83+++ rpm-3.0.3/macros.perl.in Sat Oct 30 12:28:50 1999
84@@ -0,0 +1,11 @@
85+# Perl specific macro definitions.
86+# To make use of these macros insert the following line into your spec file:
87+# %include @RPMCONFIGDIR@/macros.perl
88+
89+%define __find_requires @RPMCONFIGDIR@/find-perl-requires
90+%define __find_provides @RPMCONFIGDIR@/find-perl-provides
91+
92+%define perl_sitelib %(eval "`perl -V:installsitelib`"; echo $installsitelib)
93+%define perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch)
94+%define perl_archlib %(eval "`perl -V:installarchlib`"; echo $installarchlib)
95+
96--- rpm-3.0.3/configure.in.wiget Sat Oct 30 13:17:49 1999
97+++ rpm-3.0.3/configure.in Sat Oct 30 13:18:52 1999
98@@ -181,6 +181,7 @@
99 AC_MSG_RESULT(patch later then 2.2 found)
100 fi
101
102+ AC_PATH_PROG(PERL, perl, /usr/bin/perl, $MYPATH)
103 AC_PATH_PROG(PGPBIN, pgp, /usr/bin/pgp, $MYPATH)
104 AC_PATH_PROG(__RM, rm, /bin/rm, $MYPATH)
105 AC_PATH_PROG(__TAR, tar, /bin/tar, $MYPATH)
106@@ -906,8 +907,9 @@
107 export LIBS INCPATH CONFIG_SITE
108
109 AC_CONFIG_SUBDIRS(popt)
110-AC_OUTPUT([Makefile rpmrc macros macros.pld lib/Makefile
111- build/Makefile tools/Makefile scripts/Makefile
112+AC_OUTPUT([Makefile rpmrc macros macros.pld macros.perl lib/Makefile
113+ build/Makefile tools/Makefile
114+ scripts/Makefile scripts/perl.req scripts/perl.prov
115 tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile
116 misc/Makefile po/Makefile.in intl/Makefile
117 doc/Makefile doc/manual/Makefile doc/pl/Makefile doc/ru/Makefile
118--- rpm-3.0.3/scripts/perl.req.pld Sat Oct 30 17:00:59 1999
119+++ rpm-3.0.3/scripts/perl.req Sat Oct 30 17:01:08 1999
2fa5aec3
AF
120@@ -1,4 +1,4 @@
121-#!/usr/bin/perl
122+#!@PERL@
123
124 # a simple makedepends like script for perl.
125
126@@ -12,7 +12,11 @@
127
128 if ("@ARGV") {
129 foreach (@ARGV) {
130- process_file($_);
131+ if (m=/usr/(bin|lib|share|X11R6/(lib|bin))/=) {
3ce8984f 132+ if (! m=(/(doc|man|info|usr/src)/|\.so$)=) {
2fa5aec3
AF
133+ process_file($_);
134+ }
135+ }
136 }
137 } else {
138
3ce8984f 139@@ -20,22 +24,30 @@
2fa5aec3
AF
140 # contents of the file.
141
142 foreach (<>) {
143- process_file($_);
144+ if (m=/usr/(bin|lib|share|X11R6/(lib|bin))/=) {
3ce8984f 145+ if (! m=(/(doc|man|info|usr/src)/|\.(so|pl|ph)$)=) {
2fa5aec3
AF
146+ process_file($_);
147+ }
148+ }
149 }
150 }
edf87823 151
152
153 foreach $module (sort keys %require) {
edf87823 154 if (length($require{$module}) == 0) {
155- print "perl($module)\n";
156+ if ($module =~ /^[0-9._]+$/) {
157+ print "perl >= $module\n";
158+ } else {
cfd811fa 159+ print "perl($module)\n";
edf87823 160+ }
161 } else {
162
163- print "perl($module)>=$require{$module}\n";
164+ print "perl($module) >= $require{$module}\n";
165
166 # we need to print it without the version number until the
167 # requires syntax accepts version numbers correctly.
168
169- print "perl($module)\n";
170+# print "perl($module)\n";
171 }
172 }
173
3ce8984f 174@@ -54,7 +66,7 @@
2fa5aec3
AF
175 while (<FILE>) {
176
177 # skip the documentation
178- if ( (m/^=(head1|head2|pod)/) .. (m/^=(cut)/) ) {
179+ if ( (m/^=(head1|head2|pod|item)/) .. (m/^=(cut)/) ) {
180 next;
181 }
182
3ce8984f 183@@ -108,8 +120,17 @@
184 # will be included with the name sys/systeminfo.ph so only use the
185 # basename of *.ph files
186
187- ($module =~ m/\.ph$/) && ($module =~ s!.*/!!g );
188+ # ($module =~ m/\.ph$/) && ($module =~ s!.*/!!g );
cfd811fa 189+
3ce8984f 190+ # there is no need to generate dependencies for ph and pl files
191+ # so let's just skip them
cfd811fa 192+
3ce8984f 193+ ($module =~ m/\.(ph|pl)$/) && next;
cfd811fa 194+
3ce8984f 195+ # we don't provide platform specific modules for platforms other
196+ # than unix so we also shouldn't require them
cfd811fa 197
3ce8984f 198+ ($module =~ m/(Mac|OS2|MSDOS)::/) && next;
cfd811fa 199
3ce8984f 200 $require{$module}=$version;
201 $line{$module}=$_;
This page took 1.15253 seconds and 4 git commands to generate.