diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-10-19 04:19:14 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-10-19 04:19:14 +0000 |
commit | 1e644f45746e6e7d4677d2adfbcce74afa2655e9 (patch) | |
tree | 3660735891644d45d2d382149b04f85c966fd08a | |
parent | Version bump. (diff) | |
download | gentoo-2-1e644f45746e6e7d4677d2adfbcce74afa2655e9.tar.gz gentoo-2-1e644f45746e6e7d4677d2adfbcce74afa2655e9.tar.bz2 gentoo-2-1e644f45746e6e7d4677d2adfbcce74afa2655e9.zip |
split mpfr out from gmp
(Portage version: 2.0.53_rc5)
-rw-r--r-- | dev-libs/mpfr/ChangeLog | 8 | ||||
-rw-r--r-- | dev-libs/mpfr/Manifest | 6 | ||||
-rw-r--r-- | dev-libs/mpfr/files/2.2.0/patch01 | 41 | ||||
-rw-r--r-- | dev-libs/mpfr/files/2.2.0/patch02 | 71 | ||||
-rw-r--r-- | dev-libs/mpfr/files/2.2.0/patch03 | 12 | ||||
-rw-r--r-- | dev-libs/mpfr/files/2.2.0/patch04 | 20 | ||||
-rw-r--r-- | dev-libs/mpfr/files/digest-mpfr-2.2.0_p4 | 1 | ||||
-rw-r--r-- | dev-libs/mpfr/mpfr-2.2.0_p4.ebuild | 43 |
8 files changed, 202 insertions, 0 deletions
diff --git a/dev-libs/mpfr/ChangeLog b/dev-libs/mpfr/ChangeLog new file mode 100644 index 000000000000..201c48fba1c2 --- /dev/null +++ b/dev-libs/mpfr/ChangeLog @@ -0,0 +1,8 @@ +# ChangeLog for dev-libs/mpfr +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/mpfr/ChangeLog,v 1.1 2005/10/19 04:19:14 vapier Exp $ + +*mpfr-2.2.0_p4 (19 Oct 2005) + + 19 Oct 2005; Mike Frysinger <vapier@gentoo.org> : + Initial import. Ebuild submitted by me. diff --git a/dev-libs/mpfr/Manifest b/dev-libs/mpfr/Manifest new file mode 100644 index 000000000000..f4d38560bc21 --- /dev/null +++ b/dev-libs/mpfr/Manifest @@ -0,0 +1,6 @@ +MD5 8104d29f4f544ed24fc54349b3c50968 files/2.2.0/patch01 1248 +MD5 34ae93cd0ed0b3adcb49cfdc68c18b75 files/2.2.0/patch02 2177 +MD5 a7af9750238fdf49c8dffcf151f57049 files/2.2.0/patch03 407 +MD5 2244e0aef66bc63773899b1758b8e812 files/2.2.0/patch04 811 +MD5 f6dac72eea74ed7475bfcb5461ebe3af files/digest-mpfr-2.2.0_p4 63 +MD5 d22bf06e49d8189f84ae5fc4b34de545 mpfr-2.2.0_p4.ebuild 657 diff --git a/dev-libs/mpfr/files/2.2.0/patch01 b/dev-libs/mpfr/files/2.2.0/patch01 new file mode 100644 index 000000000000..7beb6624e5eb --- /dev/null +++ b/dev-libs/mpfr/files/2.2.0/patch01 @@ -0,0 +1,41 @@ +diff -Naurd mpfr-2.2.0/lngamma.c mpfr-2.2.0-p1/lngamma.c +--- mpfr-2.2.0/lngamma.c 2005-09-09 15:17:58.000000000 +0000 ++++ mpfr-2.2.0-p1/lngamma.c 2005-09-29 11:27:04.000000000 +0000 +@@ -167,8 +167,8 @@ + compared = mpfr_cmp_ui (z0, 1); + + #ifndef IS_GAMMA +- if (compared == 0) /* lngamma(1) = +0 */ +- return mpfr_set_ui (y, 0, GMP_RNDN); ++ if (compared == 0 || (compared > 0 && mpfr_cmp_ui (z0, 2) == 0)) ++ return mpfr_set_ui (y, 0, GMP_RNDN); /* lngamma(1 or 2) = +0 */ + #endif + + mpfr_init2 (s, MPFR_PREC_MIN); +diff -Naurd mpfr-2.2.0/tests/tlngamma.c mpfr-2.2.0-p1/tests/tlngamma.c +--- mpfr-2.2.0/tests/tlngamma.c 2005-09-09 15:17:59.000000000 +0000 ++++ mpfr-2.2.0-p1/tests/tlngamma.c 2005-09-29 11:20:34.000000000 +0000 +@@ -79,7 +79,7 @@ + + mpfr_set_ui (x, 1, GMP_RNDN); + mpfr_lngamma (y, x, GMP_RNDN); +- if (mpfr_cmp_ui (y, 0)) ++ if (mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y)) + { + printf ("Error for lngamma(1)\n"); + exit (1); +@@ -93,6 +93,14 @@ + exit (1); + } + ++ mpfr_set_ui (x, 2, GMP_RNDN); ++ mpfr_lngamma (y, x, GMP_RNDN); ++ if (mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y)) ++ { ++ printf ("Error for lngamma(2)\n"); ++ exit (1); ++ } ++ + mpfr_set_prec (x, 53); + mpfr_set_prec (y, 53); + diff --git a/dev-libs/mpfr/files/2.2.0/patch02 b/dev-libs/mpfr/files/2.2.0/patch02 new file mode 100644 index 000000000000..493e63de4e1f --- /dev/null +++ b/dev-libs/mpfr/files/2.2.0/patch02 @@ -0,0 +1,71 @@ +diff -Naurd mpfr-2.2.0-p1/mpfr.h mpfr-2.2.0-p2/mpfr.h +--- mpfr-2.2.0-p1/mpfr.h 2005-09-06 15:02:12.000000000 +0000 ++++ mpfr-2.2.0-p2/mpfr.h 2005-09-29 11:36:36.000000000 +0000 +@@ -630,12 +630,17 @@ + (__builtin_constant_p (_s) && (_s) >= 0 ? \ + mpfr_cmp_ui ((_f), (_s)) : \ + mpfr_cmp_si_2exp ((_f), (_s), 0)) ++#if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 + #undef mpfr_set_ui + #define mpfr_set_ui(_f,_u,_r) \ + (__builtin_constant_p (_u) && (_u) == 0 ? \ +- ((_f)->_mpfr_sign = 1, \ +- (_f)->_mpfr_exp = __MPFR_EXP_ZERO, 0): \ +- mpfr_set_ui (_f,_u,_r)) ++ __extension__ ({ \ ++ mpfr_ptr _p = (_f); \ ++ _p->_mpfr_sign = 1; \ ++ _p->_mpfr_exp = __MPFR_EXP_ZERO; \ ++ (void) (_r); 0; }) : \ ++ mpfr_set_ui (_f,_u,_r)) ++#endif + #undef mpfr_set_si + #define mpfr_set_si(_f,_s,_r) \ + (__builtin_constant_p (_s) && (_s) >= 0 ? \ +diff -Naurd mpfr-2.2.0-p1/tests/tset_si.c mpfr-2.2.0-p2/tests/tset_si.c +--- mpfr-2.2.0-p1/tests/tset_si.c 2005-08-18 17:03:17.000000000 +0000 ++++ mpfr-2.2.0-p2/tests/tset_si.c 2005-09-29 09:19:39.000000000 +0000 +@@ -72,6 +72,35 @@ + mpfr_clear (x); + } + ++static void ++test_macros (void) ++{ ++ mpfr_t x[3]; ++ mpfr_ptr p; ++ mpfr_rnd_t r; ++ ++ mpfr_inits (x[0], x[1], x[2], NULL); ++ p = x[0]; ++ r = 0; ++ mpfr_set_ui (p++, 0, r++); ++ if (p != x[1] || r != 1) ++ { ++ printf ("Error in mpfr_set_ui macro: p - x[0] = %d (expecting 1), " ++ "r = %d (expecting 1)\n", (int) (p - x[0]), r); ++ exit (1); ++ } ++ p = x[0]; ++ r = 0; ++ mpfr_set_si (p++, 0, r++); ++ if (p != x[1] || r != 1) ++ { ++ printf ("Error in mpfr_set_si macro: p - x[0] = %d (expecting 1), " ++ "r = %d (expecting 1)\n", (int) (p - x[0]), r); ++ exit (1); ++ } ++ mpfr_clears (x[0], x[1], x[2], NULL); ++} ++ + /* FIXME: Comparing against mpfr_get_si/ui is not ideal, it'd be better to + have all tests examine the bits in mpfr_t for what should come out. */ + +@@ -324,6 +353,7 @@ + mpfr_clear (x); + + test_2exp (); ++ test_macros (); + tests_end_mpfr (); + return 0; + } diff --git a/dev-libs/mpfr/files/2.2.0/patch03 b/dev-libs/mpfr/files/2.2.0/patch03 new file mode 100644 index 000000000000..d479590d5c0f --- /dev/null +++ b/dev-libs/mpfr/files/2.2.0/patch03 @@ -0,0 +1,12 @@ +diff -Naurd mpfr-2.2.0-p2/configure mpfr-2.2.0-p3/configure +--- mpfr-2.2.0-p2/configure 2005-09-19 13:31:58.000000000 +0000 ++++ mpfr-2.2.0-p3/configure 2005-10-02 10:49:55.000000000 +0000 +@@ -10519,7 +10519,7 @@ + ;; + + darwin* | rhapsody*) +- if test "$GXX" = yes ; then ++ if test "$GCC" = yes ; then + archive_cmds_need_lc=no + case "$host_os" in + rhapsody* | darwin1.[012]) diff --git a/dev-libs/mpfr/files/2.2.0/patch04 b/dev-libs/mpfr/files/2.2.0/patch04 new file mode 100644 index 000000000000..203e1489404d --- /dev/null +++ b/dev-libs/mpfr/files/2.2.0/patch04 @@ -0,0 +1,20 @@ +diff -Naurd mpfr-2.2.0-p3/tests/tpow.c mpfr-2.2.0-p4/tests/tpow.c +--- mpfr-2.2.0-p3/tests/tpow.c 2005-06-02 16:12:05.000000000 +0000 ++++ mpfr-2.2.0-p4/tests/tpow.c 2005-10-06 09:54:52.000000000 +0000 +@@ -509,6 +509,7 @@ + for (i = 0; i < 11; i++) + for (j = 0; j < 11; j++) + { ++ double d; + int p; + static int q[11][11] = { + /* NaN +inf -inf +0 -0 +1 -1 +2 -2 +0.5 -0.5 */ +@@ -527,7 +528,7 @@ + test_pow (r, t[i], t[j], GMP_RNDN); + p = mpfr_nan_p (r) ? 0 : mpfr_inf_p (r) ? 1 : + mpfr_cmp_ui (r, 0) == 0 ? 2 : +- (int) (fabs (mpfr_get_d (r, GMP_RNDN)) * 128.0); ++ (d = mpfr_get_d (r, GMP_RNDN), (int) (ABS(d) * 128.0)); + if (p != 0 && MPFR_SIGN(r) < 0) + p = -p; + if (p != q[i][j]) diff --git a/dev-libs/mpfr/files/digest-mpfr-2.2.0_p4 b/dev-libs/mpfr/files/digest-mpfr-2.2.0_p4 new file mode 100644 index 000000000000..ae8d596e7d0a --- /dev/null +++ b/dev-libs/mpfr/files/digest-mpfr-2.2.0_p4 @@ -0,0 +1 @@ +MD5 1a81f721ee78cb027f6c41a243d3a33d mpfr-2.2.0.tar.bz2 728490 diff --git a/dev-libs/mpfr/mpfr-2.2.0_p4.ebuild b/dev-libs/mpfr/mpfr-2.2.0_p4.ebuild new file mode 100644 index 000000000000..b4bd04b9c7da --- /dev/null +++ b/dev-libs/mpfr/mpfr-2.2.0_p4.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2005 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_p4.ebuild,v 1.1 2005/10/19 04:19:14 vapier 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" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND=">=dev-libs/gmp-4.1.0" + +S=${WORKDIR}/${MY_P} + +src_unpack() { + unpack ${A} + cd "${S}" + for ((i=1; i<=PLEVEL; ++i)) ; do + epatch "${FILESDIR}"/${MY_PV}/patch$(printf '%02d' ${i}) + 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 +} |