- Add flint3.diff to have the build succeed with flint-3.
OBS-URL: https://build.opensuse.org/package/show/science/cm?expand=0&rev=11
This commit is contained in:
parent
eecfc1323b
commit
4702a9175c
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 22 04:06:43 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Add flint3.diff to have the build succeed with flint-3.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Jun 24 14:42:15 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
|
Sat Jun 24 14:42:15 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
3
cm.spec
3
cm.spec
@ -27,7 +27,8 @@ URL: https://www.multiprecision.org/cm/
|
|||||||
Source: http://www.multiprecision.org/downloads/%name-%version.tar.gz
|
Source: http://www.multiprecision.org/downloads/%name-%version.tar.gz
|
||||||
Source2: http://www.multiprecision.org/downloads/%name-%version.tar.gz.asc
|
Source2: http://www.multiprecision.org/downloads/%name-%version.tar.gz.asc
|
||||||
Source3: %name.keyring
|
Source3: %name.keyring
|
||||||
BuildRequires: flint-devel
|
Patch1: flint3.diff
|
||||||
|
BuildRequires: flint-devel >= 3
|
||||||
BuildRequires: gmp-devel >= 4.3.2
|
BuildRequires: gmp-devel >= 4.3.2
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: makeinfo
|
BuildRequires: makeinfo
|
||||||
|
57
flint3.diff
Normal file
57
flint3.diff
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
From: Jan Engelhardt <jengelh@inai.de>
|
||||||
|
Date: 2023-10-22 06:05:56.005185292 +0200
|
||||||
|
|
||||||
|
Copy functions from FLINT 2.9 [13042307357192c09630d276f0e7bf2abb9ffd39]
|
||||||
|
which have been removed in FLINT 3.0.
|
||||||
|
---
|
||||||
|
lib/flint.c | 23 +++++++++++++++++++++--
|
||||||
|
1 file changed, 21 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
Index: cm-0.4.2/lib/flint.c
|
||||||
|
===================================================================
|
||||||
|
--- cm-0.4.2.orig/lib/flint.c
|
||||||
|
+++ cm-0.4.2/lib/flint.c
|
||||||
|
@@ -30,6 +30,25 @@ Foundation, Inc., 59 Temple Place - Suit
|
||||||
|
/* */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
+static void fmpz_mod_poly_get_coeff_mpz1(mpz_t x,
|
||||||
|
+ const fmpz_mod_poly_t poly, slong n, const fmpz_mod_ctx_t ctx)
|
||||||
|
+{
|
||||||
|
+ fmpz_t t;
|
||||||
|
+ fmpz_init(t);
|
||||||
|
+ fmpz_mod_poly_get_coeff_fmpz(t, poly, n, ctx);
|
||||||
|
+ fmpz_get_mpz(x, t);
|
||||||
|
+ fmpz_clear(t);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void fmpz_mod_poly_set_coeff_mpz1(fmpz_mod_poly_t poly,
|
||||||
|
+ slong n, const mpz_t x, const fmpz_mod_ctx_t ctx)
|
||||||
|
+{
|
||||||
|
+ fmpz_t t;
|
||||||
|
+ fmpz_init_set_readonly(t, x);
|
||||||
|
+ fmpz_mod_poly_set_coeff_fmpz(poly, n, t, ctx);
|
||||||
|
+ fmpz_clear_readonly(t);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void mpzx_set_fmpz_mod_poly (mpzx_ptr f, fmpz_mod_poly_t ff,
|
||||||
|
const fmpz_mod_ctx_t ctx)
|
||||||
|
{
|
||||||
|
@@ -38,7 +57,7 @@ void mpzx_set_fmpz_mod_poly (mpzx_ptr f,
|
||||||
|
deg = fmpz_mod_poly_degree (ff, ctx);
|
||||||
|
mpzx_set_deg (f, deg);
|
||||||
|
for (i = 0; i <= deg; i++)
|
||||||
|
- fmpz_mod_poly_get_coeff_mpz (f->coeff [i], ff, i, ctx);
|
||||||
|
+ fmpz_mod_poly_get_coeff_mpz1(f->coeff [i], ff, i, ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
@@ -51,7 +70,7 @@ void fmpz_mod_poly_set_mpzx (fmpz_mod_po
|
||||||
|
deg = f->deg;
|
||||||
|
fmpz_mod_poly_realloc (ff, deg + 1, ctx);
|
||||||
|
for (i = 0; i <= deg; i++)
|
||||||
|
- fmpz_mod_poly_set_coeff_mpz (ff, i, f->coeff [i], ctx);
|
||||||
|
+ fmpz_mod_poly_set_coeff_mpz1(ff, i, f->coeff [i], ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user