commit: 453f7fa523bebf196d46e3ad3207a3684a9ffa82 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> AuthorDate: Fri May 2 01:44:29 2025 +0000 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> CommitDate: Fri May 2 01:49:11 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=453f7fa5
sci-mathematics/gfan: gcc-15 buildfix revision Closes: https://bugs.gentoo.org/937329 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> sci-mathematics/gfan/files/gfan-0.6.2-gcc15.patch | 22 ++++++ sci-mathematics/gfan/gfan-0.6.2-r7.ebuild | 86 +++++++++++++++++++++++ 2 files changed, 108 insertions(+) diff --git a/sci-mathematics/gfan/files/gfan-0.6.2-gcc15.patch b/sci-mathematics/gfan/files/gfan-0.6.2-gcc15.patch new file mode 100644 index 000000000000..3e4b75e292c5 --- /dev/null +++ b/sci-mathematics/gfan/files/gfan-0.6.2-gcc15.patch @@ -0,0 +1,22 @@ +https://github.com/Singular/Singular/commit/d3f73432d73ac0dd041 + +diff --git a/src/gfanlib_matrix.h b/src/gfanlib_matrix.h +index 418fa4c..27818b2 100644 +--- a/src/gfanlib_matrix.h ++++ b/src/gfanlib_matrix.h +@@ -115,6 +115,7 @@ public: + p[i][j]=s*(q[i][j]); + return p; + } ++ /* + friend Matrix operator*(const Matrix& a, const Matrix& b) + { + assert(a.width==b.height); +@@ -123,6 +124,7 @@ public: + ret[i]=a.vectormultiply(b.column(i)); + return ret.transposed(); + } ++ */ + /* template<class T> + Matrix<T>(const Matrix<T>& c):v(c.size()){ + for(int i=0;i<size();i++)v[i]=typ(c[i]);} diff --git a/sci-mathematics/gfan/gfan-0.6.2-r7.ebuild b/sci-mathematics/gfan/gfan-0.6.2-r7.ebuild new file mode 100644 index 000000000000..fa24bc6c8dfa --- /dev/null +++ b/sci-mathematics/gfan/gfan-0.6.2-r7.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Compute Groebner fans and tropical varieties" +HOMEPAGE="https://users-math.au.dk/~jensen/software/gfan/gfan.html" +SRC_URI="https://users-math.au.dk/~jensen/software/${PN}/${PN}${PV}.tar.gz" + +S="${WORKDIR}/${PN}${PV}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~riscv ~x86 ~amd64-linux ~x86-linux" +IUSE="doc" + +# texlive-plaingeneric is needed for \usepackage{ulem} in +# the manual. ghostscript-gpl provides the "dvipdf" command. +BDEPEND="doc? ( + app-text/ghostscript-gpl + dev-texlive/texlive-plaingeneric + virtual/latex-base +)" +DEPEND="dev-libs/gmp:0=[cxx(+)] + sci-libs/cddlib:0=" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-0.6.2-testsuite.patch" + "${FILESDIR}/${PN}-0.6.2-Makefile.patch" + "${FILESDIR}/${PN}-0.6.2-fix-0602ResultantFanProjection.patch" + "${FILESDIR}/${PN}-0.6.2-fix-spelling-errors.patch" + "${FILESDIR}/${PN}-0.6.2-find-name.patch" + "${FILESDIR}/${PN}-0.6.2-glibcxx-assertions.patch" + "${FILESDIR}/${PN}-0.6.2-gcc15.patch" +) + +pkg_setup() { + tc-export CC CXX + + # This should really go in cppflags, but that doesn't work with + # gfan's hand-written Makefile. + append-cxxflags -DNOCDDPREFIX -I"${EPREFIX}"/usr/include/cddlib +} + +src_prepare() { + default + + # And this one fails (harmlessly) on x86, bug 818397. + rm -r testsuite/0009RenderStairCase || \ + die "unable to disable test 0009RenderStairCase" +} + +src_configure() { + # -Werror=odr + # https://bugs.gentoo.org/863044 + # Only contact method is email. I have sent one detailing the issue. + filter-lto + + # The upstream Makefile says that GCC produces bad code with -O3. + replace-flags "-O3" "-O2" + default +} + +src_compile() { + default + if use doc; then + pushd doc > /dev/null || die + # The LaTeX build commands need to be repeated until the + # document "stops changing," which is not as easy as it + # sounds to detect. Running it twice seems to work here. + for iteration in 1 2; do + latex manual.tex && \ + bibtex manual && \ + dvipdf manual.dvi manual.pdf || die + done + popd > /dev/null || die + fi +} + +src_install() { + emake PREFIX="${ED}/usr" install + use doc && dodoc doc/manual.pdf +}
