summaryrefslogtreecommitdiff
path: root/devel/gmp
diff options
context:
space:
mode:
Diffstat (limited to 'devel/gmp')
-rw-r--r--devel/gmp/Makefile6
-rw-r--r--devel/gmp/PLIST10
-rw-r--r--devel/gmp/buildlink.mk4
-rw-r--r--devel/gmp/distinfo11
-rw-r--r--devel/gmp/patches/patch-aa33
-rw-r--r--devel/gmp/patches/patch-ga25
-rw-r--r--devel/gmp/patches/patch-gb33
-rw-r--r--devel/gmp/patches/patch-gc27
-rw-r--r--devel/gmp/patches/patch-gd30
9 files changed, 132 insertions, 47 deletions
diff --git a/devel/gmp/Makefile b/devel/gmp/Makefile
index 5c1695fd5d3..ac7293dff44 100644
--- a/devel/gmp/Makefile
+++ b/devel/gmp/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.12.2.1 2002/06/23 06:29:49 jlam Exp $
+# $NetBSD: Makefile,v 1.12.2.2 2002/08/25 21:20:03 jlam Exp $
#
-DISTNAME= gmp-4.0.1
+DISTNAME= gmp-4.1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:=gmp/}
@@ -13,7 +13,7 @@ BUILD_DEPENDS+= m4-1.4:../../devel/m4
USE_BUILDLINK2= YES
GNU_CONFIGURE= YES
-CONFIGURE_ARGS+= --enable-cxx
+CONFIGURE_ARGS+= --enable-cxx --without-readline
USE_LIBTOOL= YES
LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
M4= ${PREFIX}/bin/gm4
diff --git a/devel/gmp/PLIST b/devel/gmp/PLIST
index 699c97d3d33..e8632cafaf0 100644
--- a/devel/gmp/PLIST
+++ b/devel/gmp/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2002/04/12 14:12:18 jschauma Exp $
+@comment $NetBSD: PLIST,v 1.4.2.1 2002/08/25 21:20:04 jlam Exp $
include/gmp.h
include/gmpxx.h
@unexec ${INSTALL_INFO} --delete --info-dir=%D/info %D/info/gmp.info
@@ -15,10 +15,10 @@ info/gmp.info-8
lib/libgmp.a
lib/libgmp.la
lib/libgmp.so
-lib/libgmp.so.5
-lib/libgmp.so.5.1
+lib/libgmp.so.6.0
+lib/libgmp.so.6
+lib/libgmpxx.so.3.2
+lib/libgmpxx.so.3
lib/libgmpxx.a
lib/libgmpxx.la
lib/libgmpxx.so
-lib/libgmpxx.so.3
-lib/libgmpxx.so.3.1
diff --git a/devel/gmp/buildlink.mk b/devel/gmp/buildlink.mk
index 3c587e4d081..d06448c8403 100644
--- a/devel/gmp/buildlink.mk
+++ b/devel/gmp/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.7 2001/07/27 13:33:23 jlam Exp $
+# $NetBSD: buildlink.mk,v 1.7.2.1 2002/08/25 21:20:05 jlam Exp $
#
# This Makefile fragment is included by packages that use gmp.
#
@@ -17,7 +17,7 @@ GMP_BUILDLINK_MK= # defined
.include "../../mk/bsd.buildlink.mk"
-BUILDLINK_DEPENDS.gmp?= gmp>=3.0
+BUILDLINK_DEPENDS.gmp?= gmp>=4.1
DEPENDS+= ${BUILDLINK_DEPENDS.gmp}:../../devel/gmp
EVAL_PREFIX+= BUILDLINK_PREFIX.gmp=gmp
diff --git a/devel/gmp/distinfo b/devel/gmp/distinfo
index 6148ed031ca..3d9d6817ff4 100644
--- a/devel/gmp/distinfo
+++ b/devel/gmp/distinfo
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.3.2.1 2002/06/23 18:44:16 jlam Exp $
+$NetBSD: distinfo,v 1.3.2.2 2002/08/25 21:20:05 jlam Exp $
-SHA1 (gmp-4.0.1.tar.gz) = 3ead9745123e1324c0f0ab9985d4cb28b6d74655
-Size (gmp-4.0.1.tar.gz) = 1745294 bytes
-SHA1 (patch-aa) = 01e298efa337dec5e92e9376f369128cf481fbf0
+SHA1 (gmp-4.1.tar.gz) = 6385fdfda2da9bd8c47256f5766b917f767c181b
+Size (gmp-4.1.tar.gz) = 2145387 bytes
+SHA1 (patch-ga) = 59b4b5cca8a78c3220b35b5abdbe9354f0c9865e
+SHA1 (patch-gb) = fc15a237f4bfc74aec382b3926dbfa1a224b7480
+SHA1 (patch-gc) = 811a6e3ce6691ce63338ca6283ba589db3ed6c84
+SHA1 (patch-gd) = 771fa505e8d2c8eed1e8c09f3d340c461ab350df
diff --git a/devel/gmp/patches/patch-aa b/devel/gmp/patches/patch-aa
deleted file mode 100644
index b1e92346401..00000000000
--- a/devel/gmp/patches/patch-aa
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-aa,v 1.7.2.2 2002/06/23 18:44:17 jlam Exp $
-
---- longlong.h.orig Thu Nov 15 14:48:14 2001
-+++ longlong.h
-@@ -734,8 +734,8 @@
- #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
- __asm__ ("add%.l %5,%1\n\taddx%.l %3,%0" \
- : "=d" ((USItype)(sh)), "=&d" ((USItype)(sl)) \
-- : "%0" ((USItype)(ah)), "d" ((USItype)(bh)), \
-- "%1" ((USItype)(al)), "g" ((USItype)(bl)))
-+ : "0" ((USItype)(ah)), "d" ((USItype)(bh)), \
-+ "1" ((USItype)(al)), "g" ((USItype)(bl)))
- #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
- __asm__ ("sub%.l %5,%1\n\tsubx%.l %3,%0" \
- : "=d" ((USItype)(sh)), "=&d" ((USItype)(sl)) \
-@@ -750,7 +750,7 @@
- #define umul_ppmm(w1, w0, u, v) \
- __asm__ ("mulu%.l %3,%1:%0" \
- : "=d" ((USItype)(w0)), "=d" ((USItype)(w1)) \
-- : "%0" ((USItype)(u)), "dmi" ((USItype)(v)))
-+ : "0" ((USItype)(u)), "dmi" ((USItype)(v)))
- #define UMUL_TIME 45
- #define udiv_qrnnd(q, r, n1, n0, d) \
- __asm__ ("divu%.l %4,%1:%0" \
-@@ -788,7 +788,7 @@
- " | End inlined umul_ppmm" \
- : "=&d" ((USItype)(xh)), "=&d" ((USItype)(xl)), \
- "=d" (__umul_tmp1), "=&d" (__umul_tmp2) \
-- : "%2" ((USItype)(a)), "d" ((USItype)(b))); \
-+ : "2" ((USItype)(a)), "d" ((USItype)(b))); \
- } while (0)
- #define UMUL_TIME 100
- #define UDIV_TIME 400
diff --git a/devel/gmp/patches/patch-ga b/devel/gmp/patches/patch-ga
new file mode 100644
index 00000000000..9dcb41d0829
--- /dev/null
+++ b/devel/gmp/patches/patch-ga
@@ -0,0 +1,25 @@
+$NetBSD: patch-ga,v 1.1.2.2 2002/08/25 21:20:07 jlam Exp $
+
+This is a patch for 4.1 from the GNU MP Homepage, it should be
+removed in future versions
+
+Index: randraw.c
+===================================================================
+RCS file: /home/cvsfiles/gmp/randraw.c,v
+retrieving revision 1.18
+retrieving revision 1.19
+diff -u -r1.18 -r1.19
+--- randraw.c 2002/05/14 16:59:44 1.18
++++ randraw.c 2002/06/09 08:12:03 1.19
+@@ -112,10 +112,8 @@
+ if (seedn == 0)
+ {
+ /* Seed is 0. Result is C % M. Assume table is sensibly stored,
+- with C smaller than M*/
++ with C smaller than M. */
+ *rp = c;
+-
+- ASSERT_ALWAYS (((mp_limb_t) 1 << m2exp) > c);
+
+ *seedp = c;
+ SIZ (rstate->_mp_seed) = 1;
diff --git a/devel/gmp/patches/patch-gb b/devel/gmp/patches/patch-gb
new file mode 100644
index 00000000000..991427ba277
--- /dev/null
+++ b/devel/gmp/patches/patch-gb
@@ -0,0 +1,33 @@
+$NetBSD: patch-gb,v 1.1.2.2 2002/08/25 21:20:08 jlam Exp $
+
+This is a patch for 4.1 from the GNU MP Homepage, it should be
+removed in future versions
+
+--- mpz/powm_ui.c.~1.16.~ Thu May 16 09:20:49 2002
++++ mpz/powm_ui.c Sat Jun 1 10:41:34 2002
+@@ -115,6 +115,17 @@
+
+ /* Main loop. */
+
++ /* If m is already normalized (high bit of high limb set), and b is the
++ same size, but a bigger value, and e==1, then there's no modular
++ reductions done and we can end up with a result out of range at the
++ end. */
++ if (c == 0)
++ {
++ if (xn == mn && mpn_cmp (xp, mp, mn) >= 0)
++ mpn_sub_n (xp, xp, mp, mn);
++ goto finishup;
++ }
++
+ while (c != 0)
+ {
+ mpn_sqr_n (tp, xp, xn);
+@@ -149,6 +160,7 @@
+ c--;
+ }
+
++ finishup:
+ /* We shifted m left m_zero_cnt steps. Adjust the result by reducing
+ it with the original MOD. */
+ if (m_zero_cnt != 0)
diff --git a/devel/gmp/patches/patch-gc b/devel/gmp/patches/patch-gc
new file mode 100644
index 00000000000..a478bb29be6
--- /dev/null
+++ b/devel/gmp/patches/patch-gc
@@ -0,0 +1,27 @@
+$NetBSD: patch-gc,v 1.1.2.2 2002/08/25 21:20:10 jlam Exp $
+
+This is a patch for 4.1 from the GNU MP Homepage, it should be
+removed in future versions
+
+--- mpf/inp_str.c.old Tue Jan 2 18:53:42 2001
++++ mpf/inp_str.c Wed Jul 3 10:57:33 2002
+@@ -64,6 +64,7 @@
+ c = getc (stream);
+ }
+ ungetc (c, stream);
++ nread--;
+
+ if (str_size >= alloc_size)
+ {
+@@ -74,9 +75,10 @@
+ str[str_size] = 0;
+
+ retval = mpf_set_str (rop, str, base);
++ (*__gmp_free_func) (str, alloc_size);
++
+ if (retval == -1)
+ return 0; /* error */
+
+- (*__gmp_free_func) (str, alloc_size);
+ return str_size + nread;
+ }
diff --git a/devel/gmp/patches/patch-gd b/devel/gmp/patches/patch-gd
new file mode 100644
index 00000000000..26f4eaafc01
--- /dev/null
+++ b/devel/gmp/patches/patch-gd
@@ -0,0 +1,30 @@
+$NetBSD: patch-gd,v 1.1.2.2 2002/08/25 21:20:11 jlam Exp $
+
+This is a patch for 4.1 from the GNU MP Homepage, it should be
+removed in future versions
+
+--- gmpxx.h.old Wed Jul 3 10:45:48 2002
++++ gmpxx.h Wed Jul 3 10:49:28 2002
+@@ -2633,10 +2633,18 @@
+ }
+
+ // conversion functions
+- const mpz_classref get_num() const { return mpz_classref(mpq_numref(mp)); }
+- mpz_classref get_num() { return mpz_classref(mpq_numref(mp)); }
+- const mpz_classref get_den() const { return mpz_classref(mpq_denref(mp)); }
+- mpz_classref get_den() { return mpz_classref(mpq_denref(mp)); }
++
++ // casting a reference to an mpz_t to mpz_class & is a dirty hack,
++ // but works because the internal representation of mpz_class is
++ // exactly an mpz_t
++ const mpz_class & get_num() const
++ { return reinterpret_cast<const mpz_class &>(*mpq_numref(mp)); }
++ mpz_class & get_num()
++ { return reinterpret_cast<mpz_class &>(*mpq_numref(mp)); }
++ const mpz_class & get_den() const
++ { return reinterpret_cast<const mpz_class &>(*mpq_denref(mp)); }
++ mpz_class & get_den()
++ { return reinterpret_cast<mpz_class &>(*mpq_denref(mp)); }
+
+ mpq_srcptr get_mpq_t() const { return mp; }
+ mpq_ptr get_mpq_t() { return mp; }