From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E0D121382C5 for ; Sun, 21 Jun 2020 07:48:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 251B4E0917; Sun, 21 Jun 2020 07:48:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0D218E0917 for ; Sun, 21 Jun 2020 07:48:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1C67B34F9B9 for ; Sun, 21 Jun 2020 07:48:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4E1CA253 for ; Sun, 21 Jun 2020 07:48:35 +0000 (UTC) From: "Hans de Graaff" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Hans de Graaff" Message-ID: <1592725686.eea031d253fac214034a2b18e2ee16d4c3295a14.graaff@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/x25519/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-ruby/x25519/x25519-1.0.8.ebuild X-VCS-Directories: dev-ruby/x25519/ X-VCS-Committer: graaff X-VCS-Committer-Name: Hans de Graaff X-VCS-Revision: eea031d253fac214034a2b18e2ee16d4c3295a14 X-VCS-Branch: master Date: Sun, 21 Jun 2020 07:48:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 06687f6c-4bda-432a-9c92-575623c607c7 X-Archives-Hash: faf2dc7bc93a2c54a1de53fa66077840 commit: eea031d253fac214034a2b18e2ee16d4c3295a14 Author: Hans de Graaff gentoo org> AuthorDate: Sun Jun 21 07:47:55 2020 +0000 Commit: Hans de Graaff gentoo org> CommitDate: Sun Jun 21 07:48:06 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eea031d2 dev-ruby/x25519: precomputed impl only works on amd64 The precomputed implementation only works on amd64, so avoid it on other arches and let them fall back to the unoptimized reference implementation. Closes: https://bugs.gentoo.org/728420 Closes: https://bugs.gentoo.org/728888 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Hans de Graaff gentoo.org> dev-ruby/x25519/x25519-1.0.8.ebuild | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dev-ruby/x25519/x25519-1.0.8.ebuild b/dev-ruby/x25519/x25519-1.0.8.ebuild index 36e65576f66..cd2b4a702e7 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 }