aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.ruby.mk
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2001-04-06 10:11:41 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2001-04-06 10:11:41 +0000
commit369ae010abeedfbeb2aaa0a594f8b2ab8017c5cb (patch)
treeecc95dacae88cdc2aa148d38b93c9c92898904ea /Mk/bsd.ruby.mk
parent47285d38b504ab8d1e0bc3993ddbc44adc194eb0 (diff)
downloadports-369ae010abeedfbeb2aaa0a594f8b2ab8017c5cb.tar.gz
ports-369ae010abeedfbeb2aaa0a594f8b2ab8017c5cb.zip
Notes
Diffstat (limited to 'Mk/bsd.ruby.mk')
-rw-r--r--Mk/bsd.ruby.mk18
1 files changed, 15 insertions, 3 deletions
diff --git a/Mk/bsd.ruby.mk b/Mk/bsd.ruby.mk
index ebcb56a638fb..d40471ba1a4f 100644
--- a/Mk/bsd.ruby.mk
+++ b/Mk/bsd.ruby.mk
@@ -208,7 +208,9 @@ RUBY_FLAGS+= -d
USE_RUBY= yes
RUBY_EXTCONF?= extconf.rb
-CONFIGURE_ARGS+= --with-opt-dir="${LOCALBASE}"
+CONFIGURE_ARGS+= --with-opt-dir="${LOCALBASE}" \
+ --with-pthread-cflags="${PTHREAD_CFLAGS}" \
+ --with-pthread-libs="${PTHREAD_LIBS}"
do-configure: ruby-extconf-configure
@@ -218,7 +220,12 @@ ruby-extconf-configure:
@${ECHO_MSG} "===> Running ${RUBY_EXTCONF} in ${d} to configure"
.if defined(RUBY_WITH_PTHREAD)
cd ${WRKSRC}/${d}; \
- ${RUBY} ${RUBY_FLAGS} -i -pe 'if ~ /\brequire\s+[\047"]mkmf[\047"]/ then $$_ += "$$libs.sub!(/-lc\\b/, \"\"); $$libs += \" -pthread \"\n"; end' ${RUBY_EXTCONF}
+ ${RUBY} ${RUBY_FLAGS} -i -pe '~ /\brequire\s+[\047"]mkmf[\047"]/ \
+ and $$_ += %Q|\
+ $$libs.sub!(/-lc\\b/, "")\n \
+ $$libs += " " + with_config("pthread-libs") + " "\n \
+ $$CFLAGS += " " + with_config("pthread-cflags") + " "\n \
+ |' ${RUBY_EXTCONF}
.endif
@cd ${WRKSRC}/${d}; \
${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}
@@ -227,7 +234,12 @@ ruby-extconf-configure:
@${ECHO_MSG} "===> Running ${RUBY_EXTCONF} to configure"
.if defined(RUBY_WITH_PTHREAD)
cd ${WRKSRC}; \
- ${RUBY} ${RUBY_FLAGS} -i -pe 'if ~ /\brequire\s+[\047"]mkmf[\047"]/ then $$_ += "$$libs.sub!(/-lc\\b/, \"\"); $$libs += \" -pthread \"\n"; end' ${RUBY_EXTCONF}
+ ${RUBY} ${RUBY_FLAGS} -i -pe '~ /\brequire\s+[\047"]mkmf[\047"]/ \
+ and $$_ += %Q|\
+ $$libs.sub!(/-lc\\b/, "")\n \
+ $$libs += " " + with_config("pthread-libs") + " "\n \
+ $$CFLAGS += " " + with_config("pthread-cflags") + " "\n \
+ |' ${RUBY_EXTCONF}
.endif
@cd ${WRKSRC}; \
${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}