summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiyang Wu <xgreenlandforwyy@gmail.com>2023-01-23 16:16:56 +0800
committerBenda Xu <heroxbd@gentoo.org>2023-01-31 21:24:54 +0800
commit6af722a55be4b47e0984d9e8b2a186eff645cb47 (patch)
treeb30d4b8ce06cf2aafc672569440fb2320e4bece5 /dev-util/hip
parentdev-python/pypy3-exe: Remove old (diff)
downloadgentoo-6af722a55be4b47e0984d9e8b2a186eff645cb47.tar.gz
gentoo-6af722a55be4b47e0984d9e8b2a186eff645cb47.tar.bz2
gentoo-6af722a55be4b47e0984d9e8b2a186eff645cb47.zip
dev-util/hip: Avoid double prefix problems
hprefixify on hip-config.cmake and hipcc.pl is not working well. Disable auto hprefixify and adjust manual modification instead. Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'dev-util/hip')
-rw-r--r--dev-util/hip/hip-5.1.3-r4.ebuild (renamed from dev-util/hip/hip-5.1.3-r3.ebuild)10
-rw-r--r--dev-util/hip/hip-5.3.3-r2.ebuild (renamed from dev-util/hip/hip-5.3.3-r1.ebuild)10
2 files changed, 10 insertions, 10 deletions
diff --git a/dev-util/hip/hip-5.1.3-r3.ebuild b/dev-util/hip/hip-5.1.3-r4.ebuild
index 56090c5077df..3ea312756ff5 100644
--- a/dev-util/hip/hip-5.1.3-r3.ebuild
+++ b/dev-util/hip/hip-5.1.3-r4.ebuild
@@ -105,19 +105,19 @@ src_prepare() {
# which makes "stdlib.h" not found when using "#include_next" in header files;
sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
-e "/HIP.*FLAGS.*isystem.*HIP_INCLUDE_PATH/d" \
- -e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
- -e "s:\$ENV{'HIP_LIB_PATH'}:'/usr/$(get_libdir)':" \
+ -e "s:\$ENV{'DEVICE_LIB_PATH'}:'${EPREFIX}/usr/lib/amdgcn/bitcode':" \
+ -e "s:\$ENV{'HIP_LIB_PATH'}:'${EPREFIX}/usr/$(get_libdir)':" \
-e "/rpath/s,--rpath=[^ ]*,," \
-e "s,\$HIP_CLANG_PATH/../lib/clang/\$HIP_CLANG_VERSION/,${CLANG_RESOURCE_DIR}/,g" \
-i bin/hipcc.pl || die
# change --hip-device-lib-path to "/usr/lib/amdgcn/bitcode", must align with "dev-libs/rocm-device-libs"
- sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:/usr/lib/amdgcn/bitcode:" \
+ sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:${EPREFIX}/usr/lib/amdgcn/bitcode:" \
-i "${S}/hip-config.cmake.in" || die
einfo "prefixing hipcc and its utils..."
- hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}")
- hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${HIP_S}")
+ hprefixify $(grep -rl --exclude-dir=build/ --exclude="hip-config.cmake.in" "/usr" "${S}")
+ hprefixify $(grep -rl --exclude-dir=build/ --exclude="hipcc.pl" "/usr" "${HIP_S}")
cp "$(prefixify_ro "${FILESDIR}"/hipvars-5.1.3.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)," \
diff --git a/dev-util/hip/hip-5.3.3-r1.ebuild b/dev-util/hip/hip-5.3.3-r2.ebuild
index 07b7709afbc2..bf43460c20d0 100644
--- a/dev-util/hip/hip-5.3.3-r1.ebuild
+++ b/dev-util/hip/hip-5.3.3-r2.ebuild
@@ -97,19 +97,19 @@ src_prepare() {
# which makes "stdlib.h" not found when using "#include_next" in header files;
sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
-e "/HIP.*FLAGS.*isystem.*HIP_INCLUDE_PATH/d" \
- -e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
- -e "s:\$ENV{'HIP_LIB_PATH'}:'/usr/$(get_libdir)':" \
+ -e "s:\$ENV{'DEVICE_LIB_PATH'}:'${EPREFIX}/usr/lib/amdgcn/bitcode':" \
+ -e "s:\$ENV{'HIP_LIB_PATH'}:'${EPREFIX}/usr/$(get_libdir)':" \
-e "/rpath/s,--rpath=[^ ]*,," \
-e "s,\$HIP_CLANG_PATH/../lib/clang/\$HIP_CLANG_VERSION/,${CLANG_RESOURCE_DIR}/,g" \
-i bin/hipcc.pl || die
# change --hip-device-lib-path to "/usr/lib/amdgcn/bitcode", must align with "dev-libs/rocm-device-libs"
- sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:/usr/lib/amdgcn/bitcode:" \
+ sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:${EPREFIX}/usr/lib/amdgcn/bitcode:" \
-i "${S}/hip-config.cmake.in" || die
einfo "prefixing hipcc and its utils..."
- hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}")
- hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${HIP_S}")
+ hprefixify $(grep -rl --exclude-dir=build/ --exclude="hip-config.cmake.in" "/usr" "${S}")
+ hprefixify $(grep -rl --exclude-dir=build/ --exclude="hipcc.pl" "/usr" "${HIP_S}")
cp "$(prefixify_ro "${FILESDIR}"/hipvars-5.1.3.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)," \