Skip to content

Commit

Permalink
Fix provides field
Browse files Browse the repository at this point in the history
Previously the code for provides field was not evaluating the CPACK_DEBIAN_PACKAGE_PROVIDES variable, causing CPACK_DEBIAN_PACKAGE_PROVIDES to be included as a literal string provided by the devel package.
  • Loading branch information
lawruble13 committed Feb 9, 2024
1 parent b04260e commit 6f15572
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions share/rocmcmakebuildtools/cmake/ROCMCreatePackage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,21 @@ macro(rocm_create_package)
)
endif()
if(PARSE_HEADER_ONLY)
rocm_join_if_set(", "
CPACK_DEBIAN_DEVEL_PACKAGE_PROVIDES
CPACK_DEBIAN_PACKAGE_PROVIDES
"${CPACK_PACKAGE_NAME} (= ${CPACK_PACKAGE_VERSION})")
rocm_join_if_set(", "
CPACK_RPM_DEVEL_PACKAGE_PROVIDES
CPACK_DEBIAN_PACKAGE_PROVIDES
"${CPACK_PACKAGE_NAME} = ${CPACK_PACKAGE_VERSION}")
if(DEFINED CPACK_DEBIAN_DEVEL_PACKAGE_PROVIDES)
rocm_join_if_set(", ",
CPACK_DEBIAN_DEVEL_PACKAGE_PROVIDES
"${CPACK_PACKAGE_NAME} = ${CPACK_PACKAGE_VERSION}"
)
else()
rocm_join_if_set(", "
CPACK_DEBIAN_DEVEL_PACKAGE_PROVIDES
"${CPACK_DEBIAN_PACKAGE_PROVIDES}"
"${CPACK_PACKAGE_NAME} (= ${CPACK_PACKAGE_VERSION})")
rocm_join_if_set(", "
CPACK_RPM_DEVEL_PACKAGE_PROVIDES
"${CPACK_DEBIAN_PACKAGE_PROVIDES}"
"${CPACK_PACKAGE_NAME} = ${CPACK_PACKAGE_VERSION}")
endif()
else()
rocm_package_add_dependencies(COMPONENT devel DEPENDS "${CPACK_PACKAGE_NAME} >= ${CPACK_PACKAGE_VERSION}")
endif()
Expand Down

0 comments on commit 6f15572

Please sign in to comment.