diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-02-25 19:25:33 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-02-25 19:25:33 +0000 |
commit | 67dbd3ba144944fbf4b466be1b5fa0569b774e6f (patch) | |
tree | 721c7f9085992578da57f71ea0c5becb6827cdb4 /sci-libs/taucs | |
parent | d4653056cc74d97f24bef0d56b4ebe11c53c8b76 (diff) |
gentoo auto-resync : 25:02:2025 - 19:25:33
Diffstat (limited to 'sci-libs/taucs')
-rw-r--r-- | sci-libs/taucs/Manifest | 7 | ||||
-rw-r--r-- | sci-libs/taucs/files/taucs-2.2-missing-include.patch | 36 | ||||
-rw-r--r-- | sci-libs/taucs/files/taucs-2.2.1-C23.patch | 120 | ||||
-rw-r--r-- | sci-libs/taucs/files/taucs-2.2.1-allocate-memory-in-test.patch | 24 | ||||
-rw-r--r-- | sci-libs/taucs/metadata.xml | 3 | ||||
-rw-r--r-- | sci-libs/taucs/taucs-2.2.1.ebuild | 84 |
6 files changed, 273 insertions, 1 deletions
diff --git a/sci-libs/taucs/Manifest b/sci-libs/taucs/Manifest index 393f1d8f7ea6..d11acc935b79 100644 --- a/sci-libs/taucs/Manifest +++ b/sci-libs/taucs/Manifest @@ -1,4 +1,9 @@ +AUX taucs-2.2-missing-include.patch 832 BLAKE2B c2187358f0aedaf10564d39de771e06d4683dacd354bb9dadb063c8e4b1294b4085281cfc20d1bebf293d0a5c29e8f10d5dc6cf3a82bd7b565589996b21feff7 SHA512 1260dbbb69e7e67cbe4488999dad83fd49d5347f1cc7711bcf7f7cf8aa818c9c1c10884a4b06a2663ae8af4d8e4a48a1a02ffdab48aef517c1880d287bc5792b AUX taucs-2.2-respect-ar.patch 635 BLAKE2B 59ea54427651adc597caf85bf5eafe8055a6223e3c588939519e660661ffec4082d574c08aebff8106508f4b5afe147d1f7ef5c1972b17461d286273c9cbb76a SHA512 b18551f3d386ebd203b422c9848bfb14c7d8bb67e0facb450869d0846ca23e35902339cfa519ef7b33d1cf0dfb6301bad5b9f2fcd2035d1e02b150a0c15a26e3 +AUX taucs-2.2.1-C23.patch 2966 BLAKE2B 11d3dc4752539589999650680e231f8a5bac252683bfd2c527f68ab06c5230763e8b0821badd1fb4883e692ed783ed5e8f841c6381c038650600d2a9fd1a467f SHA512 47662bb2ad8c4dfcb27c7455e43e969d99e4891b5b4bc388aa897e7b7f6e1403f63e7f60a30ea8c11df84b82d805bb139dfd59fc9af49d829bc130520044a558 +AUX taucs-2.2.1-allocate-memory-in-test.patch 777 BLAKE2B 4d5ccc3a4297126f648e17907188a3b8ffc4bad4fac7e14e9082b706baac601d11aff5f5995cdd6107aaaa680e260c5be9431d97c86e34fdf235b84ec5b8f8d9 SHA512 ccb0a81c68bad2da8797ac81f352cec328f2e82bb32165fc5af62bd9e4f2ec2e26273d9fd25dece263102590cc732998964b02725d296aa599f9e853913e734f +DIST taucs-2.2.1.tar.gz 1594127 BLAKE2B 426f5a6f919415480a14d231233214d4e560ecfb257b67751fc26ce0897acab504ee50d0dd074dd99c9c0b74c1bcad2c2f88e8a9708107a5c2dfe52d452eba02 SHA512 727f05a7ea89cb74893905b17571ae9275db283e0fbe1d5538dfd72c0f9ed1a47325b1845b1e8b381793a513b4b538b35d503f5dbb63db222e1b01fd1169f1e9 DIST taucs-2.2.tgz 1573863 BLAKE2B 21cf7479d7ce1f27678431e0d3dcaea1b3f8b11071b44651207791d6980bf5be0ed51cab7915f9e8da88d5da777c0f03a8d058e2ac8881e0d0b244ddfd796f5c SHA512 d8652de2da343dfd19c4278ac99313bcb577d976decdd3bd3875f0c9576832605b787feaef916eb4e82f22907c8bd029125c2ae56c827639e4d535ad62f20fcf EBUILD taucs-2.2-r1.ebuild 1967 BLAKE2B a9e232cadb1bd1a1f35335fd645b4103a2e9d44539bae7b83b009c79c1ae946fa6c423ef6def6f1a806ecc527f2305d4e650f667cd1ee14b3d221d42e415a450 SHA512 e2931a7f3ef767f77a04bb1b7bb9ad2d200181a45b34d782d92f73049c8406e3b7230a30bf3744231c6565e5705df539a4d0aa38fec0a0a877d1d0a63cc1e124 -MISC metadata.xml 1070 BLAKE2B 587dedd3574665d544778ab9048c5c5558072f25fe7e471bcfb9d4482c7dcafeb3dd64534df8fde8ddb2f6a78beb359b8d50b9db571ae6e572852121e8cdf512 SHA512 adc87df19bdb8589cade774312a3f056cb4abc373166e5a9a6b84d52e99c65b0344ef2e045ad641e168abfcbd74b92c6d1e40fbf33bc51a507e6591ac0bd0b4a +EBUILD taucs-2.2.1.ebuild 2306 BLAKE2B 6d21ec6d2c5625c8d51e0113fa6447e3cb25fe552c0d80cb2a348f68380c838af48a14c8db355846694f59c4c3755600cda25a7fc29f9a9e062586799349f930 SHA512 e5a1159ff124cf61aef079a860acefb3c13e435f53518cbfbb799b61bd6fce651b4559ea9333465b4f87bf7ba2a184a799820385e26dfd2d2754ce33da5ad295 +MISC metadata.xml 1152 BLAKE2B f8ecec1047be757e7b2300b2e6c7aad30c9e60ad5746d0ecf9d65343d6346b198538dcc559282e612605af95942f6cdb77955d35a94e41e71957d722e0823da1 SHA512 3d097acdbb9514f129d00190be4029cab5cf0736469dfbf6bf7bf01af6d2fcb529ace2eb086547d4d7755d1924188d6a57091412e2d2b03b176cb3942029bdbc diff --git a/sci-libs/taucs/files/taucs-2.2-missing-include.patch b/sci-libs/taucs/files/taucs-2.2-missing-include.patch new file mode 100644 index 000000000000..b5186aef3911 --- /dev/null +++ b/sci-libs/taucs/files/taucs-2.2-missing-include.patch @@ -0,0 +1,36 @@ +I don't know why he uses number of arguments to distinguish if +it's windows or not. Add correct header, section off wrong +mkdirs on Windows +https://bugs.gentoo.org/898294 +--- a/configurator/taucs_config.c ++++ b/configurator/taucs_config.c +@@ -1,6 +1,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <sys/stat.h> + + #include "taucs_structure.h" + +@@ -242,8 +242,10 @@ + sprintf(name,"%s%c%s", configdir,pathsep,ostype); + + if (win32) { ++#if defined _WIN32 || defined __CYGWIN__ + mkdir(configdir); + mkdir(name); ++#endif + } + else { + mkdir(configdir,0777); +@@ -301,8 +303,10 @@ + sprintf(name,"%s%c%s", configdir,pathsep,ostype); + + if (win32) { ++#if defined _WIN32 || defined __CYGWIN__ + mkdir(configdir); + mkdir(name); ++#endif + } + else { + mkdir(configdir,0777); diff --git a/sci-libs/taucs/files/taucs-2.2.1-C23.patch b/sci-libs/taucs/files/taucs-2.2.1-C23.patch new file mode 100644 index 000000000000..dec900f8603b --- /dev/null +++ b/sci-libs/taucs/files/taucs-2.2.1-C23.patch @@ -0,0 +1,120 @@ +Port to C23. Various problems without the bug +found in bumping package version +--- a/src/taucs_ccs_ooc_llt.c ++++ b/src/taucs_ccs_ooc_llt.c +@@ -281,7 +281,7 @@ + int do_order, + int ipostorder[], + double given_mem, +- void (*sn_struct_handler)(), ++ void (*sn_struct_handler)(void* argument, int sn, int sn_up_size, int* sn_struct_ptr[]), + void* sn_struct_handler_arg + ) + { +@@ -455,7 +455,7 @@ + int do_order, + int do_column_to_sn_map, + double given_mem, +- void (*sn_struct_handler)(), ++ void (*sn_struct_handler)(void* argument, int sn, int sn_up_size, int* sn_struct_ptr[]), + void* sn_struct_handler_arg + ) + { +--- a/src/taucs_vaidya.c ++++ b/src/taucs_vaidya.c +@@ -3046,7 +3046,7 @@ + int row, col; + int *pi1 = 0; /* warning */ + double x, y, min, max, not; +- byte bool=1; ++ byte Bool=1; + edge *p,*dummy, *pe ,*max_pe; + int count = 0; + +@@ -3116,18 +3116,18 @@ + + for(minrho=1;minrho<maxdist;minrho++) + { +- bool = 1; ++ Bool = 1; + for(k=0;k<min(j,classes);k++) + { + if ((double)(findrho[(minrho+1)*classes+k]-findrho[minrho*classes+k]) > (findrho[minrho*classes+k])/x) +- bool = 0; ++ Bool = 0; + } +- if (bool) ++ if (Bool) + goto afterr; + } + + afterr: +- if (bool) ++ if (Bool) + { + for(i=0;i<n;i++) + if ((d[i] <= minrho) && (d[i] != -1) ) +--- a/progs/direct.c ++++ b/progs/direct.c +@@ -691,7 +691,6 @@ + /***********************************************************/ + + if (A->flags & TAUCS_SINGLE) { +- float snrm2_(); + int one = 1; + + NormErr = 0.0; +@@ -704,7 +703,6 @@ + } + + if (A->flags & TAUCS_DOUBLE) { +- double dnrm2_(); + int one = 1; + + NormErr = 0.0; +@@ -718,7 +716,6 @@ + + #ifdef TAUCS_CONFIG_DCOMPLEX + if (A->flags & TAUCS_DCOMPLEX) { +- double dznrm2_(); + int one = 1; + double* pX = (double*) Xz; + double* pNX = (double*) NXz; +--- a/progs/direct_coverage.c ++++ b/progs/direct_coverage.c +@@ -729,7 +729,6 @@ + /***********************************************************/ + + if (A->flags & TAUCS_SINGLE) { +- float snrm2_(); + int one = 1; + + NormErr = 0.0; +@@ -742,7 +741,6 @@ + } + + if (A->flags & TAUCS_DOUBLE) { +- double dnrm2_(); + int one = 1; + + NormErr = 0.0; +@@ -755,7 +753,6 @@ + } + + if (A->flags & TAUCS_DCOMPLEX) { +- double dznrm2_(); + int one = 1; + double* pX = (double*) Xz; + double* pNX = (double*) NXz; +diff '--color=auto' -ur taucs-2.2.1.old/progs/test_cilk_snmf.c taucs-2.2.1/progs/test_cilk_snmf.c +--- taucs-2.2.1.old/progs/test_cilk_snmf.c 2025-02-21 22:18:08.370013676 +0400 ++++ taucs-2.2.1/progs/test_cilk_snmf.c 2025-02-21 22:18:37.175471226 +0400 +@@ -27,8 +27,6 @@ + #define my_dnrm2 dnrm2 + #endif + +-double my_dnrm2(); +- + int main() + { + int xyz = 30; diff --git a/sci-libs/taucs/files/taucs-2.2.1-allocate-memory-in-test.patch b/sci-libs/taucs/files/taucs-2.2.1-allocate-memory-in-test.patch new file mode 100644 index 000000000000..2aed8c1bc757 --- /dev/null +++ b/sci-libs/taucs/files/taucs-2.2.1-allocate-memory-in-test.patch @@ -0,0 +1,24 @@ +There may be more actions needed, before that memory was unallocated +and nullptrs were dereferenced. +--- a/progs/test_cilk_snmf.c ++++ b/progs/test_cilk_snmf.c +@@ -54,6 +54,7 @@ + + Xd =(double*)malloc((A->n)*sizeof(double)); + for(i=0; i<A->n; i++) (Xd)[i]=(float)((double)random()/RAND_MAX); ++ Bd =(double*)malloc((A->n)*sizeof(double)); + taucs_ccs_times_vec(A,Xd,Bd); + + taucs_ccs_order(A,&perm,&invperm,"metis"); +@@ -74,8 +75,11 @@ + return 1; + } + ++ PBd =(double*)malloc((A->n)*sizeof(double)); + taucs_vec_permute(A->n,A->flags,Bd,PBd,perm); ++ NXd =(double*)malloc((A->n)*sizeof(double)); + taucs_supernodal_solve_llt(L,PBd,NXd); /* direct solver */ ++ PXd =(double*)malloc((A->n)*sizeof(double)); + taucs_vec_ipermute(A->n,A->flags,PXd,NXd,perm); + + { diff --git a/sci-libs/taucs/metadata.xml b/sci-libs/taucs/metadata.xml index db08cf08723b..dda4de5504d0 100644 --- a/sci-libs/taucs/metadata.xml +++ b/sci-libs/taucs/metadata.xml @@ -25,4 +25,7 @@ * Multilevel-Support-Graph Preconditioners. * Utility Routines </longdescription> + <upstream> + <remote-id type="github">sivantoledo/taucs</remote-id> + </upstream> </pkgmetadata> diff --git a/sci-libs/taucs/taucs-2.2.1.ebuild b/sci-libs/taucs/taucs-2.2.1.ebuild new file mode 100644 index 000000000000..c8bc53a1478d --- /dev/null +++ b/sci-libs/taucs/taucs-2.2.1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit fortran-2 toolchain-funcs + +DESCRIPTION="C library of sparse linear solvers" +HOMEPAGE="https://github.com/sivantoledo/taucs/" +SRC_URI="https://github.com/sivantoledo/taucs/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc" +RESTRICT="test" + +RDEPEND=" + sci-libs/metis + virtual/blas + virtual/lapack" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + # bug 725588 + "${FILESDIR}"/${PN}-2.2-respect-ar.patch + "${FILESDIR}"/${PN}-2.2-missing-include.patch + "${FILESDIR}"/${P}-C23.patch + "${FILESDIR}"/${P}-allocate-memory-in-test.patch +) + +src_configure() { + cat > config/linux_shared.mk <<-EOF || die + AR=$(tc-getAR) + FC=$(tc-getFC) + CC=$(tc-getCC) + LD=$(tc-getFC) + RANLIB=$(tc-getRANLIB) + CFLAGS=${CFLAGS} -fPIC + FFLAGS=${FFLAGS} -fPIC + LDFLAGS=${LDFLAGS} -fPIC + LIBBLAS=$($(tc-getPKG_CONFIG) --libs blas) + LIBLAPACK=$($(tc-getPKG_CONFIG) --libs lapack) + LIBMETIS=$($(tc-getPKG_CONFIG) --libs metis) + LIBF77= + EOF + # no cat <<EOF because -o has a trailing space + cp config/linux.mk config/linux-musl.mk + cp config/linux_shared.mk config/linux-musl_shared.mk +} + +src_compile() { + # not autotools configure. Uses difference in mkdir signature + # between windows and linux to recognize system. + CC="$(tc-getCC)" ./configure variant=_shared || die + emake + + cd lib/linux$(usev elibc_musl -musl)_shared || die + $(tc-getFC) ${LDFLAGS} -shared -Wl,-soname=libtaucs.so.1 \ + -Wl,--whole-archive libtaucs.a -Wl,--no-whole-archive \ + $($(tc-getPKG_CONFIG) --libs blas lapack metis) \ + -o libtaucs.so.1.0.0 \ + || die "shared lib linking failed" +} + +src_test() { + LD_LIBRARY_PATH=lib/linux$(usev elibc_musl -musl)_shared \ + ./testscript variant=_shared || die "compile test failed" + if grep -q FAILED testscript.log; then + eerror "Test failed. See ${S}/testscript.log" + die "test failed" + fi +} + +src_install() { + ln -s libtaucs.so.1.0.0 lib/linux$(usev elibc_musl -musl)_shared/libtaucs.so.1 || die + ln -s libtaucs.so.1 lib/linux$(usev elibc_musl -musl)_shared/libtaucs.so || die + dolib.so lib/linux$(usev elibc_musl -musl)_shared/libtaucs.so* + + doheader build/*/*.h src/*.h + + use doc && dodoc doc/*.pdf +} |