summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2023-07-29 15:07:22 +0800
committerBenda Xu <heroxbd@gentoo.org>2023-07-30 12:35:24 +0800
commit20ba0493ccc5cd9ffd83ebc27f03879024717871 (patch)
tree063faa6c52b0e614fdb0d9a2c014080a314e6003 /sci-libs
parentsci-libs/rocFFT: remove versioned dependence on rocm-cmake. (diff)
downloadgentoo-20ba0493ccc5cd9ffd83ebc27f03879024717871.tar.gz
gentoo-20ba0493ccc5cd9ffd83ebc27f03879024717871.tar.bz2
gentoo-20ba0493ccc5cd9ffd83ebc27f03879024717871.zip
sci-libs/hipFFT: do not use cmake module to find HIP.
Loosen the versioned dependence on dev-util/hip. Reference: https://github.com/ROCmSoftwarePlatform/hipFFT/pull/66 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/hipFFT/files/hipFFT-5.1.3_hip-config.patch90
-rw-r--r--sci-libs/hipFFT/hipFFT-5.1.3-r1.ebuild (renamed from sci-libs/hipFFT/hipFFT-5.1.3.ebuild)16
2 files changed, 95 insertions, 11 deletions
diff --git a/sci-libs/hipFFT/files/hipFFT-5.1.3_hip-config.patch b/sci-libs/hipFFT/files/hipFFT-5.1.3_hip-config.patch
new file mode 100644
index 000000000000..2f63a0f8e6f7
--- /dev/null
+++ b/sci-libs/hipFFT/files/hipFFT-5.1.3_hip-config.patch
@@ -0,0 +1,90 @@
+reverts the following commit.
+
+Upstream: https://github.com/ROCmSoftwarePlatform/hipFFT/pull/67
+
+commit 41491c9a70f808ed74690a538ca7bd25ff1ae1ca
+Author: Steve Leung <Steve.Leung@amd.com>
+Date: Wed Sep 1 11:25:26 2021 -0600
+
+ cmake: use HIP CONFIG on Windows
+
+diff --git a/clients/rider/CMakeLists.txt b/clients/rider/CMakeLists.txt
+index de1fc7d..8b88103 100644
+--- b/clients/rider/CMakeLists.txt
++++ a/clients/rider/CMakeLists.txt
+@@ -43,11 +43,7 @@
+
+ if( NOT CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" )
+ if( NOT BUILD_WITH_LIB STREQUAL "CUDA" )
+- if( WIN32 )
+- find_package( HIP CONFIG REQUIRED )
+- else()
+- find_package( HIP MODULE REQUIRED )
+- endif()
++ find_package( HIP REQUIRED )
+ target_link_libraries( hipfft-rider PRIVATE hip::host )
+ else()
+
+diff --git a/clients/samples/CMakeLists.txt b/clients/samples/CMakeLists.txt
+index 5a882c6..37162ab 100644
+--- b/clients/samples/CMakeLists.txt
++++ a/clients/samples/CMakeLists.txt
+@@ -48,11 +48,7 @@
+ target_link_libraries( ${sample} PRIVATE hip::hipfft )
+
+ if( NOT CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" )
+- if( WIN32 )
+- find_package( HIP CONFIG REQUIRED )
+- else()
+- find_package( HIP MODULE REQUIRED )
+- endif()
++ find_package( HIP REQUIRED )
+ if( NOT BUILD_WITH_LIB STREQUAL "CUDA" )
+ target_link_libraries( ${sample} PRIVATE hip::host )
+ else()
+diff --git a/clients/tests/CMakeLists.txt b/clients/tests/CMakeLists.txt
+index 2b965e2..0442a79 100644
+--- b/clients/tests/CMakeLists.txt
++++ a/clients/tests/CMakeLists.txt
+@@ -81,11 +81,7 @@
+
+ if( NOT CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" )
+ if( NOT BUILD_WITH_LIB STREQUAL "CUDA" )
+- if( WIN32 )
+- find_package( HIP CONFIG REQUIRED )
+- else()
+- find_package( HIP MODULE REQUIRED )
+- endif()
++ find_package( HIP REQUIRED )
+ target_link_libraries( hipfft-test PRIVATE hip::host )
+ else()
+ target_compile_definitions( hipfft-test PRIVATE __HIP_PLATFORM_NVIDIA__)
+diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake
+index 022e3e4..0c8b3f8 100644
+--- b/cmake/dependencies.cmake
++++ a/cmake/dependencies.cmake
+@@ -27,22 +27,14 @@
+ # HIP
+ if( NOT CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" )
+ if( NOT BUILD_WITH_LIB STREQUAL "CUDA" )
+- if( WIN32 )
+- find_package( HIP CONFIG REQUIRED )
+- else()
+- find_package( HIP MODULE REQUIRED )
+- endif()
++ find_package( HIP REQUIRED )
+ list( APPEND HIP_INCLUDE_DIRS "${HIP_ROOT_DIR}/include" )
+ endif()
+ else()
+ if( BUILD_WITH_LIB STREQUAL "CUDA" )
+ set(HIP_INCLUDE_DIRS "${HIP_ROOT_DIR}/include")
+ else()
+- if( WIN32 )
+- find_package( HIP CONFIG REQUIRED )
+- else()
+- find_package( HIP MODULE REQUIRED )
+- endif()
++ find_package( HIP REQUIRED )
+ endif()
+ endif()
+
diff --git a/sci-libs/hipFFT/hipFFT-5.1.3.ebuild b/sci-libs/hipFFT/hipFFT-5.1.3-r1.ebuild
index 216d15841546..79eb8052324f 100644
--- a/sci-libs/hipFFT/hipFFT-5.1.3.ebuild
+++ b/sci-libs/hipFFT/hipFFT-5.1.3-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -18,7 +18,7 @@ SLOT="0/$(ver_cut 1-2)"
RESTRICT="test"
-RDEPEND="dev-util/hip:${SLOT}
+RDEPEND="dev-util/hip
sci-libs/rocFFT:${SLOT}[${ROCM_USEDEP}]"
DEPEND="${RDEPEND}"
BDEPEND=""
@@ -26,25 +26,19 @@ BDEPEND=""
S="${WORKDIR}/hipFFT-rocm-${PV}"
PATCHES=(
+ "${FILESDIR}/${PN}-5.1.3_hip-config.patch"
"${FILESDIR}/${PN}-5.1.3-gentoo-install-locations.patch"
"${FILESDIR}/${PN}-5.0.2-remove-git-dependency.patch"
"${FILESDIR}/${PN}-4.3.0-add-complex-header.patch"
)
-src_prepare() {
- sed -e "/CMAKE_INSTALL_LIBDIR/d" -i CMakeLists.txt || die
- cmake_src_prepare
-}
-
src_configure() {
local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-DCMAKE_INSTALL_INCLUDEDIR="include/hipfft"
- -DCMAKE_MODULE_PATH="${EPREFIX}/usr/$(get_libdir)/cmake"
- -DHIP_ROOT_DIR="${EPREFIX}/usr"
+ -DROCM_SYMLINK_LIBS=OFF
-DBUILD_CLIENTS_TESTS=OFF
-DBUILD_CLIENTS_RIDER=OFF
)
- cmake_src_configure
+ CXX=hipcc cmake_src_configure
}