diff options
author | Mamoru Komachi <usata@gentoo.org> | 2004-07-31 19:17:20 +0000 |
---|---|---|
committer | Mamoru Komachi <usata@gentoo.org> | 2004-07-31 19:17:20 +0000 |
commit | 13cc9cae20b289d71095971e68c24c8529c15107 (patch) | |
tree | 125640f874e754323795ba5d9466f204201eea37 /dev-ruby | |
parent | ~amd64 - bug #57765 (Manifest recommit) (diff) | |
download | gentoo-2-13cc9cae20b289d71095971e68c24c8529c15107.tar.gz gentoo-2-13cc9cae20b289d71095971e68c24c8529c15107.tar.bz2 gentoo-2-13cc9cae20b289d71095971e68c24c8529c15107.zip |
Added macos support.
Diffstat (limited to 'dev-ruby')
-rw-r--r-- | dev-ruby/ruby-config/ChangeLog | 9 | ||||
-rw-r--r-- | dev-ruby/ruby-config/Manifest | 7 | ||||
-rw-r--r-- | dev-ruby/ruby-config/files/digest-ruby-config-0.3 | 0 | ||||
-rw-r--r-- | dev-ruby/ruby-config/files/ruby-config-0.2 (renamed from dev-ruby/ruby-config/files/ruby-config.sh) | 2 | ||||
-rw-r--r-- | dev-ruby/ruby-config/files/ruby-config-0.3 | 144 | ||||
-rw-r--r-- | dev-ruby/ruby-config/ruby-config-0.2.ebuild | 5 | ||||
-rw-r--r-- | dev-ruby/ruby-config/ruby-config-0.3.ebuild | 19 |
7 files changed, 180 insertions, 6 deletions
diff --git a/dev-ruby/ruby-config/ChangeLog b/dev-ruby/ruby-config/ChangeLog index 2a48e63d2c7a..c7405b0fcb9b 100644 --- a/dev-ruby/ruby-config/ChangeLog +++ b/dev-ruby/ruby-config/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-ruby/ruby-config # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-config/ChangeLog,v 1.11 2004/06/25 01:57:28 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-config/ChangeLog,v 1.12 2004/07/31 19:17:20 usata Exp $ + +*ruby-config-0.3 (01 Aug 2004) + + 01 Aug 2004; Mamoru KOMACHI <usata@gentoo.org> +files/ruby-config-0.2, + +files/ruby-config-0.3, -files/ruby-config.sh, ruby-config-0.2.ebuild, + +ruby-config-0.3.ebuild: + Added macos support. 12 Apr 2004; Mamoru KOMACHI <usata@gentoo.org> ruby-config-0.2.ebuild: Marked stable on all arches to satisfy dev-lang/ruby dep diff --git a/dev-ruby/ruby-config/Manifest b/dev-ruby/ruby-config/Manifest index cb0329ba6d7a..40df0b39ef67 100644 --- a/dev-ruby/ruby-config/Manifest +++ b/dev-ruby/ruby-config/Manifest @@ -1,5 +1,8 @@ -MD5 2f8443e6517b0e2dadf4c0b105439ea8 ruby-config-0.2.ebuild 531 MD5 739b6f8ad8be38fde2d869e4bbea6072 ChangeLog 1508 MD5 3eec9f3fe48b51f49dbc1f171a3b026f metadata.xml 157 -MD5 e4152cbe75a8cc3e61620ffc4859f3c4 files/ruby-config.sh 2726 +MD5 c7668c45cd455d9e9fcb4cd67de3fdb2 ruby-config-0.2.ebuild 536 +MD5 6a26086613d7a9ced01010bb8d9d9dc2 ruby-config-0.3.ebuild 552 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-ruby-config-0.2 0 +MD5 e4152cbe75a8cc3e61620ffc4859f3c4 files/ruby-config-0.2 2726 +MD5 0a7c099905f9d8c1e2b781bfede69cc0 files/ruby-config-0.3 3109 +MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-ruby-config-0.3 0 diff --git a/dev-ruby/ruby-config/files/digest-ruby-config-0.3 b/dev-ruby/ruby-config/files/digest-ruby-config-0.3 new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/dev-ruby/ruby-config/files/digest-ruby-config-0.3 diff --git a/dev-ruby/ruby-config/files/ruby-config.sh b/dev-ruby/ruby-config/files/ruby-config-0.2 index 10b4ded20862..d1adfecb4f9a 100644 --- a/dev-ruby/ruby-config/files/ruby-config.sh +++ b/dev-ruby/ruby-config/files/ruby-config-0.2 @@ -2,7 +2,7 @@ # 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.sh,v 1.3 2004/07/14 22:04:35 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-config/files/ruby-config-0.2,v 1.1 2004/07/31 19:17:20 usata Exp $ # Author: Mamoru KOMACHI <usata@gentoo.org> diff --git a/dev-ruby/ruby-config/files/ruby-config-0.3 b/dev-ruby/ruby-config/files/ruby-config-0.3 new file mode 100644 index 000000000000..d6c99dedc0d1 --- /dev/null +++ b/dev-ruby/ruby-config/files/ruby-config-0.3 @@ -0,0 +1,144 @@ +#!/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,v 1.1 2004/07/31 19:17:20 usata 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/} + # don't make symlink to ri + for i in ruby irb erb testrb rdoc ; 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 ruby16" + ;; + 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.2.ebuild b/dev-ruby/ruby-config/ruby-config-0.2.ebuild index 82d718360a8e..6516214b51f0 100644 --- a/dev-ruby/ruby-config/ruby-config-0.2.ebuild +++ b/dev-ruby/ruby-config/ruby-config-0.2.ebuild @@ -1,6 +1,6 @@ # 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/ruby-config-0.2.ebuild,v 1.12 2004/06/25 01:57:28 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-config/ruby-config-0.2.ebuild,v 1.13 2004/07/31 19:17:20 usata Exp $ DESCRIPTION="Utility to switch the ruby interpreter beging used" HOMEPAGE="http://www.gentoo.org/" @@ -12,7 +12,8 @@ KEYWORDS="x86 ppc sparc mips alpha arm hppa amd64 ia64 s390" IUSE="" DEPEND="virtual/ruby" +S="${WORKDIR}" src_install() { - newsbin ${FILESDIR}/ruby-config.sh ruby-config || die + newsbin ${FILESDIR}/${P} ruby-config || die } diff --git a/dev-ruby/ruby-config/ruby-config-0.3.ebuild b/dev-ruby/ruby-config/ruby-config-0.3.ebuild new file mode 100644 index 000000000000..7a46e236eea6 --- /dev/null +++ b/dev-ruby/ruby-config/ruby-config-0.3.ebuild @@ -0,0 +1,19 @@ +# 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/ruby-config-0.3.ebuild,v 1.1 2004/07/31 19:17:20 usata Exp $ + +DESCRIPTION="Utility to switch the ruby interpreter beging used" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~s390 macos" +IUSE="" + +DEPEND="virtual/ruby" +S="${WORKDIR}" + +src_install() { + newsbin ${FILESDIR}/${P} ruby-config || die +} |