Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package e-antic for openSUSE:Factory checked 
in at 2023-10-23 23:40:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/e-antic (Old)
 and      /work/SRC/openSUSE:Factory/.e-antic.new.1945 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "e-antic"

Mon Oct 23 23:40:26 2023 rev:10 rq:1119392 version:1.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/e-antic/e-antic.changes  2022-12-06 
14:24:17.826098318 +0100
+++ /work/SRC/openSUSE:Factory/.e-antic.new.1945/e-antic.changes        
2023-10-23 23:40:41.066918168 +0200
@@ -1,0 +2,5 @@
+Sun Oct 22 04:06:43 UTC 2023 - Jan Engelhardt <jeng...@inai.de>
+
+- Add flint3.diff to have the build succeed with flint-3.
+
+-------------------------------------------------------------------

New:
----
  flint3.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ e-antic.spec ++++++
--- /var/tmp/diff_new_pack.FkoP9F/_old  2023-10-23 23:40:41.786944306 +0200
+++ /var/tmp/diff_new_pack.FkoP9F/_new  2023-10-23 23:40:41.790944451 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package e-antic
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,13 +27,12 @@
 URL:            https://github.com/flatsurf/e-antic
 
 Source:         
https://github.com/flatsurf/e-antic/releases/download/%version/e-antic-%version.tar.gz
+Patch1:         flint3.diff
 BuildRequires:  %{python_module setuptools}
-BuildRequires:  antic-devel
-BuildRequires:  arb-devel
 BuildRequires:  automake
 BuildRequires:  cereal-devel
 BuildRequires:  fdupes
-BuildRequires:  flint-devel >= 2.6
+BuildRequires:  flint-devel >= 3
 BuildRequires:  gcc-c++
 BuildRequires:  gmp-devel
 BuildRequires:  libboost_headers-devel
@@ -61,8 +60,7 @@
 Summary:        Development files for e-antic
 Group:          Development/Libraries/C and C++
 Requires:       %lname = %version
-Requires:       antic-devel
-Requires:       arb-devel
+Requires:       flint-devel
 Requires:       libboost_headers-devel
 
 %description devel
@@ -82,7 +80,8 @@
 mkdir p%{$python_bin_suffix}/
 pushd p%{$python_bin_suffix}/
 %configure --disable-static --without-benchmark --without-byexample \
-       --without-pytest --without-doc PYTHON="python%{$python_bin_suffix}"
+       --without-pytest --without-doc PYTHON="python%{$python_bin_suffix}" \
+       CPPFLAGS="-I/usr/include/flint"
 %make_build
 popd
 }

++++++ flint3.diff ++++++
From: Jan Engelhardt <jeng...@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.

---
 libeantic/srcxx/renf_elem_class.cpp |   43 ++++++++++++++++++++++++++++++++++--
 1 file changed, 41 insertions(+), 2 deletions(-)

Index: e-antic-1.3.0/libeantic/srcxx/renf_elem_class.cpp
===================================================================
--- e-antic-1.3.0.orig/libeantic/srcxx/renf_elem_class.cpp
+++ e-antic-1.3.0/libeantic/srcxx/renf_elem_class.cpp
@@ -488,6 +488,45 @@ renf_elem_class::renf_elem_class(const r
     fmpq_poly_clear(p);
 }
 
+static void
+_fmpq_poly_set_array_mpq1(fmpz * poly, fmpz_t den, const mpq_t *a, slong n)
+{
+       mpz_t d, t;
+       mpz_init_set_ui(d, 1);
+       mpz_init(t);
+       for (slong i = 0; i < n; i++)
+               mpz_lcm(d, d, mpq_denref(a[i]));
+       for (slong i = 0; i < n; i++) {
+               __mpz_struct *ptr = _fmpz_promote(poly + i);
+               mpz_divexact(t, d, mpq_denref(a[i]));
+               mpz_mul(ptr, mpq_numref(a[i]), t);
+               _fmpz_demote_val(poly + i);
+       }
+       fmpz_set_mpz(den, d);
+       mpz_clear(d);
+       mpz_clear(t);
+}
+
+static void fmpq_poly_set_array_mpq1(fmpq_poly_t poly, const mpq_t *a, slong n)
+{
+       if (n == 0) {
+               fmpq_poly_zero(poly);
+               return;
+       }
+       fmpq_poly_fit_length(poly, n);
+       _fmpq_poly_set_array_mpq1(poly->coeffs, poly->den, a, n);
+       _fmpq_poly_set_length(poly, n);
+       _fmpq_poly_normalise(poly);
+}
+
+static void fmpq_poly_set_coeff_mpz1(fmpq_poly_t poly, slong n, const mpz_t x)
+{
+       fmpz_t f;
+       fmpz_init_set_readonly(f, x);
+       fmpq_poly_set_coeff_fmpz(poly, n, f);
+       fmpz_clear_readonly(f);
+}
+
 renf_elem_class::renf_elem_class(const renf_class& k, const 
std::vector<unsigned long> & coefficients)
     : renf_elem_class(k)
 {
@@ -512,7 +551,7 @@ renf_elem_class::renf_elem_class(const r
     fmpq_poly_t p;
     fmpq_poly_init(p);
     for (size_t i = 0; i < coefficients.size(); i++)
-        fmpq_poly_set_coeff_mpz(p, static_cast<slong>(i), 
coefficients[i].__get_mp());
+        fmpq_poly_set_coeff_mpz1(p, static_cast<slong>(i), 
coefficients[i].__get_mp());
 
     renf_elem_set_fmpq_poly(a, p, nf->renf_t());
     fmpq_poly_clear(p);
@@ -526,7 +565,7 @@ renf_elem_class::renf_elem_class(const r
 
     fmpq_poly_t p;
     fmpq_poly_init(p);
-    fmpq_poly_set_array_mpq(p, reinterpret_cast<const 
mpq_t*>(&coefficients[0]), coefficients.size());
+    fmpq_poly_set_array_mpq1(p, reinterpret_cast<const 
mpq_t*>(&coefficients[0]), coefficients.size());
 
     renf_elem_set_fmpq_poly(a, p, nf->renf_t());
     fmpq_poly_clear(p);

Reply via email to