summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-11-11 21:59:12 +0000
committerSam James <sam@gentoo.org>2022-11-11 22:36:01 +0000
commit7ec6b766b668b0eecf9708d9840b84c0d5752bf8 (patch)
tree06fb042e12f4643d8d05bb35c27a20fe8f6b0a61 /sci-libs/lapack
parentsci-mathematics/cvc4: drop toml usage (diff)
downloadgentoo-7ec6b766b668b0eecf9708d9840b84c0d5752bf8.tar.gz
gentoo-7ec6b766b668b0eecf9708d9840b84c0d5752bf8.tar.bz2
gentoo-7ec6b766b668b0eecf9708d9840b84c0d5752bf8.zip
sci-libs/lapack: add 3.11
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs/lapack')
-rw-r--r--sci-libs/lapack/Manifest1
-rw-r--r--sci-libs/lapack/lapack-3.11.ebuild103
2 files changed, 104 insertions, 0 deletions
diff --git a/sci-libs/lapack/Manifest b/sci-libs/lapack/Manifest
index 67e1793bcebc..d545bd858148 100644
--- a/sci-libs/lapack/Manifest
+++ b/sci-libs/lapack/Manifest
@@ -1,2 +1,3 @@
DIST lapack-3.10.0.tar.gz 7630775 BLAKE2B fd2f920dd3f69eab471aa8c20d1b8178fb5c6e80337a2ed6948aba3ec639a816f8d368bb59ff6fb513b2f5cda9e61c2a547182f22fbc84a8c34191acefc3406a SHA512 56055000c241bab8f318ebd79249ea012c33be0c4c3eca6a78e247f35ad9e8088f46605a0ba52fd5ad3e7898be3b7bc6c50ceb3af327c4986a266b06fe768cbf
DIST lapack-3.10.1.tar.gz 7632257 BLAKE2B f2653239029ed9c136173fc2e54773a785ad3e469d581ca2b7f6a72697e6bb9d22879edaf8327ada510df259c08fe984202d14cb3860c0d2a711eb55a1cc11dd SHA512 0500bbbb48483208c0a35b74972ff0059c389da6032824a2079637266a99fa980882eedf7f1fc490219ee4ff27812ac8c6afe118e25f40a9c2387e7b997762fb
+DIST lapack-3.11.tar.gz 7723909 BLAKE2B b3f8ec8cd439d790ba5869b8b071fe924a4ac53328bce77d46032602b45353670966ed9223324a0780aabc2e95624f439e03f90a89586f96afbe1374c4261bc5 SHA512 d2f23c5f6ae14fb868312a25235459bd0c04f4b43b82a5ade01314776ade9a75dc518a457eb58595f29f64cb0bb86f1a12ce8beea3ec87ef9caf49493ce29fb3
diff --git a/sci-libs/lapack/lapack-3.11.ebuild b/sci-libs/lapack/lapack-3.11.ebuild
new file mode 100644
index 000000000000..de92c76f6d72
--- /dev/null
+++ b/sci-libs/lapack/lapack-3.11.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Some additional tests are run if Python is found
+PYTHON_COMPAT=( python3_{8..11} )
+inherit cmake python-any-r1
+
+DESCRIPTION="BLAS,CBLAS,LAPACK,LAPACKE reference implementations"
+HOMEPAGE="https://www.netlib.org/lapack/"
+SRC_URI="https://github.com/Reference-LAPACK/lapack/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+# TODO: static-libs 64bit-index
+IUSE="lapacke deprecated doc eselect-ldso test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !app-eselect/eselect-cblas
+ virtual/fortran
+ eselect-ldso? (
+ >=app-eselect/eselect-blas-0.2
+ >=app-eselect/eselect-lapack-0.2
+ )
+ doc? ( app-doc/blas-docs )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )
+"
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCBLAS=ON
+ -DLAPACKE=$(usex lapacke)
+ -DBUILD_DEPRECATED=$(usex deprecated)
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_TESTING=$(usex test)
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ use eselect-ldso || return
+ # Create private lib directory for eselect::blas (ld.so.conf)
+ dodir /usr/$(get_libdir)/blas/reference
+ dosym ../../libblas.so usr/$(get_libdir)/blas/reference/libblas.so
+ dosym ../../libblas.so.3 usr/$(get_libdir)/blas/reference/libblas.so.3
+ dosym ../../libcblas.so usr/$(get_libdir)/blas/reference/libcblas.so
+ dosym ../../libcblas.so.3 usr/$(get_libdir)/blas/reference/libcblas.so.3
+
+ # Create private lib directory for eselect::lapack (ld.so.conf)
+ dodir /usr/$(get_libdir)/lapack/reference
+ dosym ../../liblapack.so usr/$(get_libdir)/lapack/reference/liblapack.so
+ dosym ../../liblapack.so.3 usr/$(get_libdir)/lapack/reference/liblapack.so.3
+}
+
+pkg_postinst() {
+ use eselect-ldso || return
+
+ local me=reference libdir=$(get_libdir)
+ # check eselect-blas
+ eselect blas add ${libdir} "${EROOT}"/usr/${libdir}/blas/${me} ${me}
+ local current_blas=$(eselect blas show ${libdir} | cut -d' ' -f2)
+ if [[ ${current_blas} == ${me} || -z ${current_blas} ]]; then
+ eselect blas set ${libdir} ${me}
+ elog "Current eselect: BLAS ($libdir) -> [${current_blas}]."
+ else
+ elog "Current eselect: BLAS ($libdir) -> [${current_blas}]."
+ elog "To use blas [${me}] implementation, you have to issue (as root):"
+ elog "\t eselect blas set ${libdir} ${me}"
+ fi
+
+ # check eselect-lapack
+ eselect lapack add ${libdir} "${EROOT}"/usr/${libdir}/lapack/${me} ${me}
+ local current_lapack=$(eselect lapack show ${libdir} | cut -d' ' -f2)
+ if [[ ${current_lapack} == ${me} || -z ${current_lapack} ]]; then
+ eselect lapack set ${libdir} ${me}
+ elog "Current eselect: LAPACK ($libdir) -> [${current_lapack}]."
+ else
+ elog "Current eselect: LAPACK ($libdir) -> [${current_lapack}]."
+ elog "To use lapack [${me}] implementation, you have to issue (as root):"
+ elog "\t eselect lapack set ${libdir} ${me}"
+ fi
+}
+
+pkg_postrm() {
+ use eselect-ldso || return
+
+ eselect blas validate
+ eselect lapack validate
+}