summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2023-11-19 06:26:36 +0000
committerPatrick Lauer <patrick@gentoo.org>2023-11-19 11:30:07 +0000
commitd555a7a2046ef59a01ae06c8047a113fff5de936 (patch)
tree0cce7824d5a6a02a864a9b74620c80e9f7f0f00c /dev-util/hipcc/hipcc-5.7.1-r3.ebuild
parentdev-util/hip: Force rebuild through revbump (diff)
downloadgentoo-d555a7a2046ef59a01ae06c8047a113fff5de936.tar.gz
gentoo-d555a7a2046ef59a01ae06c8047a113fff5de936.tar.bz2
gentoo-d555a7a2046ef59a01ae06c8047a113fff5de936.zip
dev-util/hipcc: Force rebuild with revbump
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
Diffstat (limited to 'dev-util/hipcc/hipcc-5.7.1-r3.ebuild')
-rw-r--r--dev-util/hipcc/hipcc-5.7.1-r3.ebuild46
1 files changed, 46 insertions, 0 deletions
diff --git a/dev-util/hipcc/hipcc-5.7.1-r3.ebuild b/dev-util/hipcc/hipcc-5.7.1-r3.ebuild
new file mode 100644
index 000000000000..180354c8673c
--- /dev/null
+++ b/dev-util/hipcc/hipcc-5.7.1-r3.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake llvm
+
+LLVM_MAX_SLOT=17
+
+DESCRIPTION="Radeon Open Compute hipcc"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/hipcc"
+
+KEYWORDS="~amd64"
+SRC_URI="https://github.com/ROCm-Developer-Tools/hipcc/archive/refs/tags/rocm-${PV}.tar.gz -> hipcc-${PV}.tar.gz"
+
+LICENSE="Apache-2.0 MIT"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
+
+S=${WORKDIR}/HIPCC-rocm-${PV}
+
+RDEPEND="!<dev-util/hip-5.7"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.7.1-fno-stack-protector.patch"
+ "${FILESDIR}/${PN}-5.7.1-hipcc-hip-version.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ sed -e "s:\$ROCM_PATH/llvm/bin:$(get_llvm_prefix ${LLVM_MAX_SLOT})/bin:" \
+ -i bin/hipvars.pm || die
+
+ sed -e "s:\$ENV{'DEVICE_LIB_PATH'}:'${EPREFIX}/usr/lib/amdgcn/bitcode':" \
+ -e "s:\$ENV{'HIP_LIB_PATH'}:'${EPREFIX}/usr/$(get_libdir)':" \
+ -e "/HIP.*FLAGS.*isystem.*HIP_INCLUDE_PATH/d" \
+ -i bin/hipcc.pl || die
+}
+
+src_install() {
+ cmake_src_install
+ # rm unwanted copy
+ rm -rf "${ED}/usr/hip" || die
+}