Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (760bb60a8adfe56698bd42ccc33c61ec0f599137)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (760bb60a8adfe56698bd42ccc33c61ec0f599137)
  • Date: Tue, 26 Dec 2017 21:26:58 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

ChangeLog | 2
gnu.gpg |binary
libs/libmpc/HISTORY | 3
libs/libmpc/PRE_BUILD | 4 +
libs/libmpc/mpfr_fmma.patch | 171
++++++++++++++++++++++++++++++++++++++++++++
libs/mpfr/DETAILS | 8 +-
libs/mpfr/HISTORY | 4 +
libs/mpfr/INSTALL | 6 -
8 files changed, 193 insertions(+), 5 deletions(-)

New commits:
commit 760bb60a8adfe56698bd42ccc33c61ec0f599137
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

libs/libmpc: fixed compilation with MPFR 4.0.0

commit 7bc752c90e79a71c988136bf45e27bbdc5de9236
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

libs/mpfr: version 4.0.0

commit 5c127b2e50e26f6841924ed14d4dd5a92ceb0315
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

gnu.gpg: added Vincent Lefévre's key

diff --git a/ChangeLog b/ChangeLog
index 6dde21b..fe1f14c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2017-12-26 Pavel Vinogradov <public AT sourcemage.org>
* ruby-raa/ruby-2.5: new spell, 2.5.x version of ruby
+ * gnu.gpg: added new key, 980C197698C3739D,
+ Vincent Lefévre <vincent AT vinc17.net>

