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 F2C461382C5 for ; Tue, 22 Dec 2020 09:47:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 33BE0E0BDF; Tue, 22 Dec 2020 09:47:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 1AB6FE0BDF for ; Tue, 22 Dec 2020 09:47:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 D62923414EA for ; Tue, 22 Dec 2020 09:47:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 461C12A9 for ; Tue, 22 Dec 2020 09:47:18 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1608630400.1a3cd2703835fc0e25c47695c0ed1eeea4e59bb2.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libtomcrypt/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/libtomcrypt/libtomcrypt-1.18.2-r1.ebuild dev-libs/libtomcrypt/libtomcrypt-1.18.2.ebuild X-VCS-Directories: dev-libs/libtomcrypt/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 1a3cd2703835fc0e25c47695c0ed1eeea4e59bb2 X-VCS-Branch: master Date: Tue, 22 Dec 2020 09:47:18 +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: 4994acd0-e478-43dc-b4be-7d02976dda46 X-Archives-Hash: 6f514184fce90da8c7c6fb6e121d30c3 commit: 1a3cd2703835fc0e25c47695c0ed1eeea4e59bb2 Author: Michał Górny gentoo org> AuthorDate: Tue Dec 22 09:46:40 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Dec 22 09:46:40 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a3cd270 dev-libs/libtomcrypt: Fix linking to math libs Closes: https://bugs.gentoo.org/761226 Signed-off-by: Michał Górny gentoo.org> ...-1.18.2.ebuild => libtomcrypt-1.18.2-r1.ebuild} | 32 ++++++++++------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/dev-libs/libtomcrypt/libtomcrypt-1.18.2.ebuild b/dev-libs/libtomcrypt/libtomcrypt-1.18.2-r1.ebuild similarity index 81% rename from dev-libs/libtomcrypt/libtomcrypt-1.18.2.ebuild rename to dev-libs/libtomcrypt/libtomcrypt-1.18.2-r1.ebuild index 9b87379612a..4a2fbf1ca84 100644 --- a/dev-libs/libtomcrypt/libtomcrypt-1.18.2.ebuild +++ b/dev-libs/libtomcrypt/libtomcrypt-1.18.2-r1.ebuild @@ -36,9 +36,18 @@ mymake() { local extra_libs=() # Build support as appropriate for consumers (MPI) - use gmp && enabled_features+=( -DGMP_DESC=1 ) - use libtommath && enabled_features+=( -DLTM_DESC=1 ) - use tomsfastmath && enabled_features+=( -DTFM_DESC=1 ) + if use gmp; then + enabled_features+=( -DGMP_DESC=1 ) + extra_libs+=( -lgmp ) + fi + if use libtommath; then + enabled_features+=( -DLTM_DESC=1 ) + extra_libs+=( -ltommath ) + fi + if use tomsfastmath; then + enabled_features+=( -DTFM_DESC=1 ) + extra_libs+=( -ltfm ) + fi # For the test and example binaries, we have to choose # which MPI we want to use. @@ -46,27 +55,14 @@ mymake() { # gmp > libtommath > tomsfastmath > none if use gmp ; then enabled_features+=( -DUSE_GMP=1 ) - extra_libs=( -lgmp ) elif use libtommath ; then enabled_features+=( -DUSE_LTM=1 ) - extra_libs=( -ltommath ) elif use tomsfastmath ; then enabled_features+=( -DUSE_TFM=1 ) - extra_libs=( -ltfm ) - fi - - # If none of the above are being used, - # the tests don't need to link against any extra - # libraries. - - # We only need to do this strange logic for tests - # anyway because we're choosing what to build a binary with. - if [[ ${TEST} != 1 ]] ; then - extra_libs=() fi # IGNORE_SPEED=1 is needed to respect CFLAGS - EXTRALIBS="${extra_libs}" emake \ + EXTRALIBS="${extra_libs[*]}" emake \ CFLAGS="${CFLAGS} ${enabled_features[*]}" \ CC="$(tc-getCC)" \ AR="$(tc-getAR)" \ @@ -88,7 +84,7 @@ src_test() { # 1) https://github.com/libtom/libtomcrypt/commit/a65cfb8dbe4 # 2) https://github.com/libtom/libtomcrypt/commit/fdc6cd20137 # is made, we can run tests for each provider. - TEST=1 mymake test + mymake test ./test || die "Running tests failed" }