commit:     bceba55c72407a9669165f0be9985e54d3a8f0a6
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 20 02:56:38 2023 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Thu Dec 14 15:01:59 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bceba55c

dev-util/hip: get rid of FindHIP and keep hip-config.

According to the cmake documentation, do not write find modules for
packages that themselves build with CMake. Instead provide a CMake
package configuration file with the package itself.

FindHIP is needed by HIP over CUDA, not what Gentoo is aiming for.

Reference: https://github.com/ROCmSoftwarePlatform/hipFFT/pull/66
Reference: https://cmake.org/cmake/help/latest/command/find_package.html
Bug: https://github.com/ROCm-Developer-Tools/hipamd/issues/39
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 dev-util/hip/hip-5.7.1-r1.ebuild | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dev-util/hip/hip-5.7.1-r1.ebuild b/dev-util/hip/hip-5.7.1-r1.ebuild
index 2bc703093df9..25601091075f 100644
--- a/dev-util/hip/hip-5.7.1-r1.ebuild
+++ b/dev-util/hip/hip-5.7.1-r1.ebuild
@@ -59,6 +59,10 @@ hip_test_wrapper() {
 }
 
 src_prepare() {
+       # hipamd is itself built by cmake, and should never provide a
+       # FindHIP.cmake module.
+       rm -r "${WORKDIR}"/HIP-rocm-${PV}/cmake/FindHIP* || die
+
        # 
https://github.com/ROCm-Developer-Tools/HIP/commit/405d029422ba8bb6be5a233d5eebedd2ad2e8bd3
        # 
https://github.com/ROCm-Developer-Tools/clr/commit/ab6d34ae773f4d151e04170c0f4e46c1135ddf3e
        # Migrated to hip-test, but somehow the change is not applied to the 
tarball.

Reply via email to