From b47c3a358310c904284bc6fd8d6bdc87114093f9 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 9 Feb 2017 12:56:54 -0500 Subject: dev-libs/mpfr: version bump to 3.1.5_p2 #608770 --- dev-libs/mpfr/files/3.1.5/patch01 | 82 +++++++++++++++++++++++++++++++++ dev-libs/mpfr/files/3.1.5/patch02 | 92 ++++++++++++++++++++++++++++++++++++++ dev-libs/mpfr/mpfr-3.1.5.ebuild | 55 ----------------------- dev-libs/mpfr/mpfr-3.1.5_p2.ebuild | 55 +++++++++++++++++++++++ 4 files changed, 229 insertions(+), 55 deletions(-) create mode 100644 dev-libs/mpfr/files/3.1.5/patch01 create mode 100644 dev-libs/mpfr/files/3.1.5/patch02 delete mode 100644 dev-libs/mpfr/mpfr-3.1.5.ebuild create mode 100644 dev-libs/mpfr/mpfr-3.1.5_p2.ebuild (limited to 'dev-libs') diff --git a/dev-libs/mpfr/files/3.1.5/patch01 b/dev-libs/mpfr/files/3.1.5/patch01 new file mode 100644 index 000000000000..e1576d59766a --- /dev/null +++ b/dev-libs/mpfr/files/3.1.5/patch01 @@ -0,0 +1,82 @@ +diff -Naurd mpfr-3.1.5-a/PATCHES mpfr-3.1.5-b/PATCHES +--- mpfr-3.1.5-a/PATCHES 2016-12-15 08:35:46.476430238 +0000 ++++ mpfr-3.1.5-b/PATCHES 2016-12-15 08:35:46.544430346 +0000 +@@ -0,0 +1 @@ ++vasprintf +diff -Naurd mpfr-3.1.5-a/VERSION mpfr-3.1.5-b/VERSION +--- mpfr-3.1.5-a/VERSION 2016-09-27 07:58:14.000000000 +0000 ++++ mpfr-3.1.5-b/VERSION 2016-12-15 08:35:46.544430346 +0000 +@@ -1 +1 @@ +-3.1.5 ++3.1.5-p1 +diff -Naurd mpfr-3.1.5-a/src/mpfr.h mpfr-3.1.5-b/src/mpfr.h +--- mpfr-3.1.5-a/src/mpfr.h 2016-09-27 07:58:15.000000000 +0000 ++++ mpfr-3.1.5-b/src/mpfr.h 2016-12-15 08:35:46.540430340 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 5 +-#define MPFR_VERSION_STRING "3.1.5" ++#define MPFR_VERSION_STRING "3.1.5-p1" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +diff -Naurd mpfr-3.1.5-a/src/vasprintf.c mpfr-3.1.5-b/src/vasprintf.c +--- mpfr-3.1.5-a/src/vasprintf.c 2016-09-27 07:58:15.000000000 +0000 ++++ mpfr-3.1.5-b/src/vasprintf.c 2016-12-15 08:35:46.520430308 +0000 +@@ -1593,7 +1593,7 @@ + } + else if (spec.spec == 'f' || spec.spec == 'F') + { +- if (spec.prec == -1) ++ if (spec.prec < 0) + spec.prec = 6; + if (regular_fg (np, p, spec, NULL) == -1) + goto error; +diff -Naurd mpfr-3.1.5-a/src/version.c mpfr-3.1.5-b/src/version.c +--- mpfr-3.1.5-a/src/version.c 2016-09-27 07:58:15.000000000 +0000 ++++ mpfr-3.1.5-b/src/version.c 2016-12-15 08:35:46.544430346 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.5"; ++ return "3.1.5-p1"; + } +diff -Naurd mpfr-3.1.5-a/tests/tsprintf.c mpfr-3.1.5-b/tests/tsprintf.c +--- mpfr-3.1.5-a/tests/tsprintf.c 2016-09-27 07:58:14.000000000 +0000 ++++ mpfr-3.1.5-b/tests/tsprintf.c 2016-12-15 08:35:46.520430308 +0000 +@@ -1251,6 +1251,25 @@ + check_emin_aux (MPFR_EMIN_MIN); + } + ++static void ++test20161214 (void) ++{ ++ mpfr_t x; ++ char buf[32]; ++ const char s[] = "0x0.fffffffffffff8p+1024"; ++ int r; ++ ++ mpfr_init2 (x, 64); ++ mpfr_set_str (x, s, 16, MPFR_RNDN); ++ r = mpfr_snprintf (buf, 32, "%.*RDf", -2, x); ++ MPFR_ASSERTN(r == 316); ++ r = mpfr_snprintf (buf, 32, "%.*RDf", INT_MIN + 1, x); ++ MPFR_ASSERTN(r == 316); ++ r = mpfr_snprintf (buf, 32, "%.*RDf", INT_MIN, x); ++ MPFR_ASSERTN(r == 316); ++ mpfr_clear (x); ++} ++ + int + main (int argc, char **argv) + { +@@ -1271,6 +1290,7 @@ + mixed (); + check_emax (); + check_emin (); ++ test20161214 (); + + #if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) + #if MPFR_LCONV_DPTS diff --git a/dev-libs/mpfr/files/3.1.5/patch02 b/dev-libs/mpfr/files/3.1.5/patch02 new file mode 100644 index 000000000000..01878bf1b0d3 --- /dev/null +++ b/dev-libs/mpfr/files/3.1.5/patch02 @@ -0,0 +1,92 @@ +diff -Naurd mpfr-3.1.5-a/PATCHES mpfr-3.1.5-b/PATCHES +--- mpfr-3.1.5-a/PATCHES 2016-12-19 22:11:17.022676737 +0000 ++++ mpfr-3.1.5-b/PATCHES 2016-12-19 22:11:17.094676820 +0000 +@@ -0,0 +1 @@ ++strtofr +diff -Naurd mpfr-3.1.5-a/VERSION mpfr-3.1.5-b/VERSION +--- mpfr-3.1.5-a/VERSION 2016-12-15 08:35:46.544430346 +0000 ++++ mpfr-3.1.5-b/VERSION 2016-12-19 22:11:17.094676820 +0000 +@@ -1 +1 @@ +-3.1.5-p1 ++3.1.5-p2 +diff -Naurd mpfr-3.1.5-a/src/mpfr.h mpfr-3.1.5-b/src/mpfr.h +--- mpfr-3.1.5-a/src/mpfr.h 2016-12-15 08:35:46.540430340 +0000 ++++ mpfr-3.1.5-b/src/mpfr.h 2016-12-19 22:11:17.090676815 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 5 +-#define MPFR_VERSION_STRING "3.1.5-p1" ++#define MPFR_VERSION_STRING "3.1.5-p2" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +diff -Naurd mpfr-3.1.5-a/src/strtofr.c mpfr-3.1.5-b/src/strtofr.c +--- mpfr-3.1.5-a/src/strtofr.c 2016-09-27 07:58:15.000000000 +0000 ++++ mpfr-3.1.5-b/src/strtofr.c 2016-12-19 22:11:17.066676788 +0000 +@@ -743,11 +743,14 @@ + of the pstr_size most significant digits of pstr->mant, with + equality in case exact is non-zero. */ + +- /* test if rounding is possible, and if so exit the loop */ +- if (exact || mpfr_can_round_raw (result, ysize, +- (pstr->negative) ? -1 : 1, +- ysize_bits - err - 1, +- MPFR_RNDN, rnd, MPFR_PREC(x))) ++ /* test if rounding is possible, and if so exit the loop. ++ Note: we also need to be able to determine the correct ternary value, ++ thus we use the MPFR_PREC(x) + (rnd == MPFR_RNDN) trick. ++ For example if result = xxx...xxx111...111 and rnd = RNDN, ++ then we know the correct rounding is xxx...xx(x+1), but we cannot know ++ the correct ternary value. */ ++ if (exact || mpfr_round_p (result, ysize, ysize_bits - err - 1, ++ MPFR_PREC(x) + (rnd == MPFR_RNDN))) + break; + + next_loop: +diff -Naurd mpfr-3.1.5-a/src/version.c mpfr-3.1.5-b/src/version.c +--- mpfr-3.1.5-a/src/version.c 2016-12-15 08:35:46.544430346 +0000 ++++ mpfr-3.1.5-b/src/version.c 2016-12-19 22:11:17.094676820 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.5-p1"; ++ return "3.1.5-p2"; + } +diff -Naurd mpfr-3.1.5-a/tests/tstrtofr.c mpfr-3.1.5-b/tests/tstrtofr.c +--- mpfr-3.1.5-a/tests/tstrtofr.c 2016-09-27 07:58:14.000000000 +0000 ++++ mpfr-3.1.5-b/tests/tstrtofr.c 2016-12-19 22:11:17.066676788 +0000 +@@ -1191,6 +1191,24 @@ + mpfr_clears (e, x1, x2, (mpfr_ptr) 0); + } + ++/* Note: the number is 5^47/2^9. */ ++static void ++bug20161217 (void) ++{ ++ mpfr_t fp, z; ++ static const char * num = "0.1387778780781445675529539585113525390625e31"; ++ int inex; ++ ++ mpfr_init2 (fp, 110); ++ mpfr_init2 (z, 110); ++ inex = mpfr_strtofr (fp, num, NULL, 10, MPFR_RNDN); ++ MPFR_ASSERTN(inex == 0); ++ mpfr_set_str_binary (z, "10001100001000010011110110011101101001010000001011011110010001010100010100100110111101000010001011001100001101E-9"); ++ MPFR_ASSERTN(mpfr_equal_p (fp, z)); ++ mpfr_clear (fp); ++ mpfr_clear (z); ++} ++ + int + main (int argc, char *argv[]) + { +@@ -1205,6 +1223,7 @@ + test20100310 (); + bug20120814 (); + bug20120829 (); ++ bug20161217 (); + + tests_end_mpfr (); + return 0; diff --git a/dev-libs/mpfr/mpfr-3.1.5.ebuild b/dev-libs/mpfr/mpfr-3.1.5.ebuild deleted file mode 100644 index 7ef9311fa8e0..000000000000 --- a/dev-libs/mpfr/mpfr-3.1.5.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -# NOTE: we cannot depend on autotools here starting with gcc-4.3.x -inherit eutils libtool multilib-minimal - -MY_PV=${PV/_p*} -MY_P=${PN}-${MY_PV} -PLEVEL=${PV/*p} -DESCRIPTION="library for multiple-precision floating-point computations with exact rounding" -HOMEPAGE="http://www.mpfr.org/" -SRC_URI="http://www.mpfr.org/mpfr-${MY_PV}/${MY_P}.tar.xz" - -LICENSE="LGPL-2.1" -SLOT="0/4" # libmpfr.so version -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="static-libs" - -RDEPEND=">=dev-libs/gmp-4.1.4-r2[${MULTILIB_USEDEP},static-libs?]" -DEPEND="${RDEPEND}" - -S=${WORKDIR}/${MY_P} - -src_prepare() { - if [[ ${PLEVEL} != ${PV} ]] ; then - local i - for (( i = 1; i <= PLEVEL; ++i )) ; do - epatch "${FILESDIR}"/${MY_PV}/patch$(printf '%02d' ${i}) - done - fi - epatch_user - find . -type f -exec touch -r configure {} + - elibtoolize -} - -multilib_src_configure() { - # Make sure mpfr doesn't go probing toolchains it shouldn't #476336#19 - ECONF_SOURCE=${S} \ - user_redefine_cc=yes \ - econf \ - --docdir="\$(datarootdir)/doc/${PF}" \ - $(use_enable static-libs static) -} - -multilib_src_install_all() { - use static-libs || find "${ED}"/usr -name '*.la' -delete - - # clean up html/license install - pushd "${ED}"/usr/share/doc/${PF} >/dev/null || die - dohtml *.html && rm COPYING* *.html - popd >/dev/null || die -} diff --git a/dev-libs/mpfr/mpfr-3.1.5_p2.ebuild b/dev-libs/mpfr/mpfr-3.1.5_p2.ebuild new file mode 100644 index 000000000000..7ef9311fa8e0 --- /dev/null +++ b/dev-libs/mpfr/mpfr-3.1.5_p2.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +# NOTE: we cannot depend on autotools here starting with gcc-4.3.x +inherit eutils libtool multilib-minimal + +MY_PV=${PV/_p*} +MY_P=${PN}-${MY_PV} +PLEVEL=${PV/*p} +DESCRIPTION="library for multiple-precision floating-point computations with exact rounding" +HOMEPAGE="http://www.mpfr.org/" +SRC_URI="http://www.mpfr.org/mpfr-${MY_PV}/${MY_P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0/4" # libmpfr.so version +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="static-libs" + +RDEPEND=">=dev-libs/gmp-4.1.4-r2[${MULTILIB_USEDEP},static-libs?]" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + if [[ ${PLEVEL} != ${PV} ]] ; then + local i + for (( i = 1; i <= PLEVEL; ++i )) ; do + epatch "${FILESDIR}"/${MY_PV}/patch$(printf '%02d' ${i}) + done + fi + epatch_user + find . -type f -exec touch -r configure {} + + elibtoolize +} + +multilib_src_configure() { + # Make sure mpfr doesn't go probing toolchains it shouldn't #476336#19 + ECONF_SOURCE=${S} \ + user_redefine_cc=yes \ + econf \ + --docdir="\$(datarootdir)/doc/${PF}" \ + $(use_enable static-libs static) +} + +multilib_src_install_all() { + use static-libs || find "${ED}"/usr -name '*.la' -delete + + # clean up html/license install + pushd "${ED}"/usr/share/doc/${PF} >/dev/null || die + dohtml *.html && rm COPYING* *.html + popd >/dev/null || die +} -- cgit v1.2.3-65-gdbad