Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sys-devel/oneDPL/
Date: Thu, 01 Dec 2022 21:39:41
Message-Id: 1669930771.2376be379ba28a6e57a4aaf9e8fab9ad7ce3a5aa.andrewammerlaan@gentoo
1 commit: 2376be379ba28a6e57a4aaf9e8fab9ad7ce3a5aa
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 1 21:30:23 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 1 21:39:31 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=2376be37
7
8 sys-devel/oneDPL: new package, add 2021.7.1
9
10 See-also: https://github.com/gentoo/sci/pull/1040
11 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
12
13 sys-devel/oneDPL/metadata.xml | 11 +++++++
14 sys-devel/oneDPL/oneDPL-2021.7.1.ebuild | 57 +++++++++++++++++++++++++++++++++
15 2 files changed, 68 insertions(+)
16
17 diff --git a/sys-devel/oneDPL/metadata.xml b/sys-devel/oneDPL/metadata.xml
18 new file mode 100644
19 index 000000000..5fbeb1b05
20 --- /dev/null
21 +++ b/sys-devel/oneDPL/metadata.xml
22 @@ -0,0 +1,11 @@
23 +<?xml version="1.0" encoding="UTF-8"?>
24 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
25 +<pkgmetadata>
26 + <maintainer type="project">
27 + <email>sci@g.o</email>
28 + <name>Gentoo Science Project</name>
29 + </maintainer>
30 + <upstream>
31 + <remote-id type="github">oneapi-src/oneDPL</remote-id>
32 + </upstream>
33 +</pkgmetadata>
34
35 diff --git a/sys-devel/oneDPL/oneDPL-2021.7.1.ebuild b/sys-devel/oneDPL/oneDPL-2021.7.1.ebuild
36 new file mode 100644
37 index 000000000..e9f773726
38 --- /dev/null
39 +++ b/sys-devel/oneDPL/oneDPL-2021.7.1.ebuild
40 @@ -0,0 +1,57 @@
41 +# Copyright 2022 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=8
45 +
46 +PYTHON_COMPAT=( python3_{8..11} )
47 +DOCS_BUILDER="sphinx"
48 +DOCS_DIR="documentation/library_guide"
49 +DOCS_AUTODOC=0
50 +inherit cmake python-any-r1 docs
51 +
52 +DESCRIPTION="oneAPI Data Parallel C++ Library"
53 +HOMEPAGE="https://github.com/oneapi-src/oneDPL"
54 +SRC_URI="https://github.com/oneapi-src/oneDPL/archive/refs/tags/${P}-release.tar.gz"
55 +S="${WORKDIR}/${PN}-${P}-release"
56 +
57 +LICENSE="Apache-2.0-with-LLVM-exceptions"
58 +SLOT="0"
59 +KEYWORDS="~amd64"
60 +
61 +#TODO: Figure out how to use the test
62 +RESTRICT="test"
63 +
64 +BDEPEND="virtual/pkgconfig"
65 +
66 +DEPEND="
67 + sys-devel/DPC++
68 + dev-libs/level-zero:=
69 + dev-cpp/tbb:=
70 +"
71 +RDEPEND="${DEPEND}"
72 +
73 +src_prepare() {
74 + cmake_src_prepare
75 + # Not using the DPC++ compiler doesn't really make sense here
76 + export CXX="${ESYSROOT}/usr/lib/llvm/intel/bin/clang"
77 +}
78 +
79 +src_configure() {
80 + local mycmakeargs=(
81 + -DONEDPL_DEVICE_BACKEND="level_zero"
82 + -DONEDPL_BACKEND="dpcpp"
83 + )
84 +
85 + cmake_src_configure
86 +}
87 +
88 +src_compile() {
89 + # Nothing to compile, header only
90 + docs_compile
91 +}
92 +
93 +src_install() {
94 + einstalldocs
95 + dodir /usr/include
96 + mv "${S}/include/oneapi" "${ED}/usr/include/" || die
97 +}