Gentoo Archives: gentoo-commits

From: Craig Andrews <candrews@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocr-runtime/, dev-libs/rocr-runtime/files/
Date: Sun, 29 Dec 2019 22:22:28
Message-Id: 1577658114.1bef97970aed14818f86fd57de801afbf0444085.candrews@gentoo
1 commit: 1bef97970aed14818f86fd57de801afbf0444085
2 Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 29 22:02:42 2019 +0000
4 Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 29 22:21:54 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bef9797
7
8 dev-libs/rocr-runtime: 3.0.0 version bump
9
10 Closes: https://github.com/gentoo/gentoo/pull/14148/
11 Package-Manager: Portage-2.3.84, Repoman-2.3.20
12 Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
13
14 dev-libs/rocr-runtime/Manifest | 1 +
15 .../rocr-runtime-3.0.0-cmake-install-paths.patch | 45 ++++++++++++++++++++++
16 dev-libs/rocr-runtime/rocr-runtime-3.0.0.ebuild | 37 ++++++++++++++++++
17 3 files changed, 83 insertions(+)
18
19 diff --git a/dev-libs/rocr-runtime/Manifest b/dev-libs/rocr-runtime/Manifest
20 index 81684befba7..49064ebf53b 100644
21 --- a/dev-libs/rocr-runtime/Manifest
22 +++ b/dev-libs/rocr-runtime/Manifest
23 @@ -4,3 +4,4 @@ DIST rocr-runtime-2.6.0.tar.gz 318296 BLAKE2B c04e04db32f650def8a7973fa73f0c0e9b
24 DIST rocr-runtime-2.7.0.tar.gz 321669 BLAKE2B 99f7a62019aaa893ff032a7ed492720c1d0d8fc2c8a730f2e6833d1ad34af57e1045ed480a7d5ba72123bebfa6accd6282be4299bf94d77404adc5bbc9d13624 SHA512 46926a711665df4e232a6dcbcb1f67a4a133bffac927b70404e3cefe624be31dfc5ffea49ae9b834076cfcdf94a6e61b6804af6aed75f433e1842c980bc6e54d
25 DIST rocr-runtime-2.8.0.tar.gz 324868 BLAKE2B 5c46ffec7482e09032c67270a352543465f9f8a0a7c45e9884c37104e9e12a7e4dccb60bf3904d1398ffc00d9e934fc055190ba9ba4c1104bdb83be6c758eded SHA512 428b7d1d17a82c841a4d9a2c163670464416afa3ca3c579cc63ee712880940c0150e365922ffdafa44ee81fb76295cc19b66a1a4cb0a7e9a366f56782d826061
26 DIST rocr-runtime-2.9.0.tar.gz 323220 BLAKE2B 7e6338185f23011ed4105c6797431677e657c6fc198f83399daab4d3b2d3333ebd6e86c0d669bf794f984ea0346b8e528449eb5d81aff2ecf3f1871663458df6 SHA512 fa68fde0f79651956096ee506ff8b6760a9623e7d9cb099229b3951b7434bed5b501a3c6785c5767902c7dbf6c478ada5d2c2a5c5984063f0d0d0db8bca2bda2
27 +DIST rocr-runtime-3.0.0.tar.gz 327908 BLAKE2B 0d95ecc22d27e470dd46f02aca012c59e8d0b0bd76de21133a1198d2daa75547600d95ea6c3a3771da36ce3fdf5e197b40ff68543b71adf36d33079a9d9496ab SHA512 e1a1eeec67bca02defc6f502e94dab71e48833737cc0f45552781c5b0cc36bff9147b2c477d6c2c3c9bd25654569ad1d91cd06aa81fcf412657a489cb56c5674
28
29 diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-3.0.0-cmake-install-paths.patch b/dev-libs/rocr-runtime/files/rocr-runtime-3.0.0-cmake-install-paths.patch
30 new file mode 100644
31 index 00000000000..29429d0c480
32 --- /dev/null
33 +++ b/dev-libs/rocr-runtime/files/rocr-runtime-3.0.0-cmake-install-paths.patch
34 @@ -0,0 +1,45 @@
35 +https://github.com/RadeonOpenCompute/ROCR-Runtime/pull/51
36 +
37 +From 09a835e8de2d88e917328a78765a1db423d21920 Mon Sep 17 00:00:00 2001
38 +From: Craig Andrews <candrews@××××××××××××.com>
39 +Date: Sun, 29 Dec 2019 16:57:00 -0500
40 +Subject: [PATCH] Correctly install the library into the system
41 +
42 +Install to standard locations in /usr/{lib,include}/lib (as opposed to /usr/hsa/{lib,include}/hsa)
43 +Use CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR from GNUInstallDirs instead of using "lib" and "include"
44 +---
45 + CMakeLists.txt | 13 +++----------
46 + 1 file changed, 3 insertions(+), 10 deletions(-)
47 +
48 +diff --git a/CMakeLists.txt b/CMakeLists.txt
49 +index f292182..7474dd2 100644
50 +--- a/CMakeLists.txt
51 ++++ b/CMakeLists.txt
52 +@@ -61,6 +61,7 @@ endif() # if (ROCM_CCACHE_BUILD)
53 +
54 + list ( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules" )
55 + include ( utils )
56 ++include ( GNUInstallDirs )
57 + include ( hsa_common )
58 +
59 + ## Find LibElf
60 +@@ -176,17 +177,9 @@ endif ()
61 + set_property ( TARGET ${CORE_RUNTIME_TARGET} PROPERTY VERSION "${SO_VERSION_STRING}" )
62 + set_property ( TARGET ${CORE_RUNTIME_TARGET} PROPERTY SOVERSION "${SO_MAJOR}" )
63 +
64 +-## Create symlinks for legacy packaging and install
65 +-add_custom_target ( hsa_include_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../hsa/include/hsa hsa_include_link )
66 +-add_custom_target ( hsa_lib_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../hsa/lib/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}-link.so )
67 +-add_custom_target ( hsa_lib_link2 ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../hsa/lib/${CORE_RUNTIME_LIBRARY}.so.${SO_MAJOR} ${CORE_RUNTIME_LIBRARY}-link.so.${SO_MAJOR} )
68 +-
69 + ## Set install information
70 +-install ( TARGETS ${CORE_RUNTIME_TARGET} LIBRARY DESTINATION hsa/lib )
71 +-install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION hsa/include/hsa )
72 +-install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa_include_link DESTINATION include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa )
73 +-install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so DESTINATION lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so )
74 +-install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so.${SO_MAJOR} DESTINATION lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so.${SO_MAJOR} )
75 ++install ( TARGETS ${CORE_RUNTIME_TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
76 ++install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hsa )
77 +
78 + ## Packaging directives
79 + set ( CPACK_GENERATOR "DEB;RPM" CACHE STRING "Package types to build")
80
81 diff --git a/dev-libs/rocr-runtime/rocr-runtime-3.0.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-3.0.0.ebuild
82 new file mode 100644
83 index 00000000000..a0096a72495
84 --- /dev/null
85 +++ b/dev-libs/rocr-runtime/rocr-runtime-3.0.0.ebuild
86 @@ -0,0 +1,37 @@
87 +# Copyright 1999-2019 Gentoo Authors
88 +# Distributed under the terms of the GNU General Public License v2
89 +
90 +EAPI=7
91 +
92 +inherit cmake-utils
93 +
94 +if [[ ${PV} == *9999 ]] ; then
95 + EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
96 + inherit git-r3
97 + S="${WORKDIR}/${P}/src"
98 +else
99 + SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/roc-${PV}.tar.gz -> ${P}.tar.gz"
100 + S="${WORKDIR}/ROCR-Runtime-roc-${PV}/src"
101 + KEYWORDS="~amd64"
102 +fi
103 +
104 +DESCRIPTION="Radeon Open Compute Runtime"
105 +HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
106 +PATCHES=(
107 + "${FILESDIR}/${PN}-3.0.0-cmake-install-paths.patch"
108 +)
109 +
110 +LICENSE="MIT"
111 +SLOT="0/$(ver_cut 1-2)"
112 +IUSE="nonfree"
113 +
114 +COMMON_DEPEND="sys-process/numactl"
115 +RDEPEND="${COMMON_DEPEND}
116 + nonfree? ( dev-libs/hsa-ext-rocr )"
117 +DEPEND="${COMMON_DEPEND}
118 + >=dev-libs/roct-thunk-interface-${PV}"
119 +
120 +src_prepare() {
121 + sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
122 + cmake-utils_src_prepare
123 +}