Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/hsa-ext-rocr/
Date: Tue, 20 Aug 2019 15:14:56
Message-Id: 1566314075.02b7fd5c0c4a9334e942f6b05ac71bcf72a3b6df.marecki@gentoo
1 commit: 02b7fd5c0c4a9334e942f6b05ac71bcf72a3b6df
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 20 15:05:57 2019 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 20 15:14:35 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02b7fd5c
7
8 dev-libs/hsa-ext-rocr: new package
9
10 Required for the time being by dev-libs/rocm-opencl-runtime in order to
11 enable OpenCL image support. The relevant code will eventually be
12 open-sourced but so far upstream hasn't provided any timeline for it.
13
14 There is no licence file in the upstream package, that said the
15 libraries it contains used to be distributed as part of the AMDGPU-Pro
16 stack so it is a safe bet that the standalone package is covered by the
17 same EULA as for dev-libs/amdgpu-pro-opencl.
18
19 Package-Manager: Portage-2.3.69, Repoman-2.3.16
20 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
21
22 dev-libs/hsa-ext-rocr/Manifest | 1 +
23 dev-libs/hsa-ext-rocr/hsa-ext-rocr-1.1.9.99.ebuild | 53 ++++++++++++++++++++++
24 dev-libs/hsa-ext-rocr/metadata.xml | 22 +++++++++
25 3 files changed, 76 insertions(+)
26
27 diff --git a/dev-libs/hsa-ext-rocr/Manifest b/dev-libs/hsa-ext-rocr/Manifest
28 new file mode 100644
29 index 00000000000..a8f257eb375
30 --- /dev/null
31 +++ b/dev-libs/hsa-ext-rocr/Manifest
32 @@ -0,0 +1 @@
33 +DIST hsa-ext-rocr-dev_1.1.9-99-g835b876_amd64.deb 1113746 BLAKE2B ff1d3418febdde505e12a3a41b39a15d6ed28e97f62700ffa4b7bfbc618b23253026e3978e1293cfa2c06742c78574510e08969e1e1524b82b94a45d98efd2af SHA512 e7c799e218eaee6f926fe309b470af00e0ef7e4974a3dd67231c1c904a0a036e62b1ce3b176bb0c13c0fa65a718443f06e7472e3e66225d818074620e46350b1
34
35 diff --git a/dev-libs/hsa-ext-rocr/hsa-ext-rocr-1.1.9.99.ebuild b/dev-libs/hsa-ext-rocr/hsa-ext-rocr-1.1.9.99.ebuild
36 new file mode 100644
37 index 00000000000..7d91362d6a0
38 --- /dev/null
39 +++ b/dev-libs/hsa-ext-rocr/hsa-ext-rocr-1.1.9.99.ebuild
40 @@ -0,0 +1,53 @@
41 +# Copyright 1999-2019 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=7
45 +
46 +inherit unpacker
47 +
48 +MY_PV=$(ver_rs 3 '-')
49 +
50 +DESCRIPTION="Proprietary image-support library for Radeon Open Compute"
51 +HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm#closed-source-components"
52 +SRC_URI="http://repo.radeon.com/rocm/apt/debian/pool/main/h/${PN}-dev/${PN}-dev_${MY_PV}-g835b876_amd64.deb"
53 +
54 +LICENSE="AMD-GPU-PRO-EULA"
55 +SLOT="0"
56 +KEYWORDS="~amd64"
57 +IUSE="-deprecated"
58 +
59 +RESTRICT="mirror fetch strip"
60 +
61 +QA_PREBUILT="/opt/${PN}/lib*/*"
62 +
63 +S="${WORKDIR}"
64 +
65 +pkg_nofetch() {
66 + einfo "Please download the package"
67 + einfo
68 + einfo " ${SRC_URI}"
69 + einfo
70 + einfo "and place into your distfiles directory."
71 +}
72 +
73 +src_unpack() {
74 + unpack_deb ${A}
75 +}
76 +
77 +src_install() {
78 + local destdir="/opt/${PN}"
79 + local soversion=$(ver_cut 1-3)
80 + local somajor=$(ver_cut 1)
81 +
82 + local solibs_to_install=( "libhsa-ext-image64.so" )
83 + if use deprecated; then
84 + solibs_to_install+=( "libhsa-runtime-tools64.so" )
85 + fi
86 +
87 + into "${destdir}"
88 + for solib in ${solibs_to_install[@]}; do
89 + dolib.so "opt/rocm/hsa/lib/${solib}.${soversion}"
90 + dosym "${EPREFIX}${destdir}/$(get_libdir)/${solib}.${soversion}" "${EPREFIX}usr/$(get_libdir)/${solib}.${soversion}"
91 + dosym "${solib}.${soversion}" "${EPREFIX}usr/$(get_libdir)/${solib}.${somajor}"
92 + done
93 +}
94
95 diff --git a/dev-libs/hsa-ext-rocr/metadata.xml b/dev-libs/hsa-ext-rocr/metadata.xml
96 new file mode 100644
97 index 00000000000..d61b59ba30a
98 --- /dev/null
99 +++ b/dev-libs/hsa-ext-rocr/metadata.xml
100 @@ -0,0 +1,22 @@
101 +<?xml version="1.0" encoding="UTF-8"?>
102 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
103 +<pkgmetadata>
104 + <maintainer type="person">
105 + <email>marecki@g.o</email>
106 + <name>Marek Szuba</name>
107 + </maintainer>
108 + <maintainer type="person">
109 + <email>candrews@g.o</email>
110 + <name>Craig Andrews</name>
111 + </maintainer>
112 + <longdescription lang="en">
113 + For the time being the ROCm platform relies on a closed-source library
114 + to provide HSA image support. In the future it will either be deprecated
115 + or become open source.
116 + Furthermore, this package optionally provides the "tools"
117 + debug/trace/profiling library which has already been deprecated.
118 + </longdescription>
119 + <use>
120 + <flag name="deprecated">Install the deprecated debug/trace/profiling library</flag>
121 + </use>
122 +</pkgmetadata>