summaryrefslogtreecommitdiff
path: root/sci-libs/mkl
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /sci-libs/mkl
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'sci-libs/mkl')
-rw-r--r--sci-libs/mkl/Manifest17
-rw-r--r--sci-libs/mkl/files/mkl-10.0.2.018-openmpi.patch18
-rw-r--r--sci-libs/mkl/files/mkl-dynamic-ilp64-iomp.pc10
-rw-r--r--sci-libs/mkl/files/mkl-dynamic-ilp64-seq.pc10
-rw-r--r--sci-libs/mkl/files/mkl-dynamic-lp64-iomp.pc10
-rw-r--r--sci-libs/mkl/files/mkl-dynamic-lp64-seq.pc10
-rw-r--r--sci-libs/mkl/files/mkl-sdl-ilp64.pc9
-rw-r--r--sci-libs/mkl/files/mkl-sdl-lp64.pc9
-rw-r--r--sci-libs/mkl/files/mkl-static-ilp64-iomp.pc10
-rw-r--r--sci-libs/mkl/files/mkl-static-ilp64-seq.pc10
-rw-r--r--sci-libs/mkl/files/mkl-static-lp64-iomp.pc10
-rw-r--r--sci-libs/mkl/files/mkl-static-lp64-seq.pc10
-rw-r--r--sci-libs/mkl/metadata.xml4
-rw-r--r--sci-libs/mkl/mkl-10.0.5.025-r1.ebuild366
-rw-r--r--sci-libs/mkl/mkl-2020.4.304.ebuild231
15 files changed, 342 insertions, 392 deletions
diff --git a/sci-libs/mkl/Manifest b/sci-libs/mkl/Manifest
index 96cd5d09d210..b9b1f335034a 100644
--- a/sci-libs/mkl/Manifest
+++ b/sci-libs/mkl/Manifest
@@ -1,4 +1,13 @@
-AUX mkl-10.0.2.018-openmpi.patch 331 BLAKE2B 2472d459c1e3e90f6efaa1bf0941a02f2c71b24712be71fbc6be23dd53743468b8af88df49e49510344aff7b7f334940bfd5574f146eb5c82dc79a2bb0920f34 SHA512 b097815a369e8d743e77fd45ff52ad1cbe5f6d608e4bbe43d9c2cb54301c0d76960b7ce314bdbd5cd06c51e32332c9275360fe811b93df712710e359a4afab60
-DIST l_mkl_p_10.0.5.025.tgz 230389719 BLAKE2B 622dd0076c8e6d747f170685b6a378db95aa2453d15a53c93ef863729bb8dc76409d7bf72f8bab8ef9a07d8efe1e448cb9e7fc8e6f0c0b2cbbf0a0f6944e2a86 SHA512 621c3bfdecb57313e375424e391c0630a29efd70196e3e4bfc5b4ddd03aa45fda4761523652d875f2e60d466a0010c06659306b11f20966fba4943c308fa6f84
-EBUILD mkl-10.0.5.025-r1.ebuild 9829 BLAKE2B ac549f14e7c68b899a05369cc1c52670de2fabe5c07cb9def15f040e57b16eb1471a738c6db1d4133b06b38e59826bd62b494c289afda17e19cb79c923a7486d SHA512 2e09cf66221de13e9331ec0935944a878cb4de36fa36c580abd883ee7aff0d194b705935bb6e1e86b8e9d6ba3f86590e6048bbd1b0127a624e63fca1f944668b
-MISC metadata.xml 882 BLAKE2B 420f779849ebf2b4191156df6328233e0d474fe7ed1ced6505cfa3136b780a4029eb7f7df52a357287376252704d7215c98f2562689061e4fe5d1b420f2fcb22 SHA512 9909f91bb7389c3bcecc25935f7d7fc03c4b91c26990a188e3597be0818d94aec644f7cc9786cf673321c1136738e4738ae775019ab423019450e49725788be8
+AUX mkl-dynamic-ilp64-iomp.pc 306 BLAKE2B 0ea0134934cde3aef3689e4fb4749b3f1c6f90276bd9f64b784af1674b57eb6c3d00fd80b0733e1864e09c89bea6c7bf175d124ba1cb224c22d64ddc4c3457e4 SHA512 26d85c37d9900d3dc594302cdcf3ff13e49654843fac4febcddf0706f3b8bc87d259c1e88fe014ff157de168313cb32d868819ae994cb10e7bb37df0095ea83c
+AUX mkl-dynamic-ilp64-seq.pc 295 BLAKE2B 5b11259d812803cd2f122e4cf5557afbccaedc31cd0d1c88bf51bab540ab6b34ac393bce8308a8c2284a7e94d12ae361c47ce0164a971fda62ba14cda17e386a SHA512 86fa0bbee7aea9505fa549240de434ecb1c8749108eb442514a91c6b2f95eeaf1e1e0aa86ae4f5f97c6bfac5e436abfde2f30e79bbe1346e916d431b85948248
+AUX mkl-dynamic-lp64-iomp.pc 304 BLAKE2B cf0035147e728be3ce478526e3ff90b020835f7fe9be9119f4692500663c789884c191516737b076abd54e964fbe60860f82a5cde9ce883aa41078de64605e31 SHA512 2b372856f4139e36dad46f1c5763adb1a3513782ed90d555e702eb67335f666e1e13505c769a84af07f3ee37c0d0d9d3dbace666ce0a0afa2b05675ab45fe2ae
+AUX mkl-dynamic-lp64-seq.pc 289 BLAKE2B 2e368aa56b94fa54605012bbc2c8f037c9a531f8cc93ed6e74785dddf7ef6cbc9c5399fe6b7fec97d090e16cd516b4db671a93ed65280c5b27cd484533c13628 SHA512 a7da30424e7f41fb885590fe28b94e86ca7ee03287d434f581b08a0b9123a8102d4ecf7f2c2e0b5c9f06fb9b9887d36a6f948495c12f1c88d4d6bc4489c8e398
+AUX mkl-sdl-ilp64.pc 225 BLAKE2B 662a2bef1ac2eef99708c4b8e39800197e3265b376550d3b40aaa15fc2370bdd0bf01eb53a908fb3a506376206164b0058aef4c3e6e4a5f6e4f1c00b1f7f4423 SHA512 cb615257fb7a15e7c0050f28e67a9e586e077ac2e96cf28a68c25ffeb24796ef9f9b3a4693f1ef0d1d10c82a4a863243929d38050022613609fd9a6b62d7fd54
+AUX mkl-sdl-lp64.pc 213 BLAKE2B 266a7a9e0d063520731b2b496ba9a4a31f01c9a806d40b1635248f75a1b1d8a9677ea3170a025b8f17a55521cd64d072ce219865d0a6bf2bfd83b5fc341240a0 SHA512 08cf34eaf1c755b6a390142346025f077d2b9f90996bdf52ce9bab6a712e1c249e2be923dfbf966b34fff71b34333b0cc147ea420d9cdc0138370e7b4c747222
+AUX mkl-static-ilp64-iomp.pc 344 BLAKE2B dea2d1e1aa563367edb1a811d2ea109db3c1b07d4c1ee09e082e3eabd072303cd51d86dbe4bd2912f02e864f04fd0fe721fe60aa0954fe015f70b488c692451f SHA512 27b177e6f49b69bcc044a805d091d66ce50be1e6bdf26953f846f67984242e48ab018343cc8099d593892847de89c61d14cb90341da02565dea38e1ae60fc20f
+AUX mkl-static-ilp64-seq.pc 333 BLAKE2B 4c21e956ae5d6ffd8b6e701458a37a74c74a04fcf4e8742e37468703345d41cf43f85122d40eb8265a693bb816899a725b025334ea124f3f39c960aa9507f57b SHA512 ff795ec9ac7ab5ab12fe0aaf1e84fe35d71b7010523c6a85aea734ff0b3ffb896293aa7f4a994bceaad119043b20b9903d5a0dd45840c2417a11fa63d7f347f3
+AUX mkl-static-lp64-iomp.pc 342 BLAKE2B eddd6bba13426762a47a306469613e2010f5882b5db312f757e94a3f468e95ea7099219cbe78e14d9ddf66b21ff5cb07074ed32f19b21ccd1e78a1f3dbf94ed6 SHA512 2f9550b64adae53a68baa9a6c1faaebb24a2e17cf74f6c50a8c5f149d5da759bf6607261d14e94ac46d8aad2bf32487e41e94f1a5bdda18eefde2c5f23a58294
+AUX mkl-static-lp64-seq.pc 331 BLAKE2B 5c234425fff2462f668fc8dd681a9c3d6d1c4e39f73ec4e5cb984eeeede1f84907ffcba3066b81912b7e8712d2dc154af5703d19d085b0f5a5fa3ab0290f2457 SHA512 b828a7513a491e852c65922159333418be026497d4b0b8b456607463af8b0d71da910e0eb4cd915f5a7eb1d0ff959c87bfc443df352f1f84ce9006530dd0af7f
+DIST mkl-2020.4.304.tar.gz 549319314 BLAKE2B 9ffdb0dc87c9fba1f003961f09cabef7376bd3d10e98085900c863383f0eb1e026f0f804390b2edf4e29d5b0b685af7b74092a7cb5cc871ca656462cec9487e4 SHA512 9c4ff7710484a1c0dd3e6ba7401eb6cb599f771651006b6a570c45b9abf1f43e8e400940d859a656c6892aa81e634c4d74eefe88e8287fdbb19a513f332326b7
+EBUILD mkl-2020.4.304.ebuild 6617 BLAKE2B 29b75f9f3ac32363d1cfe349028e12633f9bb3fdc1d20f13a0269c2dadc0e672349cf9eac99d2980af8e4407b2b254d12d92a18d24c8540b12e7bf0cfd86fc46 SHA512 626cabd6a497e7b53d8f118b1bec44236d5887a6e8a759cd36bfd0b0967fc18249d4a65d95aabfb52b802c73837ac491c9a536b7bb4d474e9b4d754df43f326d
+MISC metadata.xml 716 BLAKE2B 2f80a154c168cfde53f9da85cbde7ae08b991a19958ae1f103c482379a579ccea7d2b1472c3ac8007532d3feddb7d1be1c52378d367b199877492eff66fbd660 SHA512 303b063b9bad6ff610fee4913115828d13cb7ab3f645eabaca9d349310d9a2830fafb99e9cac22f3640f38c85649870d2b6b6b2c793a101352d01f37ae334be3
diff --git a/sci-libs/mkl/files/mkl-10.0.2.018-openmpi.patch b/sci-libs/mkl/files/mkl-10.0.2.018-openmpi.patch
deleted file mode 100644
index 0519b5fdebdb..000000000000
--- a/sci-libs/mkl/files/mkl-10.0.2.018-openmpi.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/interfaces/fftw2x_cdft/makefile 2008-03-11 23:26:26.287984332 +0000
-+++ b/interfaces/fftw2x_cdft/makefile 2008-03-13 10:56:44.755095617 +0000
-@@ -172,6 +172,15 @@
- endif
-
-
-+ifeq ($(mpi),openmpi)
-+CS = mpicc
-+ifdef mpidir
-+_CS = $(mpidir)/bin/$(CS)
-+else
-+_CS = $(CS)
-+endif
-+endif
-+
- vpath %.c wrappers
-
- $(WRP): %.o: %.c
diff --git a/sci-libs/mkl/files/mkl-dynamic-ilp64-iomp.pc b/sci-libs/mkl/files/mkl-dynamic-ilp64-iomp.pc
new file mode 100644
index 000000000000..c68c025daa23
--- /dev/null
+++ b/sci-libs/mkl/files/mkl-dynamic-ilp64-iomp.pc
@@ -0,0 +1,10 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include/mkl
+
+Name: mkl-dynamic-ilp64-iomp
+Description: Intel(R) Math Kernel Library
+Version: Gentoo
+URL: https://software.intel.com/en-us/mkl
+Libs: -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl
+Cflags: -I${includedir}
diff --git a/sci-libs/mkl/files/mkl-dynamic-ilp64-seq.pc b/sci-libs/mkl/files/mkl-dynamic-ilp64-seq.pc
new file mode 100644
index 000000000000..0494c50f9da3
--- /dev/null
+++ b/sci-libs/mkl/files/mkl-dynamic-ilp64-seq.pc
@@ -0,0 +1,10 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include/mkl
+
+Name: mkl-dynamic-ilp64-seq
+Description: Intel(R) Math Kernel Library
+Version: Gentoo
+URL: https://software.intel.com/en-us/mkl
+Libs: -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
+Cflags: -I${includedir}
diff --git a/sci-libs/mkl/files/mkl-dynamic-lp64-iomp.pc b/sci-libs/mkl/files/mkl-dynamic-lp64-iomp.pc
new file mode 100644
index 000000000000..4e8bb50bb9ca
--- /dev/null
+++ b/sci-libs/mkl/files/mkl-dynamic-lp64-iomp.pc
@@ -0,0 +1,10 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include/mkl
+
+Name: mkl-dynamic-lp64-iomp
+Description: Intel(R) Math Kernel Library
+Version: Gentoo
+URL: https://software.intel.com/en-us/mkl
+Libs: -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl
+Cflags: -I${includedir}
diff --git a/sci-libs/mkl/files/mkl-dynamic-lp64-seq.pc b/sci-libs/mkl/files/mkl-dynamic-lp64-seq.pc
new file mode 100644
index 000000000000..e0386e29fa33
--- /dev/null
+++ b/sci-libs/mkl/files/mkl-dynamic-lp64-seq.pc
@@ -0,0 +1,10 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include
+
+Name: mkl-dynamic-lp64-seq
+Description: Intel(R) Math Kernel Library
+Version: Gentoo
+URL: https://software.intel.com/en-us/mkl
+Libs: -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
+Cflags: -I${includedir}
diff --git a/sci-libs/mkl/files/mkl-sdl-ilp64.pc b/sci-libs/mkl/files/mkl-sdl-ilp64.pc
new file mode 100644
index 000000000000..e1648f7f934a
--- /dev/null
+++ b/sci-libs/mkl/files/mkl-sdl-ilp64.pc
@@ -0,0 +1,9 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include/mkl
+
+Name: mkl-sdl-ilp64
+Version: Gentoo
+Description: Intel(R) Math Kernel Library
+Libs: -lmkl_rt -lpthread -lm -ldl
+Cflags: -I${includedir} -DMKL_ILP64 -m64
diff --git a/sci-libs/mkl/files/mkl-sdl-lp64.pc b/sci-libs/mkl/files/mkl-sdl-lp64.pc
new file mode 100644
index 000000000000..506851e43fed
--- /dev/null
+++ b/sci-libs/mkl/files/mkl-sdl-lp64.pc
@@ -0,0 +1,9 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include/mkl
+
+Name: mkl-sdl-ilp64
+Version: Gentoo
+Description: Intel(R) Math Kernel Library
+Libs: -lmkl_rt -lpthread -lm -ldl
+Cflags: -I${includedir} -m64
diff --git a/sci-libs/mkl/files/mkl-static-ilp64-iomp.pc b/sci-libs/mkl/files/mkl-static-ilp64-iomp.pc
new file mode 100644
index 000000000000..911c9d498938
--- /dev/null
+++ b/sci-libs/mkl/files/mkl-static-ilp64-iomp.pc
@@ -0,0 +1,10 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include
+
+Name: mkl-static-ilp64-iomp
+Description: Intel(R) Math Kernel Library
+Version: Gentoo
+URL: https://software.intel.com/en-us/mkl
+Libs: -Wl,--start-group libmkl_intel_ilp64.a libmkl_intel_thread.a libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl
+Cflags: -I${includedir}
diff --git a/sci-libs/mkl/files/mkl-static-ilp64-seq.pc b/sci-libs/mkl/files/mkl-static-ilp64-seq.pc
new file mode 100644
index 000000000000..aff2ff30ff8c
--- /dev/null
+++ b/sci-libs/mkl/files/mkl-static-ilp64-seq.pc
@@ -0,0 +1,10 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include
+
+Name: mkl-static-ilp64-seq
+Description: Intel(R) Math Kernel Library
+Version: Gentoo
+URL: https://software.intel.com/en-us/mkl
+Libs: -Wl,--start-group libmkl_intel_ilp64.a libmkl_sequential.a libmkl_core.a -Wl,--end-group -lpthread -lm -ldl
+Cflags: -I${includedir}
diff --git a/sci-libs/mkl/files/mkl-static-lp64-iomp.pc b/sci-libs/mkl/files/mkl-static-lp64-iomp.pc
new file mode 100644
index 000000000000..ba799d399f9d
--- /dev/null
+++ b/sci-libs/mkl/files/mkl-static-lp64-iomp.pc
@@ -0,0 +1,10 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include
+
+Name: mkl-static-lp64-iomp
+Description: Intel(R) Math Kernel Library
+Version: Gentoo
+URL: https://software.intel.com/en-us/mkl
+Libs: -Wl,--start-group libmkl_intel_lp64.a libmkl_intel_thread.a libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl
+Cflags: -I${includedir}
diff --git a/sci-libs/mkl/files/mkl-static-lp64-seq.pc b/sci-libs/mkl/files/mkl-static-lp64-seq.pc
new file mode 100644
index 000000000000..1c96e5483d5f
--- /dev/null
+++ b/sci-libs/mkl/files/mkl-static-lp64-seq.pc
@@ -0,0 +1,10 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include
+
+Name: mkl-static-lp64-seq
+Description: Intel(R) Math Kernel Library
+Version: Gentoo
+URL: https://software.intel.com/en-us/mkl
+Libs: -Wl,--start-group libmkl_intel_lp64.a libmkl_sequential.a libmkl_core.a -Wl,--end-group -lpthread -lm -ldl
+Cflags: -I${includedir}
diff --git a/sci-libs/mkl/metadata.xml b/sci-libs/mkl/metadata.xml
index 446435794d0d..59fd7e51f0f7 100644
--- a/sci-libs/mkl/metadata.xml
+++ b/sci-libs/mkl/metadata.xml
@@ -13,8 +13,4 @@
capacities. The package is installed as binary and has a restrictive
license. Please see license terms and home page for proper use.
</longdescription>
- <use>
- <flag name="fortran95">Installs the BLAS/LAPACK FORTRAN95 static libraries</flag>
- <flag name="int64">Installs the 64 bits integer libraries</flag>
- </use>
</pkgmetadata>
diff --git a/sci-libs/mkl/mkl-10.0.5.025-r1.ebuild b/sci-libs/mkl/mkl-10.0.5.025-r1.ebuild
deleted file mode 100644
index bd88e59f5c51..000000000000
--- a/sci-libs/mkl/mkl-10.0.5.025-r1.ebuild
+++ /dev/null
@@ -1,366 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit check-reqs fortran-2 toolchain-funcs
-
-PID=1232
-PB=${PN}
-P_ARCHIVE=l_${PN}_p_${PV}
-
-DESCRIPTION="Intel(R) Math Kernel Library: linear algebra, fft, math functions"
-HOMEPAGE="https://software.intel.com/en-us/mkl"
-SRC_URI="http://registrationcenter-download.intel.com/irc_nas/${PID}/${P_ARCHIVE}.tgz"
-
-SLOT="0"
-LICENSE="Intel-SDP"
-KEYWORDS="-* ~amd64 ~ia64 ~x86"
-IUSE="doc fftw fortran95 int64 mpi"
-
-RESTRICT="bindist strip mirror"
-
-DEPEND="
- app-eselect/eselect-blas
- app-eselect/eselect-cblas
- app-eselect/eselect-lapack"
-RDEPEND="${DEPEND}
- doc? ( app-doc/blas-docs app-doc/lapack-docs )
- mpi? ( virtual/mpi )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-10.0.2.018-openmpi.patch # allow openmpi to work
-)
-
-MKL_DIR=/opt/intel/${PN}/${PV}
-INTEL_LIC_DIR=/opt/intel/licenses
-
-CHECKREQS_DISK_BUILD=3500M
-
-QA_PREBUILT="opt/intel/${PN}/${PV}/*"
-
-get_fcomp() {
- case $(tc-getFC) in
- *gfortran* )
- FCOMP="gfortran" ;;
- ifort )
- FCOMP="ifc" ;;
- * )
- FCOMP=$(tc-getFC) ;;
- esac
-}
-
-pkg_setup() {
- check-reqs_pkg_setup
- fortran-2_pkg_setup
- # Check the license
- if [[ -z ${MKL_LICENSE} ]]; then
- MKL_LICENSE="$(grep -ls MKern ${ROOT}${INTEL_LIC_DIR}/* | tail -n 1)"
- MKL_LICENSE=${MKL_LICENSE/${ROOT}/}
- fi
- if [[ -z ${MKL_LICENSE} ]]; then
- eerror "Did not find any valid mkl license."
- eerror "Register at ${HOMEPAGE} to receive a license"
- eerror "and place it in ${INTEL_LIC_DIR} or run:"
- eerror "export MKL_LICENSE=/my/license/file emerge mkl"
- die "license setup failed"
- fi
-
- # Check if we have enough free diskspace to install
- CHECKREQS_DISK_BUILD="1100M"
- check-reqs_pkg_setup
-
- # Check and setup fortran
- if use fortran95; then
- # blas95 and lapack95 don't compile with gfortran < 4.2
- [[ $(tc-getFC) =~ (gfortran|g77) ]] && [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] &&
- die "blas95 and lapack95 don't compile with gfortran < 4.2"
- fi
- MKL_FC="gnu"
- [[ $(tc-getFC) =~ if ]] && MKL_FC="intel"
-
- # build profiles according to what compiler is installed
- MKL_CC="gnu"
- [[ $(tc-getCC) == icc ]] && MKL_CC="intel"
-
- if has_version sys-cluster/mpich; then
- MKL_MPI=mpich
- elif has_version sys-cluster/mpich2; then
- MKL_MPI=mpich2
- elif has_version sys-cluster/openmpi; then
- MKL_MPI=openmpi
- else
- MKL_MPI=intelmpi
- fi
- get_fcomp
-}
-
-src_unpack() {
- default
- cd "${WORKDIR}/${P_ARCHIVE}"/install || die
-
- cp ${MKL_LICENSE} "${WORKDIR}"/ || die
- MKL_LIC="$(basename ${MKL_LICENSE})"
-
- # binary blob extractor installs rpm leftovers in /opt/intel
- addwrite /opt/intel
- # undocumented features: INSTALLMODE_mkl=NONRPM
-
- # We need to install mkl non-interactively.
- # If things change between versions, first do it interactively:
- # tar xf l_*; ./install.sh --duplicate mkl.ini;
- # The file will be instman/mkl.ini
- # Then check it and modify the ebuild-created one below
- # --norpm is required to be able to install 10.x
- cat > mkl.ini <<-EOF || die
- [MKL]
- EULA_ACCEPT_REJECT=ACCEPT
- FLEXLM_LICENSE_LOCATION=${WORKDIR}/${MKL_LIC}
- INSTALLMODE_mkl=NONRPM
- INSTALL_DESTINATION=${S}
- EOF
- einfo "Extracting ..."
- ./install \
- --silent ./mkl.ini \
- --installpath "${S}" \
- --log log.txt &> /dev/null \
- || die
-
- if [[ -z $(find "${S}" -name libmkl.so) ]]; then
- eerror "Could not find extracted files"
- eerror "See ${PWD}/log.txt to see why"
- die "extracting failed"
- fi
-}
-
-src_prepare() {
- default
-
- # remove left over
- rm -f /opt/intel/.*mkl*.log /opt/intel/intel_sdp_products.db || die
-
- # remove unused stuff and set up intel names
- rm -rf "${WORKDIR}"/l_* || die
-
- case ${ARCH} in
- x86) MKL_ARCH=32
- MKL_KERN=ia32
- rm -rf lib*/{em64t,64} || die
- ;;
-
- amd64) MKL_ARCH=em64t
- MKL_KERN=em64t
- rm -rf lib*/{32,64} || die
- ;;
-
- ia64) MKL_ARCH=64
- MKL_KERN=ipf
- rm -rf lib*/{32,em64t} || die
- ;;
- esac
- MKL_LIBDIR=${MKL_DIR}/lib/${MKL_ARCH}
- # fix env scripts
- sed -i \
- -e "s:${S}:${MKL_DIR}:g" \
- tools/environment/*sh || die "sed support file failed"
-}
-
-src_compile() {
- cd "${S}"/interfaces || die
- if use fortran95; then
- einfo "Compiling fortan95 static lib wrappers"
- local myconf="lib${MKL_ARCH}"
- [[ $(tc-getFC) =~ gfortran ]] && \
- myconf="${myconf} FC=gfortran"
- if use int64; then
- myconf="${myconf} interface=ilp64"
- [[ $(tc-getFC) =~ gfortran ]] && \
- myconf="${myconf} FOPTS=-fdefault-integer-8"
- fi
- local x
- for x in blas95 lapack95; do
- emake -C ${x} ${myconf}
- done
- fi
-
- if use fftw; then
- local fftwdirs="fftw2xc fftw2xf fftw3xc fftw3xf"
- local myconf="lib${MKL_ARCH} compiler=${MKL_CC}"
- if use mpi; then
- fftwdirs="${fftwdirs} fftw2x_cdft"
- myconf="${myconf} mpi=${MKL_MPI}"
- fi
- einfo "Compiling fftw static lib wrappers"
- local x
- for x in ${fftwdirs}; do
- emake -C ${x} ${myconf}
- done
- fi
-}
-
-src_test() {
- cd "${S}"/tests
- local myconf
- local testdirs="blas cblas"
- local x
- use int64 && myconf="${myconf} interface=ilp64"
- # buggy with g77 and gfortran
- #if use mpi; then
- # testdirs="${testdirs} scalapack"
- # myconf="${myconf} mpi=${MKL_MPI}"
- #fi
- for x in ${testdirs}; do
- einfo "Testing ${x}"
- emake -C ${x} \
- compiler=${MKL_FC} \
- ${myconf} \
- so${MKL_ARCH}
- done
-}
-
-mkl_make_generic_profile() {
- cd "${S}" || die
- # produce eselect files
- # don't make them in FILESDIR, it changes every major version
- cat > eselect.blas <<-EOF || die
- ${MKL_LIBDIR}/libmkl_${MKL_KERN}.a /usr/@LIBDIR@/libblas.a
- ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libblas.so
- ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libblas.so.0
- EOF
- cat > eselect.cblas <<-EOF || die
- ${MKL_LIBDIR}/libmkl_${MKL_KERN}.a /usr/@LIBDIR@/libcblas.a
- ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libcblas.so
- ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libcblas.so.0
- ${MKL_DIR}/include/mkl_cblas.h /usr/include/cblas.h
- EOF
- cat > eselect.lapack <<-EOF || die
- ${MKL_LIBDIR}/libmkl_lapack.a /usr/@LIBDIR@/liblapack.a
- ${MKL_LIBDIR}/libmkl_lapack.so /usr/@LIBDIR@/liblapack.so
- ${MKL_LIBDIR}/libmkl_lapack.so /usr/@LIBDIR@/liblapack.so.0
- EOF
-}
-
-# usage: mkl_add_profile <profile> <interface_lib> <thread_lib> <rtl_lib>
-mkl_add_profile() {
- cd "${S}" || die
- local prof=${1}
- local x
- for x in blas cblas lapack; do
- cat > ${x}-${prof}.pc <<-EOF || die
- prefix=${MKL_DIR}
- libdir=${MKL_LIBDIR}
- includedir=\${prefix}/include
- Name: ${x}
- Description: Intel(R) Math Kernel Library implementation of ${x}
- Version: ${PV}
- URL: ${HOMEPAGE}
- EOF
- done
- cat >> blas-${prof}.pc <<-EOF || die
- Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core ${4} -lpthread
- EOF
- cat >> cblas-${prof}.pc <<-EOF || die
- Requires: blas
- Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core ${4} -lpthread
- Cflags: -I\${includedir}
- EOF
- cat >> lapack-${prof}.pc <<-EOF || die
- Requires: blas
- Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core -lmkl_lapack ${4} -lpthread
- EOF
- insinto ${MKL_LIBDIR}
- for x in blas cblas lapack; do
- doins ${x}-${prof}.pc
- cp eselect.${x} eselect.${x}.${prof} || die
- echo "${MKL_LIBDIR}/${x}-${prof}.pc /usr/@LIBDIR@/pkgconfig/${x}.pc" \
- >> eselect.${x}.${prof} || die
- eselect ${x} add $(get_libdir) eselect.${x}.${prof} ${prof}
- done
-}
-
-mkl_make_profiles() {
- local clib="gf"
- has_version 'dev-lang/ifc' && clib+=" intel"
- local slib="-lmkl_sequential"
- local rlib="-liomp5"
- local pbase=${PN}
- local c
- for c in ${clib}; do
- local ilib="-lmkl_${c}_lp64"
- use x86 && ilib="-lmkl_${c}"
- local tlib="-lmkl_${c/gf/gnu}_thread"
- local comp="${c/gf/gfortran}"
- comp="${comp/intel/ifort}"
- mkl_add_profile ${pbase}-${comp} ${ilib} ${slib}
- mkl_add_profile ${pbase}-${comp}-threads ${ilib} ${tlib} ${rlib}
- if use int64; then
- ilib="-lmkl_${c}_ilp64"
- mkl_add_profile ${pbase}-${comp}-int64 ${ilib} ${slib}
- mkl_add_profile ${pbase}-${comp}-threads-int64 ${ilib} ${tlib} ${rlib}
- fi
- done
-}
-
-src_install() {
- dodir ${MKL_DIR}
-
- # install license
- if [[ ! -f ${INTEL_LIC_DIR}/${MKL_LIC} ]]; then
- insinto ${INTEL_LIC_DIR}
- doins "${WORKDIR}"/${MKL_LIC}
- fi
-
- # install main stuff: cp faster than doins
- einfo "Installing files..."
- local cpdirs="benchmarks doc examples include interfaces lib man tests"
- local doinsdirs="tools"
- cp -pPR ${cpdirs} "${D}"${MKL_DIR} \
- || die "installing mkl failed"
- insinto ${MKL_DIR}
- doins -r ${doinsdirs}
- dosym mkl_cblas.h ${MKL_DIR}/include/cblas.h
-
- # install blas/lapack profiles
- mkl_make_generic_profile
- mkl_make_profiles
-
- # install env variables
- cat > 35mkl <<-EOF || die
- MKLROOT=${MKL_DIR}
- LDPATH=${MKL_LIBDIR}
- MANPATH=${MKL_DIR}/man
- EOF
- doenvd 35mkl
-}
-
-pkg_postinst() {
- # if blas profile is mkl, set lapack and cblas profiles as mkl
- local blas_prof=$(eselect blas show | cut -d' ' -f2)
- local def_prof="mkl-gfortran-threads"
- local x
- has_version 'dev-lang/ifc' && def_prof="mkl-ifort-threads"
- use int64 && def_prof="${def_prof}-int64"
- for x in blas cblas lapack; do
- local cur_prof=$(eselect ${x} show | cut -d' ' -f2)
- if [[ -z ${cur_prof} || ${cur_prof} == ${def_prof} ]]; then
- # work around eselect bug #189942
- local configfile="${ROOT}"/etc/env.d/${x}/$(get_libdir)/config
- rm -f ${configfile} || die
- eselect ${x} set ${def_prof}
- elog "${x} has been eselected to ${def_prof}"
- else
- elog "Current eselected ${x} is ${current_lib}"
- elog "To use one of mkl profiles, issue (as root):"
- elog "\t eselect ${x} set <profile>"
- fi
- if [[ ${blas_prof} == mkl* && ${cur_prof} != ${blas_prof} ]]; then
- eselect blas set ${def_prof}
- elog "${x} is now set to ${def_prof} for consistency"
- fi
- done
- if [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]]; then
- elog "Multi-threading OpenMP for GNU compilers only available"
- elog "with gcc >= 4.2. Make sure you have a compatible version"
- elog "and select it with gcc-config before selecting gnu profiles"
- fi
-}
diff --git a/sci-libs/mkl/mkl-2020.4.304.ebuild b/sci-libs/mkl/mkl-2020.4.304.ebuild
new file mode 100644
index 000000000000..e90f9cb25172
--- /dev/null
+++ b/sci-libs/mkl/mkl-2020.4.304.ebuild
@@ -0,0 +1,231 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+inherit multilib-build rpm
+
+MAGIC=16917 # from registration center
+MY_P=${P/-/_} # mkl_2020.4.304
+MY_PV=$(ver_rs 2 '-') # 2020.4-304
+
+DESCRIPTION="Intel Math Kernel Library"
+HOMEPAGE="https://software.intel.com/en-us/intel-mkl"
+SRC_URI="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/${MAGIC}/l_${MY_P}.tgz -> ${P}.tar.gz"
+S="${WORKDIR}"/l_${MY_P}
+
+LICENSE="ISSL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+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[${MULTILIB_USEDEP}]
+"
+
+QA_PREBUILT="*"
+QA_TEXTRELS="*"
+QA_SONAME="*"
+QA_MULTILIB_PATHS="/usr/lib.*/libmkl_tbb_thread.so"
+
+# first unpack all rpms
+# find folders containing header like, static and dynamic lib files
+# these are the only folders we care about
+# find "${S}"/rpm -type f \( -name "*.a" -o -name "*.so" -o -wholename "*mkl/include*" \) \
+# | tr '/' ' ' | awk '{ print $2 }' | sort | uniq
+
+# ignore all conda-* rpms
+# ignore all empty rpms
+# information about rest:
+#
+# mkl-core-ps-32bit-2020.3-279-2020.3-279.x86_64.rpm | some prebuilt benchmark executables
+# psxe-common-2020.3-111-2020.3-111.noarch.rpm
+# comp-l-all-vars-19.1.2-279-19.1.2-279.noarch.rpm
+# comp-nomcu-vars-19.1.2-279-19.1.2-279.noarch.rpm
+# mkl-cluster-c-2020.3-279-2020.3-279.noarch.rpm
+# mkl-cluster-f-2020.3-279-2020.3-279.noarch.rpm
+# mkl-doc-2020-2020.3-279.noarch.rpm
+# mkl-common-ps-2020.3-279-2020.3-279.noarch.rpm | only contains benchmarks
+# compxe-pset-2020.3-111-2020.3-111.noarch.rpm | only contains benchmarks
+# mkl-doc-ps-2020-2020.3-279.noarch.rpm
+# mkl-common-2020.3-279-2020.3-279.noarch.rpm | setting up environment vars (might be needed for parallel studio)
+# mkl-installer-license-2020.3-279-2020.3-279.noarch.rpm | already have license
+# mkl-psxe-2020.3-111-2020.3-111.noarch.rpm | useless files
+# mkl-common-c-ps-2020.3-279-2020.3-279.noarch.rpm | contained in common-c
+
+INTEL_DIST_X86_RPMS=(
+ mkl-core-32bit
+ mkl-core-rt-32bit
+ mkl-f95-32bit
+ mkl-gnu-32bit
+ mkl-gnu-f-32bit
+ mkl-gnu-f-rt-32bit
+ mkl-gnu-rt-32bit
+ mkl-tbb-32bit
+ mkl-tbb-rt
+ intel-openmp-32bit-19.1.3-304-19.1.3-304.x86_64.rpm
+)
+INTEL_DIST_AMD64_RPMS=(
+ mkl-cluster
+ mkl-cluster-rt
+ mkl-core
+ mkl-core-ps
+ mkl-core-rt
+ mkl-f95
+ mkl-gnu
+ mkl-gnu-f
+ mkl-gnu-rt
+ mkl-gnu-f-rt
+ mkl-pgi
+ mkl-pgi-rt
+ mkl-tbb
+ mkl-tbb-rt
+ intel-openmp-19.1.3-304-19.1.3-304.x86_64.rpm
+)
+INTEL_DIST_DAT_RPMS=(
+ mkl-common-c
+ mkl-common-f
+ mkl-f95-common
+)
+
+rpm_dirname() {
+ local rpm="${1}" suffix="x86_64"
+ if [[ $# -eq 2 ]]; then
+ suffix="$2"
+ fi
+ if [[ ! ${rpm} =~ "rpm" ]] ; then
+ rpm="intel-${rpm}-${MY_PV}-${MY_PV}.${suffix}"
+ fi
+ printf '%s\n' "${rpm%%.rpm}"
+}
+
+rpm_unpack() {
+ local rpm="$1" suffix="x86_64"
+ if [[ $# -eq 2 ]]; then
+ suffix="$2"
+ fi
+ rpm="$(rpm_dirname $rpm $suffix)"
+ elog "Unpacking - ${rpm}.rpm"
+ rpmunpack "${rpm}.rpm" || die
+}
+
+src_unpack() {
+ default
+ cd "${S}"/rpm
+ local rpm
+ for rpm in ${INTEL_DIST_DAT_RPMS[@]}; do
+ rpm_unpack ${rpm} noarch
+ done
+ if use abi_x86_64 ; then
+ for rpm in ${INTEL_DIST_AMD64_RPMS[@]}; do
+ rpm_unpack ${rpm}
+ done
+ fi
+ if use abi_x86_32 ; then
+ for rpm in ${INTEL_DIST_X86_RPMS[@]}; do
+ rpm_unpack ${rpm}
+ done
+ fi
+}
+
+multilib_src_install() {
+ cd "${S}"/rpm
+ elog "current variant - ${MULTIBUILD_VARIANT}"
+ local rpm rpm_list libdir=$(get_libdir)
+ if [[ ${MULTIBUILD_VARIANT} =~ 'amd64' ]] ; then
+ rpm_list="${INTEL_DIST_AMD64_RPMS[@]}"
+ else
+ rpm_list="${INTEL_DIST_X86_RPMS[@]}"
+ fi
+ for rpm in ${rpm_list} ; do
+ rpm=$(rpm_dirname ${rpm})
+ elog "installing libs from - ${rpm}"
+ local libso liba
+ for libso in $(find "${S}"/rpm/${rpm} -name "*.so") ; do
+ dolib.so "${libso}"
+ done
+ use static-libs && \
+ for liba in $(find "${S}"/rpm/${rpm} -name "*.a") ; do
+ dolib.a "${liba}"
+ done
+ done
+
+ dodir /usr/$(get_libdir)/blas/mkl
+ dosym ../../libmkl_rt.so usr/$(get_libdir)/blas/mkl/libblas.so
+ dosym ../../libmkl_rt.so usr/$(get_libdir)/blas/mkl/libblas.so.3
+ dosym ../../libmkl_rt.so usr/$(get_libdir)/blas/mkl/libcblas.so
+ dosym ../../libmkl_rt.so usr/$(get_libdir)/blas/mkl/libcblas.so.3
+ dodir /usr/$(get_libdir)/lapack/mkl
+ dosym ../../libmkl_rt.so usr/$(get_libdir)/lapack/mkl/liblapack.so
+ dosym ../../libmkl_rt.so usr/$(get_libdir)/lapack/mkl/liblapack.so.3
+ dosym ../../libmkl_rt.so usr/$(get_libdir)/lapack/mkl/liblapacke.so
+ dosym ../../libmkl_rt.so usr/$(get_libdir)/lapack/mkl/liblapacke.so.3
+
+ # for some reason pkgconfig files are only for amd64
+ [[ ${MULTIBUILD_VARIANT} =~ 'amd64' ]] || return
+ local pc_files=( "${FILESDIR}"/*.pc )
+ insinto /usr/$(get_libdir)/pkgconfig
+ for pc in "${pc_files[@]}" ; do
+ doins "${pc}"
+ sed -e "s:@PREFIX@:${EPREFIX}/usr:" \
+ -i "${ED}"/usr/$(get_libdir)/pkgconfig/${pc##*/} || die
+ done
+}
+
+src_install() {
+ # install bunch of header like files
+ dodir /usr/include/mkl
+ for idir in $(find "${S}"/rpm -type d -wholename "*mkl/include"); do
+ cp -a "${idir}"/. "${ED}"/usr/include/mkl || die
+ done
+
+ multilib_foreach_abi multilib_src_install
+}
+
+library-provider_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_postinst() {
+ multilib_foreach_abi library-provider_pkg_postinst
+}
+
+library-provider_pkg_postrm() {
+ eselect blas validate
+ eselect lapack validate
+}
+
+pkg_postrm() {
+ multilib_foreach_abi library-provider_pkg_postrm
+}