www-client/google-chrome-beta: automated update (84.0.4147.30)
[gentoo.git] / dev-ruby / x25519 / x25519-1.0.8.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_EXTRADOC="CHANGES.md README.md"
9
10 RUBY_FAKEGEM_RECIPE_TEST="rspec3"
11
12 RUBY_FAKEGEM_GEMSPEC="x25519.gemspec"
13
14 inherit ruby-fakegem
15
16 DESCRIPTION="Key exchange via the X25519 (Curve25519) Elliptic Curve Diffie-Hellman function"
17 HOMEPAGE="https://github.com/crypto-rb/x25519"
18 SRC_URI="https://github.com/crypto-rb/x25519/archive/v${PV}.tar.gz -> ${P}.tar.gz"
19
20 LICENSE="BSD"
21 SLOT="$(ver_cut 1)"
22 KEYWORDS="~amd64"
23 IUSE=""
24
25 all_ruby_prepare() {
26         sed -i -e '/bundler/ s:^:#: ; /coverall/I s:^:#:' spec/spec_helper.rb || die
27
28         sed -i -e 's/git ls-files -z/find . -print0/' ${RUBY_FAKEGEM_GEMSPEC} || die
29 }
30
31 each_ruby_configure() {
32         ${RUBY} -Cext/x25519_precomputed extconf.rb || die
33         ${RUBY} -Cext/x25519_ref10 extconf.rb || die
34 }
35
36 each_ruby_compile() {
37         emake V=1 -Cext/x25519_precomputed
38         cp ext/x25519_precomputed/x25519_precomputed.so lib/ || die
39         emake V=1 -Cext/x25519_ref10
40         cp ext/x25519_ref10/x25519_ref10.so lib/ || die
41 }