svn commit: r351179 - head/Mk
Steve Wills
swills at FreeBSD.org
Sun Apr 13 02:44:46 UTC 2014
Author: swills
Date: Sun Apr 13 02:44:45 2014
New Revision: 351179
URL: http://svnweb.freebsd.org/changeset/ports/351179
QAT: https://qat.redports.org/buildarchive/r351179/
Log:
- Fix issues with specifying ${RUBY} variable
PR: ports/170916
Reported by: Hiroto Kagotani <hiroto.kagotani at gmail.com>
Modified:
head/Mk/bsd.ruby.mk
Modified: head/Mk/bsd.ruby.mk
==============================================================================
--- head/Mk/bsd.ruby.mk Sun Apr 13 02:41:30 2014 (r351178)
+++ head/Mk/bsd.ruby.mk Sun Apr 13 02:44:45 2014 (r351179)
@@ -152,14 +152,14 @@ RUBY_VER?= ${RUBY_DEFAULT_VER}
IGNORE= cannot install: you set the variable RUBY to "${RUBY}", but it does not seem to exist. Please specify an already installed ruby executable.
.endif
-_RUBY_TEST!= ${RUBY} -e 'begin; require "rbconfig"; rescue LoadError; puts "error"; end'
-.if !empty(_RUBY_TEST)
+_RUBY_TEST!= ${RUBY} -e 'begin; require "rbconfig"; puts "ok" ; rescue LoadError; puts "error"; end'
+.if !empty(_RUBY_TEST) && ${_RUBY_TEST} != "ok"
IGNORE= cannot install: you set the variable RUBY to "${RUBY}", but it failed to include rbconfig. Please specify a properly installed ruby executable.
.endif
-_RUBY_CONFIG= ${RUBY} -r rbconfig -e 'C = Config::CONFIG' -e
+_RUBY_CONFIG= ${RUBY} -r rbconfig -e 'C = RbConfig::CONFIG' -e
-RUBY_VERSION!= ${_RUBY_CONFIG} 'puts VERSION'
+RUBY_VERSION!= ${_RUBY_CONFIG} 'puts C["ruby_version"]'
RUBY_SUFFIX?= # empty
RUBY_ARCH!= ${_RUBY_CONFIG} 'puts C["target"]'
More information about the svn-ports-head
mailing list