summaryrefslogtreecommitdiff
path: root/lang/perl5/patches/patch-ag
blob: 6e2397cab545759d81f2857292ce0824fd6e792b (plain)
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
$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{