]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-perl-macros.patch
- added find-perl-{provides,requires} scripts which provide automatic
[packages/rpm.git] / rpm-perl-macros.patch
CommitLineData
edf87823 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@@ -27,15 +27,16 @@
87
88
89 foreach $module (sort keys %require) {
90+ ($mod = $module) =~ s/::/-/g;
91 if (length($require{$module}) == 0) {
92- print "perl($module)\n";
93+ print "perl($mod)\n";
94 } else {
95- print "perl($module)=$require{$module}\n";
96+ print "perl($mod) = $require{$module}\n";
97
98 # we need to print it without the version number until the
99 # requires syntax accepts version numbers correctly.
100
101- print "perl($module)\n";
102+# print "perl($module)\n";
103 }
104 }
105
106--- rpm-3.0.3.perl/scripts/perl.req Sat Jun 5 22:52:31 1999
107+++ rpm-3.0.3/scripts/perl.req Fri Oct 22 12:21:33 1999
108@@ -26,16 +26,21 @@
109
110
111 foreach $module (sort keys %require) {
112+ $module =~ s/::/-/g;
113 if (length($require{$module}) == 0) {
114- print "perl($module)\n";
115+ if ($module =~ /^[0-9._]+$/) {
116+ print "perl >= $module\n";
117+ } else {
118+ print "perl($module)\n";
119+ }
120 } else {
121
122- print "perl($module)>=$require{$module}\n";
123+ print "perl($module) >= $require{$module}\n";
124
125 # we need to print it without the version number until the
126 # requires syntax accepts version numbers correctly.
127
128- print "perl($module)\n";
129+# print "perl($module)\n";
130 }
131 }
132
This page took 0.046065 seconds and 4 git commands to generate.