diff options
author | Daniel Black <dragonheart@gentoo.org> | 2006-01-22 06:59:38 +0000 |
---|---|---|
committer | Daniel Black <dragonheart@gentoo.org> | 2006-01-22 06:59:38 +0000 |
commit | 8fab8a512b505ff96ec4442a8466acda353cd22e (patch) | |
tree | 8c7868a0cc55f1df2b667f9af1fce3b3c58e4126 /dev-libs | |
parent | version bump (diff) | |
download | gentoo-2-8fab8a512b505ff96ec4442a8466acda353cd22e.tar.gz gentoo-2-8fab8a512b505ff96ec4442a8466acda353cd22e.tar.bz2 gentoo-2-8fab8a512b505ff96ec4442a8466acda353cd22e.zip |
patch bump
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/mpfr/ChangeLog | 8 | ||||
-rw-r--r-- | dev-libs/mpfr/Manifest | 13 | ||||
-rw-r--r-- | dev-libs/mpfr/files/2.2.0/patch08 | 286 | ||||
-rw-r--r-- | dev-libs/mpfr/files/digest-mpfr-2.2.0_p8 | 2 | ||||
-rw-r--r-- | dev-libs/mpfr/mpfr-2.2.0_p8.ebuild | 52 |
5 files changed, 350 insertions, 11 deletions
diff --git a/dev-libs/mpfr/ChangeLog b/dev-libs/mpfr/ChangeLog index 8b111e2896b3..e6afc6bb8a2a 100644 --- a/dev-libs/mpfr/ChangeLog +++ b/dev-libs/mpfr/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-libs/mpfr # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/mpfr/ChangeLog,v 1.8 2006/01/07 01:26:58 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/mpfr/ChangeLog,v 1.9 2006/01/22 06:59:38 dragonheart Exp $ + +*mpfr-2.2.0_p8 (22 Jan 2006) + + 22 Jan 2006; Daniel Black <dragonheart@gentoo.org> +files/2.2.0/patch08, + +mpfr-2.2.0_p8.ebuild: + patch bump 07 Jan 2006; Daniel Black <dragonheart@gentoo.org> mpfr-2.2.0_p7.ebuild: opps did not mean to commit 390 to stable - marked ~s390 diff --git a/dev-libs/mpfr/Manifest b/dev-libs/mpfr/Manifest index a73fe66085f7..62a3572c8b05 100644 --- a/dev-libs/mpfr/Manifest +++ b/dev-libs/mpfr/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 cb22dc85bbd740f20b155547bec0b671 ChangeLog 1231 MD5 8104d29f4f544ed24fc54349b3c50968 files/2.2.0/patch01 1248 MD5 34ae93cd0ed0b3adcb49cfdc68c18b75 files/2.2.0/patch02 2177 @@ -8,15 +5,11 @@ MD5 a7af9750238fdf49c8dffcf151f57049 files/2.2.0/patch03 407 MD5 2244e0aef66bc63773899b1758b8e812 files/2.2.0/patch04 811 MD5 a8925f41bbdfe0bbf5318e47ce50a160 files/2.2.0/patch06 835 MD5 8b51f44fc908bad70ea0d458bac47fb9 files/2.2.0/patch07 1651 +MD5 ff52eac4c54118dd55af7757dc8f8f9b files/2.2.0/patch08 8610 MD5 f6dac72eea74ed7475bfcb5461ebe3af files/digest-mpfr-2.2.0_p4 63 MD5 868ae437254277cb5364323564dc124d files/digest-mpfr-2.2.0_p7 120 +MD5 868ae437254277cb5364323564dc124d files/digest-mpfr-2.2.0_p8 120 MD5 567094e03359ffc1c95af7356395228d metadata.xml 162 MD5 69440ff8d7609c44fc1569e999970150 mpfr-2.2.0_p4.ebuild 988 MD5 b15a5383135e4e213d444120c011b321 mpfr-2.2.0_p7.ebuild 1316 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2-ecc0.1.6 (GNU/Linux) - -iD8DBQFDvx/LmdTrptrqvGERAmGoAJwIEOtBk++39rUCKfASQUYs/PUN9wCeI+k8 -LhnA/JzLIink8jSXZYHSGEQ= -=0tYJ ------END PGP SIGNATURE----- +MD5 b15a5383135e4e213d444120c011b321 mpfr-2.2.0_p8.ebuild 1316 diff --git a/dev-libs/mpfr/files/2.2.0/patch08 b/dev-libs/mpfr/files/2.2.0/patch08 new file mode 100644 index 000000000000..37447c83fd6f --- /dev/null +++ b/dev-libs/mpfr/files/2.2.0/patch08 @@ -0,0 +1,286 @@ +diff -Naurd mpfr-2.2.0-p7/get_f.c mpfr-2.2.0-p8/get_f.c +--- mpfr-2.2.0-p7/get_f.c 2005-06-08 09:53:48.000000000 +0000 ++++ mpfr-2.2.0-p8/get_f.c 2006-01-13 15:04:34.000000000 +0000 +@@ -1,6 +1,6 @@ + /* mpfr_get_f -- convert a MPFR number to a GNU MPF number + +-Copyright 2005 Free Software Foundation, Inc. ++Copyright 2005, 2006 Free Software Foundation, Inc. + + This file is part of the MPFR Library. + +@@ -27,8 +27,9 @@ + int + mpfr_get_f (mpf_ptr x, mpfr_srcptr y, mp_rnd_t rnd_mode) + { +- unsigned long sx, sy, precx, precy, sh; +- mp_exp_t ey; ++ mp_size_t sx, sy; ++ mp_prec_t precx, precy; ++ int sh; + + if (MPFR_UNLIKELY(MPFR_IS_SINGULAR(y))) + { +@@ -44,20 +45,18 @@ + sx = PREC(x); /* number of limbs of the mantissa of x */ + + precy = MPFR_PREC(y); +- precx = sx * BITS_PER_MP_LIMB; +- sy = 1 + (MPFR_PREC(y) - 1) / BITS_PER_MP_LIMB; ++ precx = (mp_prec_t) sx * BITS_PER_MP_LIMB; ++ sy = MPFR_LIMB_SIZE (y); + + /* since mpf numbers are represented in base 2^BITS_PER_MP_LIMB, + we loose -EXP(y) % BITS_PER_MP_LIMB bits in the most significant limb */ +- ey = MPFR_GET_EXP(y) % BITS_PER_MP_LIMB; +- if (ey <= 0) +- sh = (unsigned long) (-ey); +- else /* 0 < ey < BITS_PER_MP_LIMB */ +- sh = BITS_PER_MP_LIMB - (unsigned long) ey; ++ sh = MPFR_GET_EXP(y) % BITS_PER_MP_LIMB; ++ sh = sh <= 0 ? - sh : BITS_PER_MP_LIMB - sh; ++ MPFR_ASSERTD (sh >= 0); + if (precy + sh <= precx) /* we can copy directly */ + { +- /* necessarily sy <= sx */ +- if (sh) ++ MPFR_ASSERTN (sx >= sy); ++ if (sh != 0) + mpn_rshift (PTR(x) + sx - sy, MPFR_MANT(y), sy, sh); + else + MPN_COPY (PTR(x) + sx - sy, MPFR_MANT(y), sy); +@@ -68,17 +67,17 @@ + else /* we have to round to precx - sh bits */ + { + mpfr_t z; +- unsigned long sz; ++ mp_size_t sz; + + mpfr_init2 (z, precx - sh); +- sz = 1 + (MPFR_PREC(z) - 1) / BITS_PER_MP_LIMB; ++ sz = MPFR_LIMB_SIZE (z); + mpfr_set (z, y, rnd_mode); + /* warning, sh may change due to rounding, but then z is a power of two, + thus we can safely ignore its last bit which is 0 */ +- ey = MPFR_GET_EXP(z) % BITS_PER_MP_LIMB; +- sh = (ey <= 0) ? (unsigned long) (-ey) +- : BITS_PER_MP_LIMB - (unsigned long) ey; +- if (sh) ++ sh = MPFR_GET_EXP(z) % BITS_PER_MP_LIMB; ++ sh = sh <= 0 ? - sh : BITS_PER_MP_LIMB - sh; ++ MPFR_ASSERTD (sh >= 0); ++ if (sh != 0) + mpn_rshift (PTR(x) + sx - sz, MPFR_MANT(z), sz, sh); + else + MPN_COPY (PTR(x) + sx - sz, MPFR_MANT(z), sz); +diff -Naurd mpfr-2.2.0-p7/set_f.c mpfr-2.2.0-p8/set_f.c +--- mpfr-2.2.0-p7/set_f.c 2005-08-18 16:35:13.000000000 +0000 ++++ mpfr-2.2.0-p8/set_f.c 2006-01-12 10:34:40.000000000 +0000 +@@ -1,6 +1,6 @@ + /* mpfr_set_f -- set a MPFR number from a GNU MPF number + +-Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + + This file is part of the MPFR Library. + +@@ -80,7 +80,22 @@ + inexact = 0; + } + +- MPFR_SET_EXP(y, EXP(x) * BITS_PER_MP_LIMB - cnt + carry); ++ /* warning: EXP(x) * BITS_PER_MP_LIMB may exceed the maximal exponent */ ++ if (EXP(x) > 1 + (__gmpfr_emax - 1) / BITS_PER_MP_LIMB) ++ { ++ /* EXP(x) >= 2 + floor((__gmpfr_emax-1)/BITS_PER_MP_LIMB) ++ EXP(x) >= 2 + (__gmpfr_emax - BITS_PER_MP_LIMB) / BITS_PER_MP_LIMB ++ >= 1 + __gmpfr_emax / BITS_PER_MP_LIMB ++ EXP(x) * BITS_PER_MP_LIMB >= __gmpfr_emax + BITS_PER_MP_LIMB ++ Since 0 <= cnt <= BITS_PER_MP_LIMB-1, and 0 <= carry <= 1, ++ we have then EXP(x) * BITS_PER_MP_LIMB - cnt + carry > __gmpfr_emax */ ++ return mpfr_overflow (y, rnd_mode, MPFR_SIGN (y)); ++ } ++ else ++ { ++ /* Do not use MPFR_SET_EXP as the exponent may be out of range. */ ++ MPFR_EXP (y) = EXP (x) * BITS_PER_MP_LIMB - (mp_exp_t) cnt + carry; ++ } + +- return inexact; ++ return mpfr_check_range (y, inexact, rnd_mode); + } +diff -Naurd mpfr-2.2.0-p7/tests/tget_f.c mpfr-2.2.0-p8/tests/tget_f.c +--- mpfr-2.2.0-p7/tests/tget_f.c 2005-06-02 16:12:04.000000000 +0000 ++++ mpfr-2.2.0-p8/tests/tget_f.c 2006-01-13 15:05:14.000000000 +0000 +@@ -1,6 +1,6 @@ + /* Test file for mpfr_get_f. + +-Copyright 2005 Free Software Foundation, Inc. ++Copyright 2005, 2006 Free Software Foundation, Inc. + + This file is part of the MPFR Library. + +@@ -22,6 +22,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <time.h> ++#include <limits.h> + + #include "mpfr-test.h" + +@@ -31,6 +32,7 @@ + mpf_t x; + mpfr_t y; + unsigned long i; ++ mp_exp_t e; + + MPFR_TEST_USE_RANDS (); + tests_start_mpfr (); +@@ -83,11 +85,14 @@ + printf ("Error: mpfr_get_f(%lu) fails\n", i); + exit (1); + } +- mpfr_set_si (y, (signed long) -i, GMP_RNDN); +- if (mpfr_get_f (x, y, GMP_RNDN) || mpf_cmp_si (x, (signed long) -i)) ++ if (i <= - (unsigned long) LONG_MIN) + { +- printf ("Error: mpfr_get_f(-%lu) fails\n", i); +- exit (1); ++ mpfr_set_si (y, - (long) i, GMP_RNDN); ++ if (mpfr_get_f (x, y, GMP_RNDN) || mpf_cmp_si (x, - (long) i)) ++ { ++ printf ("Error: mpfr_get_f(-%lu) fails\n", i); ++ exit (1); ++ } + } + i *= 2; + } +@@ -113,6 +118,42 @@ + i *= 2; + } + ++ /* bug reported by Jim White */ ++ for (e = 0; e <= 2 * BITS_PER_MP_LIMB; e++) ++ { ++ /* test with 2^(-e) */ ++ mpfr_set_ui (y, 1, GMP_RNDN); ++ mpfr_div_2exp (y, y, e, GMP_RNDN); ++ mpfr_get_f (x, y, GMP_RNDN); ++ mpf_mul_2exp (x, x, e); ++ if (mpf_cmp_ui (x, 1) != 0) ++ { ++ printf ("Error: mpfr_get_f(x,y,GMP_RNDN) fails\n"); ++ printf ("y="); ++ mpfr_dump (y); ++ printf ("x="); ++ mpf_div_2exp (x, x, e); ++ mpf_dump (x); ++ exit (1); ++ } ++ ++ /* test with 2^(e) */ ++ mpfr_set_ui (y, 1, GMP_RNDN); ++ mpfr_mul_2exp (y, y, e, GMP_RNDN); ++ mpfr_get_f (x, y, GMP_RNDN); ++ mpf_div_2exp (x, x, e); ++ if (mpf_cmp_ui (x, 1) != 0) ++ { ++ printf ("Error: mpfr_get_f(x,y,GMP_RNDN) fails\n"); ++ printf ("y="); ++ mpfr_dump (y); ++ printf ("x="); ++ mpf_mul_2exp (x, x, e); ++ mpf_dump (x); ++ exit (1); ++ } ++ } ++ + mpfr_clear (y); + mpf_clear (x); + +diff -Naurd mpfr-2.2.0-p7/tests/tset_f.c mpfr-2.2.0-p8/tests/tset_f.c +--- mpfr-2.2.0-p7/tests/tset_f.c 2005-09-09 15:18:00.000000000 +0000 ++++ mpfr-2.2.0-p8/tests/tset_f.c 2006-01-12 10:31:42.000000000 +0000 +@@ -1,6 +1,6 @@ + /* Test file for mpfr_set_f. + +-Copyright 1999, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++Copyright 1999, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + + This file is part of the MPFR Library. + +@@ -22,6 +22,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <time.h> ++#include <limits.h> /* for ULONG_MAX */ + + #include "mpfr-test.h" + +@@ -30,6 +31,7 @@ + { + mpfr_t x, u; + mpf_t y, z; ++ mp_exp_t emax; + unsigned long k, pr; + int r, inexact; + +@@ -87,8 +89,6 @@ + } + MPFR_ASSERTN(mpfr_cmp_ui_2exp (x, 1, 901) == 0); + +- mpfr_clear (u); +- + for (k = 1; k <= 100000; k++) + { + pr = 2 + (randlimb () & 255); +@@ -131,7 +131,49 @@ + mpf_mul_2exp (y, y, 1); + } + ++ mpf_set_ui (y, 1); ++ mpf_mul_2exp (y, y, ULONG_MAX); ++ mpfr_set_f (x, y, GMP_RNDN); ++ mpfr_set_ui (u, 1, GMP_RNDN); ++ mpfr_mul_2ui (u, u, ULONG_MAX, GMP_RNDN); ++ if (!mpfr_equal_p (x, u)) ++ { ++ printf ("Error: mpfr_set_f (x, y, GMP_RNDN) for y = 2^ULONG_MAX\n"); ++ exit (1); ++ } ++ ++ emax = mpfr_get_emax (); ++ ++ /* For mpf_mul_2exp, emax must fit in an unsigned long! */ ++ if (emax >= 0 && emax <= ULONG_MAX) ++ { ++ mpf_set_ui (y, 1); ++ mpf_mul_2exp (y, y, emax); ++ mpfr_set_f (x, y, GMP_RNDN); ++ mpfr_set_ui_2exp (u, 1, emax, GMP_RNDN); ++ if (!mpfr_equal_p (x, u)) ++ { ++ printf ("Error: mpfr_set_f (x, y, GMP_RNDN) for y = 2^emax\n"); ++ exit (1); ++ } ++ } ++ ++ /* For mpf_mul_2exp, emax - 1 must fit in an unsigned long! */ ++ if (emax >= 1 && emax - 1 <= ULONG_MAX) ++ { ++ mpf_set_ui (y, 1); ++ mpf_mul_2exp (y, y, emax - 1); ++ mpfr_set_f (x, y, GMP_RNDN); ++ mpfr_set_ui_2exp (u, 1, emax - 1, GMP_RNDN); ++ if (!mpfr_equal_p (x, u)) ++ { ++ printf ("Error: mpfr_set_f (x, y, GMP_RNDN) for y = 2^(emax-1)\n"); ++ exit (1); ++ } ++ } ++ + mpfr_clear (x); ++ mpfr_clear (u); + mpf_clear (y); + mpf_clear (z); + diff --git a/dev-libs/mpfr/files/digest-mpfr-2.2.0_p8 b/dev-libs/mpfr/files/digest-mpfr-2.2.0_p8 new file mode 100644 index 000000000000..caf7ea23d636 --- /dev/null +++ b/dev-libs/mpfr/files/digest-mpfr-2.2.0_p8 @@ -0,0 +1,2 @@ +MD5 1a81f721ee78cb027f6c41a243d3a33d mpfr-2.2.0.tar.bz2 728490 +MD5 5c4db32dfaef7d032e2f359cacebf7ce mpfr-2.2.0_p5 27251 diff --git a/dev-libs/mpfr/mpfr-2.2.0_p8.ebuild b/dev-libs/mpfr/mpfr-2.2.0_p8.ebuild new file mode 100644 index 000000000000..804b858ed84b --- /dev/null +++ b/dev-libs/mpfr/mpfr-2.2.0_p8.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/mpfr/mpfr-2.2.0_p8.ebuild,v 1.1 2006/01/22 06:59:38 dragonheart Exp $ + +inherit eutils + +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-current/${MY_P}.tar.bz2 + mirror://gentoo/mpfr-2.2.0_p5" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="" + +DEPEND=">=dev-libs/gmp-4.1.4-r2" + +S=${WORKDIR}/${MY_P} + +src_unpack() { + unpack "${MY_P}.tar.bz2" + cd "${S}" + for ((i=1; i<=PLEVEL; ++i)) ; do + patch=patch$(printf '%02d' ${i}) + if [ -f "${FILESDIR}/${MY_PV}/${patch}" ]; then + epatch "${FILESDIR}/${MY_PV}/${patch}" + elif [ -f "${DISTDIR}/${PN}-2.2.0_p${i}" ]; then + epatch "${DISTDIR}/${PN}-2.2.0_p${i}" + else + ewarn "${DISTDIR}/${PN}-2.2.0_p${i}" + die "patch ${i} missing - please report to bugs.gentoo.org" + fi + done +} + +src_compile() { + econf \ + --enable-shared \ + --enable-static \ + || die + emake || die +} + +src_install() { + make install DESTDIR="${D}" || die + dodoc AUTHORS BUGS ChangeLog NEWS README TODO + dohtml *.html +} |