commit:     d5835abbe66be09b9851fcc79a158d1a083ad8fc
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Sun Jun 12 11:55:29 2022 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 12:00:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5835abb

dev-util/hip-5.0.2: fix HIP_PATH in hipvars.pm

Reference: https://github.com/gentoo/gentoo/pull/25536#issuecomment-1153136503
Reference: https://github.com/justxi/rocm/issues/8#issuecomment-1152988796
Closes: https://github.com/gentoo/gentoo/pull/25861
Suggested-by: Paul Preney <paul <AT> preney.ca>
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 dev-util/hip/files/hipvars-5.0.2.pm                  | 20 ++++++++++++++++++++
 .../hip/{hip-5.0.2.ebuild => hip-5.0.2-r1.ebuild}    |  2 +-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/dev-util/hip/files/hipvars-5.0.2.pm 
b/dev-util/hip/files/hipvars-5.0.2.pm
new file mode 100644
index 000000000000..88d3c27bab99
--- /dev/null
+++ b/dev-util/hip/files/hipvars-5.0.2.pm
@@ -0,0 +1,20 @@
+#!/usr/bin/perl -w
+package hipvars;
+
+$HIP_BASE_VERSION_MAJOR = "@HIP_BASE_VERSION_MAJOR@";
+$HIP_BASE_VERSION_MINOR = "@HIP_BASE_VERSION_MINOR@";
+
+$isWindows = 0;
+$HIP_PATH='/usr';
+$ROCM_PATH='/usr';
+$CUDA_PATH='/opt/cuda';
+$HSA_PATH='/usr';
+$HIP_CLANG_PATH='/usr/lib/llvm/roc/bin';
+$HIP_ROCCLR_HOME=$HIP_PATH;
+$HIP_PLATFORM='amd';
+$HIP_COMPILER = "clang";
+$HIP_RUNTIME = "rocclr";
+$HIP_VERSION_MAJOR = $HIP_BASE_VERSION_MAJOR;
+$HIP_VERSION_MINOR = $HIP_BASE_VERSION_MINOR;
+$HIP_VERSION_PATCH = "@HIP_VERSION_PATCH@";
+$HIP_VERSION="$HIP_VERSION_MAJOR.$HIP_VERSION_MINOR.$HIP_VERSION_PATCH";

diff --git a/dev-util/hip/hip-5.0.2.ebuild b/dev-util/hip/hip-5.0.2-r1.ebuild
similarity index 97%
rename from dev-util/hip/hip-5.0.2.ebuild
rename to dev-util/hip/hip-5.0.2-r1.ebuild
index e3438bc87ea4..771cda985e88 100644
--- a/dev-util/hip/hip-5.0.2.ebuild
+++ b/dev-util/hip/hip-5.0.2-r1.ebuild
@@ -79,7 +79,7 @@ src_prepare() {
        hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}")
        hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${HIP_S}")
 
-       cp "$(prefixify_ro "${FILESDIR}"/hipvars.pm)" bin/ || die "failed to 
replace hipvars.pm"
+       cp "$(prefixify_ro "${FILESDIR}"/hipvars-5.0.2.pm)" bin/hipvars.pm || 
die "failed to replace hipvars.pm"
        sed -e "s,@HIP_BASE_VERSION_MAJOR@,$(ver_cut 1)," -e 
"s,@HIP_BASE_VERSION_MINOR@,$(ver_cut 2)," \
                -e "s,@HIP_VERSION_PATCH@,$(ver_cut 3)," -i bin/hipvars.pm || 
die
 }

Reply via email to