summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-07 07:25:47 +0000
committerSam James <sam@gentoo.org>2023-01-07 07:25:47 +0000
commit2fe19b7bafc24d19a8e5322a4a83bffad6284ddf (patch)
treeeaa6c18081ab10a929bbb3f7faf3333cb0484bbe /dev-libs
parentnet-irc/hexchat: Stabilize 2.16.1-r1 arm, #889994 (diff)
downloadgentoo-2fe19b7bafc24d19a8e5322a4a83bffad6284ddf.tar.gz
gentoo-2fe19b7bafc24d19a8e5322a4a83bffad6284ddf.tar.bz2
gentoo-2fe19b7bafc24d19a8e5322a4a83bffad6284ddf.zip
dev-libs/mpfr: add 4.2.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/mpfr/Manifest2
-rw-r--r--dev-libs/mpfr/mpfr-4.2.0.ebuild90
2 files changed, 92 insertions, 0 deletions
diff --git a/dev-libs/mpfr/Manifest b/dev-libs/mpfr/Manifest
index 6cf9e06c2679..0ecec49d8080 100644
--- a/dev-libs/mpfr/Manifest
+++ b/dev-libs/mpfr/Manifest
@@ -16,3 +16,5 @@ DIST mpfr-4.1.1-patch01.patch 2985 BLAKE2B d6bed1d6fca2319db457096a81aca060c1bd9
DIST mpfr-4.1.1.tar.xz 1429836 BLAKE2B ce20baee2f060acb28b877ffe6fc40c5619cf6af231bd54ca6cfb3e42ef2d74a4ffbab96cf0b5dd6a162e558099a54701d42f34f5bf2256f256fe6f5ae2505d0 SHA512 be468749bd88870dec37be35e544983a8fb7bda638eb9414c37334b9d553099ea2aa067045f51ae2c8ab86d852ef833e18161d173e414af0928e9a438c9b91f1
DIST mpfr-4.2.0-rc1.tar.xz 1476596 BLAKE2B 0bb116d26743a5ce644d7c9ecbbec903e5556483fff0bf3a42a572e1fd56ba21e1d9e6ca45c8ee7d59c5e3bd9cf243987a75bfffbddbb6d7e7ac0509da99052a SHA512 ea5edc569fbafa01b83aa4e5022f9b2021d5768649073cf5ee3d6b5a94c0ac207dada301076e033174ffa07a24f5e42e8d82fe69bca6b696e04dc250385dd919
DIST mpfr-4.2.0-rc1.tar.xz.asc 228 BLAKE2B 5d02eb5aef7224754ac5c4f15f4b58897f0327bc0672c70d5db664a73a0731480afcef3ac1ee6e2b1f0ed5e124a74a662adf1e8febf55b41b296402f899b9195 SHA512 29245c05f97ccc24aca38776231a73d2738077dedd488fd6148c18d93318f5b4c8abe6f6e9ba92c56a85cd1823f208828dc2f1691e941825e2d04d69c1357ff7
+DIST mpfr-4.2.0.tar.xz 1477532 BLAKE2B dd88ae3a6a910ad8faeb791b49c3b1085de5d0d4c49c637c124bf4d9bc79fb621d0d1d69e07d0642b9b678f6d355a5830d083dfd189e1e91d0e04c970c10bd64 SHA512 58e843125884ca58837ae5159cd4092af09e8f21931a2efd19c15de057c9d1dc0753ae95c592e2ce59a727fbc491af776db8b00a055320413cdcf2033b90505c
+DIST mpfr-4.2.0.tar.xz.asc 228 BLAKE2B b281a11528a69418739b0122b4130d9cf212569f9ded8def685b31afe700ea776dd40ac0de7aa6de1bbd5d03a1dc9726ed4278cc6cccfacd1147681a6de27f70 SHA512 ce64346cce89bc38fee161a5e01c349c97c69b626547e54a522b741949cb27bba1668d123143fd03b015f9bdd692bcba08c7b85cf4d4cea9f7834383e04d4bbc
diff --git a/dev-libs/mpfr/mpfr-4.2.0.ebuild b/dev-libs/mpfr/mpfr-4.2.0.ebuild
new file mode 100644
index 000000000000..bd852c2771c5
--- /dev/null
+++ b/dev-libs/mpfr/mpfr-4.2.0.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/vincentlefevre.asc
+inherit multilib-minimal verify-sig
+
+# Upstream distribute patches before a new release is made
+# See https://www.mpfr.org/mpfr-current/#bugs for the latest version (and patches)
+
+# Check whether any patches touch e.g. manuals!
+# https://archives.gentoo.org/gentoo-releng-autobuilds/message/c2dd39fc4ebc849db6bb0f551739e2ed
+MY_PV=${PV%%_p*}
+MY_PATCH=$(ver_cut 5-)
+MY_PATCHES=()
+MY_P=${PN}-${MY_PV/_/-}
+
+DESCRIPTION="Library for multiple-precision floating-point computations with exact rounding"
+HOMEPAGE="https://www.mpfr.org/ https://gitlab.inria.fr/mpfr"
+SRC_URI="https://www.mpfr.org/${PN}-$(ver_cut 1-3)/${MY_P}.tar.xz"
+SRC_URI+=" verify-sig? ( https://www.mpfr.org/${PN}-$(ver_cut 1-3)/${MY_P}.tar.xz.asc )"
+
+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.
+ for ((my_patch_index=1; my_patch_index <= MY_PATCH; my_patch_index++)); do
+ SRC_URI+=" $(printf "https://www.mpfr.org/${PN}-$(ver_cut 1-3)/patch%02d -> ${PN}-$(ver_cut 1-3)-patch%02d.patch " ${my_patch_index}{,})"
+ MY_PATCHES+=( "${DISTDIR}"/$(printf ${PN}-$(ver_cut 1-3)-patch%02d.patch ${my_patch_index}) )
+ done
+ unset my_patch_index
+fi
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="LGPL-2.1"
+# This is a critical package; if SONAME changes, bump subslot but also add
+# preserve-libs.eclass usage to pkg_*inst! See e.g. the readline ebuild.
+SLOT="0/6" # libmpfr.so version
+if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/gmp-5.0.0:=[${MULTILIB_USEDEP},static-libs?]"
+DEPEND="${RDEPEND}"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-vincentlefevre )"
+
+PATCHES=(
+ # Apply the upstream patches released out-of-band; generated above
+ "${MY_PATCHES[@]}"
+
+ # Additional patches
+)
+
+HTML_DOCS=( doc/FAQ.html )
+
+src_unpack() {
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
+
+ # Avoid src_unpack noise from patches
+ unpack ${MY_P}.tar.xz
+}
+
+src_prepare() {
+ default
+
+ # 4.1.0_p13's patch10 patches a .texi file *and* the corresponding
+ # info file. We need to make sure the info file is newer, so the
+ # build doesn't try to run makeinfo. Won't be needed on next release.
+ #touch "${S}/doc/mpfr.info" || die
+}
+
+multilib_src_configure() {
+ # bug #476336#19
+ # Make sure mpfr doesn't go probing toolchains it shouldn't
+ ECONF_SOURCE="${S}" \
+ user_redefine_cc=yes \
+ econf $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
+
+ if ! use static-libs ; then
+ find "${ED}"/usr -name '*.la' -delete || die
+ fi
+}