diff options
Diffstat (limited to 'dev-libs/rocm-opencl-runtime')
4 files changed, 148 insertions, 0 deletions
diff --git a/dev-libs/rocm-opencl-runtime/Manifest b/dev-libs/rocm-opencl-runtime/Manifest new file mode 100644 index 0000000..af5f84d --- /dev/null +++ b/dev-libs/rocm-opencl-runtime/Manifest @@ -0,0 +1,4 @@ +DIST rocm-opencl-runtime-4.5.0.tar.gz 998505 BLAKE2B 71388be89cbe644b3cea04561d2583a8f2485a15ad5a9fb377af50be97b0a347f93b89c73f4f85e62002c1ec58841bbc7d8c2cc7573fea2fa940b3833a408170 SHA512 43a16551cae67b547beda7c9bab3f4154bc2b7e6328532d12e97de04c916c7328ca9222d9c516b7e78a0898134d9ae7d18bd0ae5aa7f0991b7ac2ea23dc71bbe +EBUILD rocm-opencl-runtime-4.5.0.ebuild 1798 BLAKE2B 802bb5631eda7435107ae31767da6099e60fc4cfc5e2cfce47cade80b615229acd80ad42484ac5138769d631ea34d53ff7e3a48acb17131f978059bc4db59040 SHA512 b00903a3178cadd3949582819135d7ed23ccf2973d0cb4b1d17974cc164b7d2408ee09aff941b195fb48a4d323ae5ff4635e18fee780b242e73ce18ff890312e +EBUILD rocm-opencl-runtime-9999.ebuild 1798 BLAKE2B 802bb5631eda7435107ae31767da6099e60fc4cfc5e2cfce47cade80b615229acd80ad42484ac5138769d631ea34d53ff7e3a48acb17131f978059bc4db59040 SHA512 b00903a3178cadd3949582819135d7ed23ccf2973d0cb4b1d17974cc164b7d2408ee09aff941b195fb48a4d323ae5ff4635e18fee780b242e73ce18ff890312e +MISC metadata.xml 241 BLAKE2B 6dac420f48c539432671f9251c134a254e92cd56082e2551d3f9153c4319f11d06ee167a7ea10b4d16764fc2325db5057662ac61812c1ead8e7256915d9f494b SHA512 da3a07ed2a719b870f4a8f2fb10a54f6248184f553d6b8b55c7faa6b7d90aaf1d2a77ac40e08c1b6eb33f6a6da5f1db4d5eaf6c6332ffbd232fddc4ac3a1086a diff --git a/dev-libs/rocm-opencl-runtime/metadata.xml b/dev-libs/rocm-opencl-runtime/metadata.xml new file mode 100644 index 0000000..97ba7c2 --- /dev/null +++ b/dev-libs/rocm-opencl-runtime/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>julien@jroy.ca</email> + <name>Julien Roy</name> + </maintainer> +</pkgmetadata> diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-4.5.0.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-4.5.0.ebuild new file mode 100644 index 0000000..8c50be8 --- /dev/null +++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-4.5.0.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake flag-o-matic prefix + +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/refs/tags/rocm-${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-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" + "${FILESDIR}/${PN}-4.2.0-opencl3-header.patch" +) + +src_prepare() { + # Remove "clinfo" - use "dev-util/clinfo" instead + [ -d tools/clinfo ] && rm -rf tools/clinfo || die + + cmake_src_prepare + + hprefixify amdocl/CMakeLists.txt +} + +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 +} diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-9999.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-9999.ebuild new file mode 100644 index 0000000..8c50be8 --- /dev/null +++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-9999.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake flag-o-matic prefix + +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/refs/tags/rocm-${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-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" + "${FILESDIR}/${PN}-4.2.0-opencl3-header.patch" +) + +src_prepare() { + # Remove "clinfo" - use "dev-util/clinfo" instead + [ -d tools/clinfo ] && rm -rf tools/clinfo || die + + cmake_src_prepare + + hprefixify amdocl/CMakeLists.txt +} + +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 +} |