summaryrefslogtreecommitdiff
path: root/lang/perl5
diff options
context:
space:
mode:
authortv <tv>1998-12-01 02:47:18 +0000
committertv <tv>1998-12-01 02:47:18 +0000
commit96717a07920bfba6af4791ec38b439b7445325ed (patch)
tree4864d615694a9212925176f0cb14b34967da865a /lang/perl5
parent997a8b9fc87e82eb8242a5db8b49b55957690b4b (diff)
downloadpkgsrc-96717a07920bfba6af4791ec38b439b7445325ed.tar.gz
Add proper shared object support for ELF(!), and make libperl shared on
non-NOPIC systems.
Diffstat (limited to 'lang/perl5')
-rw-r--r--lang/perl5/Makefile24
-rw-r--r--lang/perl5/patches/patch-aa19
-rw-r--r--lang/perl5/patches/patch-af55
-rw-r--r--lang/perl5/patches/patch-ai13
-rw-r--r--lang/perl5/pkg/PLIST-mi7
5 files changed, 94 insertions, 24 deletions
diff --git a/lang/perl5/Makefile b/lang/perl5/Makefile
index 6b3f2d81f69..bdb46ed4598 100644
--- a/lang/perl5/Makefile
+++ b/lang/perl5/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 1998/10/03 03:14:23 tv Exp $
+# $NetBSD: Makefile,v 1.14 1998/12/01 02:47:18 tv Exp $
# FreeBSD Id: Makefile,v 1.20 1997/07/18 06:16:44 markm Exp
#
@@ -18,21 +18,25 @@ CONFIGURE_ENV+= PREFIX=${PREFIX}
CONFIGURE_SCRIPT= Configure
CONFIGURE_ARGS+= -sde -Dprefix=${PREFIX} \
-Darchname=${MACHINE_ARCH}-${LOPSYS}
+MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}
test:
@(cd ${WRKSRC}; make test)
+# ELF and a.out systems have slightly different libperl extensions.
+pre-install:
+.if exists(/usr/libexec/ld.elf_so)
+ @echo 'lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/CORE/libperl.so' >>${WRKDIR}/.PLIST-add
+.elif exists(/usr/libexec/ld.so)
+ @echo 'lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/CORE/libperl.so.4.4' >>${WRKDIR}/.PLIST-add
+.else
+ @echo 'lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/CORE/libperl.a' >>${WRKDIR}/.PLIST-add
+.endif
+
post-install:
@strip ${PREFIX}/bin/a2p
@strip ${PREFIX}/bin/perl
-.if (${OPSYS} != "NetBSD")
-# agc - no suidperl???
- @strip ${PREFIX}/bin/suidperl
-.endif
-
-# XXX until alpha can dynamically load perl modules
-.if (${MACHINE_ARCH} == "alpha")
-NOPIC=1
-.endif
.include "../../mk/bsd.pkg.mk"
+
+PLIST_SRC:= ${WRKDIR}/.PLIST-add ${PLIST_SRC}
diff --git a/lang/perl5/patches/patch-aa b/lang/perl5/patches/patch-aa
index 01e2fd2ecff..bd247960bea 100644
--- a/lang/perl5/patches/patch-aa
+++ b/lang/perl5/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.8 1998/09/07 22:40:28 agc Exp $
+$NetBSD: patch-aa,v 1.9 1998/12/01 02:47:19 tv Exp $
---- Configure.orig Fri Oct 3 18:57:39 1997
-+++ Configure Fri Aug 7 12:31:44 1998
+--- Configure.orig Fri Oct 3 13:57:39 1997
++++ Configure Mon Nov 30 20:48:38 1998
@@ -65,7 +65,7 @@
fi
@@ -122,6 +122,19 @@ $NetBSD: patch-aa,v 1.8 1998/09/07 22:40:28 agc Exp $
fi;;
esac
case "$libpth" in
+@@ -4747,10 +4748,10 @@
+ aix)
+ # We'll set it in Makefile.SH...
+ ;;
+- solaris|netbsd)
++ solaris)
+ xxx="-R $shrpdir"
+ ;;
+- freebsd)
++ freebsd|netbsd)
+ xxx="-Wl,-R$shrpdir"
+ ;;
+ linux|irix*|dec_osf)
@@ -4965,8 +4966,8 @@
esac
diff --git a/lang/perl5/patches/patch-af b/lang/perl5/patches/patch-af
index e7efa4b3c92..c89497909f5 100644
--- a/lang/perl5/patches/patch-af
+++ b/lang/perl5/patches/patch-af
@@ -1,13 +1,56 @@
-$NetBSD: patch-af,v 1.2 1998/08/07 11:09:24 agc Exp $
+$NetBSD: patch-af,v 1.3 1998/12/01 02:47:19 tv Exp $
---- hints/netbsd.sh.orig Tue Mar 24 12:24:25 1998
-+++ hints/netbsd.sh Tue Mar 24 12:28:19 1998
-@@ -49,13 +49,16 @@
+--- hints/netbsd.sh.orig Thu May 8 11:52:59 1997
++++ hints/netbsd.sh Mon Nov 30 21:06:57 1998
+@@ -19,26 +19,25 @@
+ usedl="$undef"
+ ;;
+ *)
+- case `uname -m` in
+- alpha|powerpc|pmax)
+- d_dlopen=$undef
+- ;;
+-# this doesn't work (yet).
+-# alpha)
+-# d_dlopen=$define
+-# d_dlerror=$define
+-# cccdlflags="-DPIC -fPIC $cccdlflags"
+-# lddlflags="-shared $lddlflags"
+-# ;;
+- *)
++ if [ -f /usr/libexec/ld.elf_so ]; then
++ d_dlopen=$define
++ d_dlerror=$define
++ useshrplib=$define
++ ccdlflags="-Wl,-E -Wl,-R${PREFIX}/lib $ccdlflags"
++ cccdlflags="-DPIC -fPIC $cccdlflags"
++ lddlflags="--whole-archive -shared $lddlflags"
++ elif [ -f /usr/libexec/ld.so ]; then
+ d_dlopen=$define
+ d_dlerror=$define
++ useshrplib=$define
++ ccdlflags="-Wl,-R${PREFIX}/lib $ccdlflags"
+ # we use -fPIC here because -fpic is *NOT* enough for some of the
+ # extensions like Tk on some netbsd platforms (the sparc is one)
+ cccdlflags="-DPIC -fPIC $cccdlflags"
+ lddlflags="-Bforcearchive -Bshareable $lddlflags"
+- ;;
+- esac
++ else
++ d_dlopen=$undef
++ fi
+ ;;
+ esac
+
+@@ -47,15 +46,18 @@
+ # way to make perl call setuid() or setgid(). if they aren't, then
+ # ($<, $>) = ($u, $u); will work (same for $(/$)). this is because
# you can not change the real userid of a process under 4.4BSD.
- # netbsd fixed this in 1.2A.
+-# netbsd fixed this in 1.2A.
++# netbsd fixed this in 1.3.2.
case "$osvers" in
-0.9*|1.0*|1.1*|1.2_*|1.2|1.2.*)
-+0.9*|1.0*|1.1*|1.2_*|1.2|1.2.*|1.3|1.3.1)
++0.9*|1.0*|1.1*|1.2*|1.3|1.3.1)
d_setregid="$undef"
d_setreuid="$undef"
d_setrgid="$undef"
diff --git a/lang/perl5/patches/patch-ai b/lang/perl5/patches/patch-ai
new file mode 100644
index 00000000000..0a80cd6e035
--- /dev/null
+++ b/lang/perl5/patches/patch-ai
@@ -0,0 +1,13 @@
+$NetBSD: patch-ai,v 1.1 1998/12/01 02:47:19 tv Exp $
+
+--- Makefile.SH.orig Wed Oct 15 05:33:16 1997
++++ Makefile.SH Mon Nov 30 21:02:40 1998
+@@ -37,7 +37,7 @@
+ -prebind -seg1addr 0x27000000 -install_name \$(shrpdir)/\$@"
+ ;;
+ sunos*|freebsd[23]*|netbsd*)
+- linklibperl="-lperl"
++ linklibperl="-L. -lperl"
+ ;;
+ aix*)
+ shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
diff --git a/lang/perl5/pkg/PLIST-mi b/lang/perl5/pkg/PLIST-mi
index fd6ef4f1a29..4b55114ab9b 100644
--- a/lang/perl5/pkg/PLIST-mi
+++ b/lang/perl5/pkg/PLIST-mi
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST-mi,v 1.3 1998/01/28 15:33:56 hubertf Exp $
+@comment $NetBSD: PLIST-mi,v 1.4 1998/12/01 02:47:19 tv Exp $
@comment this list changes by some files if gdbm is installed - hubertf
bin/a2p
bin/c2ph
@@ -23,9 +23,7 @@ bin/splain
@exec mkdir -p %D/lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/auto/Text/ParseWords
@unexec rm -fr %D/lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/auto/Text/ParseWords
@exec mkdir -p %D/lib/perl5/site_perl/${MACHINE_ARCH}-netbsd
-@unexec rm -fr %D/lib/perl5/site_perl/${MACHINE_ARCH}-netbsd
-@exec mkdir -p %D/lib/perl5/site_perl
-@unexec rm -fr %D/lib/perl5/site_perl
+@unexec rmdir -p %D/lib/perl5/site_perl/${MACHINE_ARCH}-netbsd 2>/dev/null || true
lib/perl5/AnyDBM_File.pm
lib/perl5/AutoLoader.pm
lib/perl5/AutoSplit.pm
@@ -162,7 +160,6 @@ lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/CORE/gv.h
lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/CORE/handy.h
lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/CORE/hv.h
lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/CORE/keywords.h
-lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/CORE/libperl.a
lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/CORE/mg.h
lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/CORE/nostdio.h
lib/perl5/${MACHINE_ARCH}-netbsd/5.00404/CORE/op.h