summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2023-10-19 10:09:46 +0000
committerPatrick Lauer <patrick@gentoo.org>2023-10-19 10:38:45 +0000
commit1518244d37f69f8d90434668ae53b4cc2b395617 (patch)
tree418034ecbb44797db525996185d0f691635faa47 /dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
parentdev-libs/rocm-device-libs: add 5.7.1, drop 5.7.0 (diff)
downloadgentoo-1518244d37f69f8d90434668ae53b4cc2b395617.tar.gz
gentoo-1518244d37f69f8d90434668ae53b4cc2b395617.tar.bz2
gentoo-1518244d37f69f8d90434668ae53b4cc2b395617.zip
dev-libs/rocm-comgr: add 5.7.1, drop 5.7.0
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
Diffstat (limited to 'dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild')
-rw-r--r--dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild61
1 files changed, 61 insertions, 0 deletions
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
new file mode 100644
index 000000000000..28f2b5385c71
--- /dev/null
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake llvm prefix
+
+LLVM_MAX_SLOT=17
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
+ inherit git-r3
+ S="${WORKDIR}/${P}/lib/comgr"
+else
+ SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/ROCm-CompilerSupport-rocm-${PV}/lib/comgr"
+ KEYWORDS="~amd64"
+fi
+
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
+ "${FILESDIR}/0001-Specify-clang-exe-path-in-Driver-Creation.patch"
+ "${FILESDIR}/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch"
+ "${FILESDIR}/${PN}-5.7.0-optional.patch"
+ "${FILESDIR}/${PN}-5.7.0-lld.patch"
+ "${FILESDIR}/${PN}-5.7.0-disassembly.patch"
+ "${FILESDIR}/${PN}-5.7.0-metadata.patch"
+ "${FILESDIR}/${PN}-5.7.0-symbolizer.patch"
+)
+
+DESCRIPTION="Radeon Open Compute Code Object Manager"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+RDEPEND=">=dev-libs/rocm-device-libs-${PV}
+ sys-devel/clang:${LLVM_MAX_SLOT}=
+ sys-devel/clang-runtime:=
+ sys-devel/lld:${LLVM_MAX_SLOT}="
+DEPEND="${RDEPEND}"
+
+CMAKE_BUILD_TYPE=Release
+
+src_prepare() {
+ sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
+ sed "/return LLVMPath;/s,LLVMPath,llvm::SmallString<128>(\"$(get_llvm_prefix ${LLVM_MAX_SLOT})\")," -i src/comgr-env.cpp || die
+ eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.0-rocm_path.patch)
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLLVM_DIR="$(get_llvm_prefix ${LLVM_MAX_SLOT})"
+ -DCMAKE_STRIP="" # disable stripping defined at lib/comgr/CMakeLists.txt:58
+ -DBUILD_TESTING=$(usex test ON OFF)
+ )
+ cmake_src_configure
+}