summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilfried Holzke <gentoo@holzke.net>2020-11-14 21:54:32 +0100
committerCraig Andrews <candrews@gentoo.org>2020-11-14 16:02:38 -0500
commit56baaf39ac73c4dada3f1a0e394d0b26f2d6cd2c (patch)
tree7a135cec248a1c519f1d1d5b41f0655025385444 /dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.9.0.ebuild
parentdev-python/cfn-python-lint: Add missing mock dep (diff)
downloadgentoo-56baaf39ac73c4dada3f1a0e394d0b26f2d6cd2c.tar.gz
gentoo-56baaf39ac73c4dada3f1a0e394d0b26f2d6cd2c.tar.bz2
gentoo-56baaf39ac73c4dada3f1a0e394d0b26f2d6cd2c.zip
dev-libs/rocm-opencl-runtime: Version bump to 3.9.0
Signed-off-by: Wilfried Holzke <gentoo@holzke.net> Package-Manager: Portage-3.0.8, Repoman-3.0.2 Closes: https://github.com/gentoo/gentoo/pull/18261 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.9.0.ebuild')
-rw-r--r--dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.9.0.ebuild69
1 files changed, 69 insertions, 0 deletions
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.9.0.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.9.0.ebuild
new file mode 100644
index 000000000000..cd1f935e955a
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.9.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.9.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
+}