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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 23C4A158020 for ; Tue, 6 Dec 2022 10:53:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 423ECE07D4; Tue, 6 Dec 2022 10:53:17 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 25B3DE07D4 for ; Tue, 6 Dec 2022 10:53:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 089B7341099 for ; Tue, 6 Dec 2022 10:53:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1DC824C8 for ; Tue, 6 Dec 2022 10:53:14 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1670323970.2e58af672b41a624f84eb7fada145ab2f6c2b1b6.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/gmp/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/gmp/gmp-6.2.1-r4.ebuild dev-libs/gmp/gmp-6.2.1-r5.ebuild X-VCS-Directories: dev-libs/gmp/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 2e58af672b41a624f84eb7fada145ab2f6c2b1b6 X-VCS-Branch: master Date: Tue, 6 Dec 2022 10:53:14 +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: 47f6457e-ac04-4d44-88ee-9d302bcdd269 X-Archives-Hash: 0c2c2b27b45f92b2a3ec417d51e466e2 commit: 2e58af672b41a624f84eb7fada145ab2f6c2b1b6 Author: Sam James gentoo org> AuthorDate: Tue Dec 6 10:48:07 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Dec 6 10:52:50 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e58af67 dev-libs/gmp: further econf fixes * Use gnuconfig.eclass to update configfsf.{guess,sub} before the wrapped versions call them. * Export CBUILD too just in case for the deduced host from upstream's wrapped config.guess (not the same as gnuconfig's at all, see bugs for details). * Save/restore upstream's config.{guess,sub} to make sure that for the second multilib build we still have it available to run. In practice, this may not have mattered too much, as the exported ac_cv_host should've persisted, but it's still worth being (clearly) correct as is the case now. * Move cpudetection warning into pkg_pretend so it's easier to spot and we also don't then repeat it for each ABI. Bug: https://bugs.gentoo.org/235697 Bug: https://bugs.gentoo.org/545442 Bug: https://bugs.gentoo.org/883201 See: 78b4d4ebbcee12f5ef4c1dfa89f80c98a582db9d See: 3fe1b5370c0cc1537d1249e8ec9d2fbcd8619499 See: bf286a7973d8b95dbef90f17cc8e2d66c19a47c8 See: 121152c38caefd8e94fb8c90cb51102693b6d6a8 Signed-off-by: Sam James gentoo.org> .../{gmp-6.2.1-r4.ebuild => gmp-6.2.1-r5.ebuild} | 32 ++++++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/dev-libs/gmp/gmp-6.2.1-r4.ebuild b/dev-libs/gmp/gmp-6.2.1-r5.ebuild similarity index 84% rename from dev-libs/gmp/gmp-6.2.1-r4.ebuild rename to dev-libs/gmp/gmp-6.2.1-r5.ebuild index 0a58fc8ba3b4..2e867d0047e9 100644 --- a/dev-libs/gmp/gmp-6.2.1-r4.ebuild +++ b/dev-libs/gmp/gmp-6.2.1-r5.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit libtool multilib-minimal toolchain-funcs +inherit gnuconfig libtool multilib-minimal toolchain-funcs MY_PV=${PV/_p*} MY_PV=${MY_PV/_/-} @@ -47,6 +47,14 @@ PATCHES=( "${FILESDIR}"/${P}-CVE-2021-43618.patch ) +pkg_pretend() { + if use cpudetection && ! use amd64 && ! use x86 ; then + elog "Using generic C implementation on non-amd64/x86 with USE=cpudetection" + elog "--enable-fat is a no-op on alternative arches." + elog "To obtain an optimized build, set USE=-cpudetection, but binpkgs should not then be made." + fi +} + src_prepare() { default @@ -68,6 +76,19 @@ src_prepare() { # Patches to original configure might have lost the +x bit. chmod a+rx configure{,.wrapped} || die + + # Save the upstream files named config.{guess,sub} which are + # wrappers around the gnuconfig versions. + mkdir "${T}"/gmp-gnuconfig || die + mv config.guess "${T}"/gmp-gnuconfig/config.guess || die + mv config.sub "${T}"/gmp-gnuconfig/config.sub || die + # Grab fresh copies from gnuconfig. + touch config.guess config.sub || die + gnuconfig_update + # Rename the fresh copies to the filenames the wrappers from GMP + # expect. + mv config.guess configfsf.guess || die + mv config.sub configfsf.sub || die } multilib_src_configure() { @@ -115,11 +136,9 @@ multilib_src_configure() { $(use pic && echo --with-pic) ) - if use cpudetection && ! use amd64 && ! use x86 ; then - elog "Using generic C implementation on non-amd64/x86 with USE=cpudetection" - elog "--enable-fat is a no-op on alternative arches." - elog "To obtain an optimized build, set USE=-cpudetection, but binpkgs should not then be made." - fi + # Move the wrappers from GMP back into place (may have been destroyed by previous econf run) + cp "${T}"/gmp-gnuconfig/config.guess "${S}"/config.guess || die + cp "${T}"/gmp-gnuconfig/config.sub "${S}"/config.sub || die # See bug #883201 again. if ! use cpudetection && ! tc-is-cross-compiler ; then @@ -131,6 +150,7 @@ multilib_src_configure() { einfo "GMP guessed processor type: ${gmp_host}" ewarn "This build will only work on this machine. Enable USE=cpudetection for binary packages!" + export ac_cv_build="${gmp_host}" export ac_cv_host="${gmp_host}" fi