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 EB12715808B for ; Wed, 16 Mar 2022 15:08:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 995CDE0898; Wed, 16 Mar 2022 15:08:14 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 E3BD4E0898 for ; Wed, 16 Mar 2022 15:08:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 F3398342FC3 for ; Wed, 16 Mar 2022 15:08:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 14F25AF for ; Wed, 16 Mar 2022 15:08:10 +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: <1647443281.7dde9a139d25b0166ec24b620298783e9b44c116.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/mpfr/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/mpfr/mpfr-4.1.0_p13-r1.ebuild X-VCS-Directories: dev-libs/mpfr/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 7dde9a139d25b0166ec24b620298783e9b44c116 X-VCS-Branch: master Date: Wed, 16 Mar 2022 15:08:10 +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: 85a93c7d-68bb-4f67-aab1-6bdf7679e720 X-Archives-Hash: 2983f938c486f50912d9c47f10de0d89 commit: 7dde9a139d25b0166ec24b620298783e9b44c116 Author: Sam James gentoo org> AuthorDate: Wed Mar 16 15:06:15 2022 +0000 Commit: Sam James gentoo org> CommitDate: Wed Mar 16 15:08:01 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dde9a13 dev-libs/mpfr: don't assume DISTDIR only contains our distfiles There's no guarantee that ${DISTDIR} only contains the distfiles for this package (it could be the system's whole cache, for example -- like in Paludis). Bug: https://github.com/MageSlayer/paludis-gentoo-patches/issues/32#issuecomment-1025371500 Thanks-to: Ionen Wolkens gentoo.org> Signed-off-by: Sam James gentoo.org> dev-libs/mpfr/mpfr-4.1.0_p13-r1.ebuild | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/dev-libs/mpfr/mpfr-4.1.0_p13-r1.ebuild b/dev-libs/mpfr/mpfr-4.1.0_p13-r1.ebuild index 0ac19f7cd365..14f2319304bc 100644 --- a/dev-libs/mpfr/mpfr-4.1.0_p13-r1.ebuild +++ b/dev-libs/mpfr/mpfr-4.1.0_p13-r1.ebuild @@ -12,6 +12,7 @@ inherit multilib-minimal # https://archives.gentoo.org/gentoo-releng-autobuilds/message/c2dd39fc4ebc849db6bb0f551739e2ed MY_PV=$(ver_cut 1-3) MY_PATCH=$(ver_cut 5-) +MY_PATCHES=() MY_P=${PN}-${MY_PV} DESCRIPTION="Library for multiple-precision floating-point computations with exact rounding" @@ -21,12 +22,11 @@ if [[ ${PV} == *_p* ]] ; then # If this is a patch release, we have to download each of the patches: # -_pN = N patches # - patch file names are like: patch01, patch02, ..., patch10, patch12, .. + # # => name the ebuild _pN where N is the number of patches on the 'bugs' page. - my_patch_index=1 - while [[ ${my_patch_index} -le ${MY_PATCH} ]] ; do - SRC_URI+=" " - SRC_URI+=$(printf "https://www.mpfr.org/${MY_P}/patch%02d -> ${MY_P}-patch%02d.patch " ${my_patch_index} ${my_patch_index}) - my_patch_index=$((my_patch_index+1)) + for ((my_patch_index=1; my_patch_index <= MY_PATCH; my_patch_index++)); do + SRC_URI+=" $(printf "https://www.mpfr.org/${MY_P}/patch%02d -> ${MY_P}-patch%02d.patch " ${my_patch_index}{,})" + MY_PATCHES+=( "${DISTDIR}"/$(printf ${MY_P}-patch%02d.patch ${my_patch_index}) ) done unset my_patch_index fi @@ -42,15 +42,20 @@ IUSE="static-libs" RDEPEND=">=dev-libs/gmp-5.0.0:=[${MULTILIB_USEDEP},static-libs?]" DEPEND="${RDEPEND}" -PATCHES=() +PATCHES=( + # Apply the upstream patches released out-of-band; generated above + "${MY_PATCHES[@]}" -if [[ ${PV} == *_p* ]] ; then - # Apply the upstream patches released out of band - PATCHES+=( "${DISTDIR}"/ ) -fi + # Additional patches +) HTML_DOCS=( doc/FAQ.html ) +src_unpack() { + # Avoid src_unpack noise from patches + unpack ${MY_P}.tar.xz +} + src_prepare() { default @@ -61,9 +66,9 @@ src_prepare() { } multilib_src_configure() { - # bug 476336#19 + # bug #476336#19 # Make sure mpfr doesn't go probing toolchains it shouldn't - ECONF_SOURCE=${S} \ + ECONF_SOURCE="${S}" \ user_redefine_cc=yes \ econf $(use_enable static-libs static) }