summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2014-12-05 13:16:26 +0000
committerwiz <wiz@pkgsrc.org>2014-12-05 13:16:26 +0000
commit70f4c86a90b8c4455a66eb4d8b11c0983978e496 (patch)
tree46c041a76361eb5df32d9f01a3da0a6302ef968c /math
parentcbea735ac7aa79d06c3ad9a929718e06e525ad5f (diff)
downloadpkgsrc-70f4c86a90b8c4455a66eb4d8b11c0983978e496.tar.gz
Apply 11 upstream patches, bump to 3.2.1pl11.
Requested by Kai-Uwe Eckhardt. Remove an incorrect comment. Changes: One of the mpfr_exp implementations uses a left shift on an integer that can be negative: exps <<= 1; and this has an undefined behavior according to the ISO C standard. In most cases, this will correspond to a multiplication by 2, and the code will behave as expected (this is why the bug hadn't been detected until now). But problems may occur if a sanitizer is used (this is how this bug was detected) or possibly in case of advanced optimizations, such as LTO. This is fixed by the exp_2 patch. The mpfr_fits_u*_p functions return 0 ("doesn't fit") instead of non-zero ("fits") on negative arguments for which the rounding to an integer in the given rounding mode is 0. This bug is fixed by the fits-smallneg patch, which also updates the testcases. Some tget_flt tests fail in environments where native C floating-point division by zero is not supported, e.g. regarded as an error, such as with Clang's sanitizer; some similar tests were already disabled in such a case, but not all. The tset_ld test triggers a useless overflow on a double. These problems are fixed by the clang-divby0 patch, which also disables constant division by zero on the native C type double with Clang in order to avoid incorrect code. The formatted output functions (mpfr_*printf) are incorrect on the value 0 when using the alternative form (# flag), a positive precision, and the g or G conversion specifier: there is one additional trailing 0. The corresponding test is also incorrect (explaining why the bug was not detected). These problems are fixed by the printf-alt0 patch, which also provides some additional related tests. Only for applications using the custom interface: The mpfr_custom_init_set macro has a typo in a variable name, which can yield incorrect behavior if the second argument is not a simple expression. This bug is fixed by the custom_init_set patch. The build fails on li2.c with the GCC -Werror=return-type option when logging has been enabled. This problem is fixed by the li2-return patch. The rounding of mpfr_exp can be incorrect for output precisions larger than or equal to MPFR_EXP_THRESHOLD (several thousands of bits; its value depends on the architecture). This bug is fixed by the exp3 patch, which also provides a testcase. This MPFR release fails to build with GMP 6 when the --with-gmp-build configure option is used. The gmp6-compat patch fixes this compatibility problem. When dividing a very large number (near the maximum finite one, in absolute value) by a very small number (near the minimum one, in absolute value), an integer overflow occurs in the computation of the exponent of the result, yielding undefined behavior, such as the result 0 instead of infinity. This bug is fixed by the div-overflow patch, which also provides a testcase. The vasprintf.c source file contains incorrect assertions, which may fail while the computation is valid; this can occur only when outputting tiny numbers (very small exponents). These assertions are fixed by the vasprintf patch, which also provides a testcase. A buffer overflow may occur in mpfr_strtofr. This is due to incorrect GMP documentation for mpn_set_str about the size of a buffer (discussion; first fix in the GMP documentation). This bug is present in the MPFR versions from 2.1.0 (adding mpfr_strtofr) to this one, and can be detected by running "make check" in a 32-bit ABI under GNU/Linux with alloca disabled (this is currently possible by using the --with-gmp-build configure option where alloca has been disabled in the GMP build). It is fixed by the strtofr patch.
Diffstat (limited to 'math')
-rw-r--r--math/mpfr/Makefile15
-rw-r--r--math/mpfr/distinfo41
2 files changed, 45 insertions, 11 deletions
diff --git a/math/mpfr/Makefile b/math/mpfr/Makefile
index cda0f44091a..e413028e7ee 100644
--- a/math/mpfr/Makefile
+++ b/math/mpfr/Makefile
@@ -1,15 +1,16 @@
-# $NetBSD: Makefile,v 1.27 2013/12/23 11:57:04 wiz Exp $
+# $NetBSD: Makefile,v 1.28 2014/12/05 13:16:26 wiz Exp $
DISTNAME= mpfr-3.1.2
-#PKGNAME= ${DISTNAME}p2 # append patch level
+PKGNAME= ${DISTNAME}pl11 # append patch level
CATEGORIES= math
MASTER_SITES= http://www.mpfr.org/mpfr-3.1.2/
EXTRACT_SUFX= .tar.bz2
-#DIST_SUBDIR= ${DISTNAME}
-#PATCH_SITES= ${MASTER_SITES}
-#PATCHFILES= patch01 patch02
-#PATCH_DIST_STRIP= -p1
+DIST_SUBDIR= ${DISTNAME}
+PATCH_SITES= ${MASTER_SITES}
+PATCH_SITES= http://www.mpfr.org/mpfr-current/
+PATCHFILES= patch01 patch02 patch03 patch04 patch05 patch06 patch07 patch08 patch09 patch10 patch11
+PATCH_DIST_STRIP= -p1
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.mpfr.org/
@@ -18,7 +19,7 @@ LICENSE= gnu-lgpl-v3
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
-TEST_TARGET= check # needs the package installed
+TEST_TARGET= check
INFO_FILES= yes
.include "../../devel/gmp/buildlink3.mk"
diff --git a/math/mpfr/distinfo b/math/mpfr/distinfo
index 547d79b1845..40b02809ca6 100644
--- a/math/mpfr/distinfo
+++ b/math/mpfr/distinfo
@@ -1,5 +1,38 @@
-$NetBSD: distinfo,v 1.18 2013/03/15 19:09:07 drochner Exp $
+$NetBSD: distinfo,v 1.19 2014/12/05 13:16:26 wiz Exp $
-SHA1 (mpfr-3.1.2.tar.bz2) = 46d5a11a59a4e31f74f73dd70c5d57a59de2d0b4
-RMD160 (mpfr-3.1.2.tar.bz2) = 8ab6a2aad186ef2dc99efc50f4ca13a142f85c2f
-Size (mpfr-3.1.2.tar.bz2) = 1225496 bytes
+SHA1 (mpfr-3.1.2/mpfr-3.1.2.tar.bz2) = 46d5a11a59a4e31f74f73dd70c5d57a59de2d0b4
+RMD160 (mpfr-3.1.2/mpfr-3.1.2.tar.bz2) = 8ab6a2aad186ef2dc99efc50f4ca13a142f85c2f
+Size (mpfr-3.1.2/mpfr-3.1.2.tar.bz2) = 1225496 bytes
+SHA1 (mpfr-3.1.2/patch01) = ab4b0be3b19106ab544cb9c0d6028b60b1576028
+RMD160 (mpfr-3.1.2/patch01) = c6907261f3faa467a9d9cecdba6f9917db3b7de0
+Size (mpfr-3.1.2/patch01) = 1652 bytes
+SHA1 (mpfr-3.1.2/patch02) = 0543edc718b82e1ef379b62b61ae27a0eea354d0
+RMD160 (mpfr-3.1.2/patch02) = b9232b9b5467a6ba2770156a8eeb3b04612c46e1
+Size (mpfr-3.1.2/patch02) = 18656 bytes
+SHA1 (mpfr-3.1.2/patch03) = f5573e2b2ab20f6615050f78d70f810775aa832d
+RMD160 (mpfr-3.1.2/patch03) = ea3cf54186502fcbd3d938067af22cf1e9814535
+Size (mpfr-3.1.2/patch03) = 4614 bytes
+SHA1 (mpfr-3.1.2/patch04) = fd810ffb73bdc84192d123c4bb220c3f1f9017f5
+RMD160 (mpfr-3.1.2/patch04) = 38abeffb08d681fb3d664c6a51a9ca2096ecd255
+Size (mpfr-3.1.2/patch04) = 3456 bytes
+SHA1 (mpfr-3.1.2/patch05) = 232b95f82da128fd6b133097cdd6e814a1d3f471
+RMD160 (mpfr-3.1.2/patch05) = 9aba36a214cc2d04dce376049a82c45e9b871926
+Size (mpfr-3.1.2/patch05) = 1760 bytes
+SHA1 (mpfr-3.1.2/patch06) = 5c0f9f7b5a25266b63961d0edcd0308e256423f7
+RMD160 (mpfr-3.1.2/patch06) = 554b0830858695ada7ec477dfa3ee3e29a54cb11
+Size (mpfr-3.1.2/patch06) = 1577 bytes
+SHA1 (mpfr-3.1.2/patch07) = b596fb5f1af4954fb94a5fbb71d7d69e75673cad
+RMD160 (mpfr-3.1.2/patch07) = 6dcbc15510c4f45ce330ba0d3f48dd4536832dec
+Size (mpfr-3.1.2/patch07) = 2640 bytes
+SHA1 (mpfr-3.1.2/patch08) = 91680e47ea2f2934e9667f703ff0f6b907c6dd24
+RMD160 (mpfr-3.1.2/patch08) = d32195e2b141208448d238852a365ceb6bf840ec
+Size (mpfr-3.1.2/patch08) = 10512 bytes
+SHA1 (mpfr-3.1.2/patch09) = 2998fc3d61b79bdf547aaeaaf90f71381e62f532
+RMD160 (mpfr-3.1.2/patch09) = b98383f009bd7021ff1814f90033fd0f357a272e
+Size (mpfr-3.1.2/patch09) = 5798 bytes
+SHA1 (mpfr-3.1.2/patch10) = 4538a6178c64259082cd55d87279a4d5e6748aee
+RMD160 (mpfr-3.1.2/patch10) = 940d1becc15f1f4f0e633720e251a0aec2b50bbe
+Size (mpfr-3.1.2/patch10) = 4012 bytes
+SHA1 (mpfr-3.1.2/patch11) = 3da176ee31b48c92f03a8eeb2f664fe8fedf298e
+RMD160 (mpfr-3.1.2/patch11) = eb31815cb378c22dd9371fdb447977e26d9a8e24
+Size (mpfr-3.1.2/patch11) = 2057 bytes