summaryrefslogtreecommitdiff
path: root/sci-libs/linbox
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-08-31 10:10:44 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-08-31 10:10:44 +0100
commit0fde6d7108b1ee9fc6ad186eff4978faa255db20 (patch)
tree54c45a4fb87434f176ae2cc91c764acdcc1122e7 /sci-libs/linbox
parent025c71a90f259ca9319b4caa92495e43acf489b0 (diff)
gentoo auto-resync : 31:08:2023 - 10:10:44
Diffstat (limited to 'sci-libs/linbox')
-rw-r--r--sci-libs/linbox/Manifest1
-rw-r--r--sci-libs/linbox/linbox-1.6.3-r2.ebuild118
2 files changed, 119 insertions, 0 deletions
diff --git a/sci-libs/linbox/Manifest b/sci-libs/linbox/Manifest
index bc9e1213cae5..e4acea8bdf2b 100644
--- a/sci-libs/linbox/Manifest
+++ b/sci-libs/linbox/Manifest
@@ -1,4 +1,5 @@
AUX linbox-1.6.3-pc.patch 1082 BLAKE2B 7d5b055c0622b61245f193eb39d7e52951262c56456dceba5b3e72f54add82b2fc1660c4590eba2c4a97009bd78119893bfccb0909ed5374752f4bf563e75655 SHA512 5739738de34c28fb9970a869ee97a6ab528fd48e3f8b3d82f39966959fa97d6076a44263678d25c06bea3c46e06c8869ba4ea94484d5b57aee3a302df49fd06b
DIST linbox-1.6.3.tar.gz 1968034 BLAKE2B 55fb83db7da375d8d97f2567c6a120ac48fefc41eb02db68152cc32f1f16009b8c8108a07bbc68087ad2ef3279108db61b48b805c9ce39f4c5f0072ab6e96304 SHA512 ccef3b4c7b9d8f999e5e4ce4e544f22cd869154513827501ecb7e1abf132ff585dfb3315cced963abe842feecda9331dda9081efb3948987365d338223a8305c
EBUILD linbox-1.6.3-r1.ebuild 3411 BLAKE2B 7690226c067c00e60467bc95939640333afcd71ef7a627f4b109417fd5cdae80a939141b42bc7d891df9b05c3276b1ce51ad212f50850aa7e01a4157a4459886 SHA512 dbfa10550a5ca468555dbaceb197b518dcb9c94149a89628d1a88f9c1dc63e5a6eb5a08697c0a7dab3d1aa3788a3e5a38ccd2b13c74718f9d395b0c05a66b7d2
+EBUILD linbox-1.6.3-r2.ebuild 3960 BLAKE2B c100770ccac73ec1e8fabc4c10ab46f46a3abd6d0e20ee60b185e7045a375257273179364516a360789a668714f96049899ebc695dae07b29df1aa780455be7a SHA512 429af19bfb27fae10338e1df4033c5125664cf014067fb7b7357ce61e6c52731b6dbb0f6ad868c3360671fd67bbcf384c8a759d070a4754db412c2d3aa26b000
MISC metadata.xml 1273 BLAKE2B 44f0e4d4b7533e7206ec34c2683977ca85a3e4e635f8dd8611f4915e09d004b5faf7639d34ae2807bb1242be19f5c8abc6b3de2913bfe3a5c807560237e2962c SHA512 c29ebb754e2d681dab82a020d12d383dd243a88f704470881b0c471d87028027b7fc3ce9ade55aff211e1e33c7a387539d8f97f428d670e56a73c0021ce42d53
diff --git a/sci-libs/linbox/linbox-1.6.3-r2.ebuild b/sci-libs/linbox/linbox-1.6.3-r2.ebuild
new file mode 100644
index 000000000000..7f9aa82d3f0e
--- /dev/null
+++ b/sci-libs/linbox/linbox-1.6.3-r2.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit 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"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="doc opencl openmp static-libs cpu_flags_x86_fma3 cpu_flags_x86_fma4 cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 cpu_flags_x86_sse4_2 cpu_flags_x86_avx cpu_flags_x86_avx2"
+
+BDEPEND="doc? ( app-doc/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.1*
+ =sci-libs/fflas-ffpack-2.4*
+ 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.6.3-pc.patch" )
+
+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
+}
+
+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.
+ #
+ # Note: after v1.6.3, we'll need to append --without-archnative to
+ # these flags to avoid -march=native being appended by default.
+ #
+ econf \
+ --with-docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --with-all="${EPREFIX}"/usr \
+ --without-fplll \
+ $(use_enable doc) \
+ $(use_enable openmp) \
+ $(use_with opencl ocl) \
+ $(use_enable cpu_flags_x86_fma3 fma) \
+ $(use_enable cpu_flags_x86_fma4 fma4) \
+ $(use_enable cpu_flags_x86_sse3 sse) \
+ $(use_enable cpu_flags_x86_sse3 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable cpu_flags_x86_ssse3 ssse3) \
+ $(use_enable cpu_flags_x86_sse4_1 sse41) \
+ $(use_enable cpu_flags_x86_sse4_2 sse42) \
+ $(use_enable cpu_flags_x86_avx avx) \
+ $(use_enable cpu_flags_x86_avx2 avx2) \
+ $(use_enable static-libs static)
+}
+
+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
+}