public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andrew Ammerlaan" <andrewammerlaan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/mkl/
Date: Sat, 10 Dec 2022 15:46:06 +0000 (UTC)	[thread overview]
Message-ID: <1670687158.4cee0ae946a2c6856e21f088268fd498e779c6af.andrewammerlaan@gentoo> (raw)

commit:     4cee0ae946a2c6856e21f088268fd498e779c6af
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 15:41:00 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 15:45:58 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4cee0ae9

sci-libs/mkl: add 2022.2.1.16993

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-libs/mkl/Manifest                  |   4 +
 sci-libs/mkl/mkl-2022.2.1.16993.ebuild | 147 +++++++++++++++++++++++++++++++++
 2 files changed, 151 insertions(+)

diff --git a/sci-libs/mkl/Manifest b/sci-libs/mkl/Manifest
index 42f2d6c292c8..72f84cccf7ac 100644
--- a/sci-libs/mkl/Manifest
+++ b/sci-libs/mkl/Manifest
@@ -1 +1,5 @@
+DIST intel-oneapi-mkl-2022.2.1-2022.2.1-16993_amd64.deb 202488238 BLAKE2B 9bea2cb85aebaa99eac17563e35e4a33e564e58b3e797ce97c140ee510870d7bccd5ffc138eea86a3c25de988a39b5ed06182cb87f103fd8c2dc772d1bd50b81 SHA512 21f2c8b9608fc942821624132aa905f2ec0863f6af9b8a02c166f88b41620ea4e66d1e6551f5da53e727103e9035f28018b12ee3bee33c76ea10be6a68c82748
+DIST intel-oneapi-mkl-common-2022.2.1-2022.2.1-16993_all.deb 23890 BLAKE2B 0287ac646a19e8a33b25cbef006cb98c410872fff2294a15d4e35dd55fc037b523c1923d99d2445a1959b6515ef4b6fdfa7243338c2d194b3c4bf4548949216c SHA512 362640c14713bc8186ea712bb6720311cce1dae6e775d7aade4c613a7a5708224507ff4fefa1081165fa366840f94f8ae73ee345699a4fee5cf7cd7607d9f94e
+DIST intel-oneapi-mkl-common-devel-2022.2.1-2022.2.1-16993_all.deb 4688928 BLAKE2B 545641f68ba7b835859092242a60e065dd7bae8e538b27afaa1f7b266c6ce9aa5c0777b6ced7b8f3a35b70dbe6c6cbfad1db7c370a7a4f4478c8f23b4075bfd5 SHA512 275f267cf103b92ed0bdf56fdd55aee7c5ba5f42d2f7507abe1219aba72f325b9386c8e203a04d4a91020598d0d9cc82b0fc7abe22491c1103f44f3a31d42b2a
+DIST intel-oneapi-mkl-devel-2022.2.1-2022.2.1-16993_amd64.deb 183600754 BLAKE2B 94373a9d71625f71fb406d302eabed7800dc1b0e0ffef6268bf93abdccb8da4adb87643ebe73cd187fe1432b43e6de4eee4b716bb67a483c862e1beef0db486a SHA512 a259580266798e16b6fe6195cfacb1cdd9ae519c86945e7df29b7eff344fbfb238b0126231a99d2190cdbdba6340dce3f40574f443efd09b4955c86260d331da
 DIST mkl-2020.4.304.tar.gz 549319314 BLAKE2B 9ffdb0dc87c9fba1f003961f09cabef7376bd3d10e98085900c863383f0eb1e026f0f804390b2edf4e29d5b0b685af7b74092a7cb5cc871ca656462cec9487e4 SHA512 9c4ff7710484a1c0dd3e6ba7401eb6cb599f771651006b6a570c45b9abf1f43e8e400940d859a656c6892aa81e634c4d74eefe88e8287fdbb19a513f332326b7

