summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaca <taca>2006-09-13 12:56:46 +0000
committertaca <taca>2006-09-13 12:56:46 +0000
commit6800a47b5e932ead4ffa791f2842d56e8d9035e7 (patch)
treea5f5512155fb4e91e08b9998b3b620ac2a167f95
parent882eca2c771567146852212b9e6d725bdcc71313 (diff)
downloadpkgsrc-6800a47b5e932ead4ffa791f2842d56e8d9035e7.tar.gz
- Introduce experimental RUBY_USE_PTHREAD; using pthread could be disabled
setting to "no" in /etc/mk.conf. (Default is "yes" on most platform.) - Correct condition of including pthread.buildlink3.mk. Tested on NetBSD current, SuSE Linux 9.3 and DragonFly BSD 1.6.0. Thanks for advise from Vincent Hourdin and Joerg Sonnenberger.
-rw-r--r--lang/ruby/Makefile.common4
-rw-r--r--lang/ruby/rubyversion.mk20
2 files changed, 15 insertions, 9 deletions
diff --git a/lang/ruby/Makefile.common b/lang/ruby/Makefile.common
index afba2c7187a..ef59bace6fc 100644
--- a/lang/ruby/Makefile.common
+++ b/lang/ruby/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.12 2006/09/08 02:36:51 taca Exp $
+# $NetBSD: Makefile.common,v 1.13 2006/09/13 12:56:46 taca Exp $
#
# Ruby base distribution common definition
@@ -41,7 +41,7 @@ PLIST_SUBST+= RUBY_SHLIBVER=${RUBY_SHLIBVER:Q} \
.include "replace.mk"
-.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} == "none"
+.if !empty(RUBY_USE_PTHREAD:M[nN][oO])
CONFIGURE_ARGS+= --disable-pthread
.else
CONFIGURE_ARGS+= --enable-pthread
diff --git a/lang/ruby/rubyversion.mk b/lang/ruby/rubyversion.mk
index e8f48b6f0d4..46766cb920f 100644
--- a/lang/ruby/rubyversion.mk
+++ b/lang/ruby/rubyversion.mk
@@ -1,4 +1,4 @@
-# $NetBSD: rubyversion.mk,v 1.25 2006/09/08 23:32:13 taca Exp $
+# $NetBSD: rubyversion.mk,v 1.26 2006/09/13 12:56:46 taca Exp $
#
.if !defined(_RUBYVERSION_MK)
@@ -147,11 +147,6 @@ RUBY_NOSHLIBMAJOR= "@comment "
RUBY_NOSHLIBMAJOR=
.endif
-.if ${OPSYS} == "NetBSD" && !empty(OS_VERSION:M1.[0-9].*)
-RUBY_NOPTHREAD= yes
-.else
-RUBY_NOPTHREAD= no
-.endif
#
# RUBY_DLEXT is suffix of extention library.
@@ -163,6 +158,17 @@ RUBY_DLEXT= so
.endif
#
+# Use pthread library with Ruby
+#
+.if ${OPSYS} == "NetBSD" && !empty(OS_VERSION:M1.[0-9].*)
+RUBY_USE_PTHREAD?= no
+.else
+RUBY_USE_PTHREAD?= yes
+PTHREAD_OPTS+= native
+#PTHREAD_AUTO_VARS= yes
+.endif
+
+#
# Dynamic PLIST directories
#
RUBY_DYNAMIC_DIRS?= # empty
@@ -265,7 +271,7 @@ RUBY_GENERATE_PLIST = ( \
.endif
.if !empty(RUBY_NOVERSION:M[nN][oO])
-.if !empty(RUBY_NOPTHREAD:M[nN][oO])
+.if empty(RUBY_USE_PTHREAD:M[nN][oO])
.include "../../mk/pthread.buildlink3.mk"
.endif
.include "../../mk/bdb.buildlink3.mk"