# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DOCS_BUILDER="doxygen" DOCS_DEPEND="media-gfx/graphviz" ROCM_SKIP_GLOBALS=1 inherit cmake docs flag-o-matic llvm rocm LLVM_MAX_SLOT=17 TEST_PV=5.7.0 # No hip-test-5.7.1 release DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability" HOMEPAGE="https://github.com/ROCm/hipamd" SRC_URI="https://github.com/ROCm/clr/archive/refs/tags/rocm-${PV}.tar.gz -> rocm-clr-${PV}.tar.gz https://github.com/ROCm/HIP/archive/refs/tags/rocm-${PV}.tar.gz -> hip-${PV}.tar.gz test? ( https://github.com/ROCm/hip-tests/archive/refs/tags/rocm-${TEST_PV}.tar.gz )" KEYWORDS="~amd64" LICENSE="MIT" SLOT="0/$(ver_cut 1-2)" RESTRICT="!test? ( test )" IUSE="debug test" DEPEND=" =dev-util/rocminfo-5* llvm-core/clang:${LLVM_MAX_SLOT} dev-libs/rocm-comgr:${SLOT} >=dev-libs/rocr-runtime-5.6 "${ED}"/usr/include/rocm-core/rocm_version.h || die #pragma once #define ROCM_VERSION_MAJOR $(ver_cut 1) #define ROCM_VERSION_MINOR $(ver_cut 2) #define ROCM_VERSION_PATCH $(ver_cut 3) #define ROCM_BUILD_INFO "$(ver_cut 1-3).0-9999-unknown" EOF dosym -r /usr/include/rocm-core/rocm_version.h /usr/include/rocm_version.h rm "${ED}/usr/include/hip/hcc_detail" || die # files already installed by hipcc, which is a runtime dep rm "${ED}/usr/bin/hipconfig.pl" || die rm "${ED}/usr/bin/hipcc.pl" || die rm "${ED}/usr/bin/hipcc" || die rm "${ED}/usr/bin/hipconfig" || die rm "${ED}/usr/bin/hipvars.pm" || die }