2017-12-25 Vlad Glagolev <stealth AT sourcemage.org>
* disk/ioping: new spell, simple disk I/O latency measuring tool
diff --git a/gnu.gpg b/gnu.gpg
index dbd3fb2..9455ca8 100644
Binary files a/gnu.gpg and b/gnu.gpg differ
diff --git a/libs/libmpc/HISTORY b/libs/libmpc/HISTORY
index bf24616..29e3301 100644
--- a/libs/libmpc/HISTORY
+++ b/libs/libmpc/HISTORY
@@ -1,3 +1,6 @@
+2017-12-26 Pavel Vinogradov <public AT sourcemage.org>
+ * PRE_BUILD, mpfr_fmma.patch: added a patch to compile with MPFR 4.0.0
+
2015-05-07 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: use SPELLX; added GATHER_DOCS to drop dirty hack in INSTALL
* INSTALL: corrected install phase by adding a test case & '-f' flag
for
diff --git a/libs/libmpc/PRE_BUILD b/libs/libmpc/PRE_BUILD
new file mode 100755
index 0000000..557d316
--- /dev/null
+++ b/libs/libmpc/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+
+patch -Np1 < "${SPELL_DIRECTORY}/mpfr_fmma.patch"
diff --git a/libs/libmpc/mpfr_fmma.patch b/libs/libmpc/mpfr_fmma.patch
new file mode 100644
index 0000000..26a18e3
--- /dev/null
+++ b/libs/libmpc/mpfr_fmma.patch
@@ -0,0 +1,171 @@
+--- mpc-1.0.3.orig/src/mul.c 2015-02-16 07:37:30.000000000 -0500
++++ mpc-1.0.3/src/mul.c 2017-12-26 16:14:42.648306427 -0500
+@@ -171,156 +171,6 @@
+ }
+
+
+-static int
+-mpfr_fmma (mpfr_ptr z, mpfr_srcptr a, mpfr_srcptr b, mpfr_srcptr c,
+- mpfr_srcptr d, int sign, mpfr_rnd_t rnd)
+-{
+- /* Computes z = ab+cd if sign >= 0, or z = ab-cd if sign < 0.
+- Assumes that a, b, c, d are finite and non-zero; so any multiplication
+- of two of them yielding an infinity is an overflow, and a
+- multiplication yielding 0 is an underflow.
+- Assumes further that z is distinct from a, b, c, d. */
+-
+- int inex;
+- mpfr_t u, v;
+-
+- /* u=a*b, v=sign*c*d exactly */
+- mpfr_init2 (u, mpfr_get_prec (a) + mpfr_get_prec (b));
+- mpfr_init2 (v, mpfr_get_prec (c) + mpfr_get_prec (d));
+- mpfr_mul (u, a, b, GMP_RNDN);
+- mpfr_mul (v, c, d, GMP_RNDN);
+- if (sign < 0)
+- mpfr_neg (v, v, GMP_RNDN);
+-
+- /* tentatively compute z as u+v; here we need z to be distinct
+- from a, b, c, d to not lose the latter */
+- inex = mpfr_add (z, u, v, rnd);
+-
+- if (mpfr_inf_p (z)) {
+- /* replace by "correctly rounded overflow" */
+- mpfr_set_si (z, (mpfr_signbit (z) ? -1 : 1), GMP_RNDN);
+- inex = mpfr_mul_2ui (z, z, mpfr_get_emax (), rnd);
+- }
+- else if (mpfr_zero_p (u) && !mpfr_zero_p (v)) {
+- /* exactly u underflowed, determine inexact flag */
+- inex = (mpfr_signbit (u) ? 1 : -1);
+- }
+- else if (mpfr_zero_p (v) && !mpfr_zero_p (u)) {
+- /* exactly v underflowed, determine inexact flag */
+- inex = (mpfr_signbit (v) ? 1 : -1);
+- }
+- else if (mpfr_nan_p (z) || (mpfr_zero_p (u) && mpfr_zero_p (v))) {
+- /* In the first case, u and v are infinities with opposite signs.
+- In the second case, u and v are zeroes; their sum may be 0 or the
+- least representable number, with a sign to be determined.
+- Redo the computations with mpz_t exponents */
+- mpfr_exp_t ea, eb, ec, ed;
+- mpz_t eu, ev;
+- /* cheat to work around the const qualifiers */
+-
+- /* Normalise the input by shifting and keep track of the shifts in
+- the exponents of u and v */
+- ea = mpfr_get_exp (a);
+- eb = mpfr_get_exp (b);
+- ec = mpfr_get_exp (c);
+- ed = mpfr_get_exp (d);
+-
+- mpfr_set_exp ((mpfr_ptr) a, (mpfr_prec_t) 0);
+- mpfr_set_exp ((mpfr_ptr) b, (mpfr_prec_t) 0);
+- mpfr_set_exp ((mpfr_ptr) c, (mpfr_prec_t) 0);
+- mpfr_set_exp ((mpfr_ptr) d, (mpfr_prec_t) 0);
+-
+- mpz_init (eu);
+- mpz_init (ev);
+- mpz_set_si (eu, (long int) ea);
+- mpz_add_si (eu, eu, (long int) eb);
+- mpz_set_si (ev, (long int) ec);
+- mpz_add_si (ev, ev, (long int) ed);
+-
+- /* recompute u and v and move exponents to eu and ev */
+- mpfr_mul (u, a, b, GMP_RNDN);
+- /* exponent of u is non-positive */
+- mpz_sub_ui (eu, eu, (unsigned long int) (-mpfr_get_exp (u)));
+- mpfr_set_exp (u, (mpfr_prec_t) 0);
+- mpfr_mul (v, c, d, GMP_RNDN);
+- if (sign < 0)
+- mpfr_neg (v, v, GMP_RNDN);
+- mpz_sub_ui (ev, ev, (unsigned long int) (-mpfr_get_exp (v)));
+- mpfr_set_exp (v, (mpfr_prec_t) 0);
+-
+- if (mpfr_nan_p (z)) {
+- mpfr_exp_t emax = mpfr_get_emax ();
+- int overflow;
+- /* We have a = ma * 2^ea with 1/2 <= |ma| < 1 and ea <= emax, and
+- analogously for b. So eu <= 2*emax, and eu > emax since we have
+- an overflow. The same holds for ev. Shift u and v by as much as
+- possible so that one of them has exponent emax and the
+- remaining exponents in eu and ev are the same. Then carry out
+- the addition. Shifting u and v prevents an underflow. */
+- if (mpz_cmp (eu, ev) >= 0) {
+- mpfr_set_exp (u, emax);
+- mpz_sub_ui (eu, eu, (long int) emax);
+- mpz_sub (ev, ev, eu);
+- mpfr_set_exp (v, (mpfr_exp_t) mpz_get_ui (ev));
+- /* remaining common exponent is now in eu */
+- }
+- else {
+- mpfr_set_exp (v, emax);
+- mpz_sub_ui (ev, ev, (long int) emax);
+- mpz_sub (eu, eu, ev);
+- mpfr_set_exp (u, (mpfr_exp_t) mpz_get_ui (eu));
+- mpz_set (eu, ev);
+- /* remaining common exponent is now also in eu */
+- }
+- inex = mpfr_add (z, u, v, rnd);
+- /* Result is finite since u and v have different signs. */
+- overflow = mpfr_mul_2ui (z, z, mpz_get_ui (eu), rnd);
+- if (overflow)
+- inex = overflow;
+- }
+- else {
+- int underflow;
+- /* Addition of two zeroes with same sign. We have a = ma * 2^ea
+- with 1/2 <= |ma| < 1 and ea >= emin and similarly for b.
+- So 2*emin < 2*emin+1 <= eu < emin < 0, and analogously for v. */
+- mpfr_exp_t emin = mpfr_get_emin ();
+- if (mpz_cmp (eu, ev) <= 0) {
+- mpfr_set_exp (u, emin);
+- mpz_add_ui (eu, eu, (unsigned long int) (-emin));
+- mpz_sub (ev, ev, eu);
+- mpfr_set_exp (v, (mpfr_exp_t) mpz_get_si (ev));
+- }
+- else {
+- mpfr_set_exp (v, emin);
+- mpz_add_ui (ev, ev, (unsigned long int) (-emin));
+- mpz_sub (eu, eu, ev);
+- mpfr_set_exp (u, (mpfr_exp_t) mpz_get_si (eu));
+- mpz_set (eu, ev);
+- }
+- inex = mpfr_add (z, u, v, rnd);
+- mpz_neg (eu, eu);
+- underflow = mpfr_div_2ui (z, z, mpz_get_ui (eu), rnd);
+- if (underflow)
+- inex = underflow;
+- }
+-
+- mpz_clear (eu);
+- mpz_clear (ev);
+-
+- mpfr_set_exp ((mpfr_ptr) a, ea);
+- mpfr_set_exp ((mpfr_ptr) b, eb);
+- mpfr_set_exp ((mpfr_ptr) c, ec);
+- mpfr_set_exp ((mpfr_ptr) d, ed);
+- /* works also when some of a, b, c, d are not all distinct */
+- }
+-
+- mpfr_clear (u);
+- mpfr_clear (v);
+-
+- return inex;
+-}
+-
+-
+ int
+ mpc_mul_naive (mpc_ptr z, mpc_srcptr x, mpc_srcptr y, mpc_rnd_t rnd)
+ {
+@@ -338,9 +188,9 @@
+ rop [0] = z [0];
+
+ inex = MPC_INEX (mpfr_fmma (mpc_realref (rop), mpc_realref (x),
mpc_realref (y), mpc_imagref (x),
+- mpc_imagref (y), -1, MPC_RND_RE (rnd)),
++ mpc_imagref (y), MPC_RND_RE (rnd)),
+ mpfr_fmma (mpc_imagref (rop), mpc_realref (x),
mpc_imagref (y), mpc_imagref (x),
+- mpc_realref (y), +1, MPC_RND_IM (rnd)));
++ mpc_realref (y), MPC_RND_IM (rnd)));
+
+ mpc_set (z, rop, MPC_RNDNN);
+ if (overlap)
diff --git a/libs/mpfr/DETAILS b/libs/mpfr/DETAILS
index 3682fcd..db39411 100755
--- a/libs/mpfr/DETAILS
+++ b/libs/mpfr/DETAILS
@@ -1,13 +1,17 @@
SPELL=mpfr
PVERSION=0
- XVERSION=3.1.6
+ XVERSION=4.0.0
VERSION=$XVERSION # -p$PVERSION
-
SOURCE_HASH=sha512:746ee74d5026f267f74ab352d850ed30ff627d530aa840c71b24793e44875f8503946bd7399905dea2b2dd5744326254d7889337fe94cfe58d03c4066e9d8054
SECURITY_PATCH=2
SOURCE=$SPELL-$XVERSION.tar.xz
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$XVERSION
SOURCE_URL[0]=http://www.mpfr.org/mpfr-$XVERSION/$SOURCE
SOURCE_URL[1]=${GNU_URL}/${SPELL}/${SOURCE}
+ SOURCE2="${SOURCE}.asc"
+ SOURCE2_URL[0]="${SOURCE_URL[0]}.asc"
+ SOURCE2_URL[1]="${SOURCE_URL[1]}.asc"
+ SOURCE_GPG="gnu.gpg:${SOURCE2}:UPSTREAM_KEY"
+ SOURCE2_IGNORE="signature"
WEB_SITE=http://www.mpfr.org/
ENTERED=20040218
LICENSE[0]=LGPL
diff --git a/libs/mpfr/HISTORY b/libs/mpfr/HISTORY
index 3389669..0362ceb 100644
--- a/libs/mpfr/HISTORY
+++ b/libs/mpfr/HISTORY
@@ -1,3 +1,7 @@
+2017-12-26 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 4.0.0, switched to upstream gpg keysigning
+ * INSTALL: updated for "smooth" upgrade
+
2017-09-07 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 3.1.6
* allpatches-3.1.5-p10.xz: removed
diff --git a/libs/mpfr/INSTALL b/libs/mpfr/INSTALL
index b5a8711..e03071b 100755
--- a/libs/mpfr/INSTALL
+++ b/libs/mpfr/INSTALL
@@ -1,6 +1,6 @@
default_install &&
# ensure that cc1 still works, as it is linked to old libmpfr
-if [ -e $INSTALL_ROOT/usr/lib/libmpfr.so.1 ]; then
- rm $INSTALL_ROOT/usr/lib/libmpfr.so.1
+if [ -e $INSTALL_ROOT/usr/lib/libmpfr.so.4 ]; then
+ rm $INSTALL_ROOT/usr/lib/libmpfr.so.4
fi &&
-ln -s $TRACK_ROOT/usr/lib/libmpfr.so $INSTALL_ROOT/usr/lib/libmpfr.so.1
+ln -s $TRACK_ROOT/usr/lib/libmpfr.so $INSTALL_ROOT/usr/lib/libmpfr.so.4



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (760bb60a8adfe56698bd42ccc33c61ec0f599137), Pavel Vinogradov, 12/26/2017

Archive powered by MHonArc 2.6.24.

Top of Page