summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2019-07-25 18:02:35 -0400
committerCraig Andrews <candrews@gentoo.org>2019-08-07 13:38:45 -0400
commit95977d266eb00c29804dc6543a805a7575b2c04a (patch)
tree5c43af12e069a4754c8fd668678fa9c81273af81 /dev-util/rocminfo
parentdev-util/rocm-cmake: Radeon Open Compute CMake Modules (diff)
downloadgentoo-95977d266eb00c29804dc6543a805a7575b2c04a.tar.gz
gentoo-95977d266eb00c29804dc6543a805a7575b2c04a.tar.bz2
gentoo-95977d266eb00c29804dc6543a805a7575b2c04a.zip
dev-util/rocminfo: ROCm Application for Reporting System Info
Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'dev-util/rocminfo')
-rw-r--r--dev-util/rocminfo/Manifest1
-rw-r--r--dev-util/rocminfo/files/rocminfo-2.6.0-cmake-variables.patch31
-rw-r--r--dev-util/rocminfo/metadata.xml14
-rw-r--r--dev-util/rocminfo/rocminfo-2.6.0.ebuild36
4 files changed, 82 insertions, 0 deletions
diff --git a/dev-util/rocminfo/Manifest b/dev-util/rocminfo/Manifest
new file mode 100644
index 000000000000..28fcd10b1e6e
--- /dev/null
+++ b/dev-util/rocminfo/Manifest
@@ -0,0 +1 @@
+DIST rocminfo-2.6.0.tar.gz 12293 BLAKE2B b08725b45f48e78841da9d6e57bb19a441a423e20f853d16024c620914059abf3cb2e61c12ae6fdfdb85eb3e984d488ae9975ab3fd2fcc529ecb576c6816fc92 SHA512 e2dae7e2e02b674b3ad959a3dffdcd8f550842edfd0eac5866259a6a12de1a5f935afbdcb37845fa189d0937c41186f0eb8be08e7b346ddef959d5dd7b62dca7
diff --git a/dev-util/rocminfo/files/rocminfo-2.6.0-cmake-variables.patch b/dev-util/rocminfo/files/rocminfo-2.6.0-cmake-variables.patch
new file mode 100644
index 000000000000..1678f5043273
--- /dev/null
+++ b/dev-util/rocminfo/files/rocminfo-2.6.0-cmake-variables.patch
@@ -0,0 +1,31 @@
+https://github.com/RadeonOpenCompute/rocminfo/pull/17
+
+From c9bfc4b3db029b8502f900cd9bb545a675ca0898 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Thu, 25 Jul 2019 17:59:51 -0400
+Subject: [PATCH] Use CACHE variables, allow overriding
+ ROCR_LIB_DIR/ROCR_INC_DIR
+
+CACHE variables allow for variables to be documented, and ROCR_LIB_DIR/ROCR_INC_DIR should be overridable as they'll have different values on different Linux distributions.
+---
+ CMakeLists.txt | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b5fa9dd..f8f430f 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -43,9 +43,10 @@ endif()
+ #
+
+ # Required Defines first:
+-
+-set(ROCR_INC_DIR ${ROCM_DIR}/include)
+-set(ROCR_LIB_DIR ${ROCM_DIR}/lib)
++set(ROCRTST_BLD_BITS CACHE "64" STRING "Either 32 or 64")
++set(ROCM_DIR CACHE PATH "Root for RocM install")
++set(ROCR_INC_DIR ${ROCM_DIR}/include CACHE PATH "Path for RocM includes")
++set(ROCR_LIB_DIR ${ROCM_DIR}/lib CACHE PATH "Path for RocM libraries")
+ #
+ # Determine ROCR Header files are present
+ #
diff --git a/dev-util/rocminfo/metadata.xml b/dev-util/rocminfo/metadata.xml
new file mode 100644
index 000000000000..c7439799c48a
--- /dev/null
+++ b/dev-util/rocminfo/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">RadeonOpenCompute/rocminfo</remote-id>
+ </upstream>
+ <longdescription lang="en">
+ ROCm Application for Reporting System Info
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-util/rocminfo/rocminfo-2.6.0.ebuild b/dev-util/rocminfo/rocminfo-2.6.0.ebuild
new file mode 100644
index 000000000000..9d2f7d5e0eb0
--- /dev/null
+++ b/dev-util/rocminfo/rocminfo-2.6.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/roc-${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+ S="${WORKDIR}/rocminfo-roc-${PV}"
+fi
+
+DESCRIPTION="ROCm Application for Reporting System Info"
+HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+RDEPEND="dev-libs/rocr-runtime"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-cmake-variables.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DROCM_DIR="${ESYSROOT}/usr"
+ -DROCR_INC_DIR="${ESYSROOT}/usr/include"
+ -DROCR_LIB_DIR="${EPREFIX}/usr/$(get_libdir)/hsa"
+ )
+ cmake-utils_src_configure
+}