commit:     0fcb43dc8b2a77319dece738f9c391e92ee8f6fe
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 19 00:04:50 2025 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Apr 19 13:17:38 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fcb43dc

dev-gap/guava: add Sort() calls to tests to fix random failures

Sent upstream, maybe there is a better fix but this will at least
prevent the test suite from failing.

Closes: https://bugs.gentoo.org/951553
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 dev-gap/guava/files/guava-3.20-testfix.patch | 26 ++++++++++++++++++++++++++
 dev-gap/guava/guava-3.20.ebuild              |  1 +
 2 files changed, 27 insertions(+)

diff --git a/dev-gap/guava/files/guava-3.20-testfix.patch 
b/dev-gap/guava/files/guava-3.20-testfix.patch
new file mode 100644
index 000000000000..ed81d5cedf1e
--- /dev/null
+++ b/dev-gap/guava/files/guava-3.20-testfix.patch
@@ -0,0 +1,26 @@
+https://github.com/gap-packages/guava/issues/110
+
+diff --git a/tst/guava.tst b/tst/guava.tst
+index c6b356b..fc70f65 100644
+--- a/tst/guava.tst
++++ b/tst/guava.tst
+@@ -100,11 +100,14 @@ gap> Print(" Codes\n");
+ gap> C:=RandomLinearCode(20,10,GF(4));
+ a  [20,10,?] randomly generated code over GF(4)
+ gap> c:=Random(C);;
+-gap> NamesOfComponents(C);
+-[ "Representative", "ZeroImmutable", "name", "LeftActingDomain", "Dimension", 
+-  "GeneratorsOfLeftOperatorAdditiveGroup", "Basis", "NiceFreeLeftModule", 
+-  "WordLength", "GeneratorMat" ]
+-gap> NamesOfComponents(c);
++gap> nC:=NamesOfComponents(C);;
++gap> Sort(nC); nC;
++[ "Basis", "Dimension", "GeneratorMat",
++  "GeneratorsOfLeftOperatorAdditiveGroup", "LeftActingDomain",
++  "NiceFreeLeftModule", "Representative", "WordLength", "ZeroImmutable",
++  "name" ]
++gap> nc:=NamesOfComponents(c);;
++gap> Sort(nc); nc;
+ [ "VectorCodeword", "WordLength", "treatAsPoly" ]
+ gap> c!.VectorCodeword;
+ < immutable compressed vector length 20 over GF(4) >

diff --git a/dev-gap/guava/guava-3.20.ebuild b/dev-gap/guava/guava-3.20.ebuild
index 130975ba1724..7ffed547cc7f 100644
--- a/dev-gap/guava/guava-3.20.ebuild
+++ b/dev-gap/guava/guava-3.20.ebuild
@@ -15,6 +15,7 @@ DEPEND="sci-mathematics/gap"
 
 PATCHES=(
        "${FILESDIR}/${PN}-3.15-makefile.patch"
+       "${FILESDIR}/${P}-testfix.patch"
 )
 
 GAP_PKG_EXTRA_INSTALL=( tbl )

Reply via email to