commit:     8baa80698652b2b41bd4ce005e257dc36be28436
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 30 14:39:03 2024 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Mar 30 14:40:30 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8baa8069

sci-libs/givaro: fix build with gcc-14

There was already an upstream patch for this that I missed.

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

 sci-libs/givaro/files/givaro-4.2.0-gcc14.patch | 31 ++++++++++++++++++++++++++
 sci-libs/givaro/givaro-4.2.0.ebuild            |  1 +
 2 files changed, 32 insertions(+)

diff --git a/sci-libs/givaro/files/givaro-4.2.0-gcc14.patch 
b/sci-libs/givaro/files/givaro-4.2.0-gcc14.patch
new file mode 100644
index 000000000000..83d7256abfd5
--- /dev/null
+++ b/sci-libs/givaro/files/givaro-4.2.0-gcc14.patch
@@ -0,0 +1,31 @@
+From 20caba1b549fe46b483f120f8eec6ec4e9f4572d Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <c...@musicinmybrain.net>
+Date: Thu, 25 Jan 2024 08:29:17 -0500
+Subject: [PATCH] Temporary GCC 14 workaround
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes https://github.com/linbox-team/givaro/issues/226 “GCC 14: No match
+for operator= for Givaro::ZRing<Givaro::Integer>”
+
+Recommended in
+https://github.com/linbox-team/givaro/issues/226#issuecomment-1908853755
+---
+ src/kernel/integer/random-integer.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/kernel/integer/random-integer.h 
b/src/kernel/integer/random-integer.h
+index f9361d33..ea189a36 100644
+--- a/src/kernel/integer/random-integer.h
++++ b/src/kernel/integer/random-integer.h
+@@ -87,7 +87,6 @@ namespace Givaro
+             if (this != &R) {
+                 _bits = R._bits;
+                 _integer = R._integer;
+-                const_cast<Integer_Domain&>(_ring)=R._ring;
+             }
+             return *this;
+         }
+-- 
+2.43.0

diff --git a/sci-libs/givaro/givaro-4.2.0.ebuild 
b/sci-libs/givaro/givaro-4.2.0.ebuild
index 327d439ec727..ab621bfb5ab1 100644
--- a/sci-libs/givaro/givaro-4.2.0.ebuild
+++ b/sci-libs/givaro/givaro-4.2.0.ebuild
@@ -34,6 +34,7 @@ PATCHES=(
        "${FILESDIR}/givaro-4.1.1-fix-pc-libdir.patch"
        "${FILESDIR}/${P}-configure.ac-fix-a-bashism.patch"
        "${FILESDIR}/${P}-cstdint.patch"
+       "${FILESDIR}/${P}-gcc14.patch"
 )
 
 src_prepare() {

Reply via email to