diff options
Diffstat (limited to 'dev-libs/rocm-opencl-runtime')
3 files changed, 84 insertions, 0 deletions
diff --git a/dev-libs/rocm-opencl-runtime/Manifest b/dev-libs/rocm-opencl-runtime/Manifest index 57cf975664ff..b86968121aec 100644 --- a/dev-libs/rocm-opencl-runtime/Manifest +++ b/dev-libs/rocm-opencl-runtime/Manifest @@ -1,10 +1,13 @@ +AUX rocm-opencl-runtime-3.10.0-add-rocclr-include-directories.patch 603 BLAKE2B 9295be2de67458b61de9e6d8fffd466c4edb67d0d5bdd457baa711df87a66fc54e2433348b3860ed52dfb484c33d43cdf7288519dae9a4f1428718fa4d995ce7 SHA512 ae7bfae7ddb73029f5a4703b47cd51b0976ba3763ca87d5f6f94b52af56cd7714ba6472d199c6c4b737928766b5f84f5c2ebff63a2fed2e1b02cf1bb3e6d28a9 AUX rocm-opencl-runtime-3.5.0-do-not-install-libopencl.patch 548 BLAKE2B ae4234422acdc1fdf0bd82a0469f63239e709c0626e3918d34e6a023b70452eed98aea1725a3638ee8f46d54d08ca885bf114ad3a7689baaa18794a6d5c983b9 SHA512 27682bb65e281744556c2a99c38ae7b3e22e3306ff10ceb98d8c3204950982b17521309dd11d36e1a07ca33b8448dae1270fa31004db9841025ff9a9e9af3d4c AUX rocm-opencl-runtime-3.7.0-add-rocclr-include-directories.patch 529 BLAKE2B c5902c6582d4ab23196829dd5953bd74469951d41ac393e92b9858d6a6336dd68c73cf57d917a13fb3869c84b1e6930e7a0de71936091011039bcd3bfc3b102e SHA512 2ac5248e05b479b9e84322cd9afb1bb783e03440648fe91e0f92e77bb2f673f9752412a2a689aba152663b5235df176a6ab54b5ecea3a20e720b831bdf6292f9 AUX rocm-opencl-runtime-3.7.0-amdocl64icd.patch 503 BLAKE2B 33154b45dd539c068cb86d29bfbfe07b189c1bd7ec36bb5ecba7e7b6a8de416c8c6794f9aed5f18f8aab33c50718f25882a46b86e4c0678440e24586eee9d967 SHA512 8f22ba90782290d0b89b3d48dbf24d5ff1418bf2d82effe5f362456ebbd65f4e3ffe044072d9023e585ec38eb3ac501ce598fef297099753818a93948bc06ccd AUX rocm-opencl-runtime-3.7.0-change-install-location.patch 2523 BLAKE2B f31cd13f8b50ea75c3ababe89905881ef92ec0319057a98978ff49514f213e5aad0f72d2eda75d300836ee4e90d1ac8b6b897442c968b30ad4c8af6c31f61fca SHA512 945d37ef36adec5ff6915bc4f3cc30801776370bce8097b53bc4e72568d4801fb7f092ebc0103ec0f625a0297d8ab5a43dcaa84d59f7145ea87610a7bc855f79 AUX rocm-opencl-runtime-3.9.0-add-rocclr-include-directories.patch 576 BLAKE2B adf9f72b83b57ca9a0205d520b8ffefd44b9b6ea13bae37ba3289ed39ad8bf7a93a1ca4c640c15dd79297fdaee34ca8b8c0f2f95c670d1a26873a73b7b2d02a7 SHA512 e3c673c649ed9a1e4c90c1d51e3f05431f61ea07287056f80879ae24b917474ebb9665ad83c361bbf2c3ca5a01b0ecc1d3d51b845a1c6e5c755fa40f7d92aaaf +DIST rocm-opencl-runtime-3.10.0.tar.gz 1004148 BLAKE2B 3d2539d24f8b3fd039424d606ebe36d7d8d1db2425f646d093a1a48d95c1c8b1c20821674fc628e622c2a5e7cbb30547805c3b84af16ad53f860f1064efa572b SHA512 121d0f310b4b235adf5f34dbf1989016b4c875bb47779b18d35fd9fab01c2118d1860e520cc6202a6fc3405b4c7897f491f611193c992cc25fe48e12bdd9f83f DIST rocm-opencl-runtime-3.8.0.tar.gz 1004339 BLAKE2B 966a5bd1d4d188004b15fe4263f2c18f6dad6a07f4bc264a5afa010f6035fbf73288966cd624e6e31e1ba584ba322d93343e3482177e6480c4a57a4150546f5a SHA512 bb4e3568e32bf6acc3c4812d7db169396a01bf90d079dc420ffb7df4bd4146d39938e76e9b386548fe64276bbf938a545c898de599113f20cc73ae98268c3d6a DIST rocm-opencl-runtime-3.9.0.tar.gz 1004372 BLAKE2B f5485dfbc615826214e1071485636e94bc83d12d4412da912455cb0ddd39ede3429a749a16428cb3c10775e652ffbe31a63ad00b3ea38a7fa43a120776a12bfe SHA512 e8149e99a7116a2c2af0d04dde55290c35dd5c6c26d95da8c8a04fcfccdb23f6617ab8348f9fc201b6d9fde7202de4ede480d7ac547ae2471c6ae10897e1795e +EBUILD rocm-opencl-runtime-3.10.0.ebuild 1991 BLAKE2B 02a1c528bf0e7f6af7859fa2d61c9902401ccc7f669fa2f1cf4fd0fc34c754dc75ae900ccb495f583f464030628617c14ee0c5179fefdbf77ce66a7544523de5 SHA512 bcf6e76c6fa5627d8f6db89221bf3cd6502207a85f742a0cdc0fd72564f8943c44c80debe7fdefb1587cf5ba18c824facddf4f01733fc3d515f06965be0e825a EBUILD rocm-opencl-runtime-3.8.0.ebuild 1990 BLAKE2B cc2505fab0d3b8c7f3cb811830adc6e5c29a6c936bd285fe4efdd2aa7ca23270835776e83fd779bbb38fdd12a58c325c6f77fa4da11bb1bdb658ff01c7d85421 SHA512 128038aae836ee3ac0835b479a1268d3a261f575a127e0c0f515d78c50c900856d37353f46e90e320202bbf5917c8380e1551b09cccb6259840eebbfc069d114 EBUILD rocm-opencl-runtime-3.9.0.ebuild 1990 BLAKE2B ae0db60899859a06173de28df69df907a874e26e83961fe35773b5fe09fa9edf55ccf079da04cb014d422622185fcd4c3dfb1d9f6a76219c69b9443c7ebb42bf SHA512 a269a7dd54e293f331a79866d2de78e0778ffb8ce58206d335fe275b4cb8af31b65d909363463b0927d3c2356b172bd8ee952af36baf704cb80d1aee71516072 MISC metadata.xml 380 BLAKE2B ead1a4d03ea8079057819764408b0d70da70bfa15b374f448f82ff90dc31067d9dfd2a7f888bdfc72a331e2c35b606dde55dde89215f7d52fef8e73740b3ca68 SHA512 1dda9d4be917efcf0b0d447b5f6a2a1ac5f6815699269e0ff6cc0763f286a32dc6180a7a844be0534847511f847afbf12ee5c249f4dd0976f773107ec46859f7 diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.10.0-add-rocclr-include-directories.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.10.0-add-rocclr-include-directories.patch new file mode 100644 index 000000000000..13fc581b4cd9 --- /dev/null +++ b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.10.0-add-rocclr-include-directories.patch @@ -0,0 +1,12 @@ +--- a/amdocl/CMakeLists.txt 2020-12-05 22:05:55.838529158 +0100 ++++ b/amdocl/CMakeLists.txt 2020-12-05 22:07:35.677524507 +0100 +@@ -23,6 +23,9 @@ + include_directories(${CMAKE_CURRENT_LIST_DIR}/../khronos) + include_directories(${CMAKE_CURRENT_LIST_DIR}/../khronos/headers) + include_directories(${CMAKE_CURRENT_LIST_DIR}/../khronos/headers/opencl2.2) ++include_directories(/usr/include/rocclr) ++include_directories(/usr/include/rocclr/compiler/lib/include/) ++include_directories(/usr/include/rocclr/elf/) + + if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR + (CMAKE_${COMPILER}_COMPILER_ID MATCHES "Clang")) diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.10.0.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.10.0.ebuild new file mode 100644 index 000000000000..125321094992 --- /dev/null +++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.10.0.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake flag-o-matic + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/" + inherit git-r3 +else + SRC_URI="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/roc-${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" + S="${WORKDIR}/ROCm-OpenCL-Runtime-rocm-${PV}" +fi + +DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime" +HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime" + +LICENSE="Apache-2.0 MIT" +SLOT="0/$(ver_cut 1-2)" + +RDEPEND=">=dev-libs/rocr-runtime-${PV} + >=dev-libs/rocclr-${PV} + >=dev-libs/rocm-comgr-${PV} + >=dev-libs/rocm-device-libs-${PV} + >=virtual/opencl-3 + media-libs/mesa" +DEPEND="${RDEPEND} + dev-lang/ocaml + dev-ml/findlib" +BDEPEND=">=dev-util/rocm-cmake-${PV}" + +PATCHES=( + "${FILESDIR}/${PN}-3.7.0-change-install-location.patch" + "${FILESDIR}/${PN}-3.5.0-do-not-install-libopencl.patch" + "${FILESDIR}/${PN}-3.10.0-add-rocclr-include-directories.patch" + "${FILESDIR}/${PN}-3.7.0-amdocl64icd.patch" +) + +src_prepare() { + # Remove "clinfo" - use "dev-util/clinfo" instead + [ -d tools/clinfo ] && rm -rf tools/clinfo || die + + # Wrong position of a '"' results in a list of strings instead of a single string and the build fails... + sed -e "s:set(CMAKE_SHARED_LINKER_FLAGS \${CMAKE_SHARED_LINKER_FLAGS} \":set(CMAKE_SHARED_LINKER_FLAGS \"\${CMAKE_SHARED_LINKER_FLAGS} :" -i "${S}/amdocl/CMakeLists.txt" + + cmake_src_prepare +} + +src_configure() { + # Reported upstream: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120 + append-cflags -fcommon + + local mycmakeargs=( + -DUSE_COMGR_LIBRARY=yes + -DROCclr_DIR="${EPREFIX}/usr/include/rocclr" + -DLIBROCclr_STATIC_DIR="${EPREFIX}/usr/lib/cmake/rocclr" + ) + cmake_src_configure +} + +src_install() { + cd "${BUILD_DIR}" || die + insinto /etc/OpenCL/vendors + doins amdocl64.icd + insinto /usr/lib64 + doins lib/libamdocl64.so +} |