pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Create a modifier PERL5_OPTIONS that specifies propert...
details: https://anonhg.NetBSD.org/pkgsrc/rev/16d25abd749a
branches: trunk
changeset: 485699:16d25abd749a
user: jlam <jlam%pkgsrc.org@localhost>
date: Sun Dec 19 00:01:43 2004 +0000
description:
Create a modifier PERL5_OPTIONS that specifies properties of the perl
installation needed when including perl5/buildlink3.mk. The only
option currently supported is "threads", which implies that a perl
that supports threads is required. The requirement is checked at
pre-install time using an INSTALL script template by both the package
build and the binary package.
Add PERL5_OPTIONS+=threads to both devel/p5-SDL and graphics/p5-GD
since those modules require a perl that supports threads.
diffstat:
devel/p5-SDL/Makefile | 5 +++--
graphics/p5-GD/Makefile | 3 ++-
lang/perl5/buildlink3.mk | 8 +++++++-
lang/perl5/files/install.tmpl | 26 ++++++++++++++++++++++++++
4 files changed, 38 insertions(+), 4 deletions(-)
diffs (88 lines):
diff -r c62b9bab6e8b -r 16d25abd749a devel/p5-SDL/Makefile
--- a/devel/p5-SDL/Makefile Sat Dec 18 23:54:58 2004 +0000
+++ b/devel/p5-SDL/Makefile Sun Dec 19 00:01:43 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2004/11/30 18:29:40 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2004/12/19 00:01:43 jlam Exp $
#
DISTNAME= SDL_perl-1.19.2
@@ -7,7 +7,8 @@
CATEGORIES= devel perl5
MASTER_SITES= ftp://sdlperl.org/SDL_perl/
-DEPENDS+= perl>=5.8.0:../../lang/perl58
+PERL5_REQD+= 5.8.0
+PERL5_OPTIONS+= threads
MAINTAINER= tech-pkg%NetBSD.org@localhost
HOMEPAGE= http://sdlperl.org/
diff -r c62b9bab6e8b -r 16d25abd749a graphics/p5-GD/Makefile
--- a/graphics/p5-GD/Makefile Sat Dec 18 23:54:58 2004 +0000
+++ b/graphics/p5-GD/Makefile Sun Dec 19 00:01:43 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.24 2004/10/03 00:14:56 tv Exp $
+# $NetBSD: Makefile,v 1.25 2004/12/19 00:01:43 jlam Exp $
DISTNAME= GD-2.16
PKGNAME= p5-${DISTNAME}
@@ -15,6 +15,7 @@
USE_BUILDLINK3= YES
PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/GD/.packlist
+PERL5_OPTIONS+= threads
MAKE_ENV+= GD_LIBS="${LDFLAGS}"
MAKE_PARAMS+= -lib_gd_path=${BUILDLINK_PREFIX.gd}
diff -r c62b9bab6e8b -r 16d25abd749a lang/perl5/buildlink3.mk
--- a/lang/perl5/buildlink3.mk Sat Dec 18 23:54:58 2004 +0000
+++ b/lang/perl5/buildlink3.mk Sun Dec 19 00:01:43 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.14 2004/04/26 04:46:00 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.15 2004/12/19 00:01:43 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
PERL5_BUILDLINK3_MK:= ${PERL5_BUILDLINK3_MK}+
@@ -36,6 +36,12 @@
_PERL5_SITEVAR.SITELIBEXP= sitelibexp
_PERL5_SITEVAR.SITEARCHEXP= sitearchexp
+PERL5_OPTIONS?= # empty
+.if !empty(PERL5_OPTIONS:Mthreads)
+USE_PKGINSTALL= yes
+INSTALL_EXTRA_TMPL+= ${.CURDIR}/../../lang/perl5/files/install.tmpl
+.endif
+
.if exists(${PERL5})
. if !defined(_PERL5_SITEPREFIX)
_PERL5_PREFIX!= \
diff -r c62b9bab6e8b -r 16d25abd749a lang/perl5/files/install.tmpl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/perl5/files/install.tmpl Sun Dec 19 00:01:43 2004 +0000
@@ -0,0 +1,26 @@
+# $NetBSD: install.tmpl,v 1.1 2004/12/19 00:01:43 jlam Exp $
+#
+# Require the presence of a pkgsrc Perl installation that supports threads
+# during the PRE-INSTALL stage, otherwise we bail out.
+
+PERL5="@PERL5@"
+
+case ${STAGE} in
+PRE-INSTALL)
+ if [ ! -x "${PERL5}" ]; then
+ ${ECHO} "==> ${PERL5} does not exist." 1>&2
+ exit 1
+ fi
+ eval `${PERL5} -V:usethreads`
+ case $usethreads in
+ define*|true|[yY]*) # possible "yes" values in Perl Config.pm
+ # We found what we were looking for (a threaded perl) so
+ # do nothing.
+ ;;
+ *)
+ ${ECHO} "==> ${PKGNAME} requires a Perl that supports threads." 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+esac
Home |
Main Index |
Thread Index |
Old Index