public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: sci-libs/oneMKL/files/, sci-libs/oneMKL/
@ 2022-12-10 18:27 Andrew Ammerlaan
  0 siblings, 0 replies; only message in thread
From: Andrew Ammerlaan @ 2022-12-10 18:27 UTC (permalink / raw
  To: gentoo-commits

commit:     196ce188d782e9e92731ce59d1838e46e786f485
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 18:23:48 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 18:23:48 2022 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=196ce188

sci-libs/oneMKL: new package, add 0.2_p20221201

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

 .../files/oneMKL-0.2_p20221201-find-lapacke.patch  | 22 ++++++++
 sci-libs/oneMKL/metadata.xml                       | 11 ++++
 sci-libs/oneMKL/oneMKL-0.2_p20221201.ebuild        | 59 ++++++++++++++++++++++
 3 files changed, 92 insertions(+)

diff --git a/sci-libs/oneMKL/files/oneMKL-0.2_p20221201-find-lapacke.patch b/sci-libs/oneMKL/files/oneMKL-0.2_p20221201-find-lapacke.patch
new file mode 100644
index 000000000..2c2fc1367
--- /dev/null
+++ b/sci-libs/oneMKL/files/oneMKL-0.2_p20221201-find-lapacke.patch
@@ -0,0 +1,22 @@
+diff --git a/cmake/FindLAPACKE.cmake b/cmake/FindLAPACKE.cmake
+index 42a5b7d..080108a 100644
+--- a/cmake/FindLAPACKE.cmake
++++ b/cmake/FindLAPACKE.cmake
+@@ -19,13 +19,13 @@
+ 
+ include_guard()
+ 
+-find_library(LAPACKE64_file NAMES lapacke64.dll.lib lapacke64.lib lapacke64 HINTS ${REF_LAPACK_ROOT} PATH_SUFFIXES lib lib64)
++find_library(LAPACKE64_file NAMES lapacke64.dll.lib lapacke64.lib lapacke HINTS ${REF_LAPACK_ROOT} PATH_SUFFIXES lib lib64)
+ find_package_handle_standard_args(LAPACKE REQUIRED_VARS LAPACKE64_file)
+-find_library(LAPACK64_file NAMES lapack64.dll.lib lapack64.lib lapack64 HINTS ${REF_LAPACK_ROOT} PATH_SUFFIXES lib lib64)
++find_library(LAPACK64_file NAMES lapack64.dll.lib lapack64.lib lapack HINTS ${REF_LAPACK_ROOT} PATH_SUFFIXES lib lib64)
+ find_package_handle_standard_args(LAPACKE REQUIRED_VARS LAPACK64_file)
+-find_library(CBLAS64_file NAMES cblas64.dll.lib cblas64.lib cblas64 HINTS ${REF_LAPACK_ROOT} PATH_SUFFIXES lib lib64)
++find_library(CBLAS64_file NAMES cblas64.dll.lib cblas64.lib cblas HINTS ${REF_LAPACK_ROOT} PATH_SUFFIXES lib lib64)
+ find_package_handle_standard_args(LAPACKE REQUIRED_VARS CBLAS64_file)
+-find_library(BLAS64_file NAMES blas64.dll.lib blas64.lib blas64 HINTS ${REF_LAPACK_ROOT} PATH_SUFFIXES lib lib64)
++find_library(BLAS64_file NAMES blas64.dll.lib blas64.lib blas HINTS ${REF_LAPACK_ROOT} PATH_SUFFIXES lib lib64)
+ find_package_handle_standard_args(LAPACKE REQUIRED_VARS BLAS64_file)
+ 
+ get_filename_component(LAPACKE64_LIB_DIR ${LAPACKE64_file} DIRECTORY)

diff --git a/sci-libs/oneMKL/metadata.xml b/sci-libs/oneMKL/metadata.xml
new file mode 100644
index 000000000..77e2dd702
--- /dev/null
+++ b/sci-libs/oneMKL/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>sci@gentoo.org</email>
+		<name>Gentoo Science Project</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">oneapi-src/oneMKL</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/sci-libs/oneMKL/oneMKL-0.2_p20221201.ebuild b/sci-libs/oneMKL/oneMKL-0.2_p20221201.ebuild
new file mode 100644
index 000000000..35d773397
--- /dev/null
+++ b/sci-libs/oneMKL/oneMKL-0.2_p20221201.ebuild
@@ -0,0 +1,59 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+COMMIT="f4866ab2648cd7cff4a047b91be5f94ff7b73ba1"
+
+DESCRIPTION="oneAPI Math Kernel Library Interfaces "
+HOMEPAGE="https://github.com/oneapi-src/oneMKL"
+SRC_URI="https://github.com/oneapi-src/oneMKL/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="test"
+# Tests don't compile properly
+# RESTRICT="!test? ( test )"
+RESTRICT="test"
+
+BDEPEND="sys-devel/DPC++"
+
+DEPEND="
+	dev-cpp/tbb:=
+	sci-libs/lapack[lapacke]
+	sci-libs/mkl
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${P}-find-lapacke.patch"
+)
+
+src_prepare() {
+	# DPC++ compiler required for full functionality
+	export CC="${ESYSROOT}/usr/lib/llvm/intel/bin/clang"
+	export CXX="${ESYSROOT}/usr/lib/llvm/intel/bin/clang++"
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DCMAKE_CXX_COMPILER="${ESYSROOT}/usr/lib/llvm/intel/bin/clang++"
+		-DCMAKE_C_COMPILER="${ESYSROOT}/usr/lib/llvm/intel/bin/clang"
+		-DMKL_ROOT="${ESYSROOT}/opt/intel/oneapi/mkl/latest"
+		-DBUILD_FUNCTIONAL_TESTS="$(usex test)"
+	)
+	cmake_src_configure
+}
+
+src_install() {
+	cmake_src_install
+	# Move into the correct libdid
+	mv "${ED}/usr/lib" "${ED}/usr/$(get_libdir)" || die
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-10 18:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-10 18:27 [gentoo-commits] proj/sci:master commit in: sci-libs/oneMKL/files/, sci-libs/oneMKL/ Andrew Ammerlaan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox