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