summaryrefslogtreecommitdiff
path: root/dev-util/hipify-clang
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-09 01:07:53 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-09 01:07:53 +0000
commit4464bf26d93bdcc80e0b1330fe9c9caef26b34fc (patch)
tree62f9e9438bf700cf277191db5d7c3a641bc972dc /dev-util/hipify-clang
parent8edd4a48a39640822abe6ddb7b2a1d5b2da4ea70 (diff)
gentoo auto-resync : 09:03:2024 - 01:07:53
Diffstat (limited to 'dev-util/hipify-clang')
-rw-r--r--dev-util/hipify-clang/Manifest4
-rw-r--r--dev-util/hipify-clang/files/hipify-clang-5.7.1-fix-clang-libs.patch47
-rw-r--r--dev-util/hipify-clang/hipify-clang-5.7.1.ebuild41
-rw-r--r--dev-util/hipify-clang/metadata.xml15
4 files changed, 107 insertions, 0 deletions
diff --git a/dev-util/hipify-clang/Manifest b/dev-util/hipify-clang/Manifest
new file mode 100644
index 000000000000..f9489960373f
--- /dev/null
+++ b/dev-util/hipify-clang/Manifest
@@ -0,0 +1,4 @@
+AUX hipify-clang-5.7.1-fix-clang-libs.patch 1298 BLAKE2B 3f6d24300e50d4144c60635045ae0d6c84a1e153607e6779180065c4158afe33a8e8df642eda9c84d1eb189b9ec00eba0614060fc7b3f9136b92b163b932bae5 SHA512 8af2408124e5caca08ea7f72a95dfed816bae4dd07effdc04562f24f209ba5ce57b5e5875f0e03a5560c09d6d3718921bfbb56dc2b55db926aa618486d00032c
+DIST HIPIFY-5.7.1.tar.gz 673452 BLAKE2B e0293c1b7f9ea028efc8d712ddedae4ec933c5bcfba524e13816bd999e67bcf06097f9fe0e4d1f4fa6a38df133be694e92adeefd92f77301d8537b6880b1a1fe SHA512 0cc75fdbcb6278d319cfe8ee3c8547dc75ea494a007d2159c64312c3411627905e0d6c7d7f0032cbc4c727a90723325aa2705db2fd473dbeb41e60f276d1c9a7
+EBUILD hipify-clang-5.7.1.ebuild 1037 BLAKE2B c13330ff2f0ce915b37841abde52c70cf8907a674969ba5ed929702dbe180e1166b7c62b7dc0bd6f8df2af6e4689337d22cf1e247f27f7d0c72d0cf5c59c23a4 SHA512 24caa7e7007d9ae952e976b5b5d86912cc7780dec7e04a001707d24840d98369799f6766ca85eb242ad04b8e5c8faf7a72fae1d315f42ce1608d81d896ca2fc1
+MISC metadata.xml 469 BLAKE2B b62d4ab1829968943d48809f2059527b44d464e8b0e089214ec3fb8fcde1d5f380045a68978be63e3e149243f5d57e1cd4958943d0cff97a882711d688870800 SHA512 c8a00d04d7f41f47b636c367f6d7c41d2bd750650af98182c250bcd9d687af64d408b9031bcd1df480746c04ffa9f0ff07bc02250cf98a6f33bf21d1b714ea2d
diff --git a/dev-util/hipify-clang/files/hipify-clang-5.7.1-fix-clang-libs.patch b/dev-util/hipify-clang/files/hipify-clang-5.7.1-fix-clang-libs.patch
new file mode 100644
index 000000000000..c2a50c929ecb
--- /dev/null
+++ b/dev-util/hipify-clang/files/hipify-clang-5.7.1-fix-clang-libs.patch
@@ -0,0 +1,47 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ce188b7..19bd013 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -68,41 +68,7 @@ if (NOT HIPIFY_CLANG_TESTS_ONLY)
+ endif()
+
+ # Link against LLVM and CLANG libraries.
+- target_link_libraries(hipify-clang PRIVATE
+- clangASTMatchers
+- clangFrontend
+- clangTooling
+- clangParse
+- clangSerialization
+- clangSema
+- clangEdit
+- clangFormat
+- clangLex
+- clangAnalysis
+- clangDriver
+- clangAST
+- clangToolingCore
+- clangRewrite
+- clangBasic
+- LLVMProfileData
+- LLVMSupport
+- LLVMMCParser
+- LLVMMC
+- LLVMBitReader
+- LLVMOption
+- LLVMCore)
+-
+- if(LLVM_PACKAGE_VERSION VERSION_GREATER "6.0.1")
+- target_link_libraries(hipify-clang PRIVATE clangToolingInclusions)
+- endif()
+-
+- if(LLVM_PACKAGE_VERSION VERSION_GREATER "9.0.1")
+- target_link_libraries(hipify-clang PRIVATE LLVMFrontendOpenMP)
+- endif()
+-
+- if(LLVM_PACKAGE_VERSION VERSION_EQUAL "15.0.0" OR LLVM_PACKAGE_VERSION VERSION_GREATER "15.0.0")
+- target_link_libraries(hipify-clang PRIVATE LLVMWindowsDriver clangSupport)
+- endif()
++ target_link_libraries(hipify-clang PRIVATE clang clang-cpp)
+
+ if(LLVM_PACKAGE_VERSION VERSION_EQUAL "16.0.0" OR LLVM_PACKAGE_VERSION VERSION_GREATER "16.0.0")
+ if(MSVC)
diff --git a/dev-util/hipify-clang/hipify-clang-5.7.1.ebuild b/dev-util/hipify-clang/hipify-clang-5.7.1.ebuild
new file mode 100644
index 000000000000..24ffc5c8829d
--- /dev/null
+++ b/dev-util/hipify-clang/hipify-clang-5.7.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="A set of tools to translate CUDA source code into portable HIP C++"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/HIPIFY"
+SRC_URI="https://github.com/ROCm-Developer-Tools/HIPIFY/archive/rocm-${PV}.tar.gz -> HIPIFY-${PV}.tar.gz"
+
+LICENSE="MIT"
+KEYWORDS="~amd64"
+SLOT="0/$(ver_cut 1-2)"
+
+BDEPEND=">=dev-build/cmake-3.22"
+DEPEND="
+ sys-devel/clang:17
+ sys-devel/llvm:17"
+
+S="${WORKDIR}/HIPIFY-rocm-${PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.7.1-fix-clang-libs.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+ sed -i 's:/../libexec/hipify::' \
+ bin/hipconvertinplace.sh bin/hipconvertinplace-perl.sh \
+ bin/hipexamine-perl.sh bin/hipexamine.sh || die
+ # Workaround for bug https://github.com/ROCm/HIPIFY/issues/1396
+ sed -i 's/find_package(LLVM REQUIRED/find_package(LLVM 17 REQUIRED/' CMakeLists.txt || die
+}
+
+src_install() {
+ cmake_src_install
+
+ # rm unwanted copy
+ rm -rf "${ED}/usr/hip" || die
+}
diff --git a/dev-util/hipify-clang/metadata.xml b/dev-util/hipify-clang/metadata.xml
new file mode 100644
index 000000000000..82e35f93e198
--- /dev/null
+++ b/dev-util/hipify-clang/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>lockalsash@gmail.com</email>
+ <name>Sv. Lockal</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ROCm-Developer-Tools/HIPIFY</remote-id>
+ </upstream>
+</pkgmetadata>