1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
|
Various debian-specific ExtUtils changes:
* Respect umask during installation, and set as appropriate for each of
perl, vendor and site (policy requires group writable site dirs).
* Don't install .packlist or perllocal.pod for perl or vendor.
* Fiddle with *PREFIX and variables written to the makefile so that
install directories may be changed when make is run by passing
PREFIX= to the "make install" command (used when packaging
modules).
* Set location of libperl.a to /usr/lib.
* Note that libperl-dev package is required for embedded linking.
diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/Embed.pm perl-5.8.8/lib/ExtUtils/Embed.pm
--- perl-5.8.8.orig/lib/ExtUtils/Embed.pm 2004-08-03 20:41:49.000000000 +1000
+++ perl-5.8.8/lib/ExtUtils/Embed.pm 2006-02-05 10:42:11.000000000 +1100
@@ -300,6 +300,9 @@
Typically, an application B<Makefile> will invoke ExtUtils::Embed
functions while building your application.
+Note that on Debian systems the B<libperl-dev> package is required for
+compiling applications which embed an interpreter.
+
=head1 @EXPORT
ExtUtils::Embed exports the following functions:
diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/Install.pm perl-5.8.8/lib/ExtUtils/Install.pm
--- perl-5.8.8.orig/lib/ExtUtils/Install.pm 2005-10-21 22:00:01.000000000 +1000
+++ perl-5.8.8/lib/ExtUtils/Install.pm 2006-02-05 10:42:11.000000000 +1100
@@ -173,8 +173,8 @@
if (-f $targetfile){
forceunlink($targetfile) unless $nonono;
} else {
- mkpath($targetdir,0,0755) unless $nonono;
- print "mkpath($targetdir,0,0755)\n" if $verbose>1;
+ mkpath($targetdir) unless $nonono;
+ print "mkpath($targetdir)\n" if $verbose>1;
}
copy($sourcefile, $targetfile) unless $nonono;
print "Installing $targetfile\n";
diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/MM_Any.pm perl-5.8.8/lib/ExtUtils/MM_Any.pm
--- perl-5.8.8.orig/lib/ExtUtils/MM_Any.pm 2005-04-13 17:49:53.000000000 +1000
+++ perl-5.8.8/lib/ExtUtils/MM_Any.pm 2006-02-05 11:17:52.000000000 +1100
@@ -645,8 +645,6 @@
sub manifypods_target {
my($self) = shift;
- my $man1pods = '';
- my $man3pods = '';
my $dependencies = '';
# populate manXpods & dependencies:
@@ -666,7 +664,7 @@
foreach my $section (qw(1 3)) {
my $pods = $self->{"MAN${section}PODS"};
push @man_cmds, $self->split_command(<<CMD, %$pods);
- \$(NOECHO) \$(POD2MAN) --section=$section --perm_rw=\$(PERM_RW)
+ \$(NOECHO) \$(POD2MAN) --section=\$(MAN${section}EXT) --perm_rw=\$(PERM_RW)
CMD
}
@@ -1080,9 +1078,11 @@
$self->{SITEPREFIX} ||= $sprefix;
$self->{VENDORPREFIX} ||= $vprefix;
- # Lots of MM extension authors like to use $(PREFIX) so we
- # put something sensible in there no matter what.
- $self->{PREFIX} = '$('.uc $self->{INSTALLDIRS}.'PREFIX)';
+ my $p = $self->{PREFIX} = $self->{PERLPREFIX};
+ for my $t (qw/PERL SITE VENDOR/)
+ {
+ $self->{"${t}PREFIX"} =~ s!^\Q$p\E(?=/|$)!\$(PREFIX)!;
+ }
}
my $arch = $Config{archname};
diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm perl-5.8.8/lib/ExtUtils/MM_Unix.pm
--- perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm 2005-05-21 19:42:56.000000000 +1000
+++ perl-5.8.8/lib/ExtUtils/MM_Unix.pm 2006-02-05 17:40:19.000000000 +1100
@@ -2054,9 +2054,7 @@
$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
pure_perl_install ::
- $(NOECHO) $(MOD_INSTALL) \
- read }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
- write }.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
+ $(NOECHO) umask 022; $(MOD_INSTALL) \
$(INST_LIB) $(DESTINSTALLPRIVLIB) \
$(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
$(INST_BIN) $(DESTINSTALLBIN) \
@@ -2068,7 +2066,7 @@
pure_site_install ::
- $(NOECHO) $(MOD_INSTALL) \
+ $(NOECHO) umask 02; $(MOD_INSTALL) \
read }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
write }.$self->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').q{ \
$(INST_LIB) $(DESTINSTALLSITELIB) \
@@ -2081,9 +2079,7 @@
}.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{
pure_vendor_install ::
- $(NOECHO) $(MOD_INSTALL) \
- read }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
- write }.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{ \
+ $(NOECHO) umask 022; $(MOD_INSTALL) \
$(INST_LIB) $(DESTINSTALLVENDORLIB) \
$(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
$(INST_BIN) $(DESTINSTALLVENDORBIN) \
@@ -2092,37 +2088,19 @@
$(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
doc_perl_install ::
- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- -$(NOECHO) $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" "$(INSTALLPRIVLIB)" \
- LINKTYPE "$(LINKTYPE)" \
- VERSION "$(VERSION)" \
- EXE_FILES "$(EXE_FILES)" \
- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
doc_site_install ::
- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- -$(NOECHO) $(DOC_INSTALL) \
+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLSITEARCH)/perllocal.pod
+ -$(NOECHO) umask 02; $(MKPATH) $(DESTINSTALLSITEARCH)
+ -$(NOECHO) umask 02; $(DOC_INSTALL) \
"Module" "$(NAME)" \
"installed into" "$(INSTALLSITELIB)" \
LINKTYPE "$(LINKTYPE)" \
VERSION "$(VERSION)" \
EXE_FILES "$(EXE_FILES)" \
- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
+ >> }.$self->catfile('$(DESTINSTALLSITEARCH)','perllocal.pod').q{
doc_vendor_install ::
- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- -$(NOECHO) $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" "$(INSTALLVENDORLIB)" \
- LINKTYPE "$(LINKTYPE)" \
- VERSION "$(VERSION)" \
- EXE_FILES "$(EXE_FILES)" \
- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
};
@@ -2131,13 +2109,12 @@
$(NOECHO) $(NOOP)
uninstall_from_perldirs ::
- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{
uninstall_from_sitedirs ::
$(NOECHO) $(UNINSTALL) }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{
uninstall_from_vendordirs ::
- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{
+
};
join("",@m);
@@ -2415,7 +2392,7 @@
($lperl = $libperl) =~ s/\$\(A\)/$self->{LIB_EXT}/;
}
unless ($libperl && -f $lperl) { # Ilya's code...
- my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/CORE";
+ my $dir = $self->{PERL_SRC} || "/usr/lib";
$dir = "$self->{PERL_ARCHLIB}/.." if $self->{UNINSTALLED_PERL};
$libperl ||= "libperl$self->{LIB_EXT}";
$libperl = "$dir/$libperl";
@@ -3007,8 +2984,7 @@
print STDERR " prefixify $var => $path\n" if $Verbose >= 2;
print STDERR " from $sprefix to $rprefix\n" if $Verbose >= 2;
- if( $self->{ARGS}{PREFIX} && $self->file_name_is_absolute($path) &&
- $path !~ s{^\Q$sprefix\E\b}{$rprefix}s )
+ if( $path !~ s{^\Q$sprefix\E\b}{$rprefix}s && $self->{ARGS}{PREFIX} )
{
print STDERR " cannot prefix, using default.\n" if $Verbose >= 2;
diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/t/INST.t perl-5.8.8/lib/ExtUtils/t/INST.t
--- perl-5.8.8.orig/lib/ExtUtils/t/INST.t 2005-10-21 19:12:39.000000000 +1000
+++ perl-5.8.8/lib/ExtUtils/t/INST.t 2006-02-05 17:48:56.000000000 +1100
@@ -65,9 +65,7 @@
is( $mm->{NAME}, 'Big::Dummy', 'NAME' );
is( $mm->{VERSION}, 0.01, 'VERSION' );
-my $config_prefix = $Config{installprefixexp} || $Config{installprefix} ||
- $Config{prefixexp} || $Config{prefix};
-is( $mm->{PERLPREFIX}, $config_prefix, 'PERLPREFIX' );
+is( $mm->{PERLPREFIX}, '$(PREFIX)', 'PERLPREFIX' );
is( !!$mm->{PERL_CORE}, !!$ENV{PERL_CORE}, 'PERL_CORE' );
diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/t/INST_PREFIX.t perl-5.8.8/lib/ExtUtils/t/INST_PREFIX.t
--- perl-5.8.8.orig/lib/ExtUtils/t/INST_PREFIX.t 2005-10-21 22:00:19.000000000 +1000
+++ perl-5.8.8/lib/ExtUtils/t/INST_PREFIX.t 2006-02-05 17:48:06.000000000 +1100
@@ -16,7 +16,7 @@
}
use strict;
-use Test::More tests => 52;
+use Test::More tests => 47;
use MakeMaker::Test::Utils;
use MakeMaker::Test::Setup::BFD;
use ExtUtils::MakeMaker;
@@ -62,16 +62,16 @@
Writing\ $Makefile\ for\ Big::Dummy\n
}x );
-is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
+#is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
isa_ok( $mm, 'ExtUtils::MakeMaker' );
is( $mm->{NAME}, 'Big::Dummy', 'NAME' );
is( $mm->{VERSION}, 0.01, 'VERSION' );
-foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) {
- unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ );
-}
+#foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) {
+# unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ );
+#}
my $PREFIX = File::Spec->catdir('foo', 'bar');
|