commit:     d7bd5c1f06f791d5d354ca75100ed64204eea8bd
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 20 18:24:55 2019 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Tue Aug 20 18:24:55 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7bd5c1f

dev-libs/rocr-runtime: Add nonfree flag for optional HSA image support

Package-Manager: Portage-2.3.72, Repoman-2.3.17
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 dev-libs/rocr-runtime/metadata.xml              | 3 +++
 dev-libs/rocr-runtime/rocr-runtime-2.7.0.ebuild | 7 +++++--
 dev-libs/rocr-runtime/rocr-runtime-9999.ebuild  | 9 ++++++---
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/dev-libs/rocr-runtime/metadata.xml 
b/dev-libs/rocr-runtime/metadata.xml
index d53b83185ad..53844ebc13e 100644
--- a/dev-libs/rocr-runtime/metadata.xml
+++ b/dev-libs/rocr-runtime/metadata.xml
@@ -15,4 +15,7 @@
     <longdescription lang="en">
         Radeon Open Compute Platform Runtime
     </longdescription>
+    <use>
+      <flag name="nonfree">Enables HSA image support using 
<pkg>dev-libs/hsa-ext-rocr</pkg></flag>
+    </use>
 </pkgmetadata>

diff --git a/dev-libs/rocr-runtime/rocr-runtime-2.7.0.ebuild 
b/dev-libs/rocr-runtime/rocr-runtime-2.7.0.ebuild
index b2fdce8bee3..507d471dc10 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-2.7.0.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-2.7.0.ebuild
@@ -23,9 +23,12 @@ PATCHES=(
 
 LICENSE="MIT"
 SLOT="0/$(ver_cut 1-2)"
+IUSE="nonfree"
 
-RDEPEND="sys-process/numactl"
-DEPEND="${RDEPEND}
+COMMON_DEPEND="sys-process/numactl"
+RDEPEND="${COMMON_DEPEND}
+       nonfree? ( dev-libs/hsa-ext-rocr )"
+DEPEND="${COMMON_DEPEND}
        >=dev-libs/roct-thunk-interface-${PV}"
 
 src_prepare() {

diff --git a/dev-libs/rocr-runtime/rocr-runtime-9999.ebuild 
b/dev-libs/rocr-runtime/rocr-runtime-9999.ebuild
index a31193337a6..6a89ca2901e 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-9999.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-9999.ebuild
@@ -20,10 +20,13 @@ HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime";
 
 LICENSE="MIT"
 SLOT="0/$(ver_cut 1-2)"
+IUSE="nonfree"
 
-RDEPEND="sys-process/numactl"
-DEPEND="${RDEPEND}
-       dev-libs/roct-thunk-interface"
+COMMON_DEPEND="sys-process/numactl"
+RDEPEND="${COMMON_DEPEND}
+       nonfree? ( dev-libs/hsa-ext-rocr )"
+DEPEND="${COMMON_DEPEND}
+       >=dev-libs/roct-thunk-interface-${PV}"
 
 src_prepare() {
        sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i 
CMakeLists.txt || die

Reply via email to