summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2022-05-01 22:41:18 +0800
committerBenda Xu <heroxbd@gentoo.org>2022-05-01 22:43:49 +0800
commitd781014aad6aa8ecf7af866458427b2ef208ff4d (patch)
tree874c289e1f522a73c02d0330df34e2dc32cfa116 /dev-util/roctracer
parentdev-python/odfpy: Bump to 1.4.2 (diff)
downloadgentoo-d781014aad6aa8ecf7af866458427b2ef208ff4d.tar.gz
gentoo-d781014aad6aa8ecf7af866458427b2ef208ff4d.tar.bz2
gentoo-d781014aad6aa8ecf7af866458427b2ef208ff4d.zip
dev-util/roctracer: version bump to 5.0.2.
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'dev-util/roctracer')
-rw-r--r--dev-util/roctracer/Manifest2
-rw-r--r--dev-util/roctracer/files/roctracer-5.0.2-Werror.patch18
-rw-r--r--dev-util/roctracer/files/roctracer-5.0.2-headers.patch36
-rw-r--r--dev-util/roctracer/files/roctracer-5.0.2-strip-license.patch14
-rw-r--r--dev-util/roctracer/roctracer-5.0.2.ebuild69
5 files changed, 139 insertions, 0 deletions
diff --git a/dev-util/roctracer/Manifest b/dev-util/roctracer/Manifest
index c0dab991cddc..9c8b51497026 100644
--- a/dev-util/roctracer/Manifest
+++ b/dev-util/roctracer/Manifest
@@ -1,5 +1,7 @@
DIST rocm-tracer-4.0.0.tar.gz 462166 BLAKE2B 1294b5639a743a9d32737c72dc0f082b5a33ee1b3365f48221ad6392cdde7637926c42ea344fa96e9fc8410ea04e9ce3f535e188a25130f4be764c4d4a59b69c SHA512 312cd6c4c98a83e28a9f8b9e6123862af2e80a0d0852acff11be65d198f277c6ea194e72f6dbaccab1dd5d4af318bef28ca546e49440f22d024a546a4e5e9e15
DIST rocm-tracer-4.2.0.tar.gz 476974 BLAKE2B 3a7be9c269fec5dcca98d7de514d97a2e1de7bbfaa54a1aca2df70453d05326564c8ee7bf793c7d176069ecd3f7f91409c6a20dd0773aa157f7abc1dac41448e SHA512 002d9fccee4761af4853e589b116bc5844b98abb84517c260aedcb5f31f5c92b862a233062ec280a6f878343c4f751d55f47fd38483e1882feb8c970f9836120
DIST rocm-tracer-4.3.0.tar.gz 477647 BLAKE2B d597df2efef0c750637c8f509b89ad62927cb839ba7c9a42fa71882ee13d4a0bba295af19b02eda5310421e53187e9a98a76777f0d3a587e7e652ecf4c10cb6a SHA512 47ea2705a361cb863f33a9f4c1a7d5005bb679221fa95f14dd5404ef5af32377bad5c7d9807e2fff8030a9c26ac4230f2bab833344ef49ecebbd5653f0edfc2c
+DIST rocm-tracer-5.0.2.tar.gz 474669 BLAKE2B b350111590140e1282338e4f134caf6228677c49361ceb9bc7ba0da8709346daa4fd014644c04adff0e903dba6014a84edd2eb3a5c132a8f91b479e4d5b085e5 SHA512 3fc1449cc9c9bf83e5233a7a0e83c0e3fa9da225d5ee4427b7d6fa15e3580497e1b9fbcd63892e4a99df01582aecd3ccfd66d2a19af2d8c25949ee705894ea44
DIST rocprofiler-4.2.0.tar.gz 1408433 BLAKE2B b35a7710d680167bad78ff74be153ea994ea919d572c5091ecec73d614bebb7ec14a14d81a0cabbe514b8439ddd7225f1a3a3fa7a0b653c33f938568bbe0c593 SHA512 35d3e9648bc5ee60bbddc15c9675efba7de3b4b3b725b9623e71a83007b8f23a323cc1da82e67f0ff425e5f827d6c632435bf465be8cba8c775405ead3f0f3be
DIST rocprofiler-4.3.0.tar.gz 1402250 BLAKE2B 3826c3b26b0d5838ab3475614c2ecd2265e177fe40b8a90abb491746513bd50841e5ceb34d1fcb4bcb2fbe8a6854b9715d0670d38f08775e5e14cd855f15629b SHA512 e327146604459f2f827ab943a21d0eaa0ee41cf6770ab94dd019d461cf6438e70a48139ce67ec1553d0f450fa5bb233a7ed39438e8bf39b33218d53e2c270d3b
+DIST rocprofiler-5.0.2.tar.gz 1401732 BLAKE2B ae870bc50dbd39c11e24f77ccb41773df1107b76cb7a12e1cebc66f8d66ddba6ad3bd6f9fe61657b03b22ef35f88fb608cf6070178f6aab24fe7a1bdcac43a96 SHA512 244e2b827126b7299ec0510daa5e1245a4a5a877394419f8bc9113f443231f67fc935609cbde6eeb26bb138ab4e95e2a88829ffa79ecc8f9881b5a77b5910c02
diff --git a/dev-util/roctracer/files/roctracer-5.0.2-Werror.patch b/dev-util/roctracer/files/roctracer-5.0.2-Werror.patch
new file mode 100644
index 000000000000..ddcfd7d669df
--- /dev/null
+++ b/dev-util/roctracer/files/roctracer-5.0.2-Werror.patch
@@ -0,0 +1,18 @@
+User code should not use the aggressive warning and error flags.
+
+Index: roctracer-rocm-5.0.2/cmake_modules/env.cmake
+===================================================================
+--- roctracer-rocm-5.0.2.orig/cmake_modules/env.cmake
++++ roctracer-rocm-5.0.2/cmake_modules/env.cmake
+@@ -39,10 +39,8 @@ add_definitions ( -D__HIP_PLATFORM_HCC__
+
+ ## Linux Compiler options
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+-set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
+-set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" )
+-set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type" )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" )
++set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive" )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden" )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno" )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics" )
diff --git a/dev-util/roctracer/files/roctracer-5.0.2-headers.patch b/dev-util/roctracer/files/roctracer-5.0.2-headers.patch
new file mode 100644
index 000000000000..91e48892bc45
--- /dev/null
+++ b/dev-util/roctracer/files/roctracer-5.0.2-headers.patch
@@ -0,0 +1,36 @@
+do not install a second set of header files, strip package name from
+libraries and headers.
+
+Index: roctracer-rocm-5.0.2/CMakeLists.txt
+===================================================================
+--- roctracer-rocm-5.0.2.orig/CMakeLists.txt
++++ roctracer-rocm-5.0.2/CMakeLists.txt
+@@ -131,16 +131,12 @@ add_custom_target ( so-patch-link ALL WO
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ../${DEST_NAME}/lib/${ROCTRACER_LIBRARY}.so.${LIB_VERSION_STRING} so-patch-link )
+
+ ## Install information
+-install ( TARGETS ${ROCTRACER_TARGET} LIBRARY DESTINATION ${DEST_NAME}/lib )
++install ( TARGETS ${ROCTRACER_TARGET} LIBRARY DESTINATION lib )
+ foreach ( header ${PUBLIC_HEADERS} )
+- get_filename_component ( header_subdir ${header} DIRECTORY )
+- install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/inc/${header} DESTINATION ${DEST_NAME}/include/${header_subdir} )
+- install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/inc/${header} DESTINATION include/${DEST_NAME}/${header_subdir} )
++ install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/inc/${header} DESTINATION include )
+ endforeach ()
+ foreach ( header ${GEN_HEADERS} )
+- get_filename_component ( header_subdir ${header} DIRECTORY )
+- install ( FILES ${PROJECT_BINARY_DIR}/inc/${header} DESTINATION ${DEST_NAME}/include/${header_subdir} )
+- install ( FILES ${PROJECT_BINARY_DIR}/inc/${header} DESTINATION include/${DEST_NAME}/${header_subdir} )
++ install ( FILES ${PROJECT_BINARY_DIR}/inc/${header} DESTINATION include )
+ endforeach ()
+ #install ( FILES ${PROJECT_BINARY_DIR}/inc-link DESTINATION include RENAME ${DEST_NAME} )
+ install ( FILES ${PROJECT_BINARY_DIR}/so-link DESTINATION lib RENAME ${ROCTRACER_LIBRARY}.so )
+@@ -162,7 +158,7 @@ add_custom_target ( so-roctx-major-link
+ add_custom_target ( so-roctx-patch-link ALL WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ../${DEST_NAME}/lib/${ROCTX_LIBRARY}.so.${LIB_VERSION_STRING} so-roctx-patch-link )
+
+-install ( TARGETS "roctx64" LIBRARY DESTINATION ${DEST_NAME}/lib )
++install ( TARGETS "roctx64" LIBRARY DESTINATION lib )
+ install ( FILES ${PROJECT_BINARY_DIR}/so-roctx-link DESTINATION lib RENAME ${ROCTX_LIBRARY}.so )
+ install ( FILES ${PROJECT_BINARY_DIR}/so-roctx-major-link DESTINATION lib RENAME ${ROCTX_LIBRARY}.so.${LIB_VERSION_MAJOR} )
+ install ( FILES ${PROJECT_BINARY_DIR}/so-roctx-patch-link DESTINATION lib RENAME ${ROCTX_LIBRARY}.so.${LIB_VERSION_STRING} )
diff --git a/dev-util/roctracer/files/roctracer-5.0.2-strip-license.patch b/dev-util/roctracer/files/roctracer-5.0.2-strip-license.patch
new file mode 100644
index 000000000000..e9c33885a01c
--- /dev/null
+++ b/dev-util/roctracer/files/roctracer-5.0.2-strip-license.patch
@@ -0,0 +1,14 @@
+Index: roctracer-rocm-5.0.2/CMakeLists.txt
+===================================================================
+--- roctracer-rocm-5.0.2.orig/CMakeLists.txt
++++ roctracer-rocm-5.0.2/CMakeLists.txt
+@@ -173,9 +173,6 @@ set ( CPACK_PACKAGE_CONTACT "ROCm Profil
+ set ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "AMD ROCTRACER library" )
+ set ( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" )
+
+-# Install license file
+-install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION share/doc/${CPACK_PACKAGE_NAME})
+-
+ ## Debian package specific variables
+ if ( DEFINED ENV{CPACK_DEBIAN_PACKAGE_RELEASE} )
+ set ( CPACK_DEBIAN_PACKAGE_RELEASE $ENV{CPACK_DEBIAN_PACKAGE_RELEASE} )
diff --git a/dev-util/roctracer/roctracer-5.0.2.ebuild b/dev-util/roctracer/roctracer-5.0.2.ebuild
new file mode 100644
index 000000000000..7c53e956e347
--- /dev/null
+++ b/dev-util/roctracer/roctracer-5.0.2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8,9} )
+
+inherit cmake prefix python-any-r1
+
+DESCRIPTION="Callback/Activity Library for Performance tracing AMD GPU's"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/roctracer.git"
+SRC_URI="https://github.com/ROCm-Developer-Tools/roctracer/archive/rocm-${PV}.tar.gz -> rocm-tracer-${PV}.tar.gz
+ https://github.com/ROCm-Developer-Tools/rocprofiler/archive/rocm-${PV}.tar.gz -> rocprofiler-${PV}.tar.gz"
+S="${WORKDIR}/roctracer-rocm-${PV}"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+RDEPEND="dev-libs/rocr-runtime:${SLOT}
+ dev-util/hip:${SLOT}"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ $(python_gen_any_dep '
+ dev-python/CppHeaderParser[${PYTHON_USEDEP}]
+ dev-python/ply[${PYTHON_USEDEP}]
+ ')
+"
+
+PATCHES=(
+ # https://github.com/ROCm-Developer-Tools/roctracer/pull/63
+ "${FILESDIR}"/${PN}-4.3.0-glibc-2.34.patch
+ "${FILESDIR}"/${PN}-5.0.2-Werror.patch
+ "${FILESDIR}"/${PN}-5.0.2-headers.patch
+ "${FILESDIR}"/${PN}-5.0.2-strip-license.patch
+)
+
+python_check_deps() {
+ has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]" &&
+ has_version "dev-python/ply[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ mv "${WORKDIR}"/rocprofiler-rocm-${PV} "${WORKDIR}"/rocprofiler || die
+
+ sed -e "/LIBRARY DESTINATION/s,lib,$(get_libdir)," \
+ -e "/add_subdirectory ( \${TEST_DIR} \${PROJECT_BINARY_DIR}/d" \
+ -e "/install ( FILES \${PROJECT_BINARY_DIR}\/so/d" \
+ -i CMakeLists.txt || die
+
+ # do not download additional sources via git
+ sed -e "/execute_process ( COMMAND sh -xc \"if/d" \
+ -e "/add_subdirectory ( \${HSA_TEST_DIR} \${PROJECT_BINARY_DIR}/d" \
+ -i test/CMakeLists.txt || die
+
+ hprefixify script/*.py
+}
+
+src_configure() {
+ export HIP_PATH="${EPREFIX}/usr"
+
+ local mycmakeargs=(
+ -DCMAKE_PREFIX_PATH="${EPREFIX}/usr/include/hsa"
+ )
+
+ cmake_src_configure
+}