Just forwarding for on-list discussion.
----- Forwarded message from Brendan O'Dea <[EMAIL PROTECTED]> -----
From: "Brendan O'Dea" <[EMAIL PROTECTED]>
Date: Thu, 2 Oct 2003 00:10:46 +1000
To: Michael G Schwern <[EMAIL PROTECTED]>
Subject: Debian patches to ExtUtils::MakeMaker for 5.8.1
Delivered-To: [EMAIL PROTECTED]
User-Agent: Mutt/1.5.4i
X-PMX-Version: 4.0.3.74897
Hi Michael,
Just a FYI re. the changes to MakeMaker for Debian's 5.8.1 packages.
The changes are pretty minimal other than the policy-specific changes
required (such as not installing .packlist files and so on).
The only one worth noting is:
@@ -2092,6 +2092,11 @@
$self->{PERLPREFIX} ||= $iprefix;
$self->{SITEPREFIX} ||= $sprefix;
$self->{VENDORPREFIX} ||= $vprefix;
+ 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};
Which is required to allow PREFIX to be overridden meaningfully on the
make command line (vs. on the Makefile.PL command line).
The change was made principally because the Debian perl policy currently
recommends using "make install PREFIX=..." to install into a temporary
directory as part of the package building process.
We should probably change policy to suggest using the new DESTDIR
support, or at least VENDORPREFIX but for the moment I didn't want to
break existing practice.
This change should (I believe) be fairly transparent.
For reference I've attached the full patches applied to ExtUtils::.
I appreciate all your work on MakeMaker BTW, this has been the most
painless upgrade that I recall. Thanks.
--bod
Remove standard libs from LD_RUN_PATH as per Debian policy.
diff -Naur perl-5.8.1.orig/lib/ExtUtils/Liblist/Kid.pm
perl-5.8.1/lib/ExtUtils/Liblist/Kid.pm
--- perl-5.8.1.orig/lib/ExtUtils/Liblist/Kid.pm 2003-09-02 23:40:27.000000000 +1000
+++ perl-5.8.1/lib/ExtUtils/Liblist/Kid.pm 2003-09-27 18:19:41.000000000 +1000
@@ -54,6 +54,9 @@
my($pwd) = cwd(); # from Cwd.pm
my($found) = 0;
+ # Debian-specific: don't use LD_RUN_PATH for standard dirs
+ $ld_run_path_seen{$_}++ for qw(/lib /usr/lib /usr/X11R6/lib);
+
foreach $thislib (split ' ', $potential_libs){
# Handle possible linker path arguments.
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.1.orig/lib/ExtUtils/Embed.pm
perl-5.8.1/lib/ExtUtils/Embed.pm
--- perl-5.8.1.orig/lib/ExtUtils/Embed.pm 2003-09-02 23:40:27.000000000 +1000
+++ perl-5.8.1/lib/ExtUtils/Embed.pm 2003-09-30 09:02:49.000000000 +1000
@@ -297,6 +297,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.1.orig/lib/ExtUtils/Install.pm
perl-5.8.1/lib/ExtUtils/Install.pm
--- perl-5.8.1.orig/lib/ExtUtils/Install.pm 2003-09-16 17:53:56.000000000 +1000
+++ perl-5.8.1/lib/ExtUtils/Install.pm 2003-09-30 09:02:49.000000000 +1000
@@ -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.1.orig/lib/ExtUtils/MM_Unix.pm
perl-5.8.1/lib/ExtUtils/MM_Unix.pm
--- perl-5.8.1.orig/lib/ExtUtils/MM_Unix.pm 2003-09-21 20:06:24.000000000 +1000
+++ perl-5.8.1/lib/ExtUtils/MM_Unix.pm 2003-09-30 09:03:59.000000000 +1000
@@ -2092,6 +2092,11 @@
$self->{PERLPREFIX} ||= $iprefix;
$self->{SITEPREFIX} ||= $sprefix;
$self->{VENDORPREFIX} ||= $vprefix;
+ 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};
@@ -2499,9 +2504,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) \
@@ -2513,7 +2516,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) \
@@ -2526,9 +2529,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) \
@@ -2537,37 +2538,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) $(DESTINSTALLARCHLIB)
+ -$(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{
};
@@ -2850,7 +2833,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";
diff -Naur --exclude=debian perl-5.8.1.orig/lib/ExtUtils/t/INST.t
perl-5.8.1/lib/ExtUtils/t/INST.t
--- perl-5.8.1.orig/lib/ExtUtils/t/INST.t 2003-09-02 23:40:29.000000000 +1000
+++ perl-5.8.1/lib/ExtUtils/t/INST.t 2003-09-30 09:02:49.000000000 +1000
@@ -60,7 +60,7 @@
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.1.orig/lib/ExtUtils/t/INST_PREFIX.t
perl-5.8.1/lib/ExtUtils/t/INST_PREFIX.t
--- perl-5.8.1.orig/lib/ExtUtils/t/INST_PREFIX.t 2003-09-02 23:40:29.000000000
+1000
+++ perl-5.8.1/lib/ExtUtils/t/INST_PREFIX.t 2003-09-30 09:02:49.000000000 +1000
@@ -16,7 +16,7 @@
}
use strict;
-use Test::More tests => 36;
+use Test::More tests => 32;
use MakeMaker::Test::Utils;
use ExtUtils::MakeMaker;
use File::Spec;
@@ -60,9 +60,9 @@
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');
----- End forwarded message -----
--