Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-ruby/chruby/
Date: Mon, 27 Dec 2021 14:44:15
Message-Id: 1640456493.424d5e5f3ba113910a3748fdb4a0fdec43dd5f88.flow@gentoo
1 commit: 424d5e5f3ba113910a3748fdb4a0fdec43dd5f88
2 Author: Alexey Zapparov <alexey <AT> zapparov <DOT> com>
3 AuthorDate: Sat Dec 25 16:39:17 2021 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 25 18:21:33 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=424d5e5f
7
8 dev-ruby/chruby: add 9999 (live) ebuild
9
10 Package-Manager: Portage-3.0.28, Repoman-3.0.3
11 Signed-off-by: Alexey Zapparov <alexey <AT> zapparov.com>
12
13 dev-ruby/chruby/chruby-9999.ebuild | 41 ++++++++++++++++++++++++++++++++++++++
14 1 file changed, 41 insertions(+)
15
16 diff --git a/dev-ruby/chruby/chruby-9999.ebuild b/dev-ruby/chruby/chruby-9999.ebuild
17 new file mode 100644
18 index 000000000..bd7345d78
19 --- /dev/null
20 +++ b/dev-ruby/chruby/chruby-9999.ebuild
21 @@ -0,0 +1,41 @@
22 +# Copyright 2021 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=8
26 +
27 +if [[ ${PV} == *9999 ]]; then
28 + EGIT_REPO_URI="https://github.com/postmodern/chruby.git"
29 + inherit git-r3
30 +else
31 + SRC_URI="https://github.com/postmodern/chruby/archive/v${PV}.tar.gz -> ${P}.tar.gz"
32 + KEYWORDS="~amd64 ~x86"
33 +fi
34 +
35 +DESCRIPTION="Changes the current Ruby"
36 +HOMEPAGE="https://github.com/postmodern/chruby"
37 +
38 +LICENSE="MIT"
39 +SLOT="0"
40 +RESTRICT="test"
41 +
42 +DEPEND="|| ( >=app-shells/bash-3.0:* app-shells/zsh )"
43 +RDEPEND="${DEPEND}"
44 +
45 +src_prepare() {
46 + default
47 +
48 + sed -i Makefile -e "s/^VERSION=.\+$/VERSION=${PVR}/" \
49 + || die "can't fix doc location to follow Gentoo/FHS guidelines"
50 +}
51 +
52 +src_install() {
53 + local emakeargs=(
54 + DESTDIR="$D"
55 + PREFIX="/usr"
56 + )
57 +
58 + emake "${emakeargs[@]}" install
59 +
60 + insinto "/etc/profile.d"
61 + newins "${FILESDIR}/systemwide.sh" "chruby.sh"
62 +}