summaryrefslogtreecommitdiff
path: root/lang/perl5/files/install_threads.tmpl
blob: 6574aba7ff509652c4ba8ce84e26e17ed0d6a5b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# $NetBSD: install_threads.tmpl,v 1.2 2016/12/12 16:08:00 wiz Exp $
#
# Require the presence of a pkgsrc Perl installation that supports threads
# during the PRE-INSTALL stage, otherwise we bail out.

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