commit:     939576eeb4bf1b118b5ca5440ca09814047296e4
Author:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  9 12:25:42 2023 +0000
Commit:     罗百科 <patrick <AT> gentoo <DOT> org>
CommitDate: Mon Oct  9 12:33:39 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=939576ee

dev-libs/rocr-runtime: add 5.7.0

Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>

 dev-libs/rocr-runtime/Manifest                  |  1 +
 dev-libs/rocr-runtime/rocr-runtime-5.7.0.ebuild | 59 +++++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/dev-libs/rocr-runtime/Manifest b/dev-libs/rocr-runtime/Manifest
index 2f307591ecf5..5fbfc76ce327 100644
--- a/dev-libs/rocr-runtime/Manifest
+++ b/dev-libs/rocr-runtime/Manifest
@@ -2,3 +2,4 @@ DIST rocr-runtime-5.1.3.tar.gz 720567 BLAKE2B 
bdf2d258ec607ffc69264d48ce82c36787
 DIST rocr-runtime-5.3.3.tar.gz 809871 BLAKE2B 
1a44e88c34fcebcea3351de812f2ac64a7b151303c5bfc4066920755c185731388afff89c705afee6010d262f68358a20b1c0197e8f23c22ab24409eb55fde0a
 SHA512 
27efe57954575549703b31c4a632548bf3d82df0f01d5f15485d0bda7efa6ec2ad0a4a8710b8f240ff57296eb62d3796926e32d16dfe448b188d8264fde0ef8b
 DIST rocr-runtime-5.4.3.tar.gz 811062 BLAKE2B 
4ee8ef49cdac7f6918db3aa96089852847d093aacc11ed7e7157a6eb512cf36a3d37396670c14ea24b16b1127c4547977390694d05bc6006ac48b40e707d6dae
 SHA512 
29f13a1b16ef457071cc050227d57cda92992f416ebc074f8cd5a856d9bd76fd34ab2ccb53c21c3d798165282d44bba287ef44a9d1da327ee198e1facc77a4db
 DIST rocr-runtime-5.5.1.tar.gz 816175 BLAKE2B 
e588d98cbd0d9a753b950ba676d6cddeed8cd094f346b2f67a761ac2d760ba28e27d5baceecf13fff53c114bb8412c8a4d892886c304d36181d5b0b020b8088a
 SHA512 
1cae2ae4f30a248fa27622ed8b77ce112b80aed9bc1b8fc4372143d4ef241f47295a77f9e978be1332f48c06a7cbcdfd478dbc8464028cb761480049ab2413fb
+DIST rocr-runtime-5.7.0.tar.gz 832038 BLAKE2B 
754bc51f042e4ea71bef2224bc243b3a5b9f4d06a828bd798db543202bbc52972414021a4d466f2907fd6739112a96d8581401a5262e7dc0803e5746efe4b6b2
 SHA512 
a380621a7955032cabff369136769240eba04feb987a1b1cd767b6b3ed959daeeead774c73d02a7cde91abe7f077d2d35a1b26e4a4d8acd227e3c8d190184e28

diff --git a/dev-libs/rocr-runtime/rocr-runtime-5.7.0.ebuild 
b/dev-libs/rocr-runtime/rocr-runtime-5.7.0.ebuild
new file mode 100644
index 000000000000..be3b27b07b62
--- /dev/null
+++ b/dev-libs/rocr-runtime/rocr-runtime-5.7.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic llvm
+
+LLVM_MAX_SLOT=17
+
+if [[ ${PV} == *9999 ]] ; then
+       EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/";
+       inherit git-r3
+       S="${WORKDIR}/${P}/src"
+else
+       
SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-${PV}.tar.gz
 -> ${P}.tar.gz"
+       S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/src"
+       KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Radeon Open Compute Runtime"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime";
+PATCHES=(
+       "${FILESDIR}/${PN}-4.3.0_no-aqlprofiler.patch"
+)
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="debug"
+
+COMMON_DEPEND="dev-libs/elfutils"
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}
+       >=dev-libs/roct-thunk-interface-${PV}
+       >=dev-libs/rocm-device-libs-${PV}
+       sys-devel/clang
+       sys-devel/lld"
+BDEPEND="app-editors/vim-core"
+       # vim-core is needed for "xxd"
+
+src_prepare() {
+       # ... otherwise system llvm/clang is used ...
+       sed -e "s:find_package(Clang REQUIRED HINTS 
\${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm 
):find_package(Clang REQUIRED HINTS /usr/lib/llvm/roc ):" -i 
image/blit_src/CMakeLists.txt || die
+
+       # Gentoo installs "*.bc" to "/usr/lib" instead of a "[path]/bitcode" 
directory ...
+       sed -e "s:-O2:--rocm-path=${EPREFIX}/usr/lib/ -O2:" -i 
image/blit_src/CMakeLists.txt || die
+
+       # internal version depends on git being present and random weird magic, 
otherwise fallback to incoherent default value
+       # fix default value to be more better
+
+       sed -i -e "s:1.7.0:${PV}:" CMakeLists.txt || die
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       use debug || append-cxxflags "-DNDEBUG"
+       local mycmakeargs=( -DINCLUDE_PATH_COMPATIBILITY=OFF )
+       cmake_src_configure
+}

Reply via email to