packages: smalltalk/smalltalk.spec, smalltalk/gmp5.patch (NEW) - added gmp5...
sls
sls at pld-linux.org
Wed Apr 7 23:23:06 CEST 2010
Author: sls Date: Wed Apr 7 21:23:06 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- added gmp5.patch (from smalltalk git)
---- Files affected:
packages/smalltalk:
smalltalk.spec (1.88 -> 1.89) , gmp5.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/smalltalk/smalltalk.spec
diff -u packages/smalltalk/smalltalk.spec:1.88 packages/smalltalk/smalltalk.spec:1.89
--- packages/smalltalk/smalltalk.spec:1.88 Sat Jan 2 00:00:51 2010
+++ packages/smalltalk/smalltalk.spec Wed Apr 7 23:23:00 2010
@@ -18,6 +18,7 @@
Source1: %{name}.desktop
Source2: %{name}.png
Patch0: %{name}-proc.patch
+Patch1: gmp5.patch
URL: http://www.gnu.org/software/smalltalk/
BuildRequires: OpenGL-devel
BuildRequires: OpenGL-glut-devel
@@ -161,6 +162,7 @@
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%configure \
@@ -299,6 +301,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.89 2010/04/07 21:23:00 sls
+- added gmp5.patch (from smalltalk git)
+
Revision 1.88 2010/01/01 23:00:51 sparky
- Summary capitalization
================================================================
Index: packages/smalltalk/gmp5.patch
diff -u /dev/null packages/smalltalk/gmp5.patch:1.1
--- /dev/null Wed Apr 7 23:23:06 2010
+++ packages/smalltalk/gmp5.patch Wed Apr 7 23:23:00 2010
@@ -0,0 +1,84 @@
+From 04ac00a8126a0b328e231e01ab4b257b28c5da3c Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <bonzini at gnu.org>
+Date: Fri, 8 Jan 2010 16:00:36 +0100
+Subject: [PATCH] hack to build with GMP 5
+
+libgst:
+2010-01-08 Paolo Bonzini <bonzini at gnu.org>
+
+ * libgst/mpz.c: Hack to build with GMP 5.
+---
+ libgst/ChangeLog | 4 ++++
+ libgst/mpz.c | 20 ++++++++++++++++++--
+ 2 files changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/libgst/mpz.c b/libgst/mpz.c
+index eaee0e8..d8e8b6b 100644
+--- a/libgst/mpz.c
++++ b/libgst/mpz.c
+@@ -1513,13 +1513,21 @@ _gst_mpz_xor (gst_mpz *res, const gst_mpz *op1, const gst_mpz *op2)
+ }
+ }
+
++#if __GNU_MP_VERSION >= 5
++extern void __gmpn_divexact (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t);
++#endif
++
+ void
+ _gst_mpz_divexact (gst_mpz *quot, const gst_mpz *num, const gst_mpz *den)
+ {
+- mp_ptr qp, tp;
++ mp_ptr qp;
+ mp_srcptr np, dp;
+- mp_size_t nsize, dsize, qsize, d_zero_limbs;
++ mp_size_t nsize, dsize, qsize;
++#if __GNU_MP_VERSION < 5
++ mp_ptr tp;
++ mp_size_t d_zero_limbs;
+ int d_zero_bits;
++#endif
+
+ nsize = ABS (num->size);
+ dsize = ABS (den->size);
+@@ -1542,6 +1550,7 @@ _gst_mpz_divexact (gst_mpz *quot, const gst_mpz *num, const gst_mpz *den)
+ return;
+ }
+
++#if __GNU_MP_VERSION < 5
+ /* Avoid quadratic behaviour, but do it conservatively. */
+ if (nsize - dsize > 1500)
+ {
+@@ -1560,6 +1569,7 @@ _gst_mpz_divexact (gst_mpz *quot, const gst_mpz *num, const gst_mpz *den)
+ dsize -= d_zero_limbs;
+ np += d_zero_limbs;
+ nsize -= d_zero_limbs;
++#endif
+
+ /* Allocate where we place the result. It must be nsize limbs big
+ because it also acts as a temporary area. */
+@@ -1567,6 +1577,7 @@ _gst_mpz_divexact (gst_mpz *quot, const gst_mpz *num, const gst_mpz *den)
+ gst_mpz_realloc (quot, nsize);
+ qp = quot->d;
+
++#if __GNU_MP_VERSION < 5
+ if (d_zero_bits != 0)
+ {
+ tp = (mp_ptr) alloca (dsize * SIZEOF_MP_LIMB_T);
+@@ -1579,9 +1590,14 @@ _gst_mpz_divexact (gst_mpz *quot, const gst_mpz *num, const gst_mpz *den)
+ }
+ else
+ MPN_COPY(qp, np, nsize);
++#endif
+
+ qsize = nsize - dsize + 1;
++#if __GNU_MP_VERSION < 5
+ mpn_bdivmod (qp, qp, nsize, dp, dsize, qsize * GMP_NUMB_BITS);
++#else
++ __gmpn_divexact (qp, np, nsize, dp, dsize);
++#endif
+ quot->size = (num->size ^ den->size) >= 0 ? qsize : -qsize;
+ }
+
+--
+1.6.5
+
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/smalltalk/smalltalk.spec?r1=1.88&r2=1.89&f=u
More information about the pld-cvs-commit
mailing list