commit:     54180b5c38969ceaf2baa76c4bf0a03feb5791d4
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Sun Jun 15 18:04:11 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 15 20:59:51 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54180b5c

dev-util/rocm-smi: use optfeature instead of elog

Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42610
Closes: https://github.com/gentoo/gentoo/pull/42610
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/rocm-smi/rocm-smi-6.3.3-r1.ebuild | 7 ++-----
 dev-util/rocm-smi/rocm-smi-6.4.1.ebuild    | 7 ++-----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/dev-util/rocm-smi/rocm-smi-6.3.3-r1.ebuild 
b/dev-util/rocm-smi/rocm-smi-6.3.3-r1.ebuild
index fe3131058822..58841363f055 100644
--- a/dev-util/rocm-smi/rocm-smi-6.3.3-r1.ebuild
+++ b/dev-util/rocm-smi/rocm-smi-6.3.3-r1.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{10..13} python3_13t )
 
-inherit cmake linux-info python-r1
+inherit cmake linux-info optfeature python-r1
 
 DESCRIPTION="ROCm System Management Interface Library"
 HOMEPAGE="https://github.com/ROCm/rocm_smi_lib";
@@ -63,8 +63,5 @@ src_install() {
 }
 
 pkg_postinst() {
-       if ! has_version sys-apps/hwdata; then
-               elog "Install sys-apps/hwdata to see vendor and device names"
-               elog "instead of hex device IDs in rocm-smi output"
-       fi
+       optfeature "vendor and device names instead of hex device IDs" 
sys-apps/hwdata
 }

diff --git a/dev-util/rocm-smi/rocm-smi-6.4.1.ebuild 
b/dev-util/rocm-smi/rocm-smi-6.4.1.ebuild
index c295e3f11933..a0c81ed871af 100644
--- a/dev-util/rocm-smi/rocm-smi-6.4.1.ebuild
+++ b/dev-util/rocm-smi/rocm-smi-6.4.1.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{11..14} python3_13t )
 
-inherit cmake linux-info python-r1
+inherit cmake linux-info optfeature python-r1
 
 DESCRIPTION="ROCm System Management Interface Library"
 HOMEPAGE="https://github.com/ROCm/rocm_smi_lib";
@@ -63,8 +63,5 @@ src_install() {
 }
 
 pkg_postinst() {
-       if ! has_version sys-apps/hwdata; then
-               elog "Install sys-apps/hwdata to see vendor and device names"
-               elog "instead of hex device IDs in rocm-smi output"
-       fi
+       optfeature "vendor and device names instead of hex device IDs" 
sys-apps/hwdata
 }

Reply via email to