baf90848b6
and 5.6.1nb10 include pulling in changes from the latest Perl sources that add a more complete set of directories on NetBSD systems to the rpath of Perl modules so that they may find libperl.so. The module build/installation is now robust against the user overriding the value of INSTALLARCHLIB.
86 lines
3.6 KiB
Text
86 lines
3.6 KiB
Text
$NetBSD: patch-ag,v 1.9 2004/01/13 01:08:57 jlam Exp $
|
|
|
|
--- lib/ExtUtils/MM_Unix.pm.orig Thu Mar 15 10:25:20 2001
|
|
+++ lib/ExtUtils/MM_Unix.pm
|
|
@@ -604,8 +604,8 @@ MAN3PODS = ".join(" \\\n\t", sort keys %
|
|
INST_HTMLSITELIBDIR INSTALLHTMLSITELIBDIR
|
|
INST_HTMLSCRIPTDIR INSTALLHTMLSCRIPTDIR
|
|
INST_HTMLLIBDIR HTMLEXT
|
|
- INST_MAN1DIR INSTALLMAN1DIR MAN1EXT
|
|
- INST_MAN3DIR INSTALLMAN3DIR MAN3EXT
|
|
+ INST_MAN1DIR INSTALLMAN1DIR INSTALLSITEMAN1DIR MAN1EXT
|
|
+ INST_MAN3DIR INSTALLMAN3DIR INSTALLSITEMAN3DIR MAN3EXT
|
|
/) {
|
|
next unless defined $self->{$tmp};
|
|
push @m, "$tmp = $self->{$tmp}\n";
|
|
@@ -1059,6 +1059,22 @@ sub dynamic_lib {
|
|
my($ldfrom) = '$(LDFROM)';
|
|
$armaybe = 'ar' if ($^O eq 'dec_osf' and $armaybe eq ':');
|
|
my(@m);
|
|
+
|
|
+ # Set LLIBPERL to nothing on static perl platforms, and to the flags
|
|
+ # needed to link against the shared libperl library on shared perl
|
|
+ # platforms. We peek at lddlflags to see if we need -Wl,-R or -R
|
|
+ # to add paths to the run-time library search path.
|
|
+ #
|
|
+ my($llibperl) = '';
|
|
+ if (($^O eq 'netbsd') and ($Config{'useshrplib'} eq 'true')) {
|
|
+ if ($Config{'lddlflags'} =~ /-Wl,-R/) {
|
|
+ $llibperl = '-L$(PERL_INC) -Wl,-R$(INSTALLARCHLIB)/CORE -Wl,-R$(PERL_ARCHLIB)/CORE -lperl';
|
|
+ } elsif ($Config{'lddlflags'} =~ /-R/) {
|
|
+ $llibperl = '-L$(PERL_INC) -R$(INSTALLARCHLIB)/CORE -R$(PERL_ARCHLIB)/CORE -lperl';
|
|
+ }
|
|
+ }
|
|
+ push(@m,'LLIBPERL = '.$llibperl."\n");
|
|
+
|
|
push(@m,'
|
|
# This section creates the dynamically loadable $(INST_DYNAMIC)
|
|
# from $(OBJECT) and possibly $(MYEXTLIB).
|
|
@@ -1088,7 +1104,7 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $
|
|
');
|
|
|
|
push(@m,' LD_RUN_PATH="$(LD_RUN_PATH)" $(LD) '.$ldrun.' $(LDDLFLAGS) '.$ldfrom.
|
|
- ' $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST)');
|
|
+ ' $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) $(PERL_ARCHIVE) $(LLIBPERL) $(LDLOADLIBS) $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST)');
|
|
push @m, '
|
|
$(CHMOD) $(PERM_RWX) $@
|
|
';
|
|
@@ -1888,7 +1904,9 @@ usually solves this kind of problem.
|
|
}
|
|
for $install_variable (qw/
|
|
INSTALLMAN1DIR
|
|
+ INSTALLSITEMAN1DIR
|
|
INSTALLMAN3DIR
|
|
+ INSTALLSITEMAN3DIR
|
|
/)
|
|
{
|
|
$self->prefixify($install_variable,$search_prefix,$replace_prefix);
|
|
@@ -1898,6 +1916,8 @@ usually solves this kind of problem.
|
|
# installed
|
|
$self->{INSTALLMAN1DIR} = $Config::Config{installman1dir}
|
|
unless defined $self->{INSTALLMAN1DIR};
|
|
+ $self->{INSTALLSITEMAN1DIR} = $Config::Config{installsiteman1dir}
|
|
+ unless defined $self->{INSTALLSITEMAN1DIR};
|
|
unless (defined $self->{INST_MAN1DIR}){
|
|
if ($self->{INSTALLMAN1DIR} =~ /^(none|\s*)$/){
|
|
$self->{INST_MAN1DIR} = $self->{INSTALLMAN1DIR};
|
|
@@ -1909,6 +1929,8 @@ usually solves this kind of problem.
|
|
|
|
$self->{INSTALLMAN3DIR} = $Config::Config{installman3dir}
|
|
unless defined $self->{INSTALLMAN3DIR};
|
|
+ $self->{INSTALLSITEMAN3DIR} = $Config::Config{installsiteman3dir}
|
|
+ unless defined $self->{INSTALLSITEMAN3DIR};
|
|
unless (defined $self->{INST_MAN3DIR}){
|
|
if ($self->{INSTALLMAN3DIR} =~ /^(none|\s*)$/){
|
|
$self->{INST_MAN3DIR} = $self->{INSTALLMAN3DIR};
|
|
@@ -2153,8 +2175,8 @@ pure_site_install ::
|
|
$(INST_SCRIPT) $(INSTALLSCRIPT) \
|
|
$(INST_HTMLLIBDIR) $(INSTALLHTMLSITELIBDIR) \
|
|
$(INST_HTMLSCRIPTDIR) $(INSTALLHTMLSCRIPTDIR) \
|
|
- $(INST_MAN1DIR) $(INSTALLMAN1DIR) \
|
|
- $(INST_MAN3DIR) $(INSTALLMAN3DIR)
|
|
+ $(INST_MAN1DIR) $(INSTALLSITEMAN1DIR) \
|
|
+ $(INST_MAN3DIR) $(INSTALLSITEMAN3DIR)
|
|
}.$self->{NOECHO}.q{$(WARN_IF_OLD_PACKLIST) \
|
|
}.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{
|
|
|