From dd6fbdd22cc56af2ec8f97b4f62ce5ef612a891b Mon Sep 17 00:00:00 2001 From: jim wang <122244446+jimwang118@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:30:21 +0000 Subject: [PATCH] [arrayfire] Add missing header files (#41236) --- ports/arrayfire/fix-miss-header-file.patch | 12 ++++++++++++ ports/arrayfire/portfile.cmake | 14 +++++++++++++- ports/arrayfire/vcpkg.json | 2 +- versions/a-/arrayfire.json | 5 +++++ versions/baseline.json | 2 +- 5 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 ports/arrayfire/fix-miss-header-file.patch diff --git a/ports/arrayfire/fix-miss-header-file.patch b/ports/arrayfire/fix-miss-header-file.patch new file mode 100644 index 0000000000..c29c51f4fa --- /dev/null +++ b/ports/arrayfire/fix-miss-header-file.patch @@ -0,0 +1,12 @@ +diff --git a/src/backend/common/half.hpp b/src/backend/common/half.hpp +index fb25d03..2f6a8a4 100644 +--- a/src/backend/common/half.hpp ++++ b/src/backend/common/half.hpp +@@ -33,6 +33,7 @@ + #endif + + #include ++#include + + #ifdef __CUDACC_RTC__ + using uint16_t = unsigned short; diff --git a/ports/arrayfire/portfile.cmake b/ports/arrayfire/portfile.cmake index 20e92f5d6f..d6640becc7 100644 --- a/ports/arrayfire/portfile.cmake +++ b/ports/arrayfire/portfile.cmake @@ -1,3 +1,10 @@ +vcpkg_download_distfile( + CUDA_PATCHES + URLS "https://github.com/arrayfire/arrayfire/pull/3552/commits/674e7bec90b90467139d32bf633467fe60824617.diff?full_index=1" + FILENAME "fix-cuda-674e7bec90b90467139d32bf633467fe60824617.patch" + SHA512 201ba8c46f5eafd5d8dbc78ddc1fb4c24b8d820f034e081b8ff30712705fe059c2850bbb7394d81931620619071559fed0e98b13cc4f985103e354c44a322e78 +) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO arrayfire/arrayfire @@ -8,6 +15,8 @@ vcpkg_from_github( build.patch Fix-constexpr-error-with-vs2019-with-half.patch fix-dependency-clfft.patch + fix-miss-header-file.patch + "${CUDA_PATCHES}" ) # arrayfire cpu thread lib needed as a submodule for the CPU backend @@ -91,7 +100,7 @@ vcpkg_cmake_install() vcpkg_copy_pdbs() -if(VCPKG_TARGET_IS_OSX) +if(NOT VCPKG_TARGET_IS_WINDOWS) vcpkg_cmake_config_fixup(CONFIG_PATH share/ArrayFire/cmake) else() vcpkg_cmake_config_fixup(CONFIG_PATH cmake) @@ -103,6 +112,9 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/examples" "${CURRENT_PACKAGES_DIR}/LICENSES" "${CURRENT_PACKAGES_DIR}/debug/LICENSES") +if(FEATURES STREQUAL "core") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +endif() # Copyright and license file(INSTALL "${SOURCE_PATH}/COPYRIGHT.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/arrayfire/vcpkg.json b/ports/arrayfire/vcpkg.json index 668cf97e62..6ccec696fd 100644 --- a/ports/arrayfire/vcpkg.json +++ b/ports/arrayfire/vcpkg.json @@ -1,7 +1,7 @@ { "name": "arrayfire", "version-semver": "3.8.0", - "port-version": 6, + "port-version": 7, "description": "ArrayFire is a general-purpose library that simplifies the process of developing software that targets parallel and massively-parallel architectures including CPUs, GPUs, and other hardware acceleration devices.", "homepage": "https://github.com/arrayfire/arrayfire", "license": "BSD-3-Clause", diff --git a/versions/a-/arrayfire.json b/versions/a-/arrayfire.json index 5d0fa9fe40..66152cdfd6 100644 --- a/versions/a-/arrayfire.json +++ b/versions/a-/arrayfire.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "985696275cbb76cb02d89d11f8e2490921c09874", + "version-semver": "3.8.0", + "port-version": 7 + }, { "git-tree": "45bae5e28a1c092e6024e21dcc4bab12c4e03440", "version-semver": "3.8.0", diff --git a/versions/baseline.json b/versions/baseline.json index 031717bc38..88e0e6e287 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -242,7 +242,7 @@ }, "arrayfire": { "baseline": "3.8.0", - "port-version": 6 + "port-version": 7 }, "arrow": { "baseline": "17.0.0",