summaryrefslogtreecommitdiff
path: root/sci-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-05 00:00:45 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-05 00:00:45 +0100
commitb594445f39d99066071d80fc8efeba5c8f72cc35 (patch)
tree9bf469821b12ac103807e30a6f7751d955648125 /sci-libs
parent7f3fecbb5b871825fe9632f46659869cab6a3769 (diff)
gentoo auto-resync : 05:05:2024 - 00:00:45
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/Manifest.gzbin44666 -> 44666 bytes
-rw-r--r--sci-libs/linbox/Manifest2
-rw-r--r--sci-libs/linbox/files/linbox-1.7.0-gcc14.patch433
-rw-r--r--sci-libs/linbox/linbox-1.7.0-r1.ebuild114
-rw-r--r--sci-libs/onnx/Manifest3
-rw-r--r--sci-libs/onnx/files/onnx-1.15.0-hidden.patch10
-rw-r--r--sci-libs/onnx/onnx-1.15.0-r2.ebuild (renamed from sci-libs/onnx/onnx-1.15.0-r1.ebuild)45
7 files changed, 583 insertions, 24 deletions
diff --git a/sci-libs/Manifest.gz b/sci-libs/Manifest.gz
index b1372f5f7733..db345a2ea5cf 100644
--- a/sci-libs/Manifest.gz
+++ b/sci-libs/Manifest.gz
Binary files differ
diff --git a/sci-libs/linbox/Manifest b/sci-libs/linbox/Manifest
index 8cf70fd7846f..7cec16db706b 100644
--- a/sci-libs/linbox/Manifest
+++ b/sci-libs/linbox/Manifest
@@ -1,7 +1,9 @@
AUX linbox-1.6.3-pc.patch 1082 BLAKE2B 7d5b055c0622b61245f193eb39d7e52951262c56456dceba5b3e72f54add82b2fc1660c4590eba2c4a97009bd78119893bfccb0909ed5374752f4bf563e75655 SHA512 5739738de34c28fb9970a869ee97a6ab528fd48e3f8b3d82f39966959fa97d6076a44263678d25c06bea3c46e06c8869ba4ea94484d5b57aee3a302df49fd06b
+AUX linbox-1.7.0-gcc14.patch 13096 BLAKE2B 7a18619522031ebae317c226009d4d11e92a5f257e95e4af4fce92312b5b24dd35b3b260c9847d5e5505e179416a2a1901946642c61a0ff5c76dd8735e295d26 SHA512 1566d9d59cc1a3f6ed28452e882d799194fa3e7acbd53d1faeaa27288efa15effba1d7d565bfb4dbc83f4717f5fd82d551e02a8cce463bc22ca3f1aa90a074c3
AUX linbox-1.7.0-hardened-testfails.patch 702 BLAKE2B df20b35fc72d67079fbd76da90b4ea4d0bf23da401929dc7b8e6c64acb380a3a8ca1d88728be568a3c72413351d013022c42c6e2b78e737f106160e607097160 SHA512 3b60caa03d2254b8d6ceadd92498bfddef1ac6ecc37d520ee2ed3f417c5f6b6982008455a03ec2a894f63fc4ec1ca3b3f189babf1d26e48ecae2bd3d5d8fb0d8
DIST linbox-1.6.3.tar.gz 1968034 BLAKE2B 55fb83db7da375d8d97f2567c6a120ac48fefc41eb02db68152cc32f1f16009b8c8108a07bbc68087ad2ef3279108db61b48b805c9ce39f4c5f0072ab6e96304 SHA512 ccef3b4c7b9d8f999e5e4ce4e544f22cd869154513827501ecb7e1abf132ff585dfb3315cced963abe842feecda9331dda9081efb3948987365d338223a8305c
DIST linbox-1.7.0.tar.gz 2258420 BLAKE2B a416e7ab138c6f3f4778a00c0c1eb46aa0a5b26d84f19a2df93e9f8959d3237e5f298f8013f9414f66605c08eebd7d632f71dcdef7080c8df814afcd2de34456 SHA512 cb4e848186d1f6357f498d1e3bda6484b4c789c02440f9614a227a2ae206a31fb20b32be40bda74da3f2f8f981bbd58d80fc97c95499b5151bb06eafb867ef9e
EBUILD linbox-1.6.3-r2.ebuild 3960 BLAKE2B 1f730cba36d545e7971fe77bdf1e5a6237b5902390dc42cd387f16f5749a5a4d08fbead53d266105cf29bb5dcb5c5dc67783c51a603cb3454345f194276693f4 SHA512 308ff8895f27fc62d7c8fa84fa39850045c2d6443f2c1d2b46b52faaac89f6acd3876ed573ebc36c7f21e2b483bd71af085b3579c6f717136025e20596afcd51
+EBUILD linbox-1.7.0-r1.ebuild 3542 BLAKE2B 73e869d12213d152c60f79de9144af8f28786b08bff9a1f20f25f44170a2c75d9f177f19c36c9ee95848a5350795f0a9f8b8c11998771f4d30894140f1eea5d5 SHA512 75502befeefd0697758041c129a27bd60bbb2247e6375ec322e7567547ca0640b3a59f2ef99250b77bae44d2504b202b952c36704d77f00ce2fb0eef5cd4302f
EBUILD linbox-1.7.0.ebuild 3494 BLAKE2B fccd6311167d2b26e520988d96e6defe090639729571b082e66a82f0fd9ed6b0d0aec75aa6fe8a6745b5f73f0a9faf3af2915c97adee111a072490ba6584d545 SHA512 011471edc7c0031f5e44b580eb308b9c5b7de9c795b4f23239d40c742c9cb13d4c23e985abe31398b91a9e932cf752e0eb64de8b44f3ced329fae0f41d19bca6
MISC metadata.xml 1177 BLAKE2B 57f2c859e73b86a679ba4e1ce568f006761799de57786b9fc60ac5d6a96641d39a6e51b04a86d802d3551ce38da8ff1c7eeb28f8831b605de3e5c786b0e7614e SHA512 78897bcff7d41ebcf9a0e521149cd90cb42234419b295738cf1881acf3f157cf935ad8b0de9e464fc99961831e8f0c0a31561b1bb42a2283f16ce646203f4774
diff --git a/sci-libs/linbox/files/linbox-1.7.0-gcc14.patch b/sci-libs/linbox/files/linbox-1.7.0-gcc14.patch
new file mode 100644
index 000000000000..f35f1072955d
--- /dev/null
+++ b/sci-libs/linbox/files/linbox-1.7.0-gcc14.patch
@@ -0,0 +1,433 @@
+https://bugs.gentoo.org/930923
+https://github.com/linbox-team/linbox/commit/b8f2d4ccdc0af4418d14f72caf6c4d01969092a3
+https://src.fedoraproject.org/rpms/linbox/c/7389d46e81dc00dcb952b2ccbbbec3fb4fcc6c8b
+
+From c614c401386ee8db014a9be56244888f7b282a18 Mon Sep 17 00:00:00 2001
+From: Jean-Guillaume Dumas <Jean-Guillaume.Dumas@imag.fr>
+Date: Fri, 26 Jan 2024 16:31:56 +0100
+Subject: [PATCH] const_cast missing faster empty init
+
+---
+ linbox/algorithms/gauss/gauss-nullspace.inl | 10 +-
+ .../matrix/sparsematrix/sparse-ell-matrix.h | 8 +-
+ .../matrix/sparsematrix/sparse-ellr-matrix.h | 18 +--
+ linbox/ring/ntl/ntl-lzz_p.h | 11 +-
+ linbox/ring/ntl/ntl-lzz_pe.h | 143 +++++++++---------
+ linbox/ring/ntl/ntl-zz_px.h | 6 +
+ 6 files changed, 104 insertions(+), 92 deletions(-)
+
+diff --git a/linbox/algorithms/gauss/gauss-nullspace.inl b/linbox/algorithms/gauss/gauss-nullspace.inl
+index 0b70e1d7c..2d6032563 100644
+--- a/linbox/algorithms/gauss/gauss-nullspace.inl
++++ b/linbox/algorithms/gauss/gauss-nullspace.inl
+@@ -2,7 +2,7 @@
+ * Copyright (C) LinBox 2008
+ *
+ * Written by Jean-Guillaume Dumas <Jean-Guillaume.Dumas@imag.fr>
+- * Time-stamp: <27 Aug 20 15:17:09 Jean-Guillaume.Dumas@imag.fr>
++ * Time-stamp: <26 Jan 24 16:05:55 Jean-Guillaume.Dumas@imag.fr>
+ *
+ *
+ * ========LICENCE========
+@@ -104,11 +104,11 @@ namespace LinBox
+
+ Permutation<Field> P(field(),(int)Nj);
+
+- // A.write( std::cerr << "A:=", Tag::FileFormat::Maple ) << ';' << std::endl;
++// A.write( std::cerr << "A:=", Tag::FileFormat::Maple ) << ';' << std::endl;
+ this->InPlaceLinearPivoting(Rank, Det, A, P, Ni, Nj );
+
+- // P.write( std::cerr << "P:=", Tag::FileFormat::Maple ) << ';' << std::endl;
+- // A.write( std::cerr << "Ua:=", Tag::FileFormat::Maple ) << ';' << std::endl;
++// P.write( std::cerr << "P:=", Tag::FileFormat::Maple ) << ';' << std::endl;
++// A.write( std::cerr << "Ua:=", Tag::FileFormat::Maple ) << ';' << std::endl;
+
+ for(size_t i=0; i< Ni; ++i) {
+ if (A[i].size() == 0) {
+@@ -123,7 +123,7 @@ namespace LinBox
+ }
+ }
+
+- // A.write( std::cerr << "Ub:=", Tag::FileFormat::Maple ) << ';' << std::endl;
++// A.write( std::cerr << "Ub:=", Tag::FileFormat::Maple ) << ';' << std::endl;
+
+ return this->nullspacebasis(x, Rank, A, P);
+ }
+diff --git a/linbox/matrix/sparsematrix/sparse-ell-matrix.h b/linbox/matrix/sparsematrix/sparse-ell-matrix.h
+index 59006d6c5..2604f47b8 100644
+--- a/linbox/matrix/sparsematrix/sparse-ell-matrix.h
++++ b/linbox/matrix/sparsematrix/sparse-ell-matrix.h
+@@ -1210,10 +1210,10 @@ namespace LinBox
+ _colid_beg = iter._colid_beg ;
+ _colid_it = iter._colid_it ;
+ _data_it = iter._data_it ;
+- _data_beg = iter._data_beg ;
+- _data_end = iter._data_end ;
+- _field = iter._field ;
+- _ld = iter._ld ;
++ const_cast<data_it>(_data_beg) = iter._data_beg ;
++ const_cast<data_it>(_data_end) = iter._data_end ;
++ const_cast<Field &>(_field) = iter._field ;
++ const_cast<size_t&>(ld) = iter._ld ;
+ _row = iter._row ;
+
+ return *this;
+diff --git a/linbox/matrix/sparsematrix/sparse-ellr-matrix.h b/linbox/matrix/sparsematrix/sparse-ellr-matrix.h
+index 498a5525d..a60943868 100644
+--- a/linbox/matrix/sparsematrix/sparse-ellr-matrix.h
++++ b/linbox/matrix/sparsematrix/sparse-ellr-matrix.h
+@@ -1102,11 +1102,11 @@ namespace LinBox
+ _Iterator &operator = (const _Iterator &iter)
+ {
+ _data_it = iter._data_it ;
+- _data_beg = iter._data_beg ;
+- _data_end = iter._data_end ;
+- _field = iter._field ;
+- _rowid = iter._rowid;
+- _ld = iter._ld ;
++ const_cast<element_iterator>(_data_beg) = iter._data_beg ;
++ const_cast<element_iterator>(_data_end)= iter._data_end ;
++ const_cast<Field &>(_field) = iter._field ;
++ const_cast<std::vector<size_t>&>(_rowid) = iter._rowid;
++ const_cast<size_t&>(ld) = iter._ld ;
+ _row = iter._row ;
+
+ return *this;
+@@ -1252,10 +1252,10 @@ namespace LinBox
+ _colid_beg = iter._colid_beg ;
+ _colid_it = iter._colid_it ;
+ _data_it = iter._data_it ;
+- _data_beg = iter._data_beg ;
+- _data_end = iter._data_end ;
+- _field = iter._field ;
+- _ld = iter._ld ;
++ const_cast<data_it>(_data_beg) = iter._data_beg ;
++ const_cast<data_it>(_data_end) = iter._data_end ;
++ const_cast<Field &>(_field) = iter._field ;
++ const_cast<size_t&>(ld)= iter._ld ;
+ _row = iter._row ;
+
+ return *this;
+diff --git a/linbox/ring/ntl/ntl-lzz_p.h b/linbox/ring/ntl/ntl-lzz_p.h
+index 201baaa35..def3a23f7 100644
+--- a/linbox/ring/ntl/ntl-lzz_p.h
++++ b/linbox/ring/ntl/ntl-lzz_p.h
+@@ -85,7 +85,7 @@ namespace Givaro
+ * @param x reference to Integer to contain output (reference returned).
+ * @param y constant reference to field element.
+ */
+- template <>
++ template <>
+ Integer& Caster(Integer& x, const NTL::zz_p& y)
+ {
+ return x = int64_t(rep(y));
+@@ -130,7 +130,7 @@ namespace LinBox
+ typedef NTL::zz_p Element ;
+ typedef Givaro::UnparametricOperations<Element> Father_t ;
+ typedef UnparametricRandIter<NTL::zz_p> RandIter;
+-
++
+ const Element zero,one,mOne ;
+
+
+@@ -145,6 +145,11 @@ namespace LinBox
+ ,zero( NTL::to_zz_p(0)),one( NTL::to_zz_p(1)),mOne(-one)
+ {}
+
++ Element &init (Element &x) const
++ {
++ return x = NTL::to_zz_p(0);
++ }
++
+ Element& init(Element& x, const double& y) const
+ {
+ double z = fmod(y,(double)Element::modulus());
+@@ -153,7 +158,7 @@ namespace LinBox
+ return x = NTL::to_zz_p(static_cast<long>(z)); //rounds towards 0
+ }
+
+- Element &init (Element &x, const integer &y=0) const
++ Element &init (Element &x, const integer &y) const
+ {
+ NTL::ZZ tmp= NTL::to_ZZ(std::string(y).data());
+ return x = NTL::to_zz_p(tmp);
+diff --git a/linbox/ring/ntl/ntl-lzz_pe.h b/linbox/ring/ntl/ntl-lzz_pe.h
+index 60b132a06..d53444b69 100644
+--- a/linbox/ring/ntl/ntl-lzz_pe.h
++++ b/linbox/ring/ntl/ntl-lzz_pe.h
+@@ -96,18 +96,18 @@ namespace LinBox
+ NTL::zz_pE::init(irredPoly);
+ _f = irredPoly;
+ }
+-
++
+ NTL_zz_pE_Initialiser( const Integer & p, const NTL::zz_pX & f) {
+ NTL::zz_p::init((int64_t) p);
+ NTL::zz_pE::init(f);
+ _f = f;
+ }
+-
++
+ NTL_zz_pE_Initialiser(const NTL::zz_pX &f) {
+ NTL::zz_pE::init(f);
+ _f = f;
+ }
+-
++
+ const NTL::zz_pX& modulus() const {
+ return _f;
+ }
+@@ -143,22 +143,22 @@ namespace LinBox
+ NTL_zz_pE (const integer &p, const integer &k) :
+ NTL_zz_pE_Initialiser(p,k),Father_t ()
+ {
+- init(const_cast<Element &>(zero), 0);
+- init(const_cast<Element &>(one), 1);
+- init(const_cast<Element &>(mOne), p-1);
++ init(const_cast<Element &>(zero), 0);
++ init(const_cast<Element &>(one), 1);
++ init(const_cast<Element &>(mOne), p-1);
+ }
+-
++
+ NTL_zz_pE (const integer &p, const NTL::zz_pX &f) :
+ NTL_zz_pE_Initialiser(p,f), Father_t()
+ {
+ init(const_cast<Element &>(zero), 0);
+- init(const_cast<Element &>(one), 1);
+- init(const_cast<Element &>(mOne), p-1);
++ init(const_cast<Element &>(one), 1);
++ init(const_cast<Element &>(mOne), p-1);
+ }
+-
++
+ NTL_zz_pE(const NTL_zz_pE &F) :
+- NTL_zz_pE_Initialiser(F.modulus()), Father_t(),
+- zero(NTL::to_zz_pE(0)), one(NTL::to_zz_pE(1)), mOne(-one)
++ NTL_zz_pE_Initialiser(F.modulus()), Father_t(),
++ zero(NTL::to_zz_pE(0)), one(NTL::to_zz_pE(1)), mOne(-one)
+ {
+ }
+
+@@ -182,15 +182,15 @@ namespace LinBox
+
+ bool isUnit (const Element& x) const
+ {
+- if (isZero(x)) {
+- return false;
+- }
+-
+- NTL::zz_pX g, tmp;
+- tmp = NTL::conv<NTL::zz_pX>(x);
+- NTL::GCD(g, tmp, modulus());
+-
+- return g == 1;
++ if (isZero(x)) {
++ return false;
++ }
++
++ NTL::zz_pX g, tmp;
++ tmp = NTL::conv<NTL::zz_pX>(x);
++ NTL::GCD(g, tmp, modulus());
++
++ return g == 1;
+ }
+
+ bool isMOne (const Element& x) const
+@@ -207,7 +207,9 @@ namespace LinBox
+ return f;
+ }
+
+- Element & init(Element & x, integer n = 0) const
++ Element & init(Element & x) const { return x; }
++
++ Element & init(Element & x, integer n) const
+ { // assumes n >= 0.
+ int e = exponent();
+ n %= cardinality();
+@@ -215,14 +217,14 @@ namespace LinBox
+ //write(std::cout << "init-ed ", x) << std::endl;
+ return x;
+ }
+-
++
+ // documentation of NTL::conv:
+ // http://www.shoup.net/ntl/doc/conversions.txt
+ // XXX = long, ZZ, ZZ_p, ZZ_pE, ZZ_pX
+ template<class XXX>
+ Element &init(Element &x, const XXX &y) const {
+- x = NTL::conv<NTL::zz_pE>(y);
+- return x;
++ x = NTL::conv<NTL::zz_pE>(y);
++ return x;
+ }
+
+ integer & convert(integer & x, const Element & y) const
+@@ -279,81 +281,80 @@ namespace LinBox
+ x=one/x;
+ return x;
+ }
+-
++
+ Element& div(Element &x, const Element &y, const Element &z) const {
+- NTL::zz_pX g, zx;
+- conv(zx, z);
+- NTL::GCD(g, zx, modulus());
+-
+- NTL::zz_pE zg;
+- conv(zg, zx / g);
+- x = NTL::conv<NTL::zz_pE>(NTL::conv<NTL::zz_pX>(y) / g);
+- x /= zg;
+-
+- return x;
++ NTL::zz_pX g, zx;
++ conv(zx, z);
++ NTL::GCD(g, zx, modulus());
++
++ NTL::zz_pE zg;
++ conv(zg, zx / g);
++ x = NTL::conv<NTL::zz_pE>(NTL::conv<NTL::zz_pX>(y) / g);
++ x /= zg;
++
++ return x;
+ }
+-
++
+ Element& divin(Element &x, const Element &y) const {
+- Element r;
+- div(r, x, y);
+- return x = r;
++ Element r;
++ div(r, x, y);
++ return x = r;
+ }
+
+ bool isDivisor(const Element &x, const Element &y) const {
+- if (isZero(y)) {
+- return false;
+- }
+-
+- if (isUnit(y)) {
+- return true;
+- }
+-
+- NTL::zz_pX a, b;
+- conv(a, x);
+- conv(b, y);
+-
+- NTL::zz_pX ga, gb;
+- NTL::GCD(ga, a, modulus());
+- NTL::GCD(gb, b, modulus());
+-
+- NTL::zz_pX r;
+- r = ga % gb;
+- return isZero(NTL::conv<Element>(r));
++ if (isZero(y)) {
++ return false;
++ }
++
++ if (isUnit(y)) {
++ return true;
++ }
++
++ NTL::zz_pX a, b;
++ conv(a, x);
++ conv(b, y);
++
++ NTL::zz_pX ga, gb;
++ NTL::GCD(ga, a, modulus());
++ NTL::GCD(gb, b, modulus());
++ NTL::zz_pX r;
++ r = ga % gb;
++ return isZero(NTL::conv<Element>(r));
+ }
+-
++
+ Element& gcd(Element &g, const Element &a, const Element &b) const {
+ NTL::zz_pX r1, r2, x, y;
+ conv(x, a);
+ conv(y, b);
+-
++
+ NTL::GCD(r1, x, modulus());
+ NTL::GCD(r2, y, r1);
+-
++
+ return g = NTL::conv<Element>(r2);
+ }
+-
++
+ Element& gcdin(Element &a, const Element &b) const {
+ NTL::zz_pE g;
+ gcd(g, a, b);
+ return a = g;
+ }
+-
++
+ Element& dxgcd(Element &g, Element &s, Element &t, Element &u, Element &v, const Element &a, const Element &b) const {
+ NTL::zz_pX gx, sx, tx, ux, vx, ax, bx;
+ conv(ax, a);
+ conv(bx, b);
+-
++
+ NTL::XGCD(gx, sx, tx, ax, bx);
+-
++
+ ux = ax / gx;
+ vx = bx / gx;
+-
++
+ conv(g, gx);
+ conv(s, sx);
+ conv(t, tx);
+ conv(u, ux);
+ conv(v, vx);
+-
++
+ return g;
+ }
+
+@@ -364,12 +365,12 @@ namespace LinBox
+ x=NTL::to_zz_pE(tmp);
+ return is;
+ }
+-
++
+ std::ostream& write( std::ostream& os ) const
+ {
+ return os << "Polynomial quotient ring using NTL::zz_pE";
+ }
+-
++
+ std::ostream& write( std::ostream& os, const Element& x) const {
+ os << x;
+ return os;
+@@ -429,7 +430,7 @@ namespace LinBox
+ uint64_t _seed;
+ const NTL_zz_pE& _ring;
+ }; // class UnparametricRandIters
+-
++
+ } // LinBox
+
+ #endif //__LINBOX_ntl_lzz_pe_H
+diff --git a/linbox/ring/ntl/ntl-zz_px.h b/linbox/ring/ntl/ntl-zz_px.h
+index 6e7d5b2fd..340df9f95 100644
+--- a/linbox/ring/ntl/ntl-zz_px.h
++++ b/linbox/ring/ntl/ntl-zz_px.h
+@@ -104,6 +104,12 @@ namespace LinBox
+ ,_CField(cf)
+ {}
+
++ /** Initialize p to 0 */
++ Element& init( Element& p ) const
++ {
++ return p = 0;
++ }
++
+ /** Initialize p to the constant y (p = y*x^0) */
+ template <class ANY>
+ Element& init( Element& p, const ANY& y ) const
+--
+2.43.0
+
diff --git a/sci-libs/linbox/linbox-1.7.0-r1.ebuild b/sci-libs/linbox/linbox-1.7.0-r1.ebuild
new file mode 100644
index 000000000000..6f5e7d7b2b55
--- /dev/null
+++ b/sci-libs/linbox/linbox-1.7.0-r1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="C++ template library for integer and finite-field linear algebra"
+HOMEPAGE="https://linalg.org/"
+SRC_URI="https://github.com/linbox-team/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+# I think only macros/libtool.m4 (and COPYING) is GPL-2+; the source
+# headers all say LGPL-2.1
+LICENSE="GPL-2+ LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="doc opencl openmp"
+
+BDEPEND="doc? ( app-text/doxygen )"
+
+# The project README says that gmp, givaro, and blas/lapack are required
+# transitively via fflas-ffpack, but that's not true. The build system
+# checks for them, and `git grep` shows that they're used directly.
+DEPEND="dev-libs/gmp[cxx(+)]
+ =sci-libs/givaro-4.2*
+ =sci-libs/fflas-ffpack-2.5*
+ virtual/cblas
+ virtual/lapack
+ opencl? ( virtual/opencl )
+ dev-libs/ntl:=
+ sci-libs/iml
+ dev-libs/mpfr:=
+ sci-mathematics/flint"
+
+# Use mathjax to render inline latex rather than requiring a working latex
+# installation to generate bitmaps.
+RDEPEND="${DEPEND}
+ doc? ( >=dev-libs/mathjax-3 )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7.0-hardened-testfails.patch
+ "${FILESDIR}"/${PN}-1.7.0-gcc14.patch
+)
+
+# The --enable-openmp flag has been removed upstream, but we don't want
+# openmp support to disappear after the package has been compiled with
+# it, so we retain the USE flag and the toolchain check.
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ default
+
+ if use doc; then
+ # Avoid the need for a working LaTeX installation. MathJax does
+ # slow down the browser a bit but it also renders much more
+ # nicely than the latex-generated bitmaps would.
+ echo "
+ USE_MATHJAX = YES
+ MATHJAX_VERSION = MathJax_3
+ MATHJAX_RELPATH = \"${EPREFIX}/usr/share/mathjax\"
+ MATHJAX_EXTENSIONS = ams
+ " >> doc/Doxyfile.mod || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ #
+ # The --with-all flag includes,
+ #
+ # --with-givaro: used for finite fields, integer, etc. (required)
+ # --with-fflas-ffpack: small field dense linear algebra (required)
+ # --with-ntl: used for finite field, polynomial arithmetic (optional)
+ # --with-iml: used for fast integer/rational linear algebra (optional)
+ # --with-mpfr: not sure, doesn't seem to be used? (optional)
+ # --with-flint: used in algorithms/matrix-blas3 once (optional)
+ # --with-fplll: an fplll interface not directly used (optional)
+ # --with-doxygen: needed with --enable-doc to build them (optional)
+ #
+ # Some of these could be behind USE flags, but the ./configure output
+ # says that they're "not yet mandatory," which makes me think we might
+ # be overcomplicating things to make them optional right now.
+ #
+ econf \
+ --with-docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --with-all="${EPREFIX}"/usr \
+ --without-fplll \
+ --without-archnative \
+ $(use_enable doc) \
+ $(use_with opencl ocl)
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete || die
+ if use doc; then
+ # These files are used for incremental doxygen builds but aren't
+ # part of the final output. Check on
+ #
+ # https://github.com/linbox-team/linbox/issues/252
+ #
+ # periodically to see if this is pointless.
+ find "${ED}/usr/share/doc/${PF}" -type f -name '*.md5' -delete || die
+ find "${ED}/usr/share/doc/${PF}" -type f -name '*.map' -delete || die
+ fi
+}
diff --git a/sci-libs/onnx/Manifest b/sci-libs/onnx/Manifest
index 968a445894eb..9caa17518035 100644
--- a/sci-libs/onnx/Manifest
+++ b/sci-libs/onnx/Manifest
@@ -1,7 +1,8 @@
AUX onnx-1.14.0-cxx_14.patch 390 BLAKE2B adae69890eec31f16de501ef3b2fc88e5dff2d0fb561d470955daa6830e7a818d35c80789cbbedd874e11776a59f07fafe9576ee11e6a0fb45fc8635fb6ef81f SHA512 7a89e24067909b1106753bd2853fc51da3d8a567c452d72d53ea321c13c78c46dbca356e3fbe78d98e301a360b93090644861c3a0d8ab6022f9666c0ee788be1
AUX onnx-1.14.1-musl.patch 518 BLAKE2B 540d5c81d43a515ca6c4598057b80ad2157ba528dd976306175ff68e9fb0e8d05d1a92a2d6c706470017750f86ae48f30c91ae21e44627679e7b3ec8cf6e1a43 SHA512 6e198ee14da82c0fe0512d587de5da0831fbc40ac546407dc27b2ed5c75e9aa87bb0d732c6ebd6099f26ac926ad7afaed131a914352e58f9956697ab55cbf933
+AUX onnx-1.15.0-hidden.patch 511 BLAKE2B 857a4ff9597a25430e2236c2d9de47c1203e630a4adfe8e4cdb72ddfb928f0327e2a625ad91e936e4d3f71bc4aa135bbd15abcf348958238075d356d47d3291b SHA512 a4dbcbae79af1ef1edc8ec8aa27eb0303c1a52baf7db74e70f2d1e6a35db7d5ed2205f7f10f34fdcd3ac536b029edf749b9eb8f7926ac2b620ac7a4b59884182
DIST onnx-1.14.1.tar.gz 11570627 BLAKE2B df478219b5d557ad7e0717377996eefc02baa88a89d9681b17e00670e42fa3c8e47db0f5c5fdfab682fa7d80032559da8276c5106a91a7599d190427e2b6e4a8 SHA512 f846fffb286c4aeadc01462f220515f0a5c2ce1cbec849da7092a08c2676f8308af7315318a2866e9182f9aed719984ef95a9ddc69ffe0e62e40664395df5efd
DIST onnx-1.15.0.tar.gz 12360484 BLAKE2B 4d35b82c128a69124b9bfcb3e56b3d584b7451ae739a91039e201dd485efa3e90e34e6cf135993317622f8f524160a38556231b2b0561e93d8cd0487abf35c1b SHA512 b46a4ab70af88053318eba45251c1f71528f15e45a33042877570e8d857febd3ec66e2e811fcda2105a4f17b84c9a1c6a0aaa22756c3287321b3ea29e83127fd
EBUILD onnx-1.14.1-r2.ebuild 1287 BLAKE2B 981384a06007a6e1d0bbe602a6ab46cf856a5f6c07223599fbebfd23f2dfef4ded766367580b11e635421b0fb94ca0574fde853ee6dadb4d5f50e978a1eec1b9 SHA512 98cd76cee92bebe93192cce202fd7caf4cbb42d0afcf312acbdcb57992ccc1a7efe1f9cc3d1dc9df9cdc657b5c1ae4bfb2d6e5f86624f4bb6b5853d6a19ec952
-EBUILD onnx-1.15.0-r1.ebuild 1181 BLAKE2B fb08ccfcb7f183d1143e516a66b49e714bebd2d88abb7838d1c5b66eb1d4dd9b767f87ae6987eef2d6f2ea5781261c07f0c24cbc49ac02601c2468c47a434929 SHA512 a4ee45c2f908e05f4fda7f9d418576182f77174543c176cd290137129017b56b49d7f7061c84f561bcaf2e1d659456746c9b1b49d86f2f164dbeb812fdb00bc8
+EBUILD onnx-1.15.0-r2.ebuild 1277 BLAKE2B 4c23680e30e41f6f7887ff21bdb7f5536feaf2cc702cab4edae00131168a834f854646c70acee084d15713be26ac2bc19337b4f2124d0a9c404d0da849f380ec SHA512 473ae0657d5a90479b1e20d76e17607dddbc411b9d6fee6af15a2167201ae5fad9f2c40cf4ddd49cfe1a81611475b2d36704278aca68e06834ce146cb2841be7
MISC metadata.xml 322 BLAKE2B a78b6feffba2cf354154448a0e0cef5e866ec51ff0158939e7a5be1f3c4cb9bb3b29ae88ae06540627946fc3e0f6e9a63ef4d8951385e840a7a87ada99e1d50a SHA512 9d81e8e43822232c8c8cf690b6bdb9939f04adeb9230f8225a5b0b10083f9555304768901c46cc5d29c41038397bbb3b12e0111c3d0443f4c0003e99b99fc50f
diff --git a/sci-libs/onnx/files/onnx-1.15.0-hidden.patch b/sci-libs/onnx/files/onnx-1.15.0-hidden.patch
new file mode 100644
index 000000000000..b500c01a91bc
--- /dev/null
+++ b/sci-libs/onnx/files/onnx-1.15.0-hidden.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt 2024-05-04 19:39:17.464135798 +0200
++++ b/CMakeLists.txt 2024-05-04 19:39:23.155068064 +0200
+@@ -496,7 +496,6 @@
+ else()
+ # On non-Windows, hide all symbols we don't need
+ set(ONNX_API_DEFINE "-DONNX_API=__attribute__\(\(__visibility__\(\"default\"\)\)\)")
+- set_target_properties(onnx_proto PROPERTIES CXX_VISIBILITY_PRESET hidden)
+ set_target_properties(onnx_proto PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
+ endif()
+ target_compile_definitions(onnx_proto PRIVATE ${ONNX_API_DEFINE})
diff --git a/sci-libs/onnx/onnx-1.15.0-r1.ebuild b/sci-libs/onnx/onnx-1.15.0-r2.ebuild
index 8e846b3e6d5f..63e8ab1695e9 100644
--- a/sci-libs/onnx/onnx-1.15.0-r1.ebuild
+++ b/sci-libs/onnx/onnx-1.15.0-r2.ebuild
@@ -3,6 +3,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_OPTIONAL=1
DISTUTILS_EXT=1
PYTHON_COMPAT=( python3_{9..12} )
inherit distutils-r1 cmake
@@ -15,49 +16,47 @@ SRC_URI="https://github.com/onnx/${PN}/archive/refs/tags/v${PV}.tar.gz
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~riscv"
+IUSE="python"
RESTRICT="test"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
- dev-python/protobuf-python[${PYTHON_USEDEP}]
- dev-python/pybind11[${PYTHON_USEDEP}]
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/protobuf-python[${PYTHON_USEDEP}]
+ dev-python/pybind11[${PYTHON_USEDEP}]
+ )
dev-libs/protobuf:=
"
DEPEND="${RDEPEND}"
+BDEPEND="python? (
+ ${DISTUTILS_DEPS}
+)"
+
+PATCHES=( "${FILESDIR}"/${P}-hidden.patch )
+
src_prepare() {
cmake_src_prepare
- distutils-r1_src_prepare
+ use python && distutils-r1_src_prepare
}
-python_configure_all() {
+src_configure() {
mycmakeargs=(
-DONNX_USE_PROTOBUF_SHARED_LIBS=ON
-DONNX_USE_LITE_PROTO=ON
+ -DONNX_BUILD_SHARED_LIBS=ON
)
cmake_src_configure
-}
-
-src_configure() {
- distutils-r1_src_configure
-}
-
-python_compile_all() {
- cmake_src_compile
+ use python && distutils-r1_src_configure
}
src_compile() {
- mycmakeargs=(
- -DONNX_USE_PROTOBUF_SHARED_LIBS=ON
- -DONNX_USE_LITE_PROTO=ON
- )
- CMAKE_ARGS="${mycmakeargs[@]}" distutils-r1_src_compile
-}
-
-python_install_all() {
- cmake_src_install
- distutils-r1_python_install_all
+ cmake_src_compile
+ use python && CMAKE_ARGS="${mycmakeargs[@]}" distutils-r1_src_compile
}
src_install() {
- distutils-r1_src_install
+ cmake_src_install
+ use python && distutils-r1_src_install
}