From ce91faf83e55a386ce6d767fc7d39a4574add9af Mon Sep 17 00:00:00 2001 From: Ilya Arzhannikov Date: Mon, 26 Jul 2021 02:26:55 +0200 Subject: [openblas] update to 0.3.15 version and add dynamic arch feature (#15238) * [openblas] dynamic arch feature * remove debug output * Update ports/openblas/CONTROL Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * update version to 0.3.13 * osx build * fix CONTROL, add FEATURES keyword to vcpkg_check_features * x-add-version * bump openblas version to 0.3.14 * ./vcpkg x-add-version openblas * apply format.diff from ci * ./vcpkg x-add-version openblas --overwrite-version * Update versions/o-/openblas.json Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * update port to version 0.3.15 * ./vcpkg x-add-version openblas * vcpkg_check_linkage * ./vcpkg x-add-version openblas --overwrite-version * ./vcpkg x-add-version openblas --overwrite-version * Update versions/o-/openblas.json Co-authored-by: Ilya Arzhannikov Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III Co-authored-by: NancyLi1013 --- ports/openblas/fix-pkg-config.patch | 19 ------------------- ports/openblas/portfile.cmake | 20 ++++++++++++++++---- ports/openblas/vcpkg.json | 13 +++++++++---- versions/baseline.json | 4 ++-- versions/o-/openblas.json | 5 +++++ 5 files changed, 32 insertions(+), 29 deletions(-) delete mode 100644 ports/openblas/fix-pkg-config.patch diff --git a/ports/openblas/fix-pkg-config.patch b/ports/openblas/fix-pkg-config.patch deleted file mode 100644 index 9ed84d1bb..000000000 --- a/ports/openblas/fix-pkg-config.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c324e224..4b82d767 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -389,11 +389,9 @@ if(NOT NO_LAPACKE) - install (FILES ${CMAKE_BINARY_DIR}/lapacke_mangling.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openblas${SUFFIX64}) - endif() - --include(FindPkgConfig QUIET) --if(PKG_CONFIG_FOUND) -- configure_file(${PROJECT_SOURCE_DIR}/cmake/openblas.pc.in ${PROJECT_BINARY_DIR}/openblas${SUFFIX64}.pc @ONLY) -- install (FILES ${PROJECT_BINARY_DIR}/openblas${SUFFIX64}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/) --endif() -+# Install pkg-config files -+configure_file(${PROJECT_SOURCE_DIR}/cmake/openblas.pc.in ${PROJECT_BINARY_DIR}/openblas${SUFFIX64}.pc @ONLY) -+install (FILES ${PROJECT_BINARY_DIR}/openblas${SUFFIX64}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/) - - - # GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share". diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index 262101692..cec9cf2a9 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -1,14 +1,13 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xianyi/OpenBLAS - REF 63b03efc2af332c88b86d4fd8079d00f4b439adf # v0.3.10 - SHA512 269852348e042fe32d0d400d5e6f4cf758024389d3966a9b1bc217061d4a03b3a7003a399212130ec4e783f1e1e5b423eb531e6e0948485b5d5ac9fdc58982cb + REF 904f9a267dddb30e9f187e57231ed160ab2f2704 # v0.3.15 + SHA512 ddb1eba7b0def08483d7610675335648017eff41de3cbe24357bd15c6938c7997f12c449f32d8225abbb5ef8f7a2e7501320ec05e970e8ddf8e4c25fd81e8002 HEAD_REF develop PATCHES uwp.patch fix-space-path.patch fix-redefinition-function.patch - fix-pkg-config.patch fix-uwp-build.patch fix-marco-conflict.patch ) @@ -34,6 +33,18 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS set(COMMON_OPTIONS -DBUILD_WITHOUT_LAPACK=ON) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "dynamic-arch" DYNAMIC_ARCH +) + +if(VCPKG_TARGET_IS_OSX) + if("dynamic-arch" IN_LIST FEATURES) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + message(STATUS "Openblas with \"dynamic-arch\" option for OSX supports only dynamic linkage. It's not a bag of openblas but bug of combination cmake+ninja+osx. See: https://gitlab.kitware.com/cmake/cmake/-/issues/16731") + endif() +endif() + # for UWP version, must build non uwp first for helper # binaries. if(VCPKG_TARGET_IS_UWP) @@ -77,6 +88,7 @@ elseif(VCPKG_TARGET_IS_WINDOWS) SOURCE_PATH ${SOURCE_PATH} OPTIONS ${COMMON_OPTIONS} + ${FEATURE_OPTIONS} ) else() string(APPEND VCPKG_C_FLAGS " -DNEEDBUNDERSCORE") # Required to get common BLASFUNC to append extra _ @@ -85,7 +97,7 @@ else() SOURCE_PATH ${SOURCE_PATH} OPTIONS ${COMMON_OPTIONS} - -DCMAKE_SYSTEM_PROCESSOR=AMD64 + ${FEATURE_OPTIONS} -DNOFORTRAN=ON -DBU=_ #required for all blas functions to append extra _ using NAME ) diff --git a/ports/openblas/vcpkg.json b/ports/openblas/vcpkg.json index 8315910a3..e0206c35c 100644 --- a/ports/openblas/vcpkg.json +++ b/ports/openblas/vcpkg.json @@ -1,13 +1,18 @@ { "name": "openblas", - "version": "0.3.10", - "port-version": 3, + "version": "0.3.15", "description": "OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.", "homepage": "https://github.com/xianyi/OpenBLAS", - "default-features": [ - "threads" + "dependencies": [ + { + "name": "pthread", + "platform": "!windows & !uwp" + } ], "features": { + "dynamic-arch": { + "description": "Support for multiple targets in a single library" + }, "simplethread": { "description": "Use simple thread", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index a6c414174..4268212cb 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4549,8 +4549,8 @@ "port-version": 0 }, "openblas": { - "baseline": "0.3.10", - "port-version": 3 + "baseline": "0.3.15", + "port-version": 0 }, "opencascade": { "baseline": "7.5.0", diff --git a/versions/o-/openblas.json b/versions/o-/openblas.json index 5b2fde684..b7a541443 100644 --- a/versions/o-/openblas.json +++ b/versions/o-/openblas.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2a214e1bac47c70d932caef7d74771c8658b1f7a", + "version": "0.3.15", + "port-version": 0 + }, { "git-tree": "20d57360e6e7afa4e4f033a87e1ded91571ee462", "version": "0.3.10", -- cgit v1.2.3