summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb Tennis <caleb@gentoo.org>2006-01-02 23:41:07 +0000
committerCaleb Tennis <caleb@gentoo.org>2006-01-02 23:41:07 +0000
commit44a283e478c1210e4ce765098abcf92c5675957b (patch)
tree97cc0dfab1c05c4b6cfddee7034cc047adee1308 /dev-ruby/ruby-config
parentcleanup old builds, add informational message about RenderAccel bug, bump atk... (diff)
downloadgentoo-2-44a283e478c1210e4ce765098abcf92c5675957b.tar.gz
gentoo-2-44a283e478c1210e4ce765098abcf92c5675957b.tar.bz2
gentoo-2-44a283e478c1210e4ce765098abcf92c5675957b.zip
New version, which allows us to specify config versions like 'ruby18_with_gems'
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'dev-ruby/ruby-config')
-rw-r--r--dev-ruby/ruby-config/ChangeLog10
-rw-r--r--dev-ruby/ruby-config/Manifest11
-rw-r--r--dev-ruby/ruby-config/files/digest-ruby-config-0.3.20
-rwxr-xr-xdev-ruby/ruby-config/files/ruby-config-0.3.2143
-rw-r--r--dev-ruby/ruby-config/ruby-config-0.3.2.ebuild27
5 files changed, 185 insertions, 6 deletions
diff --git a/dev-ruby/ruby-config/ChangeLog b/dev-ruby/ruby-config/ChangeLog
index 3624dd955adf..8b9b41daacd2 100644
--- a/dev-ruby/ruby-config/ChangeLog
+++ b/dev-ruby/ruby-config/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-ruby/ruby-config
-# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-config/ChangeLog,v 1.28 2005/07/23 11:55:20 matsuu Exp $
+# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-config/ChangeLog,v 1.29 2006/01/02 23:41:07 caleb Exp $
+
+*ruby-config-0.3.2 (02 Jan 2006)
+
+ 02 Jan 2006; Caleb Tennis <caleb@gentoo.org> +files/ruby-config-0.3.2,
+ +ruby-config-0.3.2.ebuild:
+ New version, which allows us to specify config versions like 'ruby18_with_gems'
23 Jul 2005; MATSUU Takuto <matsuu@gentoo.org> ruby-config-0.3.1.ebuild:
Stable on sh.
diff --git a/dev-ruby/ruby-config/Manifest b/dev-ruby/ruby-config/Manifest
index 8c2fbce16555..49d8dfe05f0e 100644
--- a/dev-ruby/ruby-config/Manifest
+++ b/dev-ruby/ruby-config/Manifest
@@ -1,9 +1,12 @@
-MD5 6abfaa08e00d53e988e0fe602f5c6057 ruby-config-0.3.ebuild 551
-MD5 49932d3372e8b7510088c7f07cb07b1a ruby-config-0.3.1.ebuild 672
MD5 8688b22a326b1105be1b69b32ca609c1 ChangeLog 3613
-MD5 3eec9f3fe48b51f49dbc1f171a3b026f metadata.xml 157
MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-ruby-config-0.3 0
-MD5 a7587ba5bba2cb46fd7c87c1e24fcc00 files/ruby-config-0.3.1.diff 427
MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-ruby-config-0.3.1 0
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-ruby-config-0.3.2 0
MD5 276864d6663923ca8ac72c501a857338 files/ruby-config-0.2 2724
MD5 1fc7fb01ff27a5293ea7a3aec878b55c files/ruby-config-0.3 3107
+MD5 a7587ba5bba2cb46fd7c87c1e24fcc00 files/ruby-config-0.3.1.diff 427
+MD5 b17ca7a916d9652d22ad976ecf7a2553 files/ruby-config-0.3.2 3082
+MD5 3eec9f3fe48b51f49dbc1f171a3b026f metadata.xml 157
+MD5 49932d3372e8b7510088c7f07cb07b1a ruby-config-0.3.1.ebuild 672
+MD5 021a8aa0358408e38fad9a6d8629b9b9 ruby-config-0.3.2.ebuild 659
+MD5 6abfaa08e00d53e988e0fe602f5c6057 ruby-config-0.3.ebuild 551
diff --git a/dev-ruby/ruby-config/files/digest-ruby-config-0.3.2 b/dev-ruby/ruby-config/files/digest-ruby-config-0.3.2
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/dev-ruby/ruby-config/files/digest-ruby-config-0.3.2
diff --git a/dev-ruby/ruby-config/files/ruby-config-0.3.2 b/dev-ruby/ruby-config/files/ruby-config-0.3.2
new file mode 100755
index 000000000000..3f9ae00c0c0f
--- /dev/null
+++ b/dev-ruby/ruby-config/files/ruby-config-0.3.2
@@ -0,0 +1,143 @@
+#!/bin/bash
+
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-config/files/ruby-config-0.3.2,v 1.1 2006/01/02 23:41:07 caleb Exp $
+
+# Author: Mamoru KOMACHI <usata@gentoo.org>
+
+if [ -r /etc/init.d/functions.sh ] ; then
+ source /etc/init.d/functions.sh
+elif [ -r /usr/lib/portage/bin/functions.sh ] ; then
+ source /usr/lib/portage/bin/functions.sh
+else
+ echo "Could not find functions.sh"
+ exit 1
+fi
+
+#dummy function
+EXPORT_FUNCTIONS() { :; }
+
+ALTERNATIVES="$(portageq portdir)/eclass/alternatives.eclass"
+
+if [ -r "${ALTERNATIVES}" ] ; then
+ source ${ALTERNATIVES}
+else
+ echo "Could not find ${ALTERNATIVES}"
+ exit 1
+fi
+
+usage() {
+cat << "USAGE_END"
+Usage: ruby-config [Option] [Ruby Profile]
+Change the current ruby profile, or give info about profiles.
+
+Options:
+
+ -c, --get-current-profile
+ Print current used ruby profile.
+ -l, --list-profiles
+ List available ruby profiles.
+ -h, --show-help
+ Print this help.
+
+The profile name is either ruby16, ruby18 or ruby19.
+
+USAGE_END
+exit 1
+}
+
+if [ "$#" -lt 1 ] ; then
+ usage
+fi
+
+switch_profile() {
+ case "$(portageq envvar ARCH)" in
+ macos)
+ eerror "Switching ruby profiles are not supported on Gentoo for Mac OS X."
+ ;;
+ *)
+ if [ "$EUID" != 0 ] ; then
+ eerror "You need root privilege to switch profile."
+ exit 1
+ fi
+ if [ "`expr $1 : ruby`" != 0 -a "$1" != "ruby" ] ; then
+ local suf=${1/ruby/}
+ for i in ruby irb erb testrb rdoc ri ; do
+ alternatives_makesym \
+ /usr/bin/$i /usr/bin/${i}{$suf,18,16,19}
+ done
+ alternatives_makesym \
+ /usr/lib/libruby.so /usr/lib/libruby{$suf,18,16,19}.so
+ alternatives_makesym \
+ /usr/share/man/man1/ruby.1.gz \
+ /usr/share/man/man1/ruby{$suf,18,16,19}.1.gz
+ else
+ eerror "Unsupported profile."
+ fi
+ ;;
+ esac
+}
+
+get_current_profile() {
+ case "$(portageq envvar ARCH)" in
+ macos)
+ einfo "/usr/bin/ruby is ruby 1.6.8."
+ ;;
+ *)
+ if [ ! -L /usr/bin/ruby ] ; then
+ eerror "Your ruby doesn't seem to support SLOT."
+ exit 1
+ fi
+ einfo "Your current profile refers to $(readlink /usr/bin/ruby)."
+ ;;
+ esac
+}
+
+list_profiles() {
+ case "$(portageq envvar ARCH)" in
+ macos)
+ einfo "You cannot switch between profiles on Mac OS X."
+ einfo "Installed profiles are:"
+ for f in /usr/bin/ruby[0-9][0-9]* ; do
+ einfo "\t${f#/usr/bin/}"
+ done
+ ;;
+ *)
+ einfo "Supported profiles are:"
+ for f in /usr/bin/ruby[0-9][0-9]* ; do
+ einfo "\t${f#/usr/bin/}"
+ done
+ einfo "You can specify one of the profiles listed above."
+ einfo "e.g.) ruby-config ruby18"
+ ;;
+ esac
+}
+
+for x in $* ; do
+ if [ "$#" -gt 1 ] ; then
+ eerror "ruby-config accepts only one argument."
+ eerror "Run $0 -h for help."
+ exit 1
+ fi
+ case "${x}" in
+ -c|--get-current-profile)
+ get_current_profile
+ ;;
+ -h|--show-help)
+ usage
+ ;;
+ -l|--list-profiles)
+ list_profiles
+ ;;
+ -*)
+ eerror "Invalid option. Run $0 -h for help."
+ exit 1
+ ;;
+ *)
+ switch_profile $*
+ ;;
+ esac
+
+ exit 0
+done
diff --git a/dev-ruby/ruby-config/ruby-config-0.3.2.ebuild b/dev-ruby/ruby-config/ruby-config-0.3.2.ebuild
new file mode 100644
index 000000000000..397510ab44c6
--- /dev/null
+++ b/dev-ruby/ruby-config/ruby-config-0.3.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-config/ruby-config-0.3.2.ebuild,v 1.1 2006/01/02 23:41:07 caleb Exp $
+
+inherit eutils
+
+DESCRIPTION="Utility to switch the ruby interpreter beging used"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~ppc-macos ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+RDEPEND="!<dev-ruby/ri-1.8b-r1"
+PDEPEND="virtual/ruby"
+
+S=${WORKDIR}
+
+src_unpack() {
+ cp ${FILESDIR}/${PN}-0.3.2 .
+}
+
+src_install() {
+ newsbin ${PN}-0.3.2 ruby-config || die
+}