From 0399e7964ad8e31b8e36c3f84f4108dee221f95d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Tue, 13 Sep 2022 23:33:28 +0000 Subject: [PATCH] [arrayfire] Fix feature opencl dependency clFFT (#26773) * [arrayfire] Fix feature opencl dependency clFFT * version * Add homepage and license * version --- ports/arrayfire/fix-dependency-clfft.patch | 14 ++++++++++++++ ports/arrayfire/portfile.cmake | 11 +++++++---- ports/arrayfire/vcpkg.json | 4 ++++ versions/a-/arrayfire.json | 5 +++++ versions/baseline.json | 2 +- 5 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 ports/arrayfire/fix-dependency-clfft.patch diff --git a/ports/arrayfire/fix-dependency-clfft.patch b/ports/arrayfire/fix-dependency-clfft.patch new file mode 100644 index 0000000000..8072746e3c --- /dev/null +++ b/ports/arrayfire/fix-dependency-clfft.patch @@ -0,0 +1,14 @@ +diff --git a/src/backend/opencl/CMakeLists.txt b/src/backend/opencl/CMakeLists.txt +index f970da0..b543433 100644 +--- a/src/backend/opencl/CMakeLists.txt ++++ b/src/backend/opencl/CMakeLists.txt +@@ -12,7 +12,8 @@ set_property(CACHE AF_OPENCL_BLAS_LIBRARY PROPERTY STRINGS "clBLAS" "CLBlast") + + af_deprecate(OPENCL_BLAS_LIBRARY AF_OPENCL_BLAS_LIBRARY) + +-include(build_clFFT) ++find_package(clFFT CONFIG REQUIRED) ++add_library(clFFT::clFFT ALIAS clFFT) + + file(GLOB kernel_src kernel/*.cl kernel/KParam.hpp) + diff --git a/ports/arrayfire/portfile.cmake b/ports/arrayfire/portfile.cmake index 29322df6c3..ee6fab1d8c 100644 --- a/ports/arrayfire/portfile.cmake +++ b/ports/arrayfire/portfile.cmake @@ -7,7 +7,8 @@ vcpkg_from_github( PATCHES build.patch Fix-constexpr-error-with-vs2019-with-half.patch - ) + fix-dependency-clfft.patch +) # arrayfire cpu thread lib needed as a submodule for the CPU backend vcpkg_from_github( @@ -16,7 +17,7 @@ vcpkg_from_github( REF b666773940269179f19ef11c8f1eb77005e85d9a SHA512 b3e8b54acf3a588b1f821c2774d5da2d8f8441962c6d99808d513f7117278b9066eb050b8b501bddbd3882e68eb5cc5da0b2fca54e15ab1923fe068a3fe834f5 HEAD_REF master - ) +) # Get forge. We only need headers and aren't actually linking. # We don't want to use the vcpkg dependency since it is broken in many @@ -45,7 +46,7 @@ set(AF_DEFAULT_VCPKG_CMAKE_FLAGS -DAF_FORGE_PATH=${FORGE_PATH} # forge headers for building the graphics lib -DAF_BUILD_FORGE=OFF -DAF_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/share/${PORT} # for CMake configs/targets - ) +) # bin/dll directory for Windows non-static builds for the unified backend dll if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -73,7 +74,9 @@ vcpkg_cmake_configure( OPTIONS ${AF_DEFAULT_VCPKG_CMAKE_FLAGS} ${AF_BACKEND_FEATURE_OPTIONS} - ) + MAYBE_UNUSED_VARIABLES + AF_CPU_THREAD_PATH +) vcpkg_cmake_install() vcpkg_copy_pdbs() diff --git a/ports/arrayfire/vcpkg.json b/ports/arrayfire/vcpkg.json index 91a39717c7..886bd8ffae 100644 --- a/ports/arrayfire/vcpkg.json +++ b/ports/arrayfire/vcpkg.json @@ -1,7 +1,10 @@ { "name": "arrayfire", "version-semver": "3.8.0", + "port-version": 1, "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", "supports": "x64", "dependencies": [ "boost-compute", @@ -39,6 +42,7 @@ "opencl": { "description": "ArrayFire OpenCL backend", "dependencies": [ + "clfft", "opencl" ] }, diff --git a/versions/a-/arrayfire.json b/versions/a-/arrayfire.json index 59f07bb591..e1b20d7239 100644 --- a/versions/a-/arrayfire.json +++ b/versions/a-/arrayfire.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "137eb0d15f469e75ad3255cf1de871d83b3dff49", + "version-semver": "3.8.0", + "port-version": 1 + }, { "git-tree": "e6c5e8b4e1c52380ebd2050683a185c44a2dbae4", "version-semver": "3.8.0", diff --git a/versions/baseline.json b/versions/baseline.json index 691a135028..1e6216b1ef 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -182,7 +182,7 @@ }, "arrayfire": { "baseline": "3.8.0", - "port-version": 0 + "port-version": 1 }, "arrow": { "baseline": "9.0.0",