summaryrefslogtreecommitdiff
path: root/lang/perl5/patches
diff options
context:
space:
mode:
authorjlam <jlam>2001-10-14 19:55:47 +0000
committerjlam <jlam>2001-10-14 19:55:47 +0000
commit42a19b1dc2daf96a77ec438aeb79718317a90f4f (patch)
treec81d77a7e319f119f4e5f9f3eda79e94630530ab /lang/perl5/patches
parent02c3f566eb78c71dbf3b3a44d02b1a88906e1e45 (diff)
downloadpkgsrc-42a19b1dc2daf96a77ec438aeb79718317a90f4f.tar.gz
Add a patch to the perl package that causes perl modules from CPAN to link
directly against -lperl when built. Combined with the previous update of perl to add ${LOCALBASE}/lib to the rpath when creating shared libraries/modules, these two changes make using mod_perl.so (ap-perl) more painless. All perl shared modules now contain interlibrary dependencies to the shared libraries they need. Instead of needing (at least on ELF): LoadFile !/usr/lib/libm.so LoadFile lib/perl5/5.6.1/i386-netbsd/CORE/libperl.so ... # Any other libraries needed by perl shared modules need to listed # with LoadFile here. ... LoadModule perl_module lib/httpd/mod_perl.so AddModule mod_perl.c you'd need only the last two lines as the mod_perl authors intended. I've tested this patch for many weeks now, successfully loading and using the p5-Apache-ASP module as my test bed, and I haven't noticed any problems with normal perl usage. Also comment the Makefile slightly better.
Diffstat (limited to 'lang/perl5/patches')
-rw-r--r--lang/perl5/patches/patch-ag36
1 files changed, 36 insertions, 0 deletions
diff --git a/lang/perl5/patches/patch-ag b/lang/perl5/patches/patch-ag
new file mode 100644
index 00000000000..11c52e9c5f3
--- /dev/null
+++ b/lang/perl5/patches/patch-ag
@@ -0,0 +1,36 @@
+$NetBSD: patch-ag,v 1.7 2001/10/14 19:55:48 jlam Exp $
+
+--- lib/ExtUtils/MM_Unix.pm.orig Thu Mar 15 10:25:20 2001
++++ lib/ExtUtils/MM_Unix.pm Mon Oct 1 03:51:12 2001
+@@ -1059,6 +1059,22 @@
+ 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 -lperl';
++ } elsif ($Config{'lddlflags'} =~ /-R/) {
++ $llibperl = '-L$(PERL_INC) -R$(INSTALLARCHLIB)/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 @@
+ ');
+
+ 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) $@
+ ';