* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-opencl-driver/, dev-libs/rocm-opencl-driver/files/
@ 2019-08-07 17:38 Craig Andrews
0 siblings, 0 replies; 2+ messages in thread
From: Craig Andrews @ 2019-08-07 17:38 UTC (permalink / raw
To: gentoo-commits
commit: 98d3c369ac79bacb3516c3b8a39647d8409a6682
Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 26 18:21:10 2019 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Wed Aug 7 17:38:46 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98d3c369
dev-libs/rocm-opencl-driver: Radeon Open Compute OpenCL Compatible Runtime
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
dev-libs/rocm-opencl-driver/Manifest | 1 +
...ocm-opencl-driver-2.6.0-install-correctly.patch | 49 ++++++++++++++++++++++
.../rocm-opencl-driver-2.6.0-install-header.patch | 19 +++++++++
dev-libs/rocm-opencl-driver/metadata.xml | 14 +++++++
.../rocm-opencl-driver-2.6.0.ebuild | 46 ++++++++++++++++++++
5 files changed, 129 insertions(+)
diff --git a/dev-libs/rocm-opencl-driver/Manifest b/dev-libs/rocm-opencl-driver/Manifest
new file mode 100644
index 00000000000..825e4bf6fab
--- /dev/null
+++ b/dev-libs/rocm-opencl-driver/Manifest
@@ -0,0 +1 @@
+DIST rocm-opencl-driver-2.6.0.tar.gz 21311 BLAKE2B f17219b577ccd58de052d5936953fd78588a0b042ce002853b10c05e6f6d433edcd90045c15dcd2f2c31ccef89f8b420ef756a1dd1613702efcc8868163878d1 SHA512 7b8bf646d9a36b09d75a0408301c2f1771daad95b8075b1671ca0c8b1f5826e8cd9de8935946858268dc89863a0ee054b4dde3040c84dd37e90f28c7ffa6e097
diff --git a/dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.6.0-install-correctly.patch b/dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.6.0-install-correctly.patch
new file mode 100644
index 00000000000..d70f0977ec8
--- /dev/null
+++ b/dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.6.0-install-correctly.patch
@@ -0,0 +1,49 @@
+https://github.com/RadeonOpenCompute/ROCm-OpenCL-Driver/pull/85
+
+From 8819a684c9b6e154abedc041b3da545aab353d67 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Fri, 26 Jul 2019 15:54:59 -0400
+Subject: [PATCH] Use GNUInstallDirs to install to standard locations
+
+Some distributions require 64 bit libraries to be installed to lib64, for example.
+Using GNUInstallDirs ensures that files are installed to the expected locations.
+---
+ CMakeLists.txt | 3 +++
+ src/driver/CMakeLists.txt | 2 +-
+ src/roc-cl/CMakeLists.txt | 2 +-
+ 3 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d1759b7..d21e9da 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -42,6 +42,9 @@
+
+ cmake_minimum_required(VERSION 2.8)
+
++## Include common cmake modules
++include ( GNUInstallDirs )
++
+ # Build ROCm-OpenCL-Driver with ccache if the package is present.
+ set(ROCM_OPENCL_DRIVER_CCACHE_BUILD OFF CACHE BOOL "Set to ON for a ccache enabled build")
+ if(ROCM_OPENCL_DRIVER_CCACHE_BUILD)
+diff --git a/src/driver/CMakeLists.txt b/src/driver/CMakeLists.txt
+index 7046e34..55ed13f 100644
+--- a/src/driver/CMakeLists.txt
++++ b/src/driver/CMakeLists.txt
+@@ -90,4 +90,4 @@ target_link_libraries(opencl_driver
+ target_link_libraries(opencl_driver ${llvm_libs})
+ target_include_directories(opencl_driver PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+
+-install(TARGETS opencl_driver DESTINATION lib)
++install(TARGETS opencl_driver DESTINATION ${CMAKE_INSTALL_LIBDIR} )
+diff --git a/src/roc-cl/CMakeLists.txt b/src/roc-cl/CMakeLists.txt
+index 5037453..a8e2801 100644
+--- a/src/roc-cl/CMakeLists.txt
++++ b/src/roc-cl/CMakeLists.txt
+@@ -54,4 +54,4 @@ link_directories(${LLVM_LIBRARY_DIRS})
+ add_executable(roc-cl ${sources})
+ target_link_libraries(roc-cl opencl_driver)
+
+-install(TARGETS roc-cl RUNTIME DESTINATION bin)
++install(TARGETS roc-cl RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
diff --git a/dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.6.0-install-header.patch b/dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.6.0-install-header.patch
new file mode 100644
index 00000000000..b37100994e0
--- /dev/null
+++ b/dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.6.0-install-header.patch
@@ -0,0 +1,19 @@
+From 1258a99decf96092de8ea512150209e14152ed9c Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Tue, 30 Jul 2019 16:46:20 -0400
+Subject: [PATCH] Install AmdCompiler.h header
+
+ROCm-OpenCL-Runtime uses AmdCompiler.h so it should be installed to the system and made available for use
+---
+ src/driver/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/driver/CMakeLists.txt b/src/driver/CMakeLists.txt
+index 55ed13f..8f68fb7 100644
+--- a/src/driver/CMakeLists.txt
++++ b/src/driver/CMakeLists.txt
+@@ -91,3 +91,4 @@ target_link_libraries(opencl_driver ${llvm_libs})
+ target_include_directories(opencl_driver PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+
+ install(TARGETS opencl_driver DESTINATION ${CMAKE_INSTALL_LIBDIR} )
++install(FILES AmdCompiler.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
diff --git a/dev-libs/rocm-opencl-driver/metadata.xml b/dev-libs/rocm-opencl-driver/metadata.xml
new file mode 100644
index 00000000000..359755b2e5a
--- /dev/null
+++ b/dev-libs/rocm-opencl-driver/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">RadeonOpenCompute/ROCm-OpenCL-Runtime</remote-id>
+ </upstream>
+ <longdescription lang="en">
+ Radeon Open Compute OpenCL Compatible Runtime
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-libs/rocm-opencl-driver/rocm-opencl-driver-2.6.0.ebuild b/dev-libs/rocm-opencl-driver/rocm-opencl-driver-2.6.0.ebuild
new file mode 100644
index 00000000000..6ab3d1073d1
--- /dev/null
+++ b/dev-libs/rocm-opencl-driver/rocm-opencl-driver-2.6.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Driver/"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Driver/archive/roc-${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/ROCm-OpenCL-Driver-roc-${PV}"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Radeon Open Compute OpenCL Compiler Tool Driver"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Driver"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="test"
+
+RDEPEND="sys-devel/llvm-roc:=
+ dev-libs/rocr-runtime"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-install-correctly.patch"
+ "${FILESDIR}/${P}-install-header.patch"
+)
+
+src_prepare() {
+ # remove unittest, because it downloads additional file from github.com
+ sed -e "s:add_subdirectory(src/unittest):#add_subdirectory(src/unittest):" -i CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLLVM_DIR="${EPREFIX}/usr/lib/llvm/roc/"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/"
+ )
+ cmake-utils_src_configure
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-opencl-driver/, dev-libs/rocm-opencl-driver/files/
@ 2019-08-27 13:04 Craig Andrews
0 siblings, 0 replies; 2+ messages in thread
From: Craig Andrews @ 2019-08-27 13:04 UTC (permalink / raw
To: gentoo-commits
commit: a31c9aa8de9537fe1918546bd4895c187917eabb
Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 27 13:04:10 2019 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Tue Aug 27 13:04:43 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a31c9aa8
dev-libs/rocm-opencl-driver: Include more link libraries
Closes: https://bugs.gentoo.org/692404
Package-Manager: Portage-2.3.73, Repoman-2.3.17
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
.../files/rocm-opencl-driver-2.7.0-libraries.patch | 40 ++++++++++++++++++++++
.../rocm-opencl-driver-2.7.0.ebuild | 1 +
2 files changed, 41 insertions(+)
diff --git a/dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.7.0-libraries.patch b/dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.7.0-libraries.patch
new file mode 100644
index 00000000000..9e2a06aac97
--- /dev/null
+++ b/dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.7.0-libraries.patch
@@ -0,0 +1,40 @@
+https://github.com/RadeonOpenCompute/ROCm-OpenCL-Driver/pull/88
+
+From f49ad81e246f1c196cf86f40cf44dfedec0675f1 Mon Sep 17 00:00:00 2001
+From: Mike Lothain <mike@fireburn.co.uk>
+Date: Tue, 27 Aug 2019 11:32:47 +0100
+Subject: [PATCH] Include more link libraries
+
+This is required to get dev-libs/rocm-opencl-driver-2.7.0 compiling for me on Gentoo
+
+I think it might be related to using -Wl,--as-needed in my link flags globally
+---
+ src/driver/CMakeLists.txt | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/driver/CMakeLists.txt b/src/driver/CMakeLists.txt
+index 55ed13f..b93356d 100644
+--- a/src/driver/CMakeLists.txt
++++ b/src/driver/CMakeLists.txt
+@@ -60,9 +60,13 @@ llvm_map_components_to_libnames(llvm_libs
+ AllTargetsDescs
+ AllTargetsDisassemblers
+ AllTargetsInfos
++ BitWriter
+ CodeGen
++ IRReader
++ Linker
+ MC
+ MCDisassembler
++ MCParser
+ Object
+ Symbolize
+ Core
+@@ -83,6 +87,7 @@ target_link_libraries(opencl_driver
+ clangLex
+ clangBasic
+ clangCodeGen
++ clangSerialization
+ lldELF
+ lldCore
+ LLVMDebugInfoDWARF
diff --git a/dev-libs/rocm-opencl-driver/rocm-opencl-driver-2.7.0.ebuild b/dev-libs/rocm-opencl-driver/rocm-opencl-driver-2.7.0.ebuild
index f95628a7cb7..e4e2818a7ed 100644
--- a/dev-libs/rocm-opencl-driver/rocm-opencl-driver-2.7.0.ebuild
+++ b/dev-libs/rocm-opencl-driver/rocm-opencl-driver-2.7.0.ebuild
@@ -28,6 +28,7 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}/${PN}-2.6.0-install-correctly.patch"
"${FILESDIR}/${PN}-2.6.0-install-header.patch"
+ "${FILESDIR}/${PN}-2.7.0-libraries.patch"
)
src_prepare() {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-27 13:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-27 13:04 [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-opencl-driver/, dev-libs/rocm-opencl-driver/files/ Craig Andrews
-- strict thread matches above, loose matches on Subject: below --
2019-08-07 17:38 Craig Andrews
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox