1 |
commit: b8ca3b0862eb435d6259550372bb655908123d07 |
2 |
Author: Craig Andrews <candrews <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 31 15:22:09 2019 +0000 |
4 |
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 7 17:38:46 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8ca3b08 |
7 |
|
8 |
dev-libs/rocm-hostcall: Radeon Open Compute hostcall API |
9 |
|
10 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
11 |
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org> |
12 |
|
13 |
dev-libs/rocm-hostcall/Manifest | 1 + |
14 |
.../rocm-hostcall-2.7.0-install-correctly.patch | 39 ++++++++++++++++++++++ |
15 |
dev-libs/rocm-hostcall/metadata.xml | 14 ++++++++ |
16 |
dev-libs/rocm-hostcall/rocm-hostcall-2.7.0.ebuild | 34 +++++++++++++++++++ |
17 |
4 files changed, 88 insertions(+) |
18 |
|
19 |
diff --git a/dev-libs/rocm-hostcall/Manifest b/dev-libs/rocm-hostcall/Manifest |
20 |
new file mode 100644 |
21 |
index 00000000000..ca774830c73 |
22 |
--- /dev/null |
23 |
+++ b/dev-libs/rocm-hostcall/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST rocm-hostcall-2.7.0.tar.gz 1500771 BLAKE2B 275ad4cab34d554f8a131101eda474926f7270a44a0af9941d8f1233c29b44b3efb3ba83c6b541d501a3e2fc751c591c0f6a993563bbacf539b5bcd04b23963b SHA512 afb4a7318c2e137db6ac0502041ed53e63783ec1ab458962b1b16f0f2f28e09ce2ae70d048b858740eca8bf06328858400a68bed4e91d7cfc4b7714a66d85bc9 |
26 |
|
27 |
diff --git a/dev-libs/rocm-hostcall/files/rocm-hostcall-2.7.0-install-correctly.patch b/dev-libs/rocm-hostcall/files/rocm-hostcall-2.7.0-install-correctly.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..f419674886a |
30 |
--- /dev/null |
31 |
+++ b/dev-libs/rocm-hostcall/files/rocm-hostcall-2.7.0-install-correctly.patch |
32 |
@@ -0,0 +1,39 @@ |
33 |
+https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/18 |
34 |
+ |
35 |
+From 345025de5c6c470e36505ff70978b168c05a1a71 Mon Sep 17 00:00:00 2001 |
36 |
+From: Craig Andrews <candrews@××××××××××××.com> |
37 |
+Date: Wed, 31 Jul 2019 11:18:56 -0400 |
38 |
+Subject: [PATCH] Install to standard locations using GNUInstallDirs |
39 |
+ |
40 |
+Some distributions require 64 bit libraries to be installed to lib64, for example. |
41 |
+Using GNUInstallDirs ensures that files are installed to the expected locations. |
42 |
+--- |
43 |
+ CMakeLists.txt | 8 +++++--- |
44 |
+ 1 file changed, 5 insertions(+), 3 deletions(-) |
45 |
+ |
46 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
47 |
+index 0f524e6..009bab7 100644 |
48 |
+--- a/CMakeLists.txt |
49 |
++++ b/CMakeLists.txt |
50 |
+@@ -5,6 +5,8 @@ if (NOT UNIX) |
51 |
+ message(FATAL_ERROR "No Windows support due to lack of signals") |
52 |
+ endif() |
53 |
+ |
54 |
++include(GNUInstallDirs) |
55 |
++ |
56 |
+ find_path(HSA_HEADER hsa/hsa.h PATHS /opt/rocm/include) |
57 |
+ if (NOT EXISTS ${HSA_HEADER}) |
58 |
+ message(FATAL_ERROR "Cannot find HSA headers. Please check the CMAKE_PREFIX_PATH") |
59 |
+@@ -34,9 +36,9 @@ target_compile_options(amd_hostcall |
60 |
+ target_compile_definitions(amd_hostcall |
61 |
+ PRIVATE "${AMD_HOSTCALL_PRIVATE_COMPILE_DEFINITIONS}") |
62 |
+ |
63 |
+-set(INCLUDE_INSTALL_DIR include) |
64 |
+-set(LIB_INSTALL_DIR lib) |
65 |
+-set(SHARE_INSTALL_DIR share) |
66 |
++set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}) |
67 |
++set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) |
68 |
++set(SHARE_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}) |
69 |
+ set(CONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/amd_hostcall) |
70 |
+ |
71 |
+ install(TARGETS amd_hostcall |
72 |
|
73 |
diff --git a/dev-libs/rocm-hostcall/metadata.xml b/dev-libs/rocm-hostcall/metadata.xml |
74 |
new file mode 100644 |
75 |
index 00000000000..6b2718fcba0 |
76 |
--- /dev/null |
77 |
+++ b/dev-libs/rocm-hostcall/metadata.xml |
78 |
@@ -0,0 +1,14 @@ |
79 |
+<?xml version="1.0" encoding="UTF-8"?> |
80 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
81 |
+<pkgmetadata> |
82 |
+ <maintainer type="person"> |
83 |
+ <email>candrews@g.o</email> |
84 |
+ <name>Craig Andrews</name> |
85 |
+ </maintainer> |
86 |
+ <upstream> |
87 |
+ <remote-id type="github">RadeonOpenCompute/ROCm-CompilerSupport</remote-id> |
88 |
+ </upstream> |
89 |
+ <longdescription lang="en"> |
90 |
+ Radeon Open Compute hostcall API |
91 |
+ </longdescription> |
92 |
+</pkgmetadata> |
93 |
|
94 |
diff --git a/dev-libs/rocm-hostcall/rocm-hostcall-2.7.0.ebuild b/dev-libs/rocm-hostcall/rocm-hostcall-2.7.0.ebuild |
95 |
new file mode 100644 |
96 |
index 00000000000..848a8f3a540 |
97 |
--- /dev/null |
98 |
+++ b/dev-libs/rocm-hostcall/rocm-hostcall-2.7.0.ebuild |
99 |
@@ -0,0 +1,34 @@ |
100 |
+# Copyright 1999-2019 Gentoo Authors |
101 |
+# Distributed under the terms of the GNU General Public License v2 |
102 |
+ |
103 |
+EAPI=7 |
104 |
+ |
105 |
+inherit cmake-utils |
106 |
+ |
107 |
+if [[ ${PV} == *9999 ]] ; then |
108 |
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/" |
109 |
+ inherit git-r3 |
110 |
+ S="${WORKDIR}/${P}/lib/hostcall" |
111 |
+else |
112 |
+ SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/roc-${PV}.tar.gz -> ${P}.tar.gz" |
113 |
+ S="${WORKDIR}/ROCm-CompilerSupport-roc-${PV}/lib/hostcall" |
114 |
+ KEYWORDS="~amd64" |
115 |
+fi |
116 |
+PATCHES=( |
117 |
+ "${FILESDIR}/${P}-install-correctly.patch" |
118 |
+) |
119 |
+ |
120 |
+DESCRIPTION="Radeon Open Compute hostcall API" |
121 |
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport" |
122 |
+LICENSE="MIT" |
123 |
+SLOT="0/$(ver_cut 1-2)" |
124 |
+ |
125 |
+RDEPEND="dev-libs/rocr-runtime" |
126 |
+DEPEND="${RDEPEND}" |
127 |
+ |
128 |
+src_configure() { |
129 |
+ local mycmakeargs=( |
130 |
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/" |
131 |
+ ) |
132 |
+ cmake-utils_src_configure |
133 |
+} |