commit:     361658b03516ebe9ccfddfe37c22e5d812f1ea8a
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu May 13 11:44:30 2021 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Thu May 13 11:45:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=361658b0

sci-mathematics/pari: new revision with backported rnfdisc patch.

The SageMath test suite will soon require this backported patch to
when using pari-2.13.1. It fixes an incorrect result and doesn't hurt
anything, so we add it preemptively.

Sage-bug: https://trac.sagemath.org/ticket/30801
Pari-bug: https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2284
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../pari/files/pari-2.13.1-rnfdisc.patch           | 35 ++++++++++++++++++++++
 .../{pari-2.13.1.ebuild => pari-2.13.1-r1.ebuild}  |  1 +
 2 files changed, 36 insertions(+)

diff --git a/sci-mathematics/pari/files/pari-2.13.1-rnfdisc.patch 
b/sci-mathematics/pari/files/pari-2.13.1-rnfdisc.patch
new file mode 100644
index 00000000000..39d325911e8
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.13.1-rnfdisc.patch
@@ -0,0 +1,35 @@
+From 3edb98db78dd49bb8b4137b46781a7cd570c2556 Mon Sep 17 00:00:00 2001
+From: Bill Allombert <bill.allomb...@math.u-bordeaux.fr>
+Date: Sun, 28 Mar 2021 13:27:24 +0200
+Subject: [PATCH] rnfdisc_factored: remove spurious Q_primpart [#2284]
+
+diff --git a/src/basemath/base2.c b/src/basemath/base2.c
+index b2b63ada5..531f5c558 100644
+--- a/src/basemath/base2.c
++++ b/src/basemath/base2.c
+@@ -3582,7 +3582,7 @@ rnfdisc_factored(GEN nf, GEN pol, GEN *pd)
+ 
+   nf = checknf(nf);
+   pol = rnfdisc_get_T(nf, pol, &lim);
+-  disc = nf_to_scalar_or_basis(nf, nfX_disc(nf, Q_primpart(pol)));
++  disc = nf_to_scalar_or_basis(nf, nfX_disc(nf, pol));
+   pol = nfX_to_monic(nf, pol, NULL);
+   fa = idealfactor_partial(nf, disc, lim);
+   P = gel(fa,1); l = lg(P);
+diff --git a/src/test/32/rnf b/src/test/32/rnf
+index 6bd4585..d24e1ce 100644 (file)
+--- a/src/test/32/rnf
++++ b/src/test/32/rnf
+@@ -832,9 +832,9 @@ error("inconsistent dimensions in idealtwoelt.")
+ 0
+ 0
+ 1
+-[[7361, 3786, 318, 5823; 0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1], [-3, 6, -2, 0]
+-~]
+-[2, -1]
++[[433, 322, 318, 1318/17; 0, 1, 0, 12/17; 0, 0, 1, 5/17; 0, 0, 0, 1/17], [25
++/17, -12/17, 12/17, 16/17]~]
++[1, -1]
+   ***   at top-level: rnfdedekind(nf,P,pr2,1)
+   ***                 ^-----------------------
+   *** rnfdedekind: sorry, Dedekind in the difficult case is not yet 
implemented.

diff --git a/sci-mathematics/pari/pari-2.13.1.ebuild 
b/sci-mathematics/pari/pari-2.13.1-r1.ebuild
similarity index 99%
rename from sci-mathematics/pari/pari-2.13.1.ebuild
rename to sci-mathematics/pari/pari-2.13.1-r1.ebuild
index bc5709ab338..12230c7f452 100644
--- a/sci-mathematics/pari/pari-2.13.1.ebuild
+++ b/sci-mathematics/pari/pari-2.13.1-r1.ebuild
@@ -38,6 +38,7 @@ PATCHES=(
        "${FILESDIR}/${PN}"-2.9.4-fltk-detection.patch
        "${FILESDIR}/${PN}"-2.11.2-Makefile-LDFLAGS.patch
        "${FILESDIR}/${PN}"-2.11.2-Makefile-docinstall.patch
+       "${FILESDIR}/${P}"-rnfdisc.patch
 )
 
 src_prepare() {

Reply via email to