From 17e97b8757a6b9060a6335f8a9f7975196fc763a Mon Sep 17 00:00:00 2001 From: Kent Russell Date: Fri, 12 Nov 2021 14:30:04 -0500 Subject: [PATCH] Revert "CMakeLists: Fix libdrm-amdgpu dependencies" This reverts commit af55f02fab470003dc9c497b6b69c652171b441f. Reason for revert: Infra still not ready for it yet Change-Id: I03e043c1ca7924264e3e70e3e82c73b4efc2ae75 [ROCm/ROCR-Runtime commit: e842d7f4806a1bb00744874dce130cd691ce44f8] --- projects/rocr-runtime/CMakeLists.txt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/projects/rocr-runtime/CMakeLists.txt b/projects/rocr-runtime/CMakeLists.txt index 764d9c00e9..b63ff21e18 100644 --- a/projects/rocr-runtime/CMakeLists.txt +++ b/projects/rocr-runtime/CMakeLists.txt @@ -351,13 +351,21 @@ set(CPACK_PACKAGE_VERSION "${PACKAGE_VERSION_STR}") # Setting devel package dependendent version set(CPACK_DEBIAN_PACKAGE_DEPENDS "libdrm-dev, rocm-core") -set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "libdrm-amdgpu-amdgpu1") +set(CPACK_DEBIAN_PACKAGE_SUGGESTS "libdrm-amdgpu-amdgpu1") set(CPACK_DEBIAN_PACKAGE_REPLACES "hsakmt-roct") -# Certain versions of rpm can't handle SUGGESTS or RECOMMENDS -# Also, CPACK_RPM_PACKAGE_RECOMMENDS isn't supported by -# CPack, so just set libdrm-amdgpu as a requirement for RPMs -set(CPACK_RPM_PACKAGE_REQUIRES "libdrm-devel, rocm-core, libdrm-amdgpu") +set(CPACK_RPM_PACKAGE_REQUIRES "libdrm-devel, rocm-core") + +# NOTE: CentOS/RHEL <8 and SUSE <10 have no concept of "Suggests" +# so a "suggests" field will just cause rpm installation to fail +# If the HSAKMT_REQUIRES_LIBDRM variable is true in the build +# environment, we use REQUIRES. Otherwise we use SUGGESTS +# For the distros above, this variable should be set to true +if(DEFINED HSAKMT_REQUIRES_LIBDRM) + string ( APPEND CPACK_RPM_PACKAGE_REQUIRES ", libdrm-amdgpu" ) +else() + set(CPACK_RPM_PACKAGE_SUGGESTS "libdrm-amdgpu" ) +endif() # Set the names now using CPACK utility set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")