summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-10-06 22:49:45 +0000
committerMike Frysinger <vapier@gentoo.org>2007-10-06 22:49:45 +0000
commit412b5931240f680a8318b340280e2c43c39cfa98 (patch)
treed84d130b5e4f648ab113d24266cc123a0b57a07b /dev-libs/mpfr
parentfix missing unpack. close 194910. (diff)
downloadgentoo-2-412b5931240f680a8318b340280e2c43c39cfa98.tar.gz
gentoo-2-412b5931240f680a8318b340280e2c43c39cfa98.tar.bz2
gentoo-2-412b5931240f680a8318b340280e2c43c39cfa98.zip
Version bump #193893.
(Portage version: 2.1.3.11)
Diffstat (limited to 'dev-libs/mpfr')
-rw-r--r--dev-libs/mpfr/ChangeLog8
-rw-r--r--dev-libs/mpfr/files/2.3.0/patch0183
-rw-r--r--dev-libs/mpfr/files/2.3.0/patch02140
-rw-r--r--dev-libs/mpfr/files/2.3.0/patch0396
-rw-r--r--dev-libs/mpfr/files/digest-mpfr-2.3.0_p33
-rw-r--r--dev-libs/mpfr/mpfr-2.3.0_p3.ebuild53
6 files changed, 382 insertions, 1 deletions
diff --git a/dev-libs/mpfr/ChangeLog b/dev-libs/mpfr/ChangeLog
index 52bcf5c4e555..dd7d8ca2e5a8 100644
--- a/dev-libs/mpfr/ChangeLog
+++ b/dev-libs/mpfr/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/mpfr
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/mpfr/ChangeLog,v 1.55 2007/08/25 17:35:22 beandog Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/mpfr/ChangeLog,v 1.56 2007/10/06 22:49:44 vapier Exp $
+
+*mpfr-2.3.0_p3 (06 Oct 2007)
+
+ 06 Oct 2007; Mike Frysinger <vapier@gentoo.org> +files/2.3.0/patch01,
+ +files/2.3.0/patch02, +files/2.3.0/patch03, +mpfr-2.3.0_p3.ebuild:
+ Version bump #193893.
25 Aug 2007; Steve Dibb <beandog@gentoo.org> mpfr-2.2.1_p5.ebuild:
amd64 stable
diff --git a/dev-libs/mpfr/files/2.3.0/patch01 b/dev-libs/mpfr/files/2.3.0/patch01
new file mode 100644
index 000000000000..f31505aed7c6
--- /dev/null
+++ b/dev-libs/mpfr/files/2.3.0/patch01
@@ -0,0 +1,83 @@
+diff -Naurd mpfr-2.3.0-a/Makefile.am mpfr-2.3.0-b/Makefile.am
+--- mpfr-2.3.0-a/Makefile.am 2007-08-29 10:18:11.000000000 +0000
++++ mpfr-2.3.0-b/Makefile.am 2007-09-02 23:19:32.000000000 +0000
+@@ -32,8 +32,13 @@
+
+ MAKEINFOFLAGS = --enable-encoding
+
+-get_patches.c: PATCHES get_patches.sh
+- ./get_patches.sh > $@ || rm -f $@
++# Important note: If for some reason, srcdir is read-only at build time
++# (and you use objdir != srcdir), then you need to rebuild get_patches.c
++# (with "make get_patches.c") just after patching the MPFR source. This
++# should not be a problem in practice, in particular because "make dist"
++# automatically rebuilds get_patches.c before generating the archives.
++$(srcdir)/get_patches.c: PATCHES get_patches.sh
++ (cd $(srcdir) && ./get_patches.sh) > $@ || rm -f $@
+
+ # Do not add get_patches.c to CLEANFILES so that this file doesn't
+ # need to be (re)built as long as no patches are applied. Anyway the
+diff -Naurd mpfr-2.3.0-a/Makefile.in mpfr-2.3.0-b/Makefile.in
+--- mpfr-2.3.0-a/Makefile.in 2007-08-29 10:27:18.000000000 +0000
++++ mpfr-2.3.0-b/Makefile.in 2007-09-02 23:59:30.000000000 +0000
+@@ -1665,8 +1665,13 @@
+ uninstall-info-am uninstall-libLTLIBRARIES
+
+
+-get_patches.c: PATCHES get_patches.sh
+- ./get_patches.sh > $@ || rm -f $@
++# Important note: If for some reason, srcdir is read-only at build time
++# (and you use objdir != srcdir), then you need to rebuild get_patches.c
++# (with "make get_patches.c") just after patching the MPFR source. This
++# should not be a problem in practice, in particular because "make dist"
++# automatically rebuilds get_patches.c before generating the archives.
++$(srcdir)/get_patches.c: PATCHES get_patches.sh
++ (cd $(srcdir) && ./get_patches.sh) > $@ || rm -f $@
+
+ tune:
+ $(MAKE) $(AM_MAKEFLAGS) tuneup$(EXEEXT)
+diff -Naurd mpfr-2.3.0-a/PATCHES mpfr-2.3.0-b/PATCHES
+--- mpfr-2.3.0-a/PATCHES 2007-08-29 10:18:11.000000000 +0000
++++ mpfr-2.3.0-b/PATCHES 2007-09-02 23:59:50.000000000 +0000
+@@ -0,0 +1 @@
++get_patches
+diff -Naurd mpfr-2.3.0-a/VERSION mpfr-2.3.0-b/VERSION
+--- mpfr-2.3.0-a/VERSION 2007-08-29 10:18:11.000000000 +0000
++++ mpfr-2.3.0-b/VERSION 2007-09-02 23:55:55.000000000 +0000
+@@ -1 +1 @@
+-2.3.0
++2.3.0-p1
+diff -Naurd mpfr-2.3.0-a/mpfr.h mpfr-2.3.0-b/mpfr.h
+--- mpfr-2.3.0-a/mpfr.h 2007-08-29 10:18:11.000000000 +0000
++++ mpfr-2.3.0-b/mpfr.h 2007-09-02 23:55:55.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 2
+ #define MPFR_VERSION_MINOR 3
+ #define MPFR_VERSION_PATCHLEVEL 0
+-#define MPFR_VERSION_STRING "2.3.0"
++#define MPFR_VERSION_STRING "2.3.0-p1"
+
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-2.3.0-a/tests/tversion.c mpfr-2.3.0-b/tests/tversion.c
+--- mpfr-2.3.0-a/tests/tversion.c 2007-08-29 10:18:10.000000000 +0000
++++ mpfr-2.3.0-b/tests/tversion.c 2007-09-02 23:55:55.000000000 +0000
+@@ -46,7 +46,7 @@
+ version = mpfr_get_version ();
+
+ /* This test is disabled when a suffix (e.g. -dev) has been defined. */
+-#if 1
++#if 0
+ sprintf (buffer, "%d.%d.%d", MPFR_VERSION_MAJOR, MPFR_VERSION_MINOR,
+ MPFR_VERSION_PATCHLEVEL);
+ if (strcmp (buffer, version) != 0)
+diff -Naurd mpfr-2.3.0-a/version.c mpfr-2.3.0-b/version.c
+--- mpfr-2.3.0-a/version.c 2007-08-29 10:18:11.000000000 +0000
++++ mpfr-2.3.0-b/version.c 2007-09-02 23:55:55.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+- return "2.3.0";
++ return "2.3.0-p1";
+ }
diff --git a/dev-libs/mpfr/files/2.3.0/patch02 b/dev-libs/mpfr/files/2.3.0/patch02
new file mode 100644
index 000000000000..79374c81e192
--- /dev/null
+++ b/dev-libs/mpfr/files/2.3.0/patch02
@@ -0,0 +1,140 @@
+diff -Naurd mpfr-2.3.0-a/PATCHES mpfr-2.3.0-b/PATCHES
+--- mpfr-2.3.0-a/PATCHES 2007-08-29 10:18:11.000000000 +0000
++++ mpfr-2.3.0-b/PATCHES 2007-09-03 00:03:46.000000000 +0000
+@@ -0,0 +1 @@
++mpfr_acosh
+diff -Naurd mpfr-2.3.0-a/VERSION mpfr-2.3.0-b/VERSION
+--- mpfr-2.3.0-a/VERSION 2007-09-02 23:55:55.000000000 +0000
++++ mpfr-2.3.0-b/VERSION 2007-09-03 00:02:12.000000000 +0000
+@@ -1 +1 @@
+-2.3.0-p1
++2.3.0-p2
+diff -Naurd mpfr-2.3.0-a/acosh.c mpfr-2.3.0-b/acosh.c
+--- mpfr-2.3.0-a/acosh.c 2007-08-29 10:18:11.000000000 +0000
++++ mpfr-2.3.0-b/acosh.c 2007-08-31 17:20:08.000000000 +0000
+@@ -73,7 +73,7 @@
+ /* Declaration of the size variables */
+ mp_prec_t Ny = MPFR_PREC(y); /* Precision of output variable */
+ mp_prec_t Nt; /* Precision of the intermediary variable */
+- mp_exp_t err, exp_te, exp_ti; /* Precision of error */
++ mp_exp_t err, exp_te, d; /* Precision of error */
+ MPFR_ZIV_DECL (loop);
+
+ /* compute the precision of intermediary variable */
+@@ -91,13 +91,35 @@
+ mpfr_mul (t, x, x, GMP_RNDD); /* x^2 */
+ exp_te = MPFR_GET_EXP (t);
+ mpfr_sub_ui (t, t, 1, GMP_RNDD); /* x^2-1 */
+- exp_ti = MPFR_GET_EXP (t);
+- mpfr_sqrt (t, t, GMP_RNDN); /* sqrt(x^2-1) */
+- mpfr_add (t, t, x, GMP_RNDN); /* sqrt(x^2-1)+x */
+- mpfr_log (t, t, GMP_RNDN); /* ln(sqrt(x^2-1)+x)*/
++ if (MPFR_UNLIKELY (MPFR_IS_ZERO (t)))
++ {
++ mpfr_t z;
++
++ /* This means that x is very close to 1: x = 1 + z with
++ z < 2^(-Nt). Instead of increasing the precision, let's
++ compute x^2-1 by (x+1)(x-1) with an accuracy of about
++ Nt bits. */
++ mpfr_init2 (z, Nt);
++ mpfr_add_ui (t, x, 1, GMP_RNDD);
++ mpfr_sub_ui (z, x, 1, GMP_RNDD);
++ mpfr_mul (t, t, z, GMP_RNDD);
++ d = 2;
++ mpfr_sqrt (t, t, GMP_RNDN); /* sqrt(x^2-1) */
++ mpfr_add (t, t, z, GMP_RNDN); /* sqrt(x^2-1)+z */
++ mpfr_clear (z);
++ mpfr_log1p (t, t, GMP_RNDN); /* log1p(sqrt(x^2-1)+z) */
++ }
++ else
++ {
++ d = exp_te - MPFR_GET_EXP (t);
++ d = MAX (1, d);
++ mpfr_sqrt (t, t, GMP_RNDN); /* sqrt(x^2-1) */
++ mpfr_add (t, t, x, GMP_RNDN); /* sqrt(x^2-1)+x */
++ mpfr_log (t, t, GMP_RNDN); /* ln(sqrt(x^2-1)+x) */
++ }
+
+ /* error estimate -- see algorithms.tex */
+- err = 3 + MAX (1, exp_te - exp_ti) - MPFR_GET_EXP(t);
++ err = 3 + d - MPFR_GET_EXP (t);
+ /* error is bounded by 1/2 + 2^err <= 2^(1+max(-1,err)) */
+ err = 1 + MAX (-1, err);
+ if (MPFR_LIKELY (MPFR_CAN_ROUND (t, Nt - err, Ny, rnd_mode)))
+@@ -117,9 +139,3 @@
+ MPFR_SAVE_EXPO_FREE (expo);
+ return mpfr_check_range (y, inexact, rnd_mode);
+ }
+-
+-
+-
+-
+-
+-
+diff -Naurd mpfr-2.3.0-a/mpfr.h mpfr-2.3.0-b/mpfr.h
+--- mpfr-2.3.0-a/mpfr.h 2007-09-02 23:55:55.000000000 +0000
++++ mpfr-2.3.0-b/mpfr.h 2007-09-03 00:02:12.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 2
+ #define MPFR_VERSION_MINOR 3
+ #define MPFR_VERSION_PATCHLEVEL 0
+-#define MPFR_VERSION_STRING "2.3.0-p1"
++#define MPFR_VERSION_STRING "2.3.0-p2"
+
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-2.3.0-a/tests/tacosh.c mpfr-2.3.0-b/tests/tacosh.c
+--- mpfr-2.3.0-a/tests/tacosh.c 2007-08-29 10:18:10.000000000 +0000
++++ mpfr-2.3.0-b/tests/tacosh.c 2007-08-31 17:20:00.000000000 +0000
+@@ -123,12 +123,40 @@
+ mpfr_clear (y);
+ }
+
++/* With MPFR 2.3.0, this yields an assertion failure in mpfr_acosh. */
++static void
++bug20070831 (void)
++{
++ mpfr_t x, y, z;
++ int inex;
++
++ mpfr_init2 (x, 256);
++ mpfr_init2 (y, 32);
++ mpfr_init2 (z, 32);
++ mpfr_set_ui (x, 1, GMP_RNDN);
++ mpfr_nextabove (x);
++ inex = mpfr_acosh (y, x, GMP_RNDZ);
++ mpfr_set_ui_2exp (z, 1, -127, GMP_RNDN);
++ mpfr_nextbelow (z);
++ MPFR_ASSERTN (inex < 0);
++ if (!mpfr_equal_p (y, z))
++ {
++ printf ("Error in bug20070831:\nexpected ");
++ mpfr_dump (z);
++ printf ("got ");
++ mpfr_dump (y);
++ exit (1);
++ }
++ mpfr_clears (x, y, z, (void *) 0);
++}
++
+ int
+ main (int argc, char *argv[])
+ {
+ tests_start_mpfr ();
+
+ special ();
++ bug20070831 ();
+
+ test_generic (2, 100, 25);
+
+diff -Naurd mpfr-2.3.0-a/version.c mpfr-2.3.0-b/version.c
+--- mpfr-2.3.0-a/version.c 2007-09-02 23:55:55.000000000 +0000
++++ mpfr-2.3.0-b/version.c 2007-09-03 00:02:12.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+- return "2.3.0-p1";
++ return "2.3.0-p2";
+ }
diff --git a/dev-libs/mpfr/files/2.3.0/patch03 b/dev-libs/mpfr/files/2.3.0/patch03
new file mode 100644
index 000000000000..497b354770e3
--- /dev/null
+++ b/dev-libs/mpfr/files/2.3.0/patch03
@@ -0,0 +1,96 @@
+diff -Naurd mpfr-2.3.0-a/PATCHES mpfr-2.3.0-b/PATCHES
+--- mpfr-2.3.0-a/PATCHES 2007-10-05 12:20:54.000000000 +0000
++++ mpfr-2.3.0-b/PATCHES 2007-10-05 12:21:12.000000000 +0000
+@@ -0,0 +1 @@
++mpfr_atan2
+diff -Naurd mpfr-2.3.0-a/VERSION mpfr-2.3.0-b/VERSION
+--- mpfr-2.3.0-a/VERSION 2007-09-03 00:02:12.000000000 +0000
++++ mpfr-2.3.0-b/VERSION 2007-10-05 12:21:06.000000000 +0000
+@@ -1 +1 @@
+-2.3.0-p2
++2.3.0-p3
+diff -Naurd mpfr-2.3.0-a/atan2.c mpfr-2.3.0-b/atan2.c
+--- mpfr-2.3.0-a/atan2.c 2007-08-29 10:18:11.000000000 +0000
++++ mpfr-2.3.0-b/atan2.c 2007-10-05 12:21:01.000000000 +0000
+@@ -170,6 +170,7 @@
+ /* use atan2(y,x) = atan(y/x) */
+ for (;;)
+ {
++ mpfr_clear_flags ();
+ if (mpfr_div (tmp, y, x, GMP_RNDN) == 0)
+ {
+ /* Result is exact. */
+diff -Naurd mpfr-2.3.0-a/mpfr.h mpfr-2.3.0-b/mpfr.h
+--- mpfr-2.3.0-a/mpfr.h 2007-09-03 00:02:12.000000000 +0000
++++ mpfr-2.3.0-b/mpfr.h 2007-10-05 12:21:06.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 2
+ #define MPFR_VERSION_MINOR 3
+ #define MPFR_VERSION_PATCHLEVEL 0
+-#define MPFR_VERSION_STRING "2.3.0-p2"
++#define MPFR_VERSION_STRING "2.3.0-p3"
+
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-2.3.0-a/tests/tatan.c mpfr-2.3.0-b/tests/tatan.c
+--- mpfr-2.3.0-a/tests/tatan.c 2007-08-29 10:18:10.000000000 +0000
++++ mpfr-2.3.0-b/tests/tatan.c 2007-10-05 12:21:01.000000000 +0000
+@@ -405,6 +405,40 @@
+ mpfr_clears (a, x, y, (void *) 0);
+ }
+
++/* Bug found by Robert Bajema (regression in MPFR 2.3.0).
++ The cause is the underflow flag set before the mpfr_atan2 call. */
++static void
++atan2_bug_20071003 (void)
++{
++ mpfr_t a, x, y, z;
++
++ mpfr_inits (a, x, y, z, (void *) 0);
++
++ mpfr_set_underflow ();
++ mpfr_set_str_binary (y,
++ "-0.10100110110100110111010110111111100110100010001110110E2");
++ mpfr_set_str_binary (x,
++ "0.10100101010110010100010010111000110110011110001011110E3");
++ mpfr_set_str_binary (z,
++ "-0.11101111001101101100111011001101000010010111101110110E-1");
++ mpfr_atan2 (a, y, x, GMP_RNDN);
++ if (! mpfr_equal_p (a, z))
++ {
++ printf ("mpfr_atan2 fails on:\n");
++ printf (" y = ");
++ mpfr_dump (y);
++ printf (" x = ");
++ mpfr_dump (x);
++ printf ("Expected ");
++ mpfr_dump (z);
++ printf ("Got ");
++ mpfr_dump (a);
++ exit (1);
++ }
++
++ mpfr_clears (a, x, y, z, (void *) 0);
++}
++
+ int
+ main (int argc, char *argv[])
+ {
+@@ -414,6 +448,7 @@
+ special ();
+ special_atan2 ();
+ smallvals_atan2 ();
++ atan2_bug_20071003 ();
+
+ test_generic_atan (2, 200, 17);
+ test_generic_atan2 (2, 200, 17);
+diff -Naurd mpfr-2.3.0-a/version.c mpfr-2.3.0-b/version.c
+--- mpfr-2.3.0-a/version.c 2007-09-03 00:02:12.000000000 +0000
++++ mpfr-2.3.0-b/version.c 2007-10-05 12:21:06.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+- return "2.3.0-p2";
++ return "2.3.0-p3";
+ }
diff --git a/dev-libs/mpfr/files/digest-mpfr-2.3.0_p3 b/dev-libs/mpfr/files/digest-mpfr-2.3.0_p3
new file mode 100644
index 000000000000..d0b9fb695708
--- /dev/null
+++ b/dev-libs/mpfr/files/digest-mpfr-2.3.0_p3
@@ -0,0 +1,3 @@
+MD5 cf7c743e4be122e63eb6f372fc58b657 mpfr-2.3.0.tar.bz2 872947
+RMD160 ec0fdd2a49d894c3b09b3909ad73539cdadb3f3c mpfr-2.3.0.tar.bz2 872947
+SHA256 359f0d344f92d1f145ddcd37adf54f9b8069aa2ce89c4a19603d080ef17d2d48 mpfr-2.3.0.tar.bz2 872947
diff --git a/dev-libs/mpfr/mpfr-2.3.0_p3.ebuild b/dev-libs/mpfr/mpfr-2.3.0_p3.ebuild
new file mode 100644
index 000000000000..311f0646d4f4
--- /dev/null
+++ b/dev-libs/mpfr/mpfr-2.3.0_p3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/mpfr/mpfr-2.3.0_p3.ebuild,v 1.1 2007/10/06 22:49:44 vapier Exp $
+
+# NOTE: we cannot depend on autotools here starting with gcc-4.3.x
+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"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=">=dev-libs/gmp-4.1.4-r2"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack "${MY_P}.tar.bz2"
+ cd "${S}"
+ [[ ${PLEVEL} == ${PV} ]] && return 0
+ 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}-${MY_PV}_p${i} ]] ; then
+ epatch "${DISTDIR}"/${PN}-${MY_PV}_p${i}
+ else
+ ewarn "${DISTDIR}/${PN}-${MY_PV}_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() {
+ emake install DESTDIR="${D}" || die
+ dodoc AUTHORS BUGS ChangeLog NEWS README TODO
+ dohtml *.html
+}