public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alex Legler (a3li)" <a3li@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass
Date: Mon, 26 Apr 2010 15:07:58 +0000 (UTC)	[thread overview]
Message-ID: <20100426150758.78E7B2C04C@corvid.gentoo.org> (raw)

a3li        10/04/26 15:07:58

  Modified:             ruby-ng.eclass
  Log:
  Adding a ruby_rbconfig_value function to ruby-ng.eclass for easy access even to not regularly needed rbconfig data

Revision  Changes    Path
1.11                 eclass/ruby-ng.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.10&r2=1.11

Index: ruby-ng.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ruby-ng.eclass	5 Apr 2010 07:41:09 -0000	1.10
+++ ruby-ng.eclass	26 Apr 2010 15:07:58 -0000	1.11
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.10 2010/04/05 07:41:09 a3li Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.11 2010/04/26 15:07:58 a3li Exp $
 #
 # @ECLASS: ruby-ng.eclass
 # @MAINTAINER:
@@ -418,6 +418,13 @@
 		_ruby_each_implementation _each_ruby_check_install
 }
 
+# @FUNCTION: ruby_rbconfig_value
+# @USAGE: rbconfig item
+# @RETURN: Returns the value of the given rbconfig item of the Ruby interpreter in ${RUBY}.
+ruby_rbconfig_value() {
+	echo $(${RUBY} -rrbconfig -e "puts Config::CONFIG['$1']")
+}
+
 # @FUNCTION: doruby
 # @USAGE: file [file...]
 # @DESCRIPTION:
@@ -425,7 +432,7 @@
 doruby() {
 	[[ -z ${RUBY} ]] && die "\$RUBY is not set"
 	( # don't want to pollute calling env
-		insinto $(${RUBY} -rrbconfig -e 'print Config::CONFIG["sitelibdir"]')
+		insinto $(ruby_rbconfig_value 'sitelibdir')
 		insopts -m 0644
 		doins "$@"
 	) || die "failed to install $@"
@@ -440,10 +447,10 @@
 # @FUNCTION: ruby_get_hdrdir
 # @RETURN: The location of the header files belonging to the Ruby interpreter in ${RUBY}.
 ruby_get_hdrdir() {
-	local rubyhdrdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["rubyhdrdir"]')
+	local rubyhdrdir=$(ruby_rbconfig_value 'rubyhdrdir')
 
 	if [[ "${rubyhdrdir}" = "nil" ]] ; then
-		rubyhdrdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["archdir"]')
+		rubyhdrdir=$(ruby_rbconfig_value 'archdir')
 	fi
 
 	echo "${rubyhdrdir}"






             reply	other threads:[~2010-04-26 15:08 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26 15:07 Alex Legler (a3li) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-06-23 14:56 [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass Hans de Graaff (graaff)
2011-10-24 18:20 Hans de Graaff (graaff)
2011-10-22 10:08 Tomas Chvatal (scarabeus)
2011-10-21  6:48 Hans de Graaff (graaff)
2011-10-05 17:46 Hans de Graaff (graaff)
2011-07-22  9:41 Hans de Graaff (graaff)
2011-07-22  9:10 Hans de Graaff (graaff)
2011-07-22  9:08 Hans de Graaff (graaff)
2011-07-19  5:48 Hans de Graaff (graaff)
2011-07-16  9:50 Hans de Graaff (graaff)
2011-04-25  8:37 Hans de Graaff (graaff)
2011-04-25  6:27 Hans de Graaff (graaff)
2010-11-07 22:52 Christian Faulhammer (fauli)
2010-09-10 13:03 Diego Petteno (flameeyes)
2010-07-30 17:28 Diego Petteno (flameeyes)
2010-07-30 16:56 Diego Petteno (flameeyes)
2010-07-30 15:05 Diego Petteno (flameeyes)
2010-07-14 13:11 Diego Petteno (flameeyes)
2010-07-08  4:00 Diego Petteno (flameeyes)
2010-05-24  7:33 Diego Petteno (flameeyes)
2010-05-22 13:15 Diego Petteno (flameeyes)
2010-05-22 12:45 Diego Petteno (flameeyes)
2010-05-22 12:31 Diego Petteno (flameeyes)
2010-05-22 12:18 Diego Petteno (flameeyes)
2010-05-22  3:39 Diego Petteno (flameeyes)
2010-05-21 23:18 Diego Petteno (flameeyes)
2010-05-01 16:05 Diego Petteno (flameeyes)
2010-04-30 17:40 Diego Petteno (flameeyes)
2010-04-05  7:41 Alex Legler (a3li)
2010-04-02 20:26 Alex Legler (a3li)
2010-01-15 12:58 Diego Petteno (flameeyes)
2009-12-25 18:01 Diego Petteno (flameeyes)
2009-12-14 12:25 Alex Legler (a3li)
2009-12-06 13:01 Hans de Graaff (graaff)
2009-12-05 11:33 Diego Petteno (flameeyes)
2009-12-05 11:32 Diego Petteno (flameeyes)
2009-12-05 11:30 Diego Petteno (flameeyes)
2009-12-05  9:35 Hans de Graaff (graaff)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100426150758.78E7B2C04C@corvid.gentoo.org \
    --to=a3li@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox