From d1c14e94a73fba924761cdad7298f3e48c6bc160 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 1 Jul 2024 08:00:51 +0100 Subject: gentoo auto-resync : 01:07:2024 - 08:00:50 --- sci-libs/gsl/Manifest | 2 + sci-libs/gsl/files/gsl-2.7.1-test-tolerance.patch | 47 +++++++++++++++++ sci-libs/gsl/gsl-2.7.1-r3.ebuild | 62 +++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 sci-libs/gsl/files/gsl-2.7.1-test-tolerance.patch create mode 100644 sci-libs/gsl/gsl-2.7.1-r3.ebuild (limited to 'sci-libs/gsl') diff --git a/sci-libs/gsl/Manifest b/sci-libs/gsl/Manifest index e0a529e4d16d..306fb6709bbe 100644 --- a/sci-libs/gsl/Manifest +++ b/sci-libs/gsl/Manifest @@ -1,5 +1,7 @@ AUX gsl-2.7.1-configure-clang16.patch 806 BLAKE2B 5b3552d9ad70de9100a77cdf822fc684c11798af9c53c22c1b12617483371ab143c84c6ec1564f0c43702ed490bf69346067c032b66a439e4a1f0a14f28b2b91 SHA512 3f7c67c1a0430c0e179118f341cda31334286c68d3945368f4c013354e9122d6e3c8fbda891d2654557895187197fdc0e2a512b1dd499bc4c936d87dea63adf0 +AUX gsl-2.7.1-test-tolerance.patch 1700 BLAKE2B 5964fe42d8238dbb4d508f5bdce6246311d403fcbdaf44c1f691e94d26cdfb8e8370df5f9fb2ae5a4b212f67954c553a089020e9846cced321ba8b1157182a84 SHA512 9acaf4690418e0dd87ced481d696f1034d74b09d851241ac21895740330dd8f3d237f0526476923af7f7d9fb852c09f0c64d78f98b277fd134d0ac2bf34b8afd DIST gsl-2.7-cblas.patch.bz2 12073 BLAKE2B 71f2bdafdb1f42ca5c3515f8e39266242185218495705018d88e523be9bc776b39749156500cdc5746a16e481e9cfe2b79660e250eb1a70f3b18819d16fe11c5 SHA512 5b9b2a798079610d7d4981b83672cc978ed44b66aaf6e671794685f10bd4069764bb358870019dc0eec1e251639cde12aaa3598cae0e2fc050ea39c79435fe2f DIST gsl-2.7.1.tar.gz 7509209 BLAKE2B dd216c2fdb536e57b6e29613e46e1a05183fd18c47434039caac68fefffc0390cfe2f21eb117347d4bbdf9004de837ef2db02c17c01eaea4b615e3e45a4fd90f SHA512 3300a748b63b583374701d5ae2a9db7349d0de51061a9f98e7c145b2f7de9710b3ad58b3318d0be2a9a287ace4cc5735bb9348cdf48075b98c1f6cc1029df131 EBUILD gsl-2.7.1-r2.ebuild 1348 BLAKE2B 4a22ec3920aa67b3bdabf0ccba5d7bda8a3d99bdebe5a0888c644d282ce34096d26a159dfec002b0758d4887cff44ba9d2be2d00f5d616418ee521b5e0d80445 SHA512 d11fc8e417cbccc36d48c7460cb8331e74dba8cefa31495ca95bea13939569925f3536a6feb4e17bf35f1c5ddd04ac1b608cadf489624c190af7fb31526026cf +EBUILD gsl-2.7.1-r3.ebuild 1403 BLAKE2B aadafa4820e042c9267291be517eda6367fa7be97e84b84b7c1fd21af9aa3f53ff6e009982858cd7f189ab98c4319ca8df965d9f8ebcf8f2909c74b0194def68 SHA512 b1b4e516c49fef9249843ac85546fe83c0a9492c0a3e3240bf538a3b2f41a83ee730a533a29a3668ee8113161012f8d1ffc87a6ceaa0b2fcbacade8fdcd06b40 MISC metadata.xml 1339 BLAKE2B 65c2b4eb597ccc4fe4ffb92d37e5800af6f9136fb3186bef0167d52584565faca0778ef775c0e736508cdf8eb480d26bc9a74dc799f37ff6fcd2131410f1660c SHA512 f8201bb6adb83ba875315a2201a97e1653d08665f5889d3fde83cb7ff196ae9f904372552d980b5e3c210e5aa855915827c1af32255539cab236e2b938d39888 diff --git a/sci-libs/gsl/files/gsl-2.7.1-test-tolerance.patch b/sci-libs/gsl/files/gsl-2.7.1-test-tolerance.patch new file mode 100644 index 000000000000..8ddce4388e90 --- /dev/null +++ b/sci-libs/gsl/files/gsl-2.7.1-test-tolerance.patch @@ -0,0 +1,47 @@ +From 8306771281f9b2883c5200ee241b0c0767bfe1b4 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky +Date: Sun, 30 Jun 2024 19:45:45 -0400 +Subject: [PATCH 1/1] eigen/test.c: loosen tolerance in eigenvalue norm tests + +One test for the (unit) norm of a random hermitian matrix's +eigenvalues is victim to tolerance issues, e.g. + + FAIL: herm random, normalized(1), unsorted (0.999999999999999112 + observed vs 1 expected) [117761] + +The tolerance used is N*GSL_DBL_EPSILON, where N is the size of the +matrix. On my machine, the actual error is four times GSL_DBL_EPSILON, +which means that the tolernace is close but not quite right. Despite +having done a PhD in numerical analysis, I am choosing to fix this +with a shotgun: + + * By a factor of 10 + * Then also by a factor of N + +That's still extremely close, and hopefully will sweep the problem +under the rug whether it's off by a constant or off by a function +of N. + +Bug: https://bugs.gentoo.org/664936 +Bug: https://git.adelielinux.org/adelie/packages/-/issues/504 +Bug: https://savannah.gnu.org/bugs/?56843 +--- + eigen/test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/eigen/test.c b/eigen/test.c +index b0bdcc7..2681721 100644 +--- a/eigen/test.c ++++ b/eigen/test.c +@@ -506,7 +506,7 @@ test_eigen_herm_results (const gsl_matrix_complex * A, + { + gsl_vector_complex_const_view vi = gsl_matrix_complex_const_column(evec, i); + double nrm_v = gsl_blas_dznrm2(&vi.vector); +- gsl_test_rel (nrm_v, 1.0, N * GSL_DBL_EPSILON, "%s, normalized(%d), %s", ++ gsl_test_rel (nrm_v, 1.0, N*N * 10.0 * GSL_DBL_EPSILON, "%s, normalized(%d), %s", + desc, i, desc2); + } + +-- +2.44.2 + diff --git a/sci-libs/gsl/gsl-2.7.1-r3.ebuild b/sci-libs/gsl/gsl-2.7.1-r3.ebuild new file mode 100644 index 000000000000..81205249e873 --- /dev/null +++ b/sci-libs/gsl/gsl-2.7.1-r3.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic toolchain-funcs + +DESCRIPTION="The GNU Scientific Library" +HOMEPAGE="https://www.gnu.org/software/gsl/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-2.7-cblas.patch.bz2" + +LICENSE="GPL-3+" +# Usually 0/${PV} but check +SLOT="0/27" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="cblas-external +deprecated static-libs" + +RDEPEND="cblas-external? ( virtual/cblas:= )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${WORKDIR}"/${PN}-2.7-cblas.patch + "${FILESDIR}"/${PN}-2.7.1-configure-clang16.patch + "${FILESDIR}"/${PN}-2.7.1-test-tolerance.patch +) + +src_prepare() { + default + + if use deprecated; then + sed -i -e "/GSL_DISABLE_DEPRECATED/,+2d" configure.ac || die + fi + + eautoreconf +} + +src_configure() { + filter-flags -ffast-math + + if use cblas-external; then + export CBLAS_LIBS="$($(tc-getPKG_CONFIG) --libs cblas)" + export CBLAS_CFLAGS="$($(tc-getPKG_CONFIG) --cflags cblas)" + fi + + econf \ + --enable-shared \ + $(use_with cblas-external) \ + $(use_enable static-libs static) +} + +src_test() { + local MAKEOPTS="${MAKEOPTS} -j1" + default +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die +} -- cgit v1.2.3