diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.12.2/debian/extutils_hacks.diff')
-rw-r--r-- | meta/recipes-devtools/perl/perl-5.12.2/debian/extutils_hacks.diff | 313 |
1 files changed, 313 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.12.2/debian/extutils_hacks.diff b/meta/recipes-devtools/perl/perl-5.12.2/debian/extutils_hacks.diff new file mode 100644 index 0000000000..9134cac9f2 --- /dev/null +++ b/meta/recipes-devtools/perl/perl-5.12.2/debian/extutils_hacks.diff | |||
@@ -0,0 +1,313 @@ | |||
1 | Subject: Various debian-specific ExtUtils changes | ||
2 | |||
3 | * Respect umask during installation, and set as appropriate for each of | ||
4 | perl, vendor and site (policy requires group writable site dirs). | ||
5 | |||
6 | * Don't install .packlist or perllocal.pod for perl or vendor. | ||
7 | * Fiddle with *PREFIX and variables written to the makefile so that | ||
8 | install directories may be changed when make is run by passing | ||
9 | PREFIX= to the "make install" command (used when packaging | ||
10 | modules). | ||
11 | |||
12 | * Set location of libperl.a to /usr/lib. | ||
13 | * Note that libperl-dev package is required for embedded linking. | ||
14 | * Change install target dependencies to facilitate parallel makes. | ||
15 | |||
16 | |||
17 | --- | ||
18 | cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | 12 +++--- | ||
19 | cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 44 +++++----------------- | ||
20 | cpan/ExtUtils-MakeMaker/t/INST.t | 4 +-- | ||
21 | cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t | 10 +++--- | ||
22 | dist/ExtUtils-Install/lib/ExtUtils/Install.pm | 18 +++++----- | ||
23 | lib/ExtUtils/Embed.pm | 3 ++ | ||
24 | 6 files changed, 34 insertions(+), 57 deletions(-) | ||
25 | |||
26 | diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | ||
27 | index 4905aeb..a80ac20 100644 | ||
28 | --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | ||
29 | +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | ||
30 | @@ -701,8 +701,6 @@ all POD files in MAN1PODS and MAN3PODS. | ||
31 | sub manifypods_target { | ||
32 | my($self) = shift; | ||
33 | |||
34 | - my $man1pods = ''; | ||
35 | - my $man3pods = ''; | ||
36 | my $dependencies = ''; | ||
37 | |||
38 | # populate manXpods & dependencies: | ||
39 | @@ -718,7 +716,7 @@ END | ||
40 | foreach my $section (qw(1 3)) { | ||
41 | my $pods = $self->{"MAN${section}PODS"}; | ||
42 | push @man_cmds, $self->split_command(<<CMD, %$pods); | ||
43 | - \$(NOECHO) \$(POD2MAN) --section=$section --perm_rw=\$(PERM_RW) | ||
44 | + \$(NOECHO) \$(POD2MAN) --section=\$(MAN${section}EXT) --perm_rw=\$(PERM_RW) | ||
45 | CMD | ||
46 | } | ||
47 | |||
48 | @@ -1428,9 +1426,11 @@ sub init_INSTALL_from_PREFIX { | ||
49 | $self->{SITEPREFIX} ||= $sprefix; | ||
50 | $self->{VENDORPREFIX} ||= $vprefix; | ||
51 | |||
52 | - # Lots of MM extension authors like to use $(PREFIX) so we | ||
53 | - # put something sensible in there no matter what. | ||
54 | - $self->{PREFIX} = '$('.uc $self->{INSTALLDIRS}.'PREFIX)'; | ||
55 | + my $p = $self->{PREFIX} = $self->{PERLPREFIX}; | ||
56 | + for my $t (qw/PERL SITE VENDOR/) | ||
57 | + { | ||
58 | + $self->{"${t}PREFIX"} =~ s!^\Q$p\E(?=/|$)!\$(PREFIX)!; | ||
59 | + } | ||
60 | } | ||
61 | |||
62 | my $arch = $Config{archname}; | ||
63 | diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | ||
64 | index 239d6df..940de38 100644 | ||
65 | --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | ||
66 | +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | ||
67 | @@ -2046,9 +2046,7 @@ doc__install : doc_site_install | ||
68 | $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site | ||
69 | |||
70 | pure_perl_install :: all | ||
71 | - $(NOECHO) $(MOD_INSTALL) \ | ||
72 | - read }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \ | ||
73 | - write }.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \ | ||
74 | + $(NOECHO) umask 022; $(MOD_INSTALL) \ | ||
75 | $(INST_LIB) $(DESTINSTALLPRIVLIB) \ | ||
76 | $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \ | ||
77 | $(INST_BIN) $(DESTINSTALLBIN) \ | ||
78 | @@ -2060,7 +2058,7 @@ pure_perl_install :: all | ||
79 | |||
80 | |||
81 | pure_site_install :: all | ||
82 | - $(NOECHO) $(MOD_INSTALL) \ | ||
83 | + $(NOECHO) umask 02; $(MOD_INSTALL) \ | ||
84 | read }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \ | ||
85 | write }.$self->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').q{ \ | ||
86 | $(INST_LIB) $(DESTINSTALLSITELIB) \ | ||
87 | @@ -2073,9 +2071,7 @@ pure_site_install :: all | ||
88 | }.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{ | ||
89 | |||
90 | pure_vendor_install :: all | ||
91 | - $(NOECHO) $(MOD_INSTALL) \ | ||
92 | - read }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \ | ||
93 | - write }.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{ \ | ||
94 | + $(NOECHO) umask 022; $(MOD_INSTALL) \ | ||
95 | $(INST_LIB) $(DESTINSTALLVENDORLIB) \ | ||
96 | $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \ | ||
97 | $(INST_BIN) $(DESTINSTALLVENDORBIN) \ | ||
98 | @@ -2084,37 +2080,19 @@ pure_vendor_install :: all | ||
99 | $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) | ||
100 | |||
101 | doc_perl_install :: all | ||
102 | - $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod | ||
103 | - -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) | ||
104 | - -$(NOECHO) $(DOC_INSTALL) \ | ||
105 | - "Module" "$(NAME)" \ | ||
106 | - "installed into" "$(INSTALLPRIVLIB)" \ | ||
107 | - LINKTYPE "$(LINKTYPE)" \ | ||
108 | - VERSION "$(VERSION)" \ | ||
109 | - EXE_FILES "$(EXE_FILES)" \ | ||
110 | - >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{ | ||
111 | |||
112 | doc_site_install :: all | ||
113 | - $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod | ||
114 | - -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) | ||
115 | - -$(NOECHO) $(DOC_INSTALL) \ | ||
116 | + $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLSITEARCH)/perllocal.pod | ||
117 | + -$(NOECHO) umask 02; $(MKPATH) $(DESTINSTALLSITEARCH) | ||
118 | + -$(NOECHO) umask 02; $(DOC_INSTALL) \ | ||
119 | "Module" "$(NAME)" \ | ||
120 | "installed into" "$(INSTALLSITELIB)" \ | ||
121 | LINKTYPE "$(LINKTYPE)" \ | ||
122 | VERSION "$(VERSION)" \ | ||
123 | EXE_FILES "$(EXE_FILES)" \ | ||
124 | - >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{ | ||
125 | + >> }.$self->catfile('$(DESTINSTALLSITEARCH)','perllocal.pod').q{ | ||
126 | |||
127 | doc_vendor_install :: all | ||
128 | - $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod | ||
129 | - -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) | ||
130 | - -$(NOECHO) $(DOC_INSTALL) \ | ||
131 | - "Module" "$(NAME)" \ | ||
132 | - "installed into" "$(INSTALLVENDORLIB)" \ | ||
133 | - LINKTYPE "$(LINKTYPE)" \ | ||
134 | - VERSION "$(VERSION)" \ | ||
135 | - EXE_FILES "$(EXE_FILES)" \ | ||
136 | - >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{ | ||
137 | |||
138 | }; | ||
139 | |||
140 | @@ -2123,13 +2101,12 @@ uninstall :: uninstall_from_$(INSTALLDIRS)dirs | ||
141 | $(NOECHO) $(NOOP) | ||
142 | |||
143 | uninstall_from_perldirs :: | ||
144 | - $(NOECHO) $(UNINSTALL) }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ | ||
145 | |||
146 | uninstall_from_sitedirs :: | ||
147 | $(NOECHO) $(UNINSTALL) }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{ | ||
148 | |||
149 | uninstall_from_vendordirs :: | ||
150 | - $(NOECHO) $(UNINSTALL) }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ | ||
151 | + | ||
152 | }; | ||
153 | |||
154 | join("",@m); | ||
155 | @@ -2402,7 +2379,7 @@ MAP_PRELIBS = $Config{perllibs} $Config{cryptlib} | ||
156 | ($lperl = $libperl) =~ s/\$\(A\)/$self->{LIB_EXT}/; | ||
157 | } | ||
158 | unless ($libperl && -f $lperl) { # Ilya's code... | ||
159 | - my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/CORE"; | ||
160 | + my $dir = $self->{PERL_SRC} || "/usr/lib"; | ||
161 | $dir = "$self->{PERL_ARCHLIB}/.." if $self->{UNINSTALLED_PERL}; | ||
162 | $libperl ||= "libperl$self->{LIB_EXT}"; | ||
163 | $libperl = "$dir/$libperl"; | ||
164 | @@ -2998,8 +2975,7 @@ sub prefixify { | ||
165 | print STDERR " prefixify $var => $path\n" if $Verbose >= 2; | ||
166 | print STDERR " from $sprefix to $rprefix\n" if $Verbose >= 2; | ||
167 | |||
168 | - if( $self->{ARGS}{PREFIX} && | ||
169 | - $path !~ s{^\Q$sprefix\E\b}{$rprefix}s ) | ||
170 | + if( $path !~ s{^\Q$sprefix\E\b}{$rprefix}s && $self->{ARGS}{PREFIX} ) | ||
171 | { | ||
172 | |||
173 | print STDERR " cannot prefix, using default.\n" if $Verbose >= 2; | ||
174 | diff --git a/cpan/ExtUtils-MakeMaker/t/INST.t b/cpan/ExtUtils-MakeMaker/t/INST.t | ||
175 | index 8a140eb..cf1410e 100755 | ||
176 | --- a/cpan/ExtUtils-MakeMaker/t/INST.t | ||
177 | +++ b/cpan/ExtUtils-MakeMaker/t/INST.t | ||
178 | @@ -59,9 +59,7 @@ isa_ok( $mm, 'ExtUtils::MakeMaker' ); | ||
179 | is( $mm->{NAME}, 'Big::Dummy', 'NAME' ); | ||
180 | is( $mm->{VERSION}, 0.01, 'VERSION' ); | ||
181 | |||
182 | -my $config_prefix = $Config{installprefixexp} || $Config{installprefix} || | ||
183 | - $Config{prefixexp} || $Config{prefix}; | ||
184 | -is( $mm->{PERLPREFIX}, $config_prefix, 'PERLPREFIX' ); | ||
185 | +is( $mm->{PERLPREFIX}, '$(PREFIX)', 'PERLPREFIX' ); | ||
186 | |||
187 | is( !!$mm->{PERL_CORE}, !!$ENV{PERL_CORE}, 'PERL_CORE' ); | ||
188 | |||
189 | diff --git a/cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t b/cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t | ||
190 | index 8bb9db8..316546d 100755 | ||
191 | --- a/cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t | ||
192 | +++ b/cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t | ||
193 | @@ -10,7 +10,7 @@ BEGIN { | ||
194 | } | ||
195 | |||
196 | use strict; | ||
197 | -use Test::More tests => 52; | ||
198 | +use Test::More tests => 47; | ||
199 | use MakeMaker::Test::Utils; | ||
200 | use MakeMaker::Test::Setup::BFD; | ||
201 | use ExtUtils::MakeMaker; | ||
202 | @@ -56,16 +56,16 @@ like( $stdout->read, qr{ | ||
203 | Writing\ $Makefile\ for\ Big::Dummy\n | ||
204 | }x ); | ||
205 | |||
206 | -is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' ); | ||
207 | +#is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' ); | ||
208 | |||
209 | isa_ok( $mm, 'ExtUtils::MakeMaker' ); | ||
210 | |||
211 | is( $mm->{NAME}, 'Big::Dummy', 'NAME' ); | ||
212 | is( $mm->{VERSION}, 0.01, 'VERSION' ); | ||
213 | |||
214 | -foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) { | ||
215 | - unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ ); | ||
216 | -} | ||
217 | +#foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) { | ||
218 | +# unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ ); | ||
219 | +#} | ||
220 | |||
221 | |||
222 | my $PREFIX = File::Spec->catdir('foo', 'bar'); | ||
223 | diff --git a/dist/ExtUtils-Install/lib/ExtUtils/Install.pm b/dist/ExtUtils-Install/lib/ExtUtils/Install.pm | ||
224 | index da58365..d6d5c11 100644 | ||
225 | --- a/dist/ExtUtils-Install/lib/ExtUtils/Install.pm | ||
226 | +++ b/dist/ExtUtils-Install/lib/ExtUtils/Install.pm | ||
227 | @@ -468,7 +468,7 @@ sub _can_write_dir { | ||
228 | |||
229 | =pod | ||
230 | |||
231 | -=item _mkpath($dir,$show,$mode,$verbose,$dry_run) | ||
232 | +=item _mkpath($dir,$show,$verbose,$dry_run) | ||
233 | |||
234 | Wrapper around File::Path::mkpath() to handle errors. | ||
235 | |||
236 | @@ -485,13 +485,13 @@ writable. | ||
237 | =cut | ||
238 | |||
239 | sub _mkpath { | ||
240 | - my ($dir,$show,$mode,$verbose,$dry_run)=@_; | ||
241 | + my ($dir,$show,$verbose,$dry_run)=@_; | ||
242 | if ( $verbose && $verbose > 1 && ! -d $dir) { | ||
243 | $show= 1; | ||
244 | - printf "mkpath(%s,%d,%#o)\n", $dir, $show, $mode; | ||
245 | + printf "mkpath(%s,%d)\n", $dir, $show; | ||
246 | } | ||
247 | if (!$dry_run) { | ||
248 | - if ( ! eval { File::Path::mkpath($dir,$show,$mode); 1 } ) { | ||
249 | + if ( ! eval { File::Path::mkpath($dir,$show); 1 } ) { | ||
250 | _choke("Can't create '$dir'","$@"); | ||
251 | } | ||
252 | |||
253 | @@ -796,7 +796,7 @@ sub install { #XXX OS-SPECIFIC | ||
254 | _chdir($cwd); | ||
255 | } | ||
256 | foreach my $targetdir (sort keys %check_dirs) { | ||
257 | - _mkpath( $targetdir, 0, 0755, $verbose, $dry_run ); | ||
258 | + _mkpath( $targetdir, 0, $verbose, $dry_run ); | ||
259 | } | ||
260 | foreach my $found (@found_files) { | ||
261 | my ($diff, $ffd, $origfile, $mode, $size, $atime, $mtime, | ||
262 | @@ -810,7 +810,7 @@ sub install { #XXX OS-SPECIFIC | ||
263 | $targetfile= _unlink_or_rename( $targetfile, 'tryhard', 'install' ) | ||
264 | unless $dry_run; | ||
265 | } elsif ( ! -d $targetdir ) { | ||
266 | - _mkpath( $targetdir, 0, 0755, $verbose, $dry_run ); | ||
267 | + _mkpath( $targetdir, 0, $verbose, $dry_run ); | ||
268 | } | ||
269 | print "Installing $targetfile\n"; | ||
270 | |||
271 | @@ -850,7 +850,7 @@ sub install { #XXX OS-SPECIFIC | ||
272 | |||
273 | if ($pack{'write'}) { | ||
274 | $dir = install_rooted_dir(dirname($pack{'write'})); | ||
275 | - _mkpath( $dir, 0, 0755, $verbose, $dry_run ); | ||
276 | + _mkpath( $dir, 0, $verbose, $dry_run ); | ||
277 | print "Writing $pack{'write'}\n" if $verbose; | ||
278 | $packlist->write(install_rooted_file($pack{'write'})) unless $dry_run; | ||
279 | } | ||
280 | @@ -1190,7 +1190,7 @@ be prepended as a directory to each installed file (and directory). | ||
281 | sub pm_to_blib { | ||
282 | my($fromto,$autodir,$pm_filter) = @_; | ||
283 | |||
284 | - _mkpath($autodir,0,0755); | ||
285 | + _mkpath($autodir,0); | ||
286 | while(my($from, $to) = each %$fromto) { | ||
287 | if( -f $to && -s $from == -s $to && -M $to < -M $from ) { | ||
288 | print "Skip $to (unchanged)\n"; | ||
289 | @@ -1213,7 +1213,7 @@ sub pm_to_blib { | ||
290 | # we wont try hard here. its too likely to mess things up. | ||
291 | forceunlink($to); | ||
292 | } else { | ||
293 | - _mkpath(dirname($to),0,0755); | ||
294 | + _mkpath(dirname($to),0); | ||
295 | } | ||
296 | if ($need_filtering) { | ||
297 | run_filter($pm_filter, $from, $to); | ||
298 | diff --git a/lib/ExtUtils/Embed.pm b/lib/ExtUtils/Embed.pm | ||
299 | index 24ae909..12d421d 100644 | ||
300 | --- a/lib/ExtUtils/Embed.pm | ||
301 | +++ b/lib/ExtUtils/Embed.pm | ||
302 | @@ -305,6 +305,9 @@ and extensions in your C/C++ applications. | ||
303 | Typically, an application B<Makefile> will invoke ExtUtils::Embed | ||
304 | functions while building your application. | ||
305 | |||
306 | +Note that on Debian systems the B<libperl-dev> package is required for | ||
307 | +compiling applications which embed an interpreter. | ||
308 | + | ||
309 | =head1 @EXPORT | ||
310 | |||
311 | ExtUtils::Embed exports the following functions: | ||
312 | -- | ||
313 | tg: (c823880..) debian/extutils_hacks (depends on: upstream) | ||