ruby-ng.eclass: use ruby_rbconfig_value
authorHans de Graaff <graaff@gentoo.org>
Sun, 21 Jul 2019 06:34:55 +0000 (08:34 +0200)
committerHans de Graaff <graaff@gentoo.org>
Thu, 25 Jul 2019 06:09:42 +0000 (08:09 +0200)
Consistently use ruby_rbconfig_value to get ruby configuration
information.

Signed-off-by: Hans de Graaff <graaff@gentoo.org>
eclass/ruby-ng.eclass

index 59d4450a9954d6bd043ddbea2fefed0551e7022e..8663033a499cffd52ddb12ee5cb3ba4958312276 100644 (file)
@@ -515,10 +515,10 @@ _each_ruby_check_install() {
        # we have a Mach-O object here
        [[ ${CHOST} == *-darwin ]] && scancmd=scanmacho
 
-       local libruby_basename=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["LIBRUBY_SO"]')
+       local libruby_basename=$(ruby_rbconfig_value 'LIBRUBY_SO')
        local libruby_soname=$(basename $(${scancmd} -F "%S#F" -qS "${EPREFIX}/usr/$(get_libdir)/${libruby_basename}") 2>/dev/null)
-       local sitedir=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["sitedir"]')
-       local sitelibdir=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]')
+       local sitedir=$(ruby_rbconfig_value 'sitedir')
+       local sitelibdir=$(ruby_rbconfig_value 'sitelibdir')
 
        # The current implementation lacks libruby (i.e.: jruby)
        [[ -z ${libruby_soname} ]] && return 0