dev-util/rocm-clang-ocl: OpenCL compilation with clang compiler.

This small package migrated from science overlay is the dependency
of sci-libs/MIOpen (currently in ::science; prepared for ::gentoo)

Closes: https://github.com/gentoo/gentoo/pull/22824
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
This commit is contained in:
YiyangWu
2021-08-26 15:50:33 +08:00
committed by Benda Xu
parent 5481118b47
commit 44b9b2de4f
3 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST rocm-clang-ocl-4.3.0.tar.gz 3241 BLAKE2B 1a646d64e42a8884a7714b4ca25d888aa1e84d68be3f6ceacefcf7836340133740c8df85f152fadb40d463af76eb659f0fd11ebd2b0a6a3c0da3b7ac64bf541c SHA512 059d0d118205d6f4c2a61222fc74709a86bbe71687615debcc1698f73c28a769379b909cd18742b4d3340ba30a65b02da9224fbe5fe0e2fb005d9a45f22dfe9c

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
<pkgmetadata>
<maintainer type="project">
<email>sci@gentoo.org</email>
</maintainer>
<maintainer type="person">
<email>gentoo@holzke.net</email>
<name>Wilfried Holzke</name>
</maintainer>
<maintainer type="person">
<email>xgreenlandforwyy@gmail.com</email>
<name>Yiyang Wu</name>
</maintainer>
</pkgmetadata>

View File

@@ -0,0 +1,31 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake
DESCRIPTION="OpenCL compilation with clang compiler"
HOMEPAGE="https://github.com/RadeonOpenCompute/clang-ocl.git"
SRC_URI="https://github.com/RadeonOpenCompute/clang-ocl/archive/rocm-${PV}.tar.gz -> rocm-clang-ocl-${PV}.tar.gz"
LICENSE="MIT"
SLOT="0/$(ver_cut 1-2)"
KEYWORDS="~amd64"
RDEPEND="dev-libs/rocm-opencl-runtime:${SLOT}"
DEPEND="
dev-util/rocm-cmake:${SLOT}
${RDEPEND}"
S="${WORKDIR}/clang-ocl-rocm-${PV}"
src_prepare() {
sed -e "s:HINTS \${CXX_COMPILER_PATH}/bin:NO_DEFAULT_PATH:" \
-e "s:/opt/rocm/llvm/bin:${EPREFIX}/usr/lib/llvm/roc/bin:" \
-e "/AMDDeviceLibs PATHS/s:/opt/rocm:${EPREFIX}/usr/lib/cmake/AMDDeviceLibs:" \
-e "s:\${AMD_DEVICE_LIBS_PREFIX}/amdgcn/bitcode:${EPREFIX}/usr/lib/amdgcn/bitcode:" \
-i CMakeLists.txt || die
cmake_src_prepare
}