Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package normaliz for openSUSE:Factory 
checked in at 2023-12-25 19:05:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/normaliz (Old)
 and      /work/SRC/openSUSE:Factory/.normaliz.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "normaliz"

Mon Dec 25 19:05:40 2023 rev:23 rq:1134932 version:3.10.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/normaliz/normaliz.changes        2023-11-03 
22:20:18.764419878 +0100
+++ /work/SRC/openSUSE:Factory/.normaliz.new.28375/normaliz.changes     
2023-12-25 19:05:52.382736354 +0100
@@ -1,0 +2,5 @@
+Sat Dec 23 13:42:28 UTC 2023 - Jan Engelhardt <jeng...@inai.de>
+
+- Add 0001-Add-FLINT-3-support.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Add-FLINT-3-support.patch

BETA DEBUG BEGIN:
  New:
- Add 0001-Add-FLINT-3-support.patch
BETA DEBUG END:

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

Other differences:
------------------
++++++ normaliz.spec ++++++
--- /var/tmp/diff_new_pack.ijNB2I/_old  2023-12-25 19:05:54.670819853 +0100
+++ /var/tmp/diff_new_pack.ijNB2I/_new  2023-12-25 19:05:54.686820437 +0100
@@ -26,6 +26,7 @@
 URL:            https://www.normaliz.uni-osnabrueck.de/
 
 Source:         
https://github.com/Normaliz/Normaliz/releases/download/v%version/%name-%version.tar.gz
+Patch1:         0001-Add-FLINT-3-support.patch
 BuildRequires:  e-antic-devel >= 1.0.1
 BuildRequires:  flint-devel
 BuildRequires:  gcc-c++

++++++ 0001-Add-FLINT-3-support.patch ++++++
>From e8d64832cbbd9c847452186f2da23fed6fb0a0d3 Mon Sep 17 00:00:00 2001
From: Doug Torrance <dtorra...@piedmont.edu>
Date: Tue, 19 Dec 2023 08:15:16 -0500
Subject: [PATCH] Add FLINT 3 support

The various coefficient getting/setting functions that use GMP
integers/rationals directly have been removed, and so we need to
convert from GMP <-> FLINT separately.

Closes: #412
---
 configure.ac                           |  2 +-
 source/libnormaliz/HilbertSeries.cpp   | 10 ++++++++--
 source/libnormaliz/vector_operations.h | 10 ++++++++--
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index e3779ca2..feb90500 100644
--- a/configure.ac
+++ b/configure.ac
@@ -226,7 +226,7 @@ AS_CASE([$with_flint],
 AS_IF([test "x$with_flint" != xno],
     [AC_MSG_CHECKING([whether flint headers and library are available])
      FLINT_LIBS="-lflint -lmpfr"
-     AX_CHECK_LIBRARY([FLINT], [flint/flint.h], [flint], 
[fmpz_poly_set_coeff_mpz],[],[],[$GMP_LIBS])
+     AX_CHECK_LIBRARY([FLINT], [flint/flint.h], [flint], 
[fmpz_poly_set_coeff_fmpz],[],[],[$GMP_LIBS])
      AS_IF([test x$ax_cv_have_FLINT = xyes],
        [
          CPPFLAGS="$CPPFLAGS $FLINT_CPPFLAGS"
diff --git a/source/libnormaliz/HilbertSeries.cpp 
b/source/libnormaliz/HilbertSeries.cpp
index f536a590..1420f6d7 100644
--- a/source/libnormaliz/HilbertSeries.cpp
+++ b/source/libnormaliz/HilbertSeries.cpp
@@ -72,7 +72,10 @@ void flint_poly(fmpz_poly_t flp, const vector<mpz_class>& 
nmzp) {
     slong n = (slong)nmzp.size();
     fmpz_poly_fit_length(flp, n);
     for (size_t i = 0; i < nmzp.size(); ++i) {
-        fmpz_poly_set_coeff_mpz(flp, (slong)i, nmzp[i].get_mpz_t());
+        fmpz_t fc;
+        fmpz_init(fc);
+        fmpz_set_mpz(fc, nmzp[i].get_mpz_t());
+        fmpz_poly_set_coeff_fmpz(flp, (slong)i, fc);
     }
 }
 
@@ -80,9 +83,12 @@ void nmz_poly(vector<mpz_class>& nmzp, const fmpz_poly_t 
flp) {
     size_t n = (size_t)fmpz_poly_length(flp);
     nmzp.resize(n);
     mpz_t c;
+    fmpz_t fc;
     mpz_init(c);
+    fmpz_init(fc);
     for (size_t i = 0; i < nmzp.size(); ++i) {
-        fmpz_poly_get_coeff_mpz(c, flp, i);
+        fmpz_poly_get_coeff_fmpz(fc, flp, i);
+        fmpz_get_mpz(c, fc);
         nmzp[i] = mpz_class(c);
     }
     mpz_clear(c);
diff --git a/source/libnormaliz/vector_operations.h 
b/source/libnormaliz/vector_operations.h
index d7b15230..3996bcf7 100644
--- a/source/libnormaliz/vector_operations.h
+++ b/source/libnormaliz/vector_operations.h
@@ -547,7 +547,10 @@ inline void vector2fmpq_poly(fmpq_poly_t flp, const 
std::vector<mpq_class>& poly
 
     fmpq_poly_fit_length(flp, n);
     for (size_t i = 0; i < poly_vector.size(); ++i) {
-        fmpq_poly_set_coeff_mpq(flp, (slong)i, poly_vector[i].get_mpq_t());
+        fmpq_t fcurrent_coeff;
+        fmpq_init(fcurrent_coeff);
+        fmpq_set_mpq(fcurrent_coeff, poly_vector[i].get_mpq_t());
+        fmpq_poly_set_coeff_fmpq(flp, (slong)i, fcurrent_coeff);
     }
 }
 
@@ -560,8 +563,11 @@ inline void fmpq_poly2vector(std::vector<mpq_class>& 
poly_vector, const fmpq_pol
     poly_vector.resize(length);
     for (slong i = 0; i < length; i++) {
         mpq_t current_coeff;
+        fmpq_t fcurrent_coeff;
         mpq_init(current_coeff);
-        fmpq_poly_get_coeff_mpq(current_coeff, flp, (slong)i);
+        fmpq_init(fcurrent_coeff);
+        fmpq_poly_get_coeff_fmpq(fcurrent_coeff, flp, (slong)i);
+        fmpq_get_mpq(current_coeff, fcurrent_coeff);
         poly_vector[i] = mpq_class(current_coeff);
     }
 }
-- 
2.43.0

Reply via email to