From feb0daf81d888e9160f9f94502de09b66f2a63fd Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 21 Jun 2020 17:50:24 +0100 Subject: gentoo resync : 21.06.2020 --- dev-ruby/x25519/x25519-1.0.8.ebuild | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'dev-ruby/x25519/x25519-1.0.8.ebuild') diff --git a/dev-ruby/x25519/x25519-1.0.8.ebuild b/dev-ruby/x25519/x25519-1.0.8.ebuild index 36e65576f661..cd2b4a702e7f 100644 --- a/dev-ruby/x25519/x25519-1.0.8.ebuild +++ b/dev-ruby/x25519/x25519-1.0.8.ebuild @@ -26,16 +26,27 @@ all_ruby_prepare() { sed -i -e '/bundler/ s:^:#: ; /coverall/I s:^:#:' spec/spec_helper.rb || die sed -i -e 's/git ls-files -z/find . -print0/' ${RUBY_FAKEGEM_GEMSPEC} || die + + # The precomputed implementation only works on amd64 + if ! use amd64 ; then + sed -i -e '/\(x25519_precomputed\|X25519::Provider::Precomputed\)/ s:^:#:' lib/x25519.rb || die + fi } each_ruby_configure() { - ${RUBY} -Cext/x25519_precomputed extconf.rb || die + if use amd64 ; then + ${RUBY} -Cext/x25519_precomputed extconf.rb || die + fi + ${RUBY} -Cext/x25519_ref10 extconf.rb || die } each_ruby_compile() { - emake V=1 -Cext/x25519_precomputed - cp ext/x25519_precomputed/x25519_precomputed.so lib/ || die + if use amd64 ; then + emake V=1 -Cext/x25519_precomputed + cp ext/x25519_precomputed/x25519_precomputed.so lib/ || die + fi + emake V=1 -Cext/x25519_ref10 cp ext/x25519_ref10/x25519_ref10.so lib/ || die } -- cgit v1.2.3