summaryrefslogtreecommitdiff
path: root/lang/perl5/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/perl5/files')
-rw-r--r--lang/perl5/files/install.tmpl26
1 files changed, 26 insertions, 0 deletions
diff --git a/lang/perl5/files/install.tmpl b/lang/perl5/files/install.tmpl
new file mode 100644
index 00000000000..e520da7ac14
--- /dev/null
+++ b/lang/perl5/files/install.tmpl
@@ -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