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/amdgpu-pro-opencl/
Date: Tue, 15 Jan 2019 09:52:15
Message-Id: 1547545921.bfe3cef0c493e9d6eec56affc118385201210923.marecki@gentoo
1 commit: bfe3cef0c493e9d6eec56affc118385201210923
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 15 09:47:52 2019 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 15 09:52:01 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfe3cef0
7
8 dev-libs/amdgpu-pro-opencl: bump to 18.20.684755, enable multilib
9
10 Multilib support kindly provided by Georgy Yakovlev
11 <gyakovlev <AT> gentoo.org>.
12
13 Closes: https://github.com/gentoo/gentoo/pull/9113
14 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
15 Package-Manager: Portage-2.3.51, Repoman-2.3.11
16
17 dev-libs/amdgpu-pro-opencl/Manifest | 1 +
18 .../amdgpu-pro-opencl-18.20.684755.ebuild | 79 ++++++++++++++++++++++
19 2 files changed, 80 insertions(+)
20
21 diff --git a/dev-libs/amdgpu-pro-opencl/Manifest b/dev-libs/amdgpu-pro-opencl/Manifest
22 index 05d329a3558..83337405581 100644
23 --- a/dev-libs/amdgpu-pro-opencl/Manifest
24 +++ b/dev-libs/amdgpu-pro-opencl/Manifest
25 @@ -1,2 +1,3 @@
26 DIST amdgpu-pro-17.50-552542.tar.xz 549501204 BLAKE2B 37dcda126a3bda4e87b64ce260c7e4b65a1b864363c51f06e3152f152b83a60074331e6a0bf7b831c059a50192dea8add9b38ed16971c87293ce0e56ddf26bb2 SHA512 060e96609cf1a013fddf10db9bba4b512750e5188671a669e2582c28a03213b40d073031e35a617b982374d9d1cd4078f43b27053ee34be7c83873c0814ed196
27 DIST amdgpu-pro-18.20-606296.tar.xz 230733856 BLAKE2B 21a498a894a9712d9f0277fae7f704413be0cd01cebbe427008fa3d181d03b58268e74bd3cdaf0dfb9aeca2871dad82b4aa640bbce690ca461e3f3e4acf01ffd SHA512 6575bf963e5714657914d9116de4d9b1835851fe0609b1f072b1fbdf73c068da77aba0eca1c9cce6e05e6cd8f2c1ed6b4bd6ab4ef334be5ff796ee6a3ad73831
28 +DIST amdgpu-pro-18.20-684755-ubuntu-16.04.tar.xz 229474380 BLAKE2B f589aad71f093b74e37de40ac7c45ebbbeff93609b2fff1baaba711347a4641ef17acdcbe69d371372510a48bd48262cf6269c1f4d05e264023d52a425a423f2 SHA512 240e701acfde4ebe665cf69c8bd3710d036f450822aeb7ee2a21caab289af44167afda1d3b8d0dbe2c46c4e63d9b6fb5e96778311f342c26f334dc7beb4a2d5b
29
30 diff --git a/dev-libs/amdgpu-pro-opencl/amdgpu-pro-opencl-18.20.684755.ebuild b/dev-libs/amdgpu-pro-opencl/amdgpu-pro-opencl-18.20.684755.ebuild
31 new file mode 100644
32 index 00000000000..739777fa05d
33 --- /dev/null
34 +++ b/dev-libs/amdgpu-pro-opencl/amdgpu-pro-opencl-18.20.684755.ebuild
35 @@ -0,0 +1,79 @@
36 +# Copyright 1999-2019 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=7
40 +
41 +MULTILIB_COMPAT=( abi_x86_{32,64} )
42 +
43 +inherit unpacker multilib-minimal
44 +
45 +SUPER_PN='amdgpu-pro'
46 +MY_PV=$(ver_rs 2 '-')
47 +
48 +DESCRIPTION="Proprietary OpenCL implementation for AMD GPUs"
49 +HOMEPAGE="https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-Release-Notes.aspx"
50 +SRC_URI="${SUPER_PN}-${MY_PV}-ubuntu-16.04.tar.xz"
51 +
52 +LICENSE="AMD-GPU-PRO-EULA"
53 +SLOT="0"
54 +KEYWORDS="~amd64 ~x86"
55 +
56 +RESTRICT="mirror fetch strip"
57 +
58 +COMMON="app-eselect/eselect-opencl
59 + dev-libs/ocl-icd"
60 +DEPEND="${COMMON}"
61 +RDEPEND="${COMMON}"
62 +
63 +QA_PREBUILT="/opt/amdgpu/lib*/*"
64 +
65 +S="${WORKDIR}/${SUPER_PN}-${MY_PV}-ubuntu-16.04"
66 +
67 +pkg_nofetch() {
68 + local pkgver=$(ver_cut 1-2)
69 + einfo "Please download the Radeon Software for Linux Driver ${pkgver} for Ubuntu 16 from"
70 + einfo " ${HOMEPAGE}"
71 + einfo "The archive should then be placed into your distfiles directory."
72 +}
73 +
74 +src_unpack() {
75 + default
76 + multilib_parallel_foreach_abi multilib_src_unpack
77 +}
78 +
79 +multilib_src_unpack() {
80 + local deb_abi
81 + [[ ${ABI} == x86 ]] && deb_abi=i386
82 + mkdir -p "${BUILD_DIR}" || die
83 + pushd "${BUILD_DIR}" >/dev/null || die
84 + unpack_deb "${S}/opencl-orca-amdgpu-pro-icd_${MY_PV}_${deb_abi:-${ABI}}.deb"
85 + popd >/dev/null || die
86 +}
87 +
88 +multilib_src_install() {
89 + local dir_abi short_abi
90 + [[ ${ABI} == x86 ]] && dir_abi=i386-linux-gnu && short_abi=32
91 + [[ ${ABI} == amd64 ]] && dir_abi=x86_64-linux-gnu && short_abi=64
92 +
93 + into "/opt/amdgpu"
94 + dolib.so "opt/${SUPER_PN}/lib/${dir_abi}"/*
95 +
96 + insinto /etc/OpenCL/vendors
97 + echo "/opt/amdgpu/$(get_libdir)/libamdocl-orca${short_abi}.so" \
98 + > "${T}/${SUPER_PN}-${ABI}.icd" || die "Failed to generate ICD file for ABI ${ABI}"
99 + doins "${T}/${SUPER_PN}-${ABI}.icd"
100 +}
101 +
102 +pkg_postinst() {
103 + if [[ -z "${REPLACING_VERSIONS}" ]]; then
104 + ewarn "Please note that using proprietary OpenCL libraries together with the"
105 + ewarn "Open Source amdgpu stack is not officially supported by AMD. Do not ask them"
106 + ewarn "for support in case of problems with this package."
107 + ewarn ""
108 + ewarn "Furthermore, if you have the whole AMDGPU-Pro stack installed this package"
109 + ewarn "will almost certainly conflict with it. This might change once AMDGPU-Pro"
110 + ewarn "has become officially supported by Gentoo."
111 + fi
112 +
113 + "${ROOT}"/usr/bin/eselect opencl set --use-old ocl-icd
114 +}