summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk12
1 files changed, 11 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index feeb6db91f6..cf47afa2595 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1539 2004/11/16 18:04:00 tv Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1540 2004/11/17 22:55:14 jlam Exp $
#
# This file is in the public domain.
#
@@ -306,7 +306,17 @@ USE_PERL5:= run
_PERL5_DEPMETHOD= DEPENDS
. endif
_PERL5_DEPENDS= {perl>=${_PERL5_REQD},perl-thread>=${_PERL5_REQD}}
+#
+# On platforms that have native pthreads, default to installing the
+# threaded perl. This can be overridden by explicitly setting
+# PERL5_USE_THREADS.
+#
+. if exists(/usr/include/pthread.h) && \
+ !empty(PREFER_NATIVE_PTHREADS:M[yY][eE][sS])
+PERL5_PKGSRCDIR?= ../../lang/perl58-thread
+. else
PERL5_PKGSRCDIR?= ../../lang/perl58
+. endif
. if !defined(BUILDLINK_DEPENDS.perl)
${_PERL5_DEPMETHOD}+= ${_PERL5_DEPENDS}:${PERL5_PKGSRCDIR}
. endif