summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-10-14 19:55:47 +0000
committerjlam <jlam@pkgsrc.org>2001-10-14 19:55:47 +0000
commit15c0280d2da3eb1822b2e1076d68cc6c0baabffa (patch)
treec81d77a7e319f119f4e5f9f3eda79e94630530ab /lang
parent2536d45da71f54b5ec4256da0771277a975eb00e (diff)
downloadpkgsrc-15c0280d2da3eb1822b2e1076d68cc6c0baabffa.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')
-rw-r--r--lang/perl5/Makefile8
-rw-r--r--lang/perl5/distinfo3
-rw-r--r--lang/perl5/patches/patch-ag36
3 files changed, 44 insertions, 3 deletions
diff --git a/lang/perl5/Makefile b/lang/perl5/Makefile
index 59695638a34..157222510e3 100644
--- a/lang/perl5/Makefile
+++ b/lang/perl5/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.47 2001/10/02 06:46:43 jlam Exp $
+# $NetBSD: Makefile,v 1.48 2001/10/14 19:55:47 jlam Exp $
.include "../../lang/perl5/Makefile.common"
PKGNAME= perl-${PERL5_VERS}
-PERL5_PKG_VERS= nb5
+PERL5_PKG_VERS= nb6
CATEGORIES+= lang devel
MAINTAINER= jlam@netbsd.org
@@ -51,6 +51,10 @@ SYSLIBPATH.SunOS= /usr/lib
LOCLIBPATH= ${LOCALBASE}/lib
LOCINCPATH= ${LOCALBASE}/include
+# On a.out platforms, we link with "ld" and on ELF platforms, we link with
+# "cc", so we need to use different options to pass the run-time search path
+# flags to the link command in the right way.
+#
.if ${OBJECT_FMT} == "a.out"
LOCLIBRPATHFLAGS= ${LOCLIBPATH:S/^/-R/g}
.else
diff --git a/lang/perl5/distinfo b/lang/perl5/distinfo
index 3ad4cbb5360..78199206150 100644
--- a/lang/perl5/distinfo
+++ b/lang/perl5/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2001/10/02 06:37:55 jlam Exp $
+$NetBSD: distinfo,v 1.8 2001/10/14 19:55:47 jlam Exp $
SHA1 (perl-5.6.1.tar.gz) = c718b38685f90d51a9a6b1b008de0d7d198c0744
Size (perl-5.6.1.tar.gz) = 5983695 bytes
@@ -8,3 +8,4 @@ SHA1 (patch-ac) = dfebafeec171c86de3d6105e5543270a30f82691
SHA1 (patch-ad) = 7a3ca903d958026473f593fdeb172f86f2ef66d2
SHA1 (patch-ae) = 677797f38279b7602fc5bbac8ee80c0e09f6e285
SHA1 (patch-af) = 94d91fba0731c9ee43b3e544f81cc9367a75a77c
+SHA1 (patch-ag) = 6f25b4799994279172bc756ede9f13506e9b1c28
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) $@
+ ';