dev-qt/linguist-tools: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-ruby / net-ssh / net-ssh-6.0.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 USE_RUBY="ruby24 ruby25 ruby26 ruby27"
7
8 RUBY_FAKEGEM_DOCDIR="doc"
9 RUBY_FAKEGEM_EXTRADOC="CHANGES.txt README.md THANKS.txt"
10 RUBY_FAKEGEM_EXTRAINSTALL="support"
11
12 RUBY_FAKEGEM_GEMSPEC="net-ssh.gemspec"
13
14 inherit ruby-fakegem
15
16 DESCRIPTION="Non-interactive SSH processing in pure Ruby"
17 HOMEPAGE="https://github.com/net-ssh/net-ssh"
18 SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> net-ssh-git-${PV}.tgz"
19
20 LICENSE="GPL-2"
21 SLOT="$(ver_cut 1)"
22 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
23 IUSE="ed25519 test"
24
25 ruby_add_rdepend "virtual/ruby-ssl ed25519? ( >=dev-ruby/ed25519-1.2:1 dev-ruby/bcrypt_pbkdf:1 )"
26 ruby_add_bdepend "test? ( dev-ruby/test-unit:2 >=dev-ruby/mocha-0.13 )"
27
28 all_ruby_prepare() {
29         # Avoid bundler dependency
30         sed -i -e '/\(bundler\|:release\)/ s:^:#:' Rakefile || die
31
32         sed -e "s:require_relative ':require './:" \
33                 -e 's/git ls-files -z/find -print0/' \
34                 -i ${RUBY_FAKEGEM_GEMSPEC} || die
35 }
36
37 src_test() {
38         # prevent tests from trying to connect to ssh-agent socket and failing
39         unset SSH_AUTH_SOCK
40         if ! use ed25519; then
41                 export NET_SSH_NO_ED25519=true
42         fi
43         ruby-ng_src_test
44 }