summaryrefslogtreecommitdiffstats
path: root/abs
diff options
context:
space:
mode:
authorCecil <knoppmyth@gmail.com>2011-07-05 03:13:17 (GMT)
committerCecil <knoppmyth@gmail.com>2011-07-05 03:13:17 (GMT)
commit54a8c5a9a2652f4fbe04665527beb80c56d67f43 (patch)
tree60bf885af3c1bcc0f687e31031f988babeee49cc /abs
parentdb6794dc27508afd7458b1bb8ea989111a97baac (diff)
downloadlinhes_pkgbuild-54a8c5a9a2652f4fbe04665527beb80c56d67f43.zip
linhes_pkgbuild-54a8c5a9a2652f4fbe04665527beb80c56d67f43.tar.gz
linhes_pkgbuild-54a8c5a9a2652f4fbe04665527beb80c56d67f43.tar.bz2
mpfr:Bumped to latest.
Diffstat (limited to 'abs')
-rw-r--r--abs/core/mpfr/PKGBUILD31
-rw-r--r--abs/core/mpfr/mpfr-3.0.0-p4.patch924
-rw-r--r--abs/core/mpfr/mpfr-3.0.1.p4-1-i686-build.log.12
-rw-r--r--abs/core/mpfr/mpfr-3.0.1.p4.patch367
-rw-r--r--abs/core/mpfr/mpfr.install2
5 files changed, 1314 insertions, 12 deletions
diff --git a/abs/core/mpfr/PKGBUILD b/abs/core/mpfr/PKGBUILD
index e53757b..3f59311 100644
--- a/abs/core/mpfr/PKGBUILD
+++ b/abs/core/mpfr/PKGBUILD
@@ -1,29 +1,38 @@
-# $Id: PKGBUILD 82426 2010-06-11 05:51:29Z allan $
+# $Id: PKGBUILD 128942 2011-06-25 14:51:58Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: damir <damir@archlinux.org>
pkgname=mpfr
-pkgver=3.0.0
+_pkgver=3.0.1
+_patchlevel=p4
+pkgver=${_pkgver}.${_patchlevel}
pkgrel=1
pkgdesc="Multiple-precision floating-point library"
arch=('i686' 'x86_64')
-license=('LGPL')
url="http://www.mpfr.org/"
+license=('LGPL')
depends=('gmp>=5.0')
options=('!libtool')
install=mpfr.install
-source=(http://www.mpfr.org/mpfr-current/mpfr-${pkgver}.tar.xz)
-md5sums=('8ab3bef2864b8c6e6a291f5603141bbd')
+source=(http://www.mpfr.org/mpfr-current/mpfr-${_pkgver}.tar.xz
+ mpfr-${_pkgver}.${_patchlevel}.patch)
+md5sums=('645882d9d179113a70af84d27086ed9f'
+ '52c2ac5ffbbbf0c68f08e89f016ba7aa')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- ./configure --prefix=/usr --enable-thread-safe --enable-shared || return 1
- make || return 1
- make check || return 1
+ cd "${srcdir}/${pkgname}-${_pkgver}"
+ patch -Np1 -i $srcdir/mpfr-${_pkgver}.${_patchlevel}.patch
+ ./configure --prefix=/usr --enable-thread-safe --enable-shared
+ make
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${_pkgver}"
+ make check
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" install || return 1
+ cd "${srcdir}/${pkgname}-${_pkgver}"
+ make DESTDIR="${pkgdir}" install
}
diff --git a/abs/core/mpfr/mpfr-3.0.0-p4.patch b/abs/core/mpfr/mpfr-3.0.0-p4.patch
new file mode 100644
index 0000000..5ff57b6
--- /dev/null
+++ b/abs/core/mpfr/mpfr-3.0.0-p4.patch
@@ -0,0 +1,924 @@
+diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
+--- mpfr-3.0.0-a/PATCHES 2010-06-23 11:02:49.000000000 +0000
++++ mpfr-3.0.0-b/PATCHES 2010-06-23 11:03:36.000000000 +0000
+@@ -0,0 +1 @@
++mpfr_out_str
+diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
+--- mpfr-3.0.0-a/VERSION 2010-06-10 11:00:14.000000000 +0000
++++ mpfr-3.0.0-b/VERSION 2010-06-23 11:03:20.000000000 +0000
+@@ -1 +1 @@
+-3.0.0
++3.0.0-p1
+diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
+--- mpfr-3.0.0-a/mpfr.h 2010-06-10 11:00:14.000000000 +0000
++++ mpfr-3.0.0-b/mpfr.h 2010-06-23 11:03:20.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 0
+ #define MPFR_VERSION_PATCHLEVEL 0
+-#define MPFR_VERSION_STRING "3.0.0"
++#define MPFR_VERSION_STRING "3.0.0-p1"
+
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-3.0.0-a/mpfr.texi mpfr-3.0.0-b/mpfr.texi
+--- mpfr-3.0.0-a/mpfr.texi 2010-06-10 11:00:14.000000000 +0000
++++ mpfr-3.0.0-b/mpfr.texi 2010-06-23 11:03:12.000000000 +0000
+@@ -2050,7 +2050,7 @@
+ are printed. If @var{base} is greater than 10, @samp{@@} will be used
+ instead of @samp{e} as exponent delimiter.
+
+-Return the number of bytes written, or if an error occurred, return 0.
++Return the number of characters written, or if an error occurred, return 0.
+ @end deftypefun
+
+ @deftypefun size_t mpfr_inp_str (mpfr_t @var{rop}, FILE *@var{stream}, int @var{base}, mpfr_rnd_t @var{rnd})
+diff -Naurd mpfr-3.0.0-a/out_str.c mpfr-3.0.0-b/out_str.c
+--- mpfr-3.0.0-a/out_str.c 2010-06-10 11:00:14.000000000 +0000
++++ mpfr-3.0.0-b/out_str.c 2010-06-23 11:03:12.000000000 +0000
+@@ -22,6 +22,16 @@
+
+ #include "mpfr-impl.h"
+
++/* Warning! S should not contain "%". */
++#define OUT_STR_RET(S) \
++ do \
++ { \
++ int r; \
++ r = fprintf (stream, (S)); \
++ return r < 0 ? 0 : r; \
++ } \
++ while (0)
++
+ size_t
+ mpfr_out_str (FILE *stream, int base, size_t n_digits, mpfr_srcptr op,
+ mpfr_rnd_t rnd_mode)
+@@ -29,6 +39,7 @@
+ char *s, *s0;
+ size_t l;
+ mpfr_exp_t e;
++ int err;
+
+ MPFR_ASSERTN (base >= 2 && base <= 62);
+
+@@ -36,37 +47,16 @@
+ if (stream == NULL)
+ stream = stdout;
+
+- if (MPFR_IS_NAN(op))
+- {
+- fprintf (stream, "@NaN@");
+- return 3;
+- }
+-
+- if (MPFR_IS_INF(op))
+- {
+- if (MPFR_SIGN(op) > 0)
+- {
+- fprintf (stream, "@Inf@");
+- return 3;
+- }
+- else
+- {
+- fprintf (stream, "-@Inf@");
+- return 4;
+- }
+- }
+-
+- if (MPFR_IS_ZERO(op))
++ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (op)))
+ {
+- if (MPFR_SIGN(op) > 0)
+- {
+- fprintf(stream, "0");
+- return 1;
+- }
++ if (MPFR_IS_NAN (op))
++ OUT_STR_RET ("@NaN@");
++ else if (MPFR_IS_INF (op))
++ OUT_STR_RET (MPFR_IS_POS (op) ? "@Inf@" : "-@Inf@");
+ else
+ {
+- fprintf(stream, "-0");
+- return 2;
++ MPFR_ASSERTD (MPFR_IS_ZERO (op));
++ OUT_STR_RET (MPFR_IS_POS (op) ? "0" : "-0");
+ }
+ }
+
+@@ -77,21 +67,31 @@
+
+ l = strlen (s) + 1; /* size of allocated block returned by mpfr_get_str
+ - may be incorrect, as only an upper bound? */
+- if (*s == '-')
+- fputc (*s++, stream);
+
+- /* outputs mantissa */
+- fputc (*s++, stream); e--; /* leading digit */
+- fputc ((unsigned char) MPFR_DECIMAL_POINT, stream);
+- fputs (s, stream); /* rest of mantissa */
++ /* outputs possible sign and significand */
++ err = (*s == '-' && fputc (*s++, stream) == EOF)
++ || fputc (*s++, stream) == EOF /* leading digit */
++ || fputc ((unsigned char) MPFR_DECIMAL_POINT, stream) == EOF
++ || fputs (s, stream) == EOF; /* trailing significand */
+ (*__gmp_free_func) (s0, l);
++ if (MPFR_UNLIKELY (err))
++ return 0;
++
++ e--; /* due to the leading digit */
+
+ /* outputs exponent */
+ if (e)
+ {
++ int r;
++
+ MPFR_ASSERTN(e >= LONG_MIN);
+ MPFR_ASSERTN(e <= LONG_MAX);
+- l += fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e);
++
++ r = fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e);
++ if (MPFR_UNLIKELY (r < 0))
++ return 0;
++
++ l += r;
+ }
+
+ return l;
+diff -Naurd mpfr-3.0.0-a/tests/tout_str.c mpfr-3.0.0-b/tests/tout_str.c
+--- mpfr-3.0.0-a/tests/tout_str.c 2010-06-10 11:00:13.000000000 +0000
++++ mpfr-3.0.0-b/tests/tout_str.c 2010-06-23 11:03:12.000000000 +0000
+@@ -46,22 +46,54 @@
+ special (void)
+ {
+ mpfr_t x;
++ unsigned int n;
+
+ mpfr_init (x);
+
+ mpfr_set_nan (x);
+- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
++ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
++ if (n != 5)
++ {
++ printf ("Error: mpfr_out_str (file, 10, 0, NaN, MPFR_RNDN) wrote %u "
++ "characters instead of 5.\n", n);
++ exit (1);
++ }
+
+ mpfr_set_inf (x, 1);
+- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
++ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
++ if (n != 5)
++ {
++ printf ("Error: mpfr_out_str (file, 10, 0, +Inf, MPFR_RNDN) wrote %u "
++ "characters instead of 5.\n", n);
++ exit (1);
++ }
+
+ mpfr_set_inf (x, -1);
+- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
++ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
++ if (n != 6)
++ {
++ printf ("Error: mpfr_out_str (file, 10, 0, -Inf, MPFR_RNDN) wrote %u "
++ "characters instead of 6.\n", n);
++ exit (1);
++ }
+
+ mpfr_set_ui (x, 0, MPFR_RNDN);
+- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
++ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
++ if (n != 1)
++ {
++ printf ("Error: mpfr_out_str (file, 10, 0, +0, MPFR_RNDN) wrote %u "
++ "characters instead of 1.\n", n);
++ exit (1);
++ }
++
+ mpfr_neg (x, x, MPFR_RNDN);
+- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
++ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
++ if (n != 2)
++ {
++ printf ("Error: mpfr_out_str (file, 10, 0, -0, MPFR_RNDN) wrote %u "
++ "characters instead of 2.\n", n);
++ exit (1);
++ }
+
+ mpfr_clear (x);
+ }
+diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
+--- mpfr-3.0.0-a/version.c 2010-06-10 11:00:14.000000000 +0000
++++ mpfr-3.0.0-b/version.c 2010-06-23 11:03:20.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+- return "3.0.0";
++ return "3.0.0-p1";
+ }
+diff -Naurd mpfr-3.0.0-a/Makefile.in mpfr-3.0.0-b/Makefile.in
+--- mpfr-3.0.0-a/Makefile.in 2010-06-10 11:00:52.000000000 +0000
++++ mpfr-3.0.0-b/Makefile.in 2010-06-10 11:00:52.000000000 +0000
+@@ -239,6 +239,7 @@
+ distuninstallcheck_listfiles = find . -type f -print
+ distcleancheck_listfiles = find . -type f -print
+ ACLOCAL = @ACLOCAL@
++ALLOCA = @ALLOCA@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AS = @AS@
+diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
+--- mpfr-3.0.0-a/PATCHES 2010-06-23 11:03:36.000000000 +0000
++++ mpfr-3.0.0-b/PATCHES 2010-06-25 13:23:13.000000000 +0000
+@@ -0,0 +1 @@
++alloca
+diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
+--- mpfr-3.0.0-a/VERSION 2010-06-23 11:03:20.000000000 +0000
++++ mpfr-3.0.0-b/VERSION 2010-06-25 13:23:13.000000000 +0000
+@@ -1 +1 @@
+-3.0.0-p1
++3.0.0-p2
+diff -Naurd mpfr-3.0.0-a/acinclude.m4 mpfr-3.0.0-b/acinclude.m4
+--- mpfr-3.0.0-a/acinclude.m4 2010-06-10 11:00:14.000000000 +0000
++++ mpfr-3.0.0-b/acinclude.m4 2010-06-10 11:00:14.000000000 +0000
+@@ -59,6 +59,9 @@
+ dnl sys/fpu.h - MIPS specific
+ AC_CHECK_HEADERS([sys/time.h sys/fpu.h])
+
++dnl Check how to get `alloca'
++AC_FUNC_ALLOCA
++
+ dnl SIZE_MAX macro
+ gl_SIZE_MAX
+
+diff -Naurd mpfr-3.0.0-a/configure mpfr-3.0.0-b/configure
+--- mpfr-3.0.0-a/configure 2010-06-10 11:00:51.000000000 +0000
++++ mpfr-3.0.0-b/configure 2010-06-25 13:23:05.000000000 +0000
+@@ -783,6 +783,7 @@
+ OBJDUMP
+ DLLTOOL
+ AS
++ALLOCA
+ MPFR_LIBM
+ ANSI2KNR
+ U
+@@ -5622,6 +5623,197 @@
+ done
+
+
++# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
++# for constant arguments. Useless!
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
++$as_echo_n "checking for working alloca.h... " >&6; }
++if test "${ac_cv_working_alloca_h+set}" = set; then :
++ $as_echo_n "(cached) " >&6
++else
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++#include <alloca.h>
++int
++main ()
++{
++char *p = (char *) alloca (2 * sizeof (int));
++ if (p) return 0;
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_working_alloca_h=yes
++else
++ ac_cv_working_alloca_h=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
++$as_echo "$ac_cv_working_alloca_h" >&6; }
++if test $ac_cv_working_alloca_h = yes; then
++
++$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
++
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
++$as_echo_n "checking for alloca... " >&6; }
++if test "${ac_cv_func_alloca_works+set}" = set; then :
++ $as_echo_n "(cached) " >&6
++else
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++#ifdef __GNUC__
++# define alloca __builtin_alloca
++#else
++# ifdef _MSC_VER
++# include <malloc.h>
++# define alloca _alloca
++# else
++# ifdef HAVE_ALLOCA_H
++# include <alloca.h>
++# else
++# ifdef _AIX
++ #pragma alloca
++# else
++# ifndef alloca /* predefined by HP cc +Olibcalls */
++char *alloca ();
++# endif
++# endif
++# endif
++# endif
++#endif
++
++int
++main ()
++{
++char *p = (char *) alloca (1);
++ if (p) return 0;
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_func_alloca_works=yes
++else
++ ac_cv_func_alloca_works=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
++$as_echo "$ac_cv_func_alloca_works" >&6; }
++
++if test $ac_cv_func_alloca_works = yes; then
++
++$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
++
++else
++ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
++# that cause trouble. Some versions do not even contain alloca or
++# contain a buggy version. If you still want to use their alloca,
++# use ar to extract alloca.o from them instead of compiling alloca.c.
++
++ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
++
++$as_echo "#define C_ALLOCA 1" >>confdefs.h
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
++$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
++if test "${ac_cv_os_cray+set}" = set; then :
++ $as_echo_n "(cached) " >&6
++else
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++#if defined CRAY && ! defined CRAY2
++webecray
++#else
++wenotbecray
++#endif
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "webecray" >/dev/null 2>&1; then :
++ ac_cv_os_cray=yes
++else
++ ac_cv_os_cray=no
++fi
++rm -f conftest*
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
++$as_echo "$ac_cv_os_cray" >&6; }
++if test $ac_cv_os_cray = yes; then
++ for ac_func in _getb67 GETB67 getb67; do
++ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++ if test "x$as_val" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define CRAY_STACKSEG_END $ac_func
++_ACEOF
++
++ break
++fi
++
++ done
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
++$as_echo_n "checking stack direction for C alloca... " >&6; }
++if test "${ac_cv_c_stack_direction+set}" = set; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test "$cross_compiling" = yes; then :
++ ac_cv_c_stack_direction=0
++else
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++$ac_includes_default
++int
++find_stack_direction ()
++{
++ static char *addr = 0;
++ auto char dummy;
++ if (addr == 0)
++ {
++ addr = &dummy;
++ return find_stack_direction ();
++ }
++ else
++ return (&dummy > addr) ? 1 : -1;
++}
++
++int
++main ()
++{
++ return find_stack_direction () < 0;
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++ ac_cv_c_stack_direction=1
++else
++ ac_cv_c_stack_direction=-1
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++ conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
++$as_echo "$ac_cv_c_stack_direction" >&6; }
++cat >>confdefs.h <<_ACEOF
++#define STACK_DIRECTION $ac_cv_c_stack_direction
++_ACEOF
++
++
++fi
++
++
+
+ for ac_header in stdint.h
+ do :
+@@ -7564,13 +7756,13 @@
+ else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+- (eval echo "\"\$as_me:7567: $ac_compile\"" >&5)
++ (eval echo "\"\$as_me:7759: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+- (eval echo "\"\$as_me:7570: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
++ (eval echo "\"\$as_me:7762: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+- (eval echo "\"\$as_me:7573: output\"" >&5)
++ (eval echo "\"\$as_me:7765: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+@@ -8772,7 +8964,7 @@
+ ;;
+ *-*-irix6*)
+ # Find out which ABI we are using.
+- echo '#line 8775 "configure"' > conftest.$ac_ext
++ echo '#line 8967 "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+@@ -10032,11 +10224,11 @@
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:10035: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:10227: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+- echo "$as_me:10039: \$? = $ac_status" >&5
++ echo "$as_me:10231: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+@@ -10371,11 +10563,11 @@
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:10374: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:10566: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+- echo "$as_me:10378: \$? = $ac_status" >&5
++ echo "$as_me:10570: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+@@ -10476,11 +10668,11 @@
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:10479: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:10671: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+- echo "$as_me:10483: \$? = $ac_status" >&5
++ echo "$as_me:10675: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+@@ -10531,11 +10723,11 @@
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:10534: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:10726: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+- echo "$as_me:10538: \$? = $ac_status" >&5
++ echo "$as_me:10730: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+@@ -12915,7 +13107,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 12918 "configure"
++#line 13110 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -13011,7 +13203,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 13014 "configure"
++#line 13206 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
+--- mpfr-3.0.0-a/mpfr.h 2010-06-23 11:03:20.000000000 +0000
++++ mpfr-3.0.0-b/mpfr.h 2010-06-25 13:23:13.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 0
+ #define MPFR_VERSION_PATCHLEVEL 0
+-#define MPFR_VERSION_STRING "3.0.0-p1"
++#define MPFR_VERSION_STRING "3.0.0-p2"
+
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-3.0.0-a/tests/Makefile.in mpfr-3.0.0-b/tests/Makefile.in
+--- mpfr-3.0.0-a/tests/Makefile.in 2010-06-10 11:00:52.000000000 +0000
++++ mpfr-3.0.0-b/tests/Makefile.in 2010-06-10 11:00:52.000000000 +0000
+@@ -960,6 +960,7 @@
+ red=; grn=; lgn=; blu=; std=
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
++ALLOCA = @ALLOCA@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AS = @AS@
+diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
+--- mpfr-3.0.0-a/version.c 2010-06-23 11:03:20.000000000 +0000
++++ mpfr-3.0.0-b/version.c 2010-06-25 13:23:13.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+- return "3.0.0-p1";
++ return "3.0.0-p2";
+ }
+diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
+--- mpfr-3.0.0-a/PATCHES 2010-07-10 00:11:19.000000000 +0000
++++ mpfr-3.0.0-b/PATCHES 2010-07-10 00:12:50.000000000 +0000
+@@ -0,0 +1 @@
++gamma_underflow
+diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
+--- mpfr-3.0.0-a/VERSION 2010-06-25 13:23:13.000000000 +0000
++++ mpfr-3.0.0-b/VERSION 2010-07-10 00:11:53.000000000 +0000
+@@ -1 +1 @@
+-3.0.0-p2
++3.0.0-p3
+diff -Naurd mpfr-3.0.0-a/gamma.c mpfr-3.0.0-b/gamma.c
+--- mpfr-3.0.0-a/gamma.c 2010-06-10 11:00:14.000000000 +0000
++++ mpfr-3.0.0-b/gamma.c 2010-07-10 00:11:46.000000000 +0000
+@@ -274,7 +274,7 @@
+ /* we want an upper bound for x * [log(2-x)-1].
+ since x < 0, we need a lower bound on log(2-x) */
+ mpfr_ui_sub (xp, 2, x, MPFR_RNDD);
+- mpfr_log (xp, xp, MPFR_RNDD);
++ mpfr_log2 (xp, xp, MPFR_RNDD);
+ mpfr_sub_ui (xp, xp, 1, MPFR_RNDD);
+ mpfr_mul (xp, xp, x, MPFR_RNDU);
+
+@@ -303,8 +303,8 @@
+ {
+ mpfr_sub (tmp, tmp, tmp2, MPFR_RNDZ); /* low bnd on |sin(Pi*(2-x))| */
+ mpfr_ui_div (tmp, 12, tmp, MPFR_RNDU); /* upper bound */
+- mpfr_log (tmp, tmp, MPFR_RNDU);
+- mpfr_add (tmp, tmp, xp, MPFR_RNDU);
++ mpfr_log2 (tmp, tmp, MPFR_RNDU);
++ mpfr_add (xp, tmp, xp, MPFR_RNDU);
+ underflow = mpfr_cmp_si (xp, expo.saved_emin - 2) <= 0;
+ }
+
+diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
+--- mpfr-3.0.0-a/mpfr.h 2010-06-25 13:23:13.000000000 +0000
++++ mpfr-3.0.0-b/mpfr.h 2010-07-10 00:11:53.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 0
+ #define MPFR_VERSION_PATCHLEVEL 0
+-#define MPFR_VERSION_STRING "3.0.0-p2"
++#define MPFR_VERSION_STRING "3.0.0-p3"
+
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-3.0.0-a/tests/tgamma.c mpfr-3.0.0-b/tests/tgamma.c
+--- mpfr-3.0.0-a/tests/tgamma.c 2010-06-10 11:00:13.000000000 +0000
++++ mpfr-3.0.0-b/tests/tgamma.c 2010-07-10 00:11:46.000000000 +0000
+@@ -461,6 +461,20 @@
+ mpfr_clear (x);
+ }
+
++/* bug found by Stathis, only occurs on 32-bit machines */
++static void
++test20100709 (void)
++{
++ mpfr_t x;
++ int inex;
++
++ mpfr_init2 (x, 100);
++ mpfr_set_str (x, "-4.6308260837372266e+07", 10, MPFR_RNDN);
++ inex = mpfr_gamma (x, x, MPFR_RNDN);
++ MPFR_ASSERTN(MPFR_IS_ZERO(x) && MPFR_IS_NEG(x) && inex > 0);
++ mpfr_clear (x);
++}
++
+ int
+ main (int argc, char *argv[])
+ {
+@@ -471,6 +485,7 @@
+ test_generic (2, 100, 2);
+ gamma_integer ();
+ test20071231 ();
++ test20100709 ();
+
+ data_check ("data/gamma", mpfr_gamma, "mpfr_gamma");
+
+diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
+--- mpfr-3.0.0-a/version.c 2010-06-25 13:23:13.000000000 +0000
++++ mpfr-3.0.0-b/version.c 2010-07-10 00:11:53.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+- return "3.0.0-p2";
++ return "3.0.0-p3";
+ }
+diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
+--- mpfr-3.0.0-a/PATCHES 2010-09-07 08:44:01.000000000 +0000
++++ mpfr-3.0.0-b/PATCHES 2010-09-07 08:48:46.000000000 +0000
+@@ -0,0 +1 @@
++mpfr_cmp/set_ui/si
+diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
+--- mpfr-3.0.0-a/VERSION 2010-07-10 00:11:53.000000000 +0000
++++ mpfr-3.0.0-b/VERSION 2010-09-07 08:46:06.000000000 +0000
+@@ -1 +1 @@
+-3.0.0-p3
++3.0.0-p4
+diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
+--- mpfr-3.0.0-a/mpfr.h 2010-07-10 00:11:53.000000000 +0000
++++ mpfr-3.0.0-b/mpfr.h 2010-09-07 08:46:06.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 0
+ #define MPFR_VERSION_PATCHLEVEL 0
+-#define MPFR_VERSION_STRING "3.0.0-p3"
++#define MPFR_VERSION_STRING "3.0.0-p4"
+
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+@@ -798,35 +798,45 @@
+ anyway. Checking with other ICC versions is needed. Possibly detect
+ whether warnings are produced or not with a configure test.
+ + Remove C++ too, since it complains too much. */
++/* Added casts to improve robustness in case of undefined behavior and
++ compiler extensions based on UB (in particular -fwrapv). MPFR doesn't
++ use such extensions, but these macros will be used by 3rd-party code,
++ where such extensions may be required.
++ Moreover casts to unsigned long have been added to avoid warnings in
++ programs that use MPFR and are compiled with -Wconversion; such casts
++ are OK since if X is a constant expression, then (unsigned long) X is
++ also a constant expression, so that the optimizations still work. */
+ #if defined (__GNUC__) && !defined(__ICC) && !defined(__cplusplus)
+ #if (__GNUC__ >= 2)
+ #undef mpfr_cmp_ui
+-/* We use the fact that mpfr_sgn on NaN sets the erange flag and returns 0. */
+-#define mpfr_cmp_ui(_f,_u) \
+- (__builtin_constant_p (_u) && (_u) == 0 ? \
+- mpfr_sgn (_f) : \
+- mpfr_cmp_ui_2exp ((_f),(_u),0))
++/* We use the fact that mpfr_sgn on NaN sets the erange flag and returns 0.
++ But warning! mpfr_sgn is specified as a macro in the API, thus the macro
++ mustn't be used if side effects are possible, like here. */
++#define mpfr_cmp_ui(_f,_u) \
++ (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \
++ (mpfr_sgn) (_f) : \
++ mpfr_cmp_ui_2exp ((_f), (unsigned long) (_u), 0))
+ #undef mpfr_cmp_si
+-#define mpfr_cmp_si(_f,_s) \
+- (__builtin_constant_p (_s) && (_s) >= 0 ? \
+- mpfr_cmp_ui ((_f), (_s)) : \
+- mpfr_cmp_si_2exp ((_f), (_s), 0))
++#define mpfr_cmp_si(_f,_s) \
++ (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \
++ mpfr_cmp_ui ((_f), (unsigned long) (long) (_s)) : \
++ mpfr_cmp_si_2exp ((_f), (long) (_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 ? \
+- __extension__ ({ \
+- mpfr_ptr _p = (_f); \
+- _p->_mpfr_sign = 1; \
+- _p->_mpfr_exp = __MPFR_EXP_ZERO; \
+- (void) (_r); 0; }) : \
+- mpfr_set_ui_2exp ((_f), (_u), 0, (_r)))
++#define mpfr_set_ui(_f,_u,_r) \
++ (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \
++ __extension__ ({ \
++ mpfr_ptr _p = (_f); \
++ _p->_mpfr_sign = 1; \
++ _p->_mpfr_exp = __MPFR_EXP_ZERO; \
++ (void) (_r); 0; }) : \
++ mpfr_set_ui_2exp ((_f), (unsigned long) (_u), 0, (_r)))
+ #endif
+ #undef mpfr_set_si
+-#define mpfr_set_si(_f,_s,_r) \
+- (__builtin_constant_p (_s) && (_s) >= 0 ? \
+- mpfr_set_ui ((_f), (_s), (_r)) : \
+- mpfr_set_si_2exp ((_f), (_s), 0, (_r)))
++#define mpfr_set_si(_f,_s,_r) \
++ (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \
++ mpfr_set_ui ((_f), (unsigned long) (long) (_s), (_r)) : \
++ mpfr_set_si_2exp ((_f), (long) (_s), 0, (_r)))
+ #endif
+ #endif
+
+diff -Naurd mpfr-3.0.0-a/tests/tcmp_ui.c mpfr-3.0.0-b/tests/tcmp_ui.c
+--- mpfr-3.0.0-a/tests/tcmp_ui.c 2010-06-10 11:00:13.000000000 +0000
++++ mpfr-3.0.0-b/tests/tcmp_ui.c 2010-09-07 08:45:12.000000000 +0000
+@@ -88,6 +88,126 @@
+ mpfr_clear (x);
+ }
+
++/* Since mpfr_cmp_ui and mpfr_cmp_si are also implemented by a macro
++ with __builtin_constant_p for GCC, check that side effects are
++ handled correctly. */
++static void
++check_macros (void)
++{
++ mpfr_t x;
++ int c;
++
++ mpfr_init2 (x, 32);
++
++ c = 0;
++ mpfr_set_ui (x, 17, MPFR_RNDN);
++ if (mpfr_cmp_ui (x, 17) != 0)
++ {
++ printf ("Error 1 on mpfr_cmp_ui(x,17) in check_macros\n");
++ exit (1);
++ }
++ if (mpfr_cmp_ui (x, (c++, 17)) != 0)
++ {
++ printf ("Error 2 on mpfr_cmp_ui(x,17) in check_macros\n");
++ exit (1);
++ }
++ if (c != 1)
++ {
++ printf ("Error 3 on mpfr_cmp_ui(x,17) in check_macros\n"
++ "(c = %d instead of 1)\n", c);
++ exit (1);
++ }
++ if (mpfr_cmp_si (x, 17) != 0)
++ {
++ printf ("Error 1 on mpfr_cmp_si(x,17) in check_macros\n");
++ exit (1);
++ }
++ if (mpfr_cmp_si (x, (c++, 17)) != 0)
++ {
++ printf ("Error 2 on mpfr_cmp_si(x,17) in check_macros\n");
++ exit (1);
++ }
++ if (c != 2)
++ {
++ printf ("Error 3 on mpfr_cmp_si(x,17) in check_macros\n"
++ "(c = %d instead of 2)\n", c);
++ exit (1);
++ }
++
++ c = 0;
++ mpfr_set_ui (x, 0, MPFR_RNDN);
++ if (mpfr_cmp_ui (x, 0) != 0)
++ {
++ printf ("Error 1 on mpfr_cmp_ui(x,0) in check_macros\n");
++ exit (1);
++ }
++ if (mpfr_cmp_ui (x, (c++, 0)) != 0)
++ {
++ printf ("Error 2 on mpfr_cmp_ui(x,0) in check_macros\n");
++ exit (1);
++ }
++ if (c != 1)
++ {
++ printf ("Error 3 on mpfr_cmp_ui(x,0) in check_macros\n"
++ "(c = %d instead of 1)\n", c);
++ exit (1);
++ }
++ if (mpfr_cmp_si (x, 0) != 0)
++ {
++ printf ("Error 1 on mpfr_cmp_si(x,0) in check_macros\n");
++ exit (1);
++ }
++ if (mpfr_cmp_si (x, (c++, 0)) != 0)
++ {
++ printf ("Error 2 on mpfr_cmp_si(x,0) in check_macros\n");
++ exit (1);
++ }
++ if (c != 2)
++ {
++ printf ("Error 3 on mpfr_cmp_si(x,0) in check_macros\n"
++ "(c = %d instead of 2)\n", c);
++ exit (1);
++ }
++
++ mpfr_clear (x);
++}
++
++/* Bug in r7114 */
++static void
++test_macros (void)
++{
++ mpfr_t x[3];
++ mpfr_ptr p;
++
++ mpfr_inits (x[0], x[1], x[2], (mpfr_ptr) 0);
++ mpfr_set_ui (x[0], 0, MPFR_RNDN);
++ p = x[0];
++ if (mpfr_cmp_ui (p++, 0) != 0)
++ {
++ printf ("Error in mpfr_cmp_ui macro: result should be 0.\n");
++ exit (1);
++ }
++ if (p != x[1])
++ {
++ printf ("Error in mpfr_cmp_ui macro: p - x[0] = %d (expecting 1)\n",
++ (int) (p - x[0]));
++ exit (1);
++ }
++ p = x[0];
++ if (mpfr_cmp_si (p++, 0) != 0)
++ {
++ printf ("Error in mpfr_cmp_si macro: result should be 0.\n");
++ exit (1);
++ }
++ if (p != x[1])
++ {
++ printf ("Error in mpfr_cmp_si macro: p - x[0] = %d (expecting 1)\n",
++ (int) (p - x[0]));
++ exit (1);
++ }
++ mpfr_clears (x[0], x[1], x[2], (mpfr_ptr) 0);
++}
++
+ int
+ main (void)
+ {
+@@ -216,6 +336,8 @@
+ mpfr_clear (x);
+
+ check_nan ();
++ check_macros ();
++ test_macros ();
+
+ tests_end_mpfr ();
+ return 0;
+diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
+--- mpfr-3.0.0-a/version.c 2010-07-10 00:11:53.000000000 +0000
++++ mpfr-3.0.0-b/version.c 2010-09-07 08:46:06.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+- return "3.0.0-p3";
++ return "3.0.0-p4";
+ }
diff --git a/abs/core/mpfr/mpfr-3.0.1.p4-1-i686-build.log.1 b/abs/core/mpfr/mpfr-3.0.1.p4-1-i686-build.log.1
new file mode 100644
index 0000000..b1ecda8
--- /dev/null
+++ b/abs/core/mpfr/mpfr-3.0.1.p4-1-i686-build.log.1
@@ -0,0 +1,2 @@
+/data/linhes_pkgbuild/abs/core/mpfr/PKGBUILD: line 24: cd: /data/linhes_pkgbuild/abs/core/mpfr/src/mpfr-3.0.1: No such file or directory
+ Aborting...(B
diff --git a/abs/core/mpfr/mpfr-3.0.1.p4.patch b/abs/core/mpfr/mpfr-3.0.1.p4.patch
new file mode 100644
index 0000000..9604635
--- /dev/null
+++ b/abs/core/mpfr/mpfr-3.0.1.p4.patch
@@ -0,0 +1,367 @@
+diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
+--- mpfr-3.0.1-a/PATCHES 2011-04-12 10:50:02.000000000 +0000
++++ mpfr-3.0.1-b/PATCHES 2011-04-12 10:50:02.000000000 +0000
+@@ -0,0 +1 @@
++asin_exprange
+diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
+--- mpfr-3.0.1-a/VERSION 2011-04-04 10:19:18.000000000 +0000
++++ mpfr-3.0.1-b/VERSION 2011-04-12 10:50:02.000000000 +0000
+@@ -1 +1 @@
+-3.0.1
++3.0.1-p1
+diff -Naurd mpfr-3.0.1-a/asin.c mpfr-3.0.1-b/asin.c
+--- mpfr-3.0.1-a/asin.c 2011-04-04 10:19:18.000000000 +0000
++++ mpfr-3.0.1-b/asin.c 2011-04-12 10:50:02.000000000 +0000
+@@ -63,11 +63,14 @@
+
+ compared = mpfr_cmp_ui (xp, 1);
+
++ MPFR_SAVE_EXPO_MARK (expo);
++
+ if (MPFR_UNLIKELY (compared >= 0))
+ {
+ mpfr_clear (xp);
+ if (compared > 0) /* asin(x) = NaN for |x| > 1 */
+ {
++ MPFR_SAVE_EXPO_FREE (expo);
+ MPFR_SET_NAN (asin);
+ MPFR_RET_NAN;
+ }
+@@ -80,13 +83,11 @@
+ inexact = -mpfr_const_pi (asin, MPFR_INVERT_RND(rnd_mode));
+ MPFR_CHANGE_SIGN (asin);
+ }
+- mpfr_div_2ui (asin, asin, 1, rnd_mode); /* May underflow */
+- return inexact;
++ mpfr_div_2ui (asin, asin, 1, rnd_mode);
+ }
+ }
+-
+- MPFR_SAVE_EXPO_MARK (expo);
+-
++ else
++ {
+ /* Compute exponent of 1 - ABS(x) */
+ mpfr_ui_sub (xp, 1, xp, MPFR_RNDD);
+ MPFR_ASSERTD (MPFR_GET_EXP (xp) <= 0);
+@@ -115,6 +116,7 @@
+ inexact = mpfr_set (asin, xp, rnd_mode);
+
+ mpfr_clear (xp);
++ }
+
+ MPFR_SAVE_EXPO_FREE (expo);
+ return mpfr_check_range (asin, inexact, rnd_mode);
+diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
+--- mpfr-3.0.1-a/mpfr.h 2011-04-04 10:19:18.000000000 +0000
++++ mpfr-3.0.1-b/mpfr.h 2011-04-12 10:50:02.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 0
+ #define MPFR_VERSION_PATCHLEVEL 1
+-#define MPFR_VERSION_STRING "3.0.1"
++#define MPFR_VERSION_STRING "3.0.1-p1"
+
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-3.0.1-a/tests/tasin.c mpfr-3.0.1-b/tests/tasin.c
+--- mpfr-3.0.1-a/tests/tasin.c 2011-04-04 10:19:17.000000000 +0000
++++ mpfr-3.0.1-b/tests/tasin.c 2011-04-12 10:50:02.000000000 +0000
+@@ -219,6 +219,49 @@
+ mpfr_clear (y);
+ }
+
++static void
++reduced_expo_range (void)
++{
++ mpfr_exp_t emin, emax;
++ mpfr_t x, y, ex_y;
++ int inex, ex_inex;
++ unsigned int flags, ex_flags;
++
++ emin = mpfr_get_emin ();
++ emax = mpfr_get_emax ();
++
++ mpfr_inits2 (4, x, y, ex_y, (mpfr_ptr) 0);
++ mpfr_set_str (x, "-0.1e1", 2, MPFR_RNDN);
++
++ mpfr_set_emin (1);
++ mpfr_set_emax (1);
++ mpfr_clear_flags ();
++ inex = mpfr_asin (y, x, MPFR_RNDA);
++ flags = __gmpfr_flags;
++ mpfr_set_emin (emin);
++ mpfr_set_emax (emax);
++
++ mpfr_set_str (ex_y, "-0.1101e1", 2, MPFR_RNDN);
++ ex_inex = -1;
++ ex_flags = MPFR_FLAGS_INEXACT;
++
++ if (SIGN (inex) != ex_inex || flags != ex_flags ||
++ ! mpfr_equal_p (y, ex_y))
++ {
++ printf ("Error in reduced_expo_range\non x = ");
++ mpfr_dump (x);
++ printf ("Expected y = ");
++ mpfr_out_str (stdout, 2, 0, ex_y, MPFR_RNDN);
++ printf ("\n inex = %d, flags = %u\n", ex_inex, ex_flags);
++ printf ("Got y = ");
++ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
++ printf ("\n inex = %d, flags = %u\n", SIGN (inex), flags);
++ exit (1);
++ }
++
++ mpfr_clears (x, y, ex_y, (mpfr_ptr) 0);
++}
++
+ int
+ main (void)
+ {
+@@ -226,6 +269,7 @@
+
+ special ();
+ special_overflow ();
++ reduced_expo_range ();
+
+ test_generic (2, 100, 15);
+
+diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
+--- mpfr-3.0.1-a/version.c 2011-04-04 10:19:18.000000000 +0000
++++ mpfr-3.0.1-b/version.c 2011-04-12 10:50:02.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+- return "3.0.1";
++ return "3.0.1-p1";
+ }
+diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
+--- mpfr-3.0.1-a/PATCHES 2011-05-04 11:18:33.000000000 +0000
++++ mpfr-3.0.1-b/PATCHES 2011-05-04 11:18:33.000000000 +0000
+@@ -0,0 +1 @@
++rec_sqrt-carry
+diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
+--- mpfr-3.0.1-a/VERSION 2011-04-12 10:50:02.000000000 +0000
++++ mpfr-3.0.1-b/VERSION 2011-05-04 11:18:33.000000000 +0000
+@@ -1 +1 @@
+-3.0.1-p1
++3.0.1-p2
+diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
+--- mpfr-3.0.1-a/mpfr.h 2011-04-12 10:50:02.000000000 +0000
++++ mpfr-3.0.1-b/mpfr.h 2011-05-04 11:18:33.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 0
+ #define MPFR_VERSION_PATCHLEVEL 1
+-#define MPFR_VERSION_STRING "3.0.1-p1"
++#define MPFR_VERSION_STRING "3.0.1-p2"
+
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-3.0.1-a/rec_sqrt.c mpfr-3.0.1-b/rec_sqrt.c
+--- mpfr-3.0.1-a/rec_sqrt.c 2011-04-04 10:19:18.000000000 +0000
++++ mpfr-3.0.1-b/rec_sqrt.c 2011-05-04 11:18:33.000000000 +0000
+@@ -375,20 +375,37 @@
+ MPFR_ASSERTD(un == ln + 1 || un == ln + 2);
+ /* the high un-ln limbs of u will overlap the low part of {x+ln,xn},
+ we need to add or subtract the overlapping part {u + ln, un - ln} */
++ /* Warning! th may be 0, in which case the mpn_add_1 and mpn_sub_1
++ below (with size = th) mustn't be used. In such a case, the limb
++ (carry) will be 0, so that this is semantically a no-op, but if
++ mpn_add_1 and mpn_sub_1 are used, GMP (currently) still does a
++ non-atomic read/write in a place that is not always allocated,
++ with the possible consequences: a crash if the corresponding
++ address is not mapped, or (rather unlikely) memory corruption
++ if another process/thread writes at the same place; things may
++ be worse with future GMP versions. Hence the tests carry != 0. */
+ if (neg == 0)
+ {
+ if (ln > 0)
+ MPN_COPY (x, u, ln);
+ cy = mpn_add (x + ln, x + ln, xn, u + ln, un - ln);
+ /* add cu at x+un */
+- cy += mpn_add_1 (x + un, x + un, th, cu);
++ if (cu != 0)
++ {
++ MPFR_ASSERTD (th != 0);
++ cy += mpn_add_1 (x + un, x + un, th, cu);
++ }
+ }
+ else /* negative case */
+ {
+ /* subtract {u+ln, un-ln} from {x+ln,un} */
+ cy = mpn_sub (x + ln, x + ln, xn, u + ln, un - ln);
+ /* carry cy is at x+un, like cu */
+- cy = mpn_sub_1 (x + un, x + un, th, cy + cu); /* n - un = th */
++ if (cy + cu != 0)
++ {
++ MPFR_ASSERTD (th != 0);
++ cy = mpn_sub_1 (x + un, x + un, th, cy + cu); /* n - un = th */
++ }
+ /* cy cannot be zero, since the most significant bit of Xh is 1,
+ and the correction is bounded by 2^{-h+3} */
+ MPFR_ASSERTD(cy == 0);
+diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
+--- mpfr-3.0.1-a/version.c 2011-04-12 10:50:02.000000000 +0000
++++ mpfr-3.0.1-b/version.c 2011-05-04 11:18:33.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+- return "3.0.1-p1";
++ return "3.0.1-p2";
+ }
+diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
+--- mpfr-3.0.1-a/PATCHES 2011-05-05 00:00:35.000000000 +0000
++++ mpfr-3.0.1-b/PATCHES 2011-05-05 00:00:35.000000000 +0000
+@@ -0,0 +1 @@
++atan-expo-range
+diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
+--- mpfr-3.0.1-a/VERSION 2011-05-04 11:18:33.000000000 +0000
++++ mpfr-3.0.1-b/VERSION 2011-05-05 00:00:35.000000000 +0000
+@@ -1 +1 @@
+-3.0.1-p2
++3.0.1-p3
+diff -Naurd mpfr-3.0.1-a/atan.c mpfr-3.0.1-b/atan.c
+--- mpfr-3.0.1-a/atan.c 2011-04-04 10:19:18.000000000 +0000
++++ mpfr-3.0.1-b/atan.c 2011-05-05 00:00:35.000000000 +0000
+@@ -431,5 +431,5 @@
+ MPFR_GROUP_CLEAR (group);
+
+ MPFR_SAVE_EXPO_FREE (expo);
+- return mpfr_check_range (arctgt, inexact, rnd_mode);
++ return mpfr_check_range (atan, inexact, rnd_mode);
+ }
+diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
+--- mpfr-3.0.1-a/mpfr.h 2011-05-04 11:18:33.000000000 +0000
++++ mpfr-3.0.1-b/mpfr.h 2011-05-05 00:00:35.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 0
+ #define MPFR_VERSION_PATCHLEVEL 1
+-#define MPFR_VERSION_STRING "3.0.1-p2"
++#define MPFR_VERSION_STRING "3.0.1-p3"
+
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-3.0.1-a/tests/tatan.c mpfr-3.0.1-b/tests/tatan.c
+--- mpfr-3.0.1-a/tests/tatan.c 2011-04-04 10:19:17.000000000 +0000
++++ mpfr-3.0.1-b/tests/tatan.c 2011-05-05 00:00:35.000000000 +0000
+@@ -535,6 +535,52 @@
+ mpfr_clears (a, x, y, (mpfr_ptr) 0);
+ }
+
++/* http://websympa.loria.fr/wwsympa/arc/mpfr/2011-05/msg00008.html
++ * Incorrect flags (in debug mode on a 32-bit machine, assertion failure).
++ */
++static void
++reduced_expo_range (void)
++{
++ mpfr_exp_t emin, emax;
++ mpfr_t x, y, ex_y;
++ int inex, ex_inex;
++ unsigned int flags, ex_flags;
++
++ emin = mpfr_get_emin ();
++ emax = mpfr_get_emax ();
++
++ mpfr_inits2 (12, x, y, ex_y, (mpfr_ptr) 0);
++ mpfr_set_str (x, "0.1e-5", 2, MPFR_RNDN);
++
++ mpfr_set_emin (-5);
++ mpfr_set_emax (-5);
++ mpfr_clear_flags ();
++ inex = mpfr_atan (y, x, MPFR_RNDN);
++ flags = __gmpfr_flags;
++ mpfr_set_emin (emin);
++ mpfr_set_emax (emax);
++
++ mpfr_set_str (ex_y, "0.1e-5", 2, MPFR_RNDN);
++ ex_inex = 1;
++ ex_flags = MPFR_FLAGS_INEXACT;
++
++ if (SIGN (inex) != ex_inex || flags != ex_flags ||
++ ! mpfr_equal_p (y, ex_y))
++ {
++ printf ("Error in reduced_expo_range\non x = ");
++ mpfr_dump (x);
++ printf ("Expected y = ");
++ mpfr_out_str (stdout, 2, 0, ex_y, MPFR_RNDN);
++ printf ("\n inex = %d, flags = %u\n", ex_inex, ex_flags);
++ printf ("Got y = ");
++ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
++ printf ("\n inex = %d, flags = %u\n", SIGN (inex), flags);
++ exit (1);
++ }
++
++ mpfr_clears (x, y, ex_y, (mpfr_ptr) 0);
++}
++
+ int
+ main (int argc, char *argv[])
+ {
+@@ -546,6 +592,7 @@
+ smallvals_atan2 ();
+ atan2_bug_20071003 ();
+ atan2_different_prec ();
++ reduced_expo_range ();
+
+ test_generic_atan (2, 200, 17);
+ test_generic_atan2 (2, 200, 17);
+diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
+--- mpfr-3.0.1-a/version.c 2011-05-04 11:18:33.000000000 +0000
++++ mpfr-3.0.1-b/version.c 2011-05-05 00:00:35.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+- return "3.0.1-p2";
++ return "3.0.1-p3";
+ }
+diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
+--- mpfr-3.0.1-a/PATCHES 2011-05-09 14:48:24.000000000 +0000
++++ mpfr-3.0.1-b/PATCHES 2011-05-09 14:48:24.000000000 +0000
+@@ -0,0 +1 @@
++texp-zero
+diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
+--- mpfr-3.0.1-a/VERSION 2011-05-05 00:00:35.000000000 +0000
++++ mpfr-3.0.1-b/VERSION 2011-05-09 14:48:24.000000000 +0000
+@@ -1 +1 @@
+-3.0.1-p3
++3.0.1-p4
+diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
+--- mpfr-3.0.1-a/mpfr.h 2011-05-05 00:00:35.000000000 +0000
++++ mpfr-3.0.1-b/mpfr.h 2011-05-09 14:48:24.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 0
+ #define MPFR_VERSION_PATCHLEVEL 1
+-#define MPFR_VERSION_STRING "3.0.1-p3"
++#define MPFR_VERSION_STRING "3.0.1-p4"
+
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-3.0.1-a/tests/texp.c mpfr-3.0.1-b/tests/texp.c
+--- mpfr-3.0.1-a/tests/texp.c 2011-04-04 10:19:17.000000000 +0000
++++ mpfr-3.0.1-b/tests/texp.c 2011-05-09 14:48:24.000000000 +0000
+@@ -170,7 +170,9 @@
+ mpfr_set_prec (x, prec);
+ mpfr_set_prec (y, prec);
+ mpfr_set_prec (z, prec);
+- mpfr_urandomb (x, RANDS);
++ do
++ mpfr_urandomb (x, RANDS);
++ while (MPFR_IS_ZERO (x)); /* 0 is handled by mpfr_exp only */
+ rnd = RND_RAND ();
+ mpfr_exp_2 (y, x, rnd);
+ mpfr_exp_3 (z, x, rnd);
+diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
+--- mpfr-3.0.1-a/version.c 2011-05-05 00:00:35.000000000 +0000
++++ mpfr-3.0.1-b/version.c 2011-05-09 14:48:24.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+- return "3.0.1-p3";
++ return "3.0.1-p4";
+ }
diff --git a/abs/core/mpfr/mpfr.install b/abs/core/mpfr/mpfr.install
index 46ef244..d6dd047 100644
--- a/abs/core/mpfr/mpfr.install
+++ b/abs/core/mpfr/mpfr.install
@@ -1,4 +1,4 @@
-info_dir=/usr/share/info
+info_dir=usr/share/info
info_files=(mpfr.info)
post_install() {