dev-ruby/net-ssh: fix tests with USE=-sodium
authorHans de Graaff <graaff@gentoo.org>
Sun, 17 Jun 2018 18:32:32 +0000 (20:32 +0200)
committerHans de Graaff <graaff@gentoo.org>
Sun, 17 Jun 2018 18:32:57 +0000 (20:32 +0200)
Don't try to run tests that depend on libsodium in this case.

Closes: https://bugs.gentoo.org/647334
Package-Manager: Portage-2.3.40, Repoman-2.3.9

dev-ruby/net-ssh/net-ssh-4.2.0.ebuild

index cd46a77e129a491082094d3513a4a80992459678..6d01274e11abd88db68b30b35bd3c08290a68bcf 100644 (file)
@@ -27,6 +27,11 @@ all_ruby_prepare() {
        # Don't use a ruby-bundled version of libsodium
        sed -i -e '/rbnacl\/libsodium/ s:^:#:' lib/net/ssh/authentication/ed25519.rb || die
 
+       # Don' try to use libsodium-related tests with USE=-sodium
+       if ! use sodium ; then
+               rm -f test/authentication/test_ed25519.rb
+       fi
+
        # Avoid bundler dependency
        sed -i -e '/\(bundler\|:release\)/ s:^:#:' Rakefile || die
 }