summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilfried Holzke <gentoo@holzke.net>2020-08-23 17:34:36 +0200
committerCraig Andrews <candrews@gentoo.org>2020-08-23 11:30:53 -0400
commit7553658cd43dbd2dfd1eb13ed5be4ecd84d76d40 (patch)
tree7a9e0ca6e2dd433b91fd0a0d69fee3b44e5fe276 /dev-libs/rocm-opencl-runtime
parentdev-python/networkx: Bump to 2.5 (diff)
downloadgentoo-7553658cd43dbd2dfd1eb13ed5be4ecd84d76d40.tar.gz
gentoo-7553658cd43dbd2dfd1eb13ed5be4ecd84d76d40.tar.bz2
gentoo-7553658cd43dbd2dfd1eb13ed5be4ecd84d76d40.zip
dev-libs/rocm-opencl-runtime: Version bump to 3.7.0
Signed-off-by: Wilfried Holzke <gentoo@holzke.net> Package-Manager: Portage-2.3.103, Repoman-2.3.23 Closes: https://github.com/gentoo/gentoo/pull/17237 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'dev-libs/rocm-opencl-runtime')
-rw-r--r--dev-libs/rocm-opencl-runtime/Manifest1
-rw-r--r--dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-add-rocclr-include-directories.patch11
-rw-r--r--dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-amdocl64icd.patch10
-rw-r--r--dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-change-install-location.patch79
-rw-r--r--dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.7.0.ebuild69
5 files changed, 170 insertions, 0 deletions
diff --git a/dev-libs/rocm-opencl-runtime/Manifest b/dev-libs/rocm-opencl-runtime/Manifest
index 61c9de050a58..3f9bc8f9f6f7 100644
--- a/dev-libs/rocm-opencl-runtime/Manifest
+++ b/dev-libs/rocm-opencl-runtime/Manifest
@@ -3,3 +3,4 @@ DIST rocm-opencl-runtime-3.0.0.tar.gz 974702 BLAKE2B 2cc1eaf1aa8d8cc80de698b587b
DIST rocm-opencl-runtime-3.1.0.tar.gz 969782 BLAKE2B efe3cba6122273900fec80f577c45b5a93816cfd3cadbffaa36df258ea163ecc9d47530da0aa012fd7797c431506deb96fd3642c160470e2b78af75bc9fd56f6 SHA512 1665c30349547e6404563b1b1dd4258af5ab8106a66d65d6f94e7eb3ef51b2da9bc71878330c0c7ec21842e17a97e910a36be9b06fbdeab3de84bebe3a65c9db
DIST rocm-opencl-runtime-3.3.0.tar.gz 969871 BLAKE2B 5dae88abc5861752b45f2b7e72a4d774786d0363a6da633d2ca1386a002374243a0655e8c5bc4aaa7a7db528f3c9bd5e6e1298561d3b06ce935865b6f0106172 SHA512 10c892cebca3db031b69ef3e1521fa11e49f40b18b621983f4f0902c9f563ff178d543fd1a05f6217f817838499436adaac883f7b474b64a54ce9eeb482382e5
DIST rocm-opencl-runtime-3.5.0.tar.gz 734076 BLAKE2B cc6992999188968c628b378f637c8073c99381fab42e05d7d9d89d75fe9f2bd3d573f61f00a18c078542f7fc4a3a856385d0f34fa9bb599dd63de8be18594bdf SHA512 658649c3f13d32308f8f031f26b62c20bda4841059b5ea0db5c6a827af26b07aa0bdee07a461cc4b3c37108b3f25ae59b1658fab30125f84c0729fb57c2fa014
+DIST rocm-opencl-runtime-3.7.0.tar.gz 1004361 BLAKE2B 7fa9481c77884dda15a3b0335449b2879fbac000f644fc56bbd8d06c5fd77d8355f159b9b7e8920f06351e388d0df41379b7e1fcff51cf81714a28f902218e42 SHA512 6ea509dde0290f13e66497eaad587099ed6a98df967adce207afc857ecd961b65801332ca74e36173719488639480cfcffc625a007345d0e48c10c8a0efdfa3f
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-add-rocclr-include-directories.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-add-rocclr-include-directories.patch
new file mode 100644
index 000000000000..357b97c7f49e
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-add-rocclr-include-directories.patch
@@ -0,0 +1,11 @@
+--- a/amdocl/CMakeLists.txt 2020-08-23 10:11:28.227839351 +0200
++++ b/amdocl/CMakeLists.txt 2020-08-23 10:44:34.929831772 +0200
+@@ -23,6 +23,8 @@
+ include_directories(${CMAKE_SOURCE_DIR}/khronos)
+ include_directories(${CMAKE_SOURCE_DIR}/khronos/headers)
+ include_directories(${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2)
++include_directories(/usr/include/rocclr)
++include_directories(/usr/include/rocclr/compiler/lib/include/)
+
+ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
+ (CMAKE_${COMPILER}_COMPILER_ID MATCHES "Clang"))
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-amdocl64icd.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-amdocl64icd.patch
new file mode 100644
index 000000000000..6541c69bd48a
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-amdocl64icd.patch
@@ -0,0 +1,10 @@
+--- a/amdocl/CMakeLists.txt 2020-08-23 10:11:28.227839351 +0200
++++ b/amdocl/CMakeLists.txt 2020-08-23 10:12:03.697839216 +0200
+@@ -76,3 +76,7 @@
+ add_library(amdocl64 SHARED ${amdocl64_src})
+
+ target_link_libraries(amdocl64 amdrocclr_static Threads::Threads dl ${ADDITIONAL_LIBRARIES})
++
++file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/amdocl64.icd" CONTENT "$<TARGET_FILE_NAME:amdocl64>")
++install(FILES "${CMAKE_BINARY_DIR}/amdocl64.icd" DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}/OpenCL/vendors/")
++
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-change-install-location.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-change-install-location.patch
new file mode 100644
index 000000000000..77ce5e9bd332
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-change-install-location.patch
@@ -0,0 +1,79 @@
+--- a/CMakeLists.txt 2020-08-23 10:14:54.337838565 +0200
++++ b/CMakeLists.txt 2020-08-23 10:18:26.993837753 +0200
+@@ -14,6 +14,8 @@
+ #example command:
+ # cmake -DCMAKE_PREFIX_PATH=/path/to/ROCclr/build/or/install ..
+
++include (GNUInstallDirs)
++
+ set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/khronos/headers/opencl2.2" CACHE PATH "")
+ option(BUILD_SHARED_LIBS "Build shared libs" ON)
+
+@@ -60,7 +62,7 @@
+
+ add_subdirectory(khronos/icd)
+ add_subdirectory(amdocl)
+-add_subdirectory(tools/clinfo)
++#add_subdirectory(tools/clinfo)
+ add_subdirectory(tools/cltrace)
+ if(BUILD_TESTS)
+ add_subdirectory(tests/ocltst)
+@@ -96,34 +98,34 @@
+ ###--- Packaging ------------------------------------------------------------###
+
+ # MAIN package
+-install(PROGRAMS $<TARGET_FILE:clinfo>
+- DESTINATION bin
+- COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_FILE:cltrace>
+- DESTINATION lib
+- COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_FILE:clinfo>
++# DESTINATION bin
++# COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_FILE:cltrace>
++# DESTINATION lib
++# COMPONENT MAIN)
+ install(PROGRAMS $<TARGET_FILE:amdocl64>
+- DESTINATION lib
+- COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_FILE:OpenCL>
+- DESTINATION lib
+- COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_SONAME_FILE:OpenCL>
+- DESTINATION lib
++ DESTINATION lib64
+ COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_FILE:OpenCL>
++# DESTINATION lib
++# COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_SONAME_FILE:OpenCL>
++# DESTINATION lib
++# COMPONENT MAIN)
+
+ # DEV package
+-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/khronos/headers/opencl2.2/CL"
+- DESTINATION include
+- COMPONENT DEV
+- USE_SOURCE_PERMISSIONS
+- PATTERN cl_d3d10.h EXCLUDE
+- PATTERN cl_d3d11.h EXCLUDE
+- PATTERN cl_dx9_media_sharing.h EXCLUDE
+- PATTERN cl_egl.h EXCLUDE)
+-install(PROGRAMS $<TARGET_LINKER_FILE:OpenCL>
+- DESTINATION lib
+- COMPONENT DEV)
++#install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/khronos/headers/opencl2.2/CL"
++# DESTINATION include
++# COMPONENT DEV
++# USE_SOURCE_PERMISSIONS
++# PATTERN cl_d3d10.h EXCLUDE
++# PATTERN cl_d3d11.h EXCLUDE
++# PATTERN cl_dx9_media_sharing.h EXCLUDE
++# PATTERN cl_egl.h EXCLUDE)
++#install(PROGRAMS $<TARGET_LINKER_FILE:OpenCL>
++# DESTINATION lib
++# COMPONENT DEV)
+
+ #############################
+ # Packaging steps
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.7.0.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.7.0.ebuild
new file mode 100644
index 000000000000..5a1a4386433c
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.7.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
+
+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.7.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
+}