summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-05-20 05:21:23 +0000
committerjlam <jlam@pkgsrc.org>2001-05-20 05:21:23 +0000
commit4a90c869cc47e934a4506ee0021ca40369c84f14 (patch)
tree4e6e9d0824eb25bbc155a3989b5109baeb0857b6 /lang
parentc14ef19cf3674c88db0b585210b782bfe1a4c772 (diff)
downloadpkgsrc-4a90c869cc47e934a4506ee0021ca40369c84f14.tar.gz
Update perl-base to 5.6.0nb2. Changes from version 5.6.0nb1 are building
and installing libperl as a shared libarary on platforms that support shared libraries (or those that explicitly define MKPIC=yes). As a compromise for those platforms that have the need for speed and thus a statically-linked perl binary, explicitly link perl against a static libperl.a. Before this update, the current situtation was that we installed the static library in perl and the shared library in libperl. This caused the wrong linker flags to be passed to perl packages and they might have gotten a hidden dependency on libperl depending on whether they were built with or without libperl installed. Avoid all this by only having the static or shared library installed at any time.
Diffstat (limited to 'lang')
-rw-r--r--lang/perl5-base/Makefile32
-rw-r--r--lang/perl5-base/Makefile.static11
2 files changed, 38 insertions, 5 deletions
diff --git a/lang/perl5-base/Makefile b/lang/perl5-base/Makefile
index 696be68b423..92ca3f60e83 100644
--- a/lang/perl5-base/Makefile
+++ b/lang/perl5-base/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.5 2001/04/12 18:14:16 manu Exp $
+# $NetBSD: Makefile,v 1.6 2001/05/20 05:21:23 jlam Exp $
# FreeBSD Id: Makefile,v 1.20 1997/07/18 06:16:44 markm Exp
#
DISTNAME= perl-${PERL_VERSION}
-PKGNAME= perl-base-${PERL_VERSION}nb1
+PKGNAME= perl-base-${PERL_VERSION}nb2
PERL_VERSION= 5.6.0
CATEGORIES= lang devel perl5
MASTER_SITES= ftp://ftp.digital.com/pub/plan/perl/CPAN/src/5.0/maint/ \
@@ -25,17 +25,26 @@ MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}
.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "NetBSD"
+.if exists(/usr/libexec/ld.so) || exists(/usr/libexec/ld.elf_so)
+MKPIC?= yes
+.else
+MKPIC?= no
+.endif
+.endif
+
.if ${OPSYS} == "SunOS"
MAKE_ENV+= CFLAGS=
.endif
+.if ${MKPIC} == "yes"
+CONFIGURE_ARGS+= -Duseshrplib=true
+.endif
+
PERL5_ARCHLIB= ${PREFIX}/lib/perl5/${PERL_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}
PERL5_SITEARCH= ${PREFIX}/lib/perl5/site_perl/${PERL_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}
PERL5_PACKLIST= ${PERL5_ARCHLIB}/.packlist
-test:
- @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} test
-
post-patch:
cd ${WRKSRC}/ext/DynaLoader/hints && ${CP} -f openbsd.pl netbsd.pl
@@ -47,9 +56,22 @@ pre-configure:
cd ${WRKSRC}/lib; ${RM} -rf CGI CGI.pm
cd ${WRKSRC}/utils; ${RM} -f dprofpp.PL
+.if defined(MKPIC) && (${MKPIC} == "yes")
+post-configure:
+ ${CAT} Makefile.static >> ${WRKSRC}/${MAKEFILE}
+
+post-build:
+ @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} libperl.a
+ ${RM} -f ${WRKSRC}/perl
+ @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} perl LLIBPERL=libperl.a
+.endif
+
post-install:
@strip ${PREFIX}/bin/a2p
@strip ${PREFIX}/bin/perl
${RMDIR} -p ${PERL5_SITEARCH} 2>/dev/null || ${TRUE}
+test:
+ @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} test
+
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/perl5-base/Makefile.static b/lang/perl5-base/Makefile.static
new file mode 100644
index 00000000000..3e91571c820
--- /dev/null
+++ b/lang/perl5-base/Makefile.static
@@ -0,0 +1,11 @@
+# $NetBSD: Makefile.static,v 1.1 2001/05/20 05:21:23 jlam Exp $
+#
+# Makefile fragment to build a static libperl.a to be appended to the perl
+# Makefile after the configure process. This is copied from Makefile.SH.
+
+LIBPERL_STATIC= libperl.a
+
+libperl.a: $& perl$(OBJ_EXT) $(obj) $(LIBPERLEXPORT)
+ rm -f $(LIBPERL_STATIC)
+ $(AR) rcu $(LIBPERL_STATIC) perl$(OBJ_EXT) $(obj)
+ @$(ranlib) $(LIBPERL_STATIC)