new bblfs: dev-utils/rocm-smi-7.1.0
This commit is contained in:
69
dev-utils/rocm-smi-7.1.0.PKGBUILD
Normal file
69
dev-utils/rocm-smi-7.1.0.PKGBUILD
Normal file
@@ -0,0 +1,69 @@
|
||||
pkgname=rocm-smi-lib
|
||||
pkgver=7.1.0
|
||||
pkgdesc='ROCm System Management Interface Library'
|
||||
arch=('x86_64')
|
||||
url='https://rocm.docs.amd.com/projects/rocm_smi_lib/en/latest'
|
||||
license=('NCSA')
|
||||
depends=('glibc' 'gcc' 'python')
|
||||
makedepends=('cmake')
|
||||
_patchs=("rocm-smi-5.7.1-remove-example.patch")
|
||||
_patchsums=("7ba065a74fbf7ac0529473e419084558")
|
||||
sources=("rocm-${pkgver}.tar.gz"
|
||||
${_patchs[@]}
|
||||
)
|
||||
urls=("https://github.com/ROCm/rocm-systems/archive/${sources[0]}"
|
||||
${_patchs[@]}
|
||||
)
|
||||
md5sums=("7b63ca177ae122118dc215249db5adc3"
|
||||
${_patchsums[@]}
|
||||
)
|
||||
|
||||
_dirname="projects/rocm-smi-lib"
|
||||
|
||||
src_prepare() {
|
||||
tar -xf ${distdir}/${sources[0]} --strip-components=1
|
||||
pushd -- ${_dirname}
|
||||
for _patch in ${_patchs[@]}; do
|
||||
patch -p1 -i ${filedir}/${_patch}
|
||||
done
|
||||
|
||||
# Disable code that relies on missing .git directory.
|
||||
# Just silences potential "git: command not found" QA warnings.
|
||||
sed -e "/find_program (GIT NAMES git)/d" -i CMakeLists.txt
|
||||
sed -e "/num_change_since_prev_pkg(\${VERSION_PREFIX})/d" -i cmake_modules/utils.cmake
|
||||
|
||||
local rocm_lib="/usr/lib/librocm_smi64.so.@VERSION_MAJOR@"
|
||||
sed -E "s|path_librocm =.+__file__.+|path_librocm = '${rocm_lib}'|" \
|
||||
-i python_smi_tools/rsmiBindingsInit.py.in
|
||||
popd
|
||||
}
|
||||
|
||||
src_build() {
|
||||
local cmake_args=(
|
||||
-Wno-dev
|
||||
-S "$_dirname"
|
||||
-B build
|
||||
-D CMAKE_INSTALL_PREFIX=/usr
|
||||
-D CMAKE_BUILD_TYPE=None
|
||||
)
|
||||
cmake "${cmake_args[@]}"
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
src_install() {
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
|
||||
py=python3
|
||||
_site="$("$py" -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')"
|
||||
#install -Dm755 python_smi_tools/rocm_smi.py "${pkgdir}/usr/bin/rocm-smi"
|
||||
#install -Dm644 python_smi_tools/rsmiBindings.py "${pkgdir}/$site/rsmiBindings.py"
|
||||
#install -Dm644 python_smi_tools/rsmiBindingsInit.py "${pkgdir}/$site/rsmiBindingsInit.py"
|
||||
#ln -svf "../libexec/rocm_smi/rocm_smi.py" "${pkgdir}/usr/bin/rocm-smi"
|
||||
install -Dm644 "$srcdir/$_dirname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# vim:ft=sh syn=sh et sw=2:
|
||||
14
dev-utils/rocm-smi-7.1.0/rocm-smi-5.7.1-remove-example.patch
Normal file
14
dev-utils/rocm-smi-7.1.0/rocm-smi-5.7.1-remove-example.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
Remove example; unused, only generates not important QA warnings
|
||||
--- a/rocm_smi/CMakeLists.txt
|
||||
+++ b/rocm_smi/CMakeLists.txt
|
||||
@@ -76,8 +76,10 @@ set(SMI_INC_LIST "")
|
||||
|
||||
set(SMI_EXAMPLE_EXE "rocm_smi_ex")
|
||||
|
||||
+if (WITH_EXAMPLE)
|
||||
add_executable(${SMI_EXAMPLE_EXE} "example/rocm_smi_example.cc")
|
||||
target_link_libraries(${SMI_EXAMPLE_EXE} ${ROCM_SMI_TARGET})
|
||||
+endif()
|
||||
add_library(${ROCM_SMI_TARGET} ${CMN_SRC_LIST} ${SMI_SRC_LIST}
|
||||
${CMN_INC_LIST} ${SMI_INC_LIST})
|
||||
target_link_libraries(${ROCM_SMI_TARGET} pthread rt)
|
||||
Reference in New Issue
Block a user