summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-libs/givaro/files/givaro-4.2.0-gcc15.patch26
-rw-r--r--sci-libs/givaro/givaro-4.2.0-r1.ebuild55
2 files changed, 81 insertions, 0 deletions
diff --git a/sci-libs/givaro/files/givaro-4.2.0-gcc15.patch b/sci-libs/givaro/files/givaro-4.2.0-gcc15.patch
new file mode 100644
index 000000000000..ddceae7b22ab
--- /dev/null
+++ b/sci-libs/givaro/files/givaro-4.2.0-gcc15.patch
@@ -0,0 +1,26 @@
+From 4d0712be1180f034ac698d944c1cefb3decf351a Mon Sep 17 00:00:00 2001
+From: Doug Torrance <dtorrance@piedmont.edu>
+Date: Thu, 3 Oct 2024 13:26:16 -0400
+Subject: [PATCH] Fix build using GCC 15
+
+max is an rint, which doesn't have a "Low" member. But max.Value,
+which is an ruint, does.
+
+Closes: #232
+---
+ src/kernel/recint/rfiddling.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/kernel/recint/rfiddling.h b/src/kernel/recint/rfiddling.h
+index 3865eb3b..3ea16e91 100644
+--- a/src/kernel/recint/rfiddling.h
++++ b/src/kernel/recint/rfiddling.h
+@@ -167,7 +167,7 @@ namespace RecInt
+ template <size_t K>
+ inline rint<K> rint<K>::maxFFLAS() {
+ rint<K> max;
+- set_highest_bit(max.Low.Value);
++ set_highest_bit(max.Value.Low.Value);
+ return max;
+ }
+
diff --git a/sci-libs/givaro/givaro-4.2.0-r1.ebuild b/sci-libs/givaro/givaro-4.2.0-r1.ebuild
new file mode 100644
index 000000000000..6395b5ddd659
--- /dev/null
+++ b/sci-libs/givaro/givaro-4.2.0-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="C++ library for arithmetic and algebraic computations"
+HOMEPAGE="https://casys.gricad-pages.univ-grenoble-alpes.fr/givaro/"
+SRC_URI="https://github.com/linbox-team/givaro/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="CeCILL-B"
+SLOT="0/9" # soname major
+KEYWORDS="~amd64 ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ doc? (
+ app-text/doxygen[dot]
+ dev-texlive/texlive-bibtexextra
+ dev-texlive/texlive-fontsextra
+ dev-texlive/texlive-fontutils
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ )
+"
+DEPEND="dev-libs/gmp:0[cxx(+)]"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS ChangeLog README.md )
+
+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"
+ "${FILESDIR}/${P}-gcc15.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-docdir="/usr/share/doc/${PF}/html" \
+ $(use_enable doc)
+}
+
+src_install() {
+ default
+ find "${ED}" -type f -name '*.la' -delete || die
+}