sci-libs/hipBLASLt: fix incorrect generation of hipblaslt-config.cmake

Closes: https://bugs.gentoo.org/965873
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44633
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sv. Lockal 2025-11-15 20:16:16 +08:00 committed by Sam James
parent 34d88e837b
commit 6357e689b3
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
2 changed files with 22 additions and 5 deletions

View File

@ -0,0 +1,19 @@
Fix project declaration; with this fix, origami produces origami-config.cmake instead of the second incorrect hipblaslt-config.cmake
Bug: https://bugs.gentoo.org/965873
Upstream bug: https://github.com/ROCm/rocm-libraries/issues/2556
Backports https://github.com/ROCm/rocm-libraries/commit/e8add0e18b344f12e243bad28deedcfe2d38c616#diff-d9e605ef1f0f2809cd5660e42b405a763a823ce637764cc2e336bd37c4ad8b38R6
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,9 +3,9 @@
cmake_minimum_required(VERSION 3.24.4)
-if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
- project(Origami VERSION 1.0.0 LANGUAGES CXX)
+project(Origami VERSION 1.0.0 LANGUAGES CXX)
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(ORIGAMI_STANDALONE ON)
else()
set(ORIGAMI_STANDALONE OFF)

View File

@ -113,11 +113,9 @@ src_prepare() {
# Do not install tests
sed -e "s/COMPONENT tests/COMPONENT tests EXCLUDE_FROM_ALL/" -i CMakeLists.txt || die
# usage: DEPENDS PACKAGE A PACKAGE B, not DEPENDS PACKAGE A DEPENDS PACKAGE B
# https://rocm.docs.amd.com/projects/ROCmCMakeBuildTools/en/docs-7.1.0/reference/ROCMInstallTargets.html#command:rocm_export_targets
# Bug: https://bugs.gentoo.org/965873
# Upstream bug: https://github.com/ROCm/rocm-libraries/issues/2556
sed -e "s/DEPENDS PACKAGE \${hipblas_target}/PACKAGE \${hipblas_target}/" -i CMakeLists.txt || die
pushd "${WORKDIR}/rocm-libraries-rocm-${PV}/shared/origami" || die
eapply "${FILESDIR}"/origami-7.1.0-fix-project.patch
popd || die
cmake_src_prepare
}