aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Zapparov <alexey@zapparov.com>2021-12-25 17:39:17 +0100
committerAlexey Zapparov <alexey@zapparov.com>2021-12-25 19:21:33 +0100
commit424d5e5f3ba113910a3748fdb4a0fdec43dd5f88 (patch)
tree4b6eee8160b4d4d653807a5173888c204a12e758 /dev-ruby
parentapp-misc/far2l: version bump to 2.3.2_alpha (diff)
downloadguru-424d5e5f3ba113910a3748fdb4a0fdec43dd5f88.tar.gz
guru-424d5e5f3ba113910a3748fdb4a0fdec43dd5f88.tar.bz2
guru-424d5e5f3ba113910a3748fdb4a0fdec43dd5f88.zip
dev-ruby/chruby: add 9999 (live) ebuild
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Alexey Zapparov <alexey@zapparov.com>
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/chruby/chruby-9999.ebuild41
1 files changed, 41 insertions, 0 deletions
diff --git a/dev-ruby/chruby/chruby-9999.ebuild b/dev-ruby/chruby/chruby-9999.ebuild
new file mode 100644
index 000000000..bd7345d78
--- /dev/null
+++ b/dev-ruby/chruby/chruby-9999.ebuild
@@ -0,0 +1,41 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} == *9999 ]]; then
+ EGIT_REPO_URI="https://github.com/postmodern/chruby.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/postmodern/chruby/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Changes the current Ruby"
+HOMEPAGE="https://github.com/postmodern/chruby"
+
+LICENSE="MIT"
+SLOT="0"
+RESTRICT="test"
+
+DEPEND="|| ( >=app-shells/bash-3.0:* app-shells/zsh )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+
+ sed -i Makefile -e "s/^VERSION=.\+$/VERSION=${PVR}/" \
+ || die "can't fix doc location to follow Gentoo/FHS guidelines"
+}
+
+src_install() {
+ local emakeargs=(
+ DESTDIR="$D"
+ PREFIX="/usr"
+ )
+
+ emake "${emakeargs[@]}" install
+
+ insinto "/etc/profile.d"
+ newins "${FILESDIR}/systemwide.sh" "chruby.sh"
+}