diff --git a/sci-libs/mkl/mkl-2022.2.1.16993.ebuild b/sci-libs/mkl/mkl-2022.2.1.16993.ebuild
new file mode 100644
index 000000000000..5f88f1e40685
--- /dev/null
+++ b/sci-libs/mkl/mkl-2022.2.1.16993.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit unpacker
+
+DESCRIPTION="Intel Math Kernel Library"
+HOMEPAGE="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html"
+SRC_URI="
+	https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-${PN}-$(ver_cut 1-3)-$(ver_cut 1-3)-$(ver_cut 4)_amd64.deb
+	https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-${PN}-devel-$(ver_cut 1-3)-$(ver_cut 1-3)-$(ver_cut 4)_amd64.deb
+	https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-${PN}-common-$(ver_cut 1-3)-$(ver_cut 1-3)-$(ver_cut 4)_all.deb
+	https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-${PN}-common-devel-$(ver_cut 1-3)-$(ver_cut 1-3)-$(ver_cut 4)_all.deb
+"
+S="${WORKDIR}"
+
+LICENSE="ISSL"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="static-libs"
+RESTRICT="strip"
+
+# MKL uses Intel/LLVM OpenMP by default.
+# One can change the threadding layer to "gnu" or "tbb"
+# through the MKL_THREADING_LAYER env var.
+RDEPEND="
+	app-eselect/eselect-blas
+	app-eselect/eselect-lapack
+	sys-libs/libomp
+"
+# bug #801460
+BDEPEND="app-arch/xz-utils[extra-filters]"
+
+QA_PREBUILT="*"
+QA_TEXTRELS="*"
+QA_SONAME="*"
+
+src_prepare() {
+	default
+	# Drop conda stuff
+	rm -r opt/intel/oneapi/conda_channel || die
+}
+
+src_install() {
+	# Symlink pkgconfig and cmake files
+	pushd "opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/pkgconfig" || die
+	for file in *.pc; do
+		dosym "../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/pkgconfig/${file}" "/usr/share/pkgconfig/${file}"
+	done
+	popd || die
+	pushd "opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/cmake/mkl" || die
+	for file in *.cmake; do
+		dosym "../../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/cmake/mkl/${file}" "/usr/$(get_libdir)/cmake/mkl/${file}"
+	done
+	popd || die
+
+	# Symlink files in include directory
+	pushd "opt/intel/oneapi/mkl/$(ver_cut 1-3)/include" || die
+	for file in *.h; do
+		dosym "../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/include/${file}" "/usr/include/${file}"
+	done
+	for file in *.f90; do
+		dosym "../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/include/${file}" "/usr/include/${file}"
+	done
+	for file in *.fi; do
+		dosym "../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/include/${file}" "/usr/include/${file}"
+	done
+	popd || die
+	pushd "opt/intel/oneapi/mkl/$(ver_cut 1-3)/include/fftw" || die
+	for file in *; do
+		dosym "../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/include/fftw/${file}" "/usr/include/fftw/${file}"
+	done
+	popd || die
+	pushd "opt/intel/oneapi/mkl/$(ver_cut 1-3)/include/intel64" || die
+	for file in *; do
+		dosym "../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/include/intel64/${file}" "/usr/include/${file}"
+	done
+	popd || die
+	pushd "opt/intel/oneapi/mkl/$(ver_cut 1-3)/include/oneapi" || die
+	for file in *; do
+		dosym "../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/include/oneapi/${file}" "/usr/include/oneapi/${file}"
+	done
+	popd || die
+
+	# Symlink files in locale directory
+	pushd "opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/intel64/locale/en_US" || die
+	for file in *; do
+		dosym "../../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/intel64/locale/en_US/${file}" "/usr/share/locale/en_US/${file}"
+	done
+	popd || die
+
+	# Move everything over to the image directory
+	mv "${S}/"* "${ED}" || die
+
+	dodir /usr/$(get_libdir)/blas/mkl
+	dosym ../../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/intel64/libmkl_rt.so usr/$(get_libdir)/blas/mkl/libblas.so
+	dosym ../../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/intel64/libmkl_rt.so usr/$(get_libdir)/blas/mkl/libblas.so.3
+	dosym ../../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/intel64/libmkl_rt.so usr/$(get_libdir)/blas/mkl/libcblas.so
+	dosym ../../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/intel64/libmkl_rt.so usr/$(get_libdir)/blas/mkl/libcblas.so.3
+	dodir /usr/$(get_libdir)/lapack/mkl
+	dosym ../../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/intel64/libmkl_rt.so usr/$(get_libdir)/lapack/mkl/liblapack.so
+	dosym ../../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/intel64/libmkl_rt.so usr/$(get_libdir)/lapack/mkl/liblapack.so.3
+	dosym ../../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/intel64/libmkl_rt.so usr/$(get_libdir)/lapack/mkl/liblapacke.so
+	dosym ../../../../opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/intel64/libmkl_rt.so usr/$(get_libdir)/lapack/mkl/liblapacke.so.3
+
+	newenvd - "70intel-mkl" <<-_EOF_
+		MKLROOT="${EPREFIX}/opt/intel/oneapi/mkl/$(ver_cut 1-3)"
+		PATH="${EPREFIX}/opt/intel/oneapi/mkl/$(ver_cut 1-3)/bin/intel64"
+		# we need to duplicate it in ROOTPATH for Portage to respect...
+		ROOTPATH="${EPREFIX}/opt/intel/oneapi/mkl/$(ver_cut 1-3)/bin/intel64"
+		LDPATH="${EPREFIX}/opt/intel/oneapi/mkl/$(ver_cut 1-3)/lib/intel64"
+	_EOF_
+}
+
+pkg_postinst() {
+	local libdir=$(get_libdir) me="mkl"
+
+	# check 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/CBLAS ($libdir) -> [${current_blas}]."
+	else
+		elog "Current eselect: BLAS/CBLAS ($libdir) -> [${current_blas}]."
+		elog "To use blas [${me}] implementation, you have to issue (as root):"
+		elog "\t eselect blas set ${libdir} ${me}"
+	fi
+
+	# check 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_blas}]."
+	else
+		elog "Current eselect: LAPACK ($libdir) -> [${current_blas}]."
+		elog "To use lapack [${me}] implementation, you have to issue (as root):"
+		elog "\t eselect lapack set ${libdir} ${me}"
+	fi
+}
+
+pkg_postrm() {
+	eselect blas validate
+	eselect lapack validate
+}


             reply	other threads:[~2022-12-10 15:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-10 15:46 Andrew Ammerlaan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-17 21:50 [gentoo-commits] repo/gentoo:master commit in: sci-libs/mkl/ Mike Gilbert
2024-08-04 11:15 Andrew Ammerlaan
2023-02-25  6:52 Andrew Ammerlaan
2022-12-10 19:43 Andrew Ammerlaan
2022-12-10 18:26 Andrew Ammerlaan
2022-11-23 18:25 Andrew Ammerlaan
2021-11-29  5:48 Sam James
2020-11-10  3:11 Matthias Maier
2020-11-09 14:38 Benda XU
2020-11-09  7:38 Benda XU
2020-11-09  7:38 Benda XU
2019-09-23 17:16 Michał Górny
2018-05-11 21:56 Patrice Clement
2017-12-10 21:41 Michał Górny
2016-08-23  8:44 David Seifert
2016-08-23  8:44 David Seifert
2016-03-02 20:44 Justin Lecher
2015-12-29 10:02 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1670687158.4cee0ae946a2c6856e21f088268fd498e779c6af.andrewammerlaan@gentoo \
    --to=andrewammerlaan@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox