diff options
author | Sam James <sam@gentoo.org> | 2024-03-17 07:48:42 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-03-17 07:49:44 +0000 |
commit | 563f6de9fc73190ad10ae3778fe3ede11a42f7e3 (patch) | |
tree | 7889158beebba7eebb8d4963be1a0462dd4709e8 | |
parent | www-client/firefox: drop 115.7.0 (diff) | |
download | gentoo-563f6de9fc73190ad10ae3778fe3ede11a42f7e3.tar.gz gentoo-563f6de9fc73190ad10ae3778fe3ede11a42f7e3.tar.bz2 gentoo-563f6de9fc73190ad10ae3778fe3ede11a42f7e3.zip |
sci-libs/silo: add 4.11.1
* Partially fix tests with GCC 14 (reported another issue on the upstream PR for that).
* Disable LTO and SA given the comments on a linked upstream bug wrt opimisation.
Closes: https://bugs.gentoo.org/862927
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | sci-libs/silo/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/silo/files/silo-4.11.1-gcc14-tests.patch | 45 | ||||
-rw-r--r-- | sci-libs/silo/silo-4.11.1.ebuild | 63 |
3 files changed, 109 insertions, 0 deletions
diff --git a/sci-libs/silo/Manifest b/sci-libs/silo/Manifest index f860b2cafed1..a2470626ee06 100644 --- a/sci-libs/silo/Manifest +++ b/sci-libs/silo/Manifest @@ -1 +1,2 @@ DIST silo-4.11-bsd.tgz 13298515 BLAKE2B fcf2e7912381e57d1a64644d3cee4dea50302c12704eaf0ee9e2569b7bc29b1d5c9df66878744ffc2cc04e16834fdf1cd4d677983af36005e4ecf0918c6283d5 SHA512 f642dd21dacffa147aea54d6f8669c704772d5640d6eb7eeff1d7e5e5d37ddbde250d78bad30e9478dcfec63a86863243d7a56cd9b692eaefdd7a89b34df35d0 +DIST silo-4.11.1-bsd.tar.xz 4581480 BLAKE2B 577bb9e367cae08496ec2062ce7b1fc6ebd04a8221bfb304585ea8b338502793a8ba43c14dbf8a7fd1f61b3c8a3a7886da1e9a7f9a1972d2a9cb69d5e36362e3 SHA512 e4ecfc434b43ea0bd2e3cda469f5e232b0bdfd25a44da04e77f2213ff20fd4158bc085d16b10de22d9a4be0ce822899e2b7f20c53b4d4bd941f92357a873c4a2 diff --git a/sci-libs/silo/files/silo-4.11.1-gcc14-tests.patch b/sci-libs/silo/files/silo-4.11.1-gcc14-tests.patch new file mode 100644 index 000000000000..1e729ee74e32 --- /dev/null +++ b/sci-libs/silo/files/silo-4.11.1-gcc14-tests.patch @@ -0,0 +1,45 @@ +https://github.com/LLNL/Silo/pull/371 + +From f0737787eb02093defc30de05a731ffe63c4c6f4 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Sun, 17 Mar 2024 07:35:36 +0000 +Subject: [PATCH] tests: add missing header for `difftime` +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +With GCC 14, which makes implicit function declarations an error by default: +``` +TestReadMask.c: In function ‘ElapsedTime’: +TestReadMask.c:746:15: error: implicit declaration of function ‘difftime’ [-Wimplicit-function-declaration] + 746 | ms = (int)difftime(end_time.tv_sec, start_time.tv_sec); + | ^~~~~~~~ +TestReadMask.c:62:1: note: ‘difftime’ is defined in header ‘<time.h>’; this is probably fixable by adding ‘#include <time.h>’ + 61 | #include <std.c> + +++ |+#include <time.h> + 62 | +``` + +Fix the include guards and include <time.h> unconditionally (for difftime) and <string.h> +unconditionally too (for memcpy). + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/tests/TestReadMask.c ++++ b/tests/TestReadMask.c +@@ -51,13 +51,12 @@ product endorsement purposes. + */ + #include <stdio.h> + #include <silo.h> ++#include <string.h> + #ifndef WIN32 + #include <sys/time.h> +-#else +-#include <string.h> +-#include <time.h> + #endif + #include <sys/timeb.h> ++#include <time.h> + #include <std.c> + + /* To compile this program on hyper, here is the command: + diff --git a/sci-libs/silo/silo-4.11.1.ebuild b/sci-libs/silo/silo-4.11.1.ebuild new file mode 100644 index 000000000000..78b80eb13d33 --- /dev/null +++ b/sci-libs/silo/silo-4.11.1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic fortran-2 qmake-utils + +DESCRIPTION="A mesh and field I/O library and scientific database" +HOMEPAGE="https://software.llnl.gov/Silo/" +SRC_URI="https://github.com/LLNL/Silo/releases/download/${PV}/${P}-bsd.tar.xz" +S="${WORKDIR}/${P}-bsd" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="browser +hdf5 +silex" + +# see bugs 656432 and 741741 +RDEPEND=" + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + net-dialup/lrzsz + virtual/szip + hdf5? ( sci-libs/hdf5 ) +" +DEPEND="${RDEPEND}" +BDEPEND="dev-qt/linguist-tools:5" + +PATCHES=( + "${FILESDIR}"/${PN}-4.11-test-disable-largefile.patch + "${FILESDIR}"/${PN}-4.11-tests.patch + "${FILESDIR}"/${PN}-4.11-testsuite-python-write.patch + "${FILESDIR}"/${PN}-4.11-widgets.patch + "${FILESDIR}"/${PN}-4.11-qtbindir.patch + "${FILESDIR}"/${PN}-4.11.1-gcc14-tests.patch +) + +src_configure() { + # bug #862927 and https://github.com/LLNL/Silo/issues/248 + append-flags -fno-strict-aliasing + filter-lto + + # add fflags for fixing test bug on matf77.f + # see https://github.com/LLNL/Silo/issues/234 + append-fflags $(test-flags-F77 -fallow-argument-mismatch) + + CONFIG_SHELL="${BROOT}"/bin/bash \ + QMAKE=$(qt5_get_bindir)/qmake \ + QT_BIN_DIR=$(qt5_get_bindir) \ + econf \ + --enable-install-lite-headers \ + --enable-shared \ + $(use_enable silex silex ) \ + $(use_enable browser browser ) \ + $(use_with hdf5 hdf5 "${EPREFIX}"/usr/include,"${EPREFIX}"/usr/$(get_libdir) ) +} + +src_test() { + # see https://github.com/LLNL/Silo/issues/236 + # some tests are skipped by default so we are gonna drop them directly + emake ATARGS="1-34 36-44 50-51 66-76 78-81" -C tests check +} |