Date: Friday, June 5, 2020 @ 18:41:00 Author: arojas Revision: 639181
flint 2.6 rebuild Added: e-antic/trunk/e-antic-flint-2.6.patch Modified: e-antic/trunk/PKGBUILD -------------------------+ PKGBUILD | 14 ++- e-antic-flint-2.6.patch | 182 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 192 insertions(+), 4 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2020-06-05 18:13:03 UTC (rev 639180) +++ PKGBUILD 2020-06-05 18:41:00 UTC (rev 639181) @@ -2,7 +2,7 @@ pkgname=e-antic pkgver=0.1.5 -pkgrel=1 +pkgrel=2 pkgdesc="Embedded algebraic number fields (on top of antic)" arch=(x86_64) url="https://github.com/videlec/e-antic" @@ -9,9 +9,15 @@ license=(LGPL) depends=(arb) makedepends=() -source=(https://www.labri.fr/perso/vdelecro/e-antic/$pkgname-$pkgver.tar.gz) -sha256sums=('d935ebaa59fcc6742fa62813f7039def52011f65ce3ed08f2da6ce66224f9859') +source=(https://www.labri.fr/perso/vdelecro/e-antic/$pkgname-$pkgver.tar.gz + e-antic-flint-2.6.patch) +sha256sums=('d935ebaa59fcc6742fa62813f7039def52011f65ce3ed08f2da6ce66224f9859' + '83d20c2a6617a0389a4a55956aa955e2032894afb15036965c3ff628c525fe62') +prepare() { + patch -d $pkgname-$pkgver -p1 -i ../e-antic-flint-2.6.patch # Fix build with flint 2.6 +} + build() { cd $pkgname-$pkgver ./configure --prefix=/usr @@ -18,7 +24,7 @@ #https://bugzilla.gnome.org/show_bug.cgi?id=655517 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool - make + make -j1 } package() { Added: e-antic-flint-2.6.patch =================================================================== --- e-antic-flint-2.6.patch (rev 0) +++ e-antic-flint-2.6.patch 2020-06-05 18:41:00 UTC (rev 639181) @@ -0,0 +1,182 @@ +diff --git a/e-antic/e-antic.h b/e-antic/e-antic.h +index d941baf..5317bd0 100644 +--- a/e-antic/e-antic.h ++++ b/e-antic/e-antic.h +@@ -18,12 +18,6 @@ extern "C" { + __E_ANTIC_VERSION_MINOR * 100 + \ + __E_ANTIC_VERSION_PATCHLEVEL) + +-/* check flint version */ +- +-#if __FLINT_RELEASE != 20502 && __FLINT_RELEASE != 20503 +-#error FLINT 2.5.2 or 2.5.3 required +-#endif +- + #ifdef __cplusplus + } + #endif +diff --git a/e-antic/poly_extra.h b/e-antic/poly_extra.h +index 9338f29..ee3b98b 100644 +--- a/e-antic/poly_extra.h ++++ b/e-antic/poly_extra.h +@@ -100,102 +100,6 @@ void arb_mul_fmpq(arb_t a, const arb_t b, const fmpq_t c, slong prec); + void arb_div_fmpq(arb_t a, const arb_t b, const fmpq_t c, slong prec); + void arb_fmpq_div(arb_t a, const fmpq_t c, const arb_t b, slong prec); + +-static __inline__ +-int fmpq_equal_fmpz(const fmpq_t a, const fmpz_t b) +-{ +- return fmpz_is_one(fmpq_denref(a)) && fmpz_equal(fmpq_numref(a), b); +-} +- +-static __inline__ +-int fmpq_equal_si(const fmpq_t a, const slong b) +-{ +- return fmpz_is_one(fmpq_denref(a)) && fmpz_equal_si(fmpq_numref(a), b); +-} +- +-static __inline__ +-int fmpq_equal_ui(const fmpq_t a, const ulong b) +-{ +- return fmpz_is_one(fmpq_denref(a)) && fmpz_equal_ui(fmpq_numref(a), b); +-} +- +-static __inline__ +-int fmpq_cmp_fmpz(const fmpq_t a, const fmpz_t b) +-{ +- int s; +- fmpz_t den; +- fmpz_init(den); +- fmpz_one(den); +- s = _fmpq_cmp(fmpq_numref(a), fmpq_denref(a), b, den); +- fmpz_clear(den); +- return s; +-} +- +-static __inline__ +-int fmpq_cmp_si(const fmpq_t a, slong b) +-{ +- int s; +- fmpq_t bb; +- fmpq_init(bb); +- fmpz_set_si(fmpq_numref(bb), b); +- fmpz_one(fmpq_denref(bb)); +- s = fmpq_cmp(a, bb); +- fmpq_clear(bb); +- return s; +-} +- +-static __inline__ +-int fmpq_cmp_ui(const fmpq_t a, ulong b) +-{ +- int s; +- fmpq_t bb; +- fmpq_init(bb); +- fmpz_set_ui(fmpq_numref(bb), b); +- fmpz_one(fmpq_denref(bb)); +- s = fmpq_cmp(a, bb); +- fmpq_clear(bb); +- return s; +-} +- +-static __inline__ +-void fmpq_add_ui(fmpq_t a, const fmpq_t b, ulong c) +-{ +- fmpz_t tmp; +- fmpz_init(tmp); +- fmpz_set_ui(tmp, c); +- fmpq_add_fmpz(a, b, tmp); +- fmpz_clear(tmp); +-} +- +-static __inline__ +-void fmpq_sub_ui(fmpq_t a, const fmpq_t b, ulong c) +-{ +- fmpz_t tmp; +- fmpz_init(tmp); +- fmpz_set_ui(tmp, c); +- fmpq_sub_fmpz(a, b, tmp); +- fmpz_clear(tmp); +-} +- +-static __inline__ +-void fmpq_mul_si(fmpq_t a, const fmpq_t b, slong c) +-{ +- fmpz_t tmp; +- fmpz_init(tmp); +- fmpz_set_si(tmp, c); +- fmpq_mul_fmpz(a, b, tmp); +- fmpz_clear(tmp); +-} +- +-static __inline__ +-void fmpq_mul_ui(fmpq_t a, const fmpq_t b, ulong c) +-{ +- fmpz_t tmp; +- fmpz_init(tmp); +- fmpz_set_ui(tmp, c); +- fmpq_mul_fmpz(a, b, tmp); +- fmpz_clear(tmp); +-} +- + static __inline__ + void fmpq_div_si(fmpq_t a, const fmpq_t b, slong c) + { +@@ -256,22 +160,6 @@ void fmpz_poly_evaluate_at_one(fmpz_t res, fmpz * p, slong len) + return _fmpz_vec_sum(res, p, len); + } + +-static __inline__ +-double fmpq_get_d(fmpq_t q) +-{ +- arb_t z; +- double d; +- +- arb_init(z); +- arb_set_fmpq(z, q, 64); +- +- d = arf_get_d(arb_midref(z), ARF_RND_NEAR); +- +- arb_clear(z); +- +- return d; +-} +- + static __inline__ + ulong EANTIC_FIXED_fmpz_vec_max_bits(const fmpz * vec, slong len) + { +@@ -338,7 +226,7 @@ void _fmpz_poly_num_real_roots_sturm(slong * n_neg, slong * n_pos, const fmpz * + + void fmpz_poly_product_roots_fmpq_vec(fmpz_poly_t poly, const fmpq * xs, slong n); + +-#elif __FLINT_RELEASE == 20503 ++#elif __FLINT_RELEASE >= 20503 + + #define _EANTIC_FIXED_fmpq_poly_get_str_pretty _fmpq_poly_get_str_pretty + #define EANTIC_FIXED_fmpq_poly_get_str_pretty fmpq_poly_get_str_pretty +diff --git a/nf_elem/mul.c b/nf_elem/mul.c +index 17fb3ed..a965147 100644 +--- a/nf_elem/mul.c ++++ b/nf_elem/mul.c +@@ -128,7 +128,7 @@ void _nf_elem_mul_red(nf_elem_t a, const nf_elem_t b, + _fmpz_vec_set(r, NF_ELEM_NUMREF(a), plen); + + _fmpz_poly_divrem(q, NF_ELEM_NUMREF(a), r, plen, +- fmpq_poly_numref(nf->pol), len); ++ fmpq_poly_numref(nf->pol), len, 0); + + _fmpz_vec_clear(r, plen); + _fmpz_vec_clear(q, plen - len + 1); +diff --git a/nf_elem/reduce.c b/nf_elem/reduce.c +index dd84519..007c6d4 100644 +--- a/nf_elem/reduce.c ++++ b/nf_elem/reduce.c +@@ -81,7 +81,7 @@ void _nf_elem_reduce(nf_elem_t a, const nf_t nf) + _fmpz_vec_set(r, NF_ELEM_NUMREF(a), plen); + + _fmpz_poly_divrem(q, NF_ELEM_NUMREF(a), r, plen, +- fmpq_poly_numref(nf->pol), len); ++ fmpq_poly_numref(nf->pol), len, 0); + + _fmpz_vec_clear(r, plen); + _fmpz_vec_clear(q, plen - len + 1);