head 1.8; access; symbols pkgsrc-2026Q2:1.8.0.4 pkgsrc-2026Q2-base:1.8 pkgsrc-2026Q1:1.8.0.2 pkgsrc-2026Q1-base:1.8 pkgsrc-2025Q4:1.7.0.8 pkgsrc-2025Q4-base:1.7 pkgsrc-2025Q3:1.7.0.6 pkgsrc-2025Q3-base:1.7 pkgsrc-2025Q2:1.7.0.4 pkgsrc-2025Q2-base:1.7 pkgsrc-2025Q1:1.7.0.2 pkgsrc-2025Q1-base:1.7 pkgsrc-2023Q4:1.5.0.18 pkgsrc-2023Q4-base:1.5 pkgsrc-2023Q3:1.5.0.16 pkgsrc-2023Q3-base:1.5 pkgsrc-2023Q2:1.5.0.14 pkgsrc-2023Q2-base:1.5 pkgsrc-2023Q1:1.5.0.12 pkgsrc-2023Q1-base:1.5 pkgsrc-2022Q4:1.5.0.10 pkgsrc-2022Q4-base:1.5 pkgsrc-2022Q3:1.5.0.8 pkgsrc-2022Q3-base:1.5 pkgsrc-2022Q2:1.5.0.6 pkgsrc-2022Q2-base:1.5 pkgsrc-2022Q1:1.5.0.4 pkgsrc-2022Q1-base:1.5 pkgsrc-2021Q4:1.5.0.2 pkgsrc-2021Q4-base:1.5 pkgsrc-2021Q3:1.4.0.4 pkgsrc-2021Q3-base:1.4 pkgsrc-2021Q2:1.4.0.2 pkgsrc-2021Q2-base:1.4 pkgsrc-2021Q1:1.1.0.4 pkgsrc-2021Q1-base:1.1 pkgsrc-2020Q4:1.1.0.2 pkgsrc-2020Q4-base:1.1; locks; strict; comment @# @; 1.8 date 2026.02.28.08.38.00; author thor; state Exp; branches; next 1.7; commitid ckrw2OjX5JXTw7wG; 1.7 date 2025.01.14.11.41.00; author wiz; state Exp; branches; next 1.6; commitid hdmXSPvowFD8JrFF; 1.6 date 2024.01.08.21.28.56; author thor; state dead; branches; next 1.5; commitid UcZYpOaZlI72VGTE; 1.5 date 2021.11.23.22.45.01; author wiz; state Exp; branches; next 1.4; commitid BNUlPTBg6WYJiYhD; 1.4 date 2021.05.17.11.31.29; author thor; state Exp; branches; next 1.3; commitid Gb4fsA00Kxr5GuTC; 1.3 date 2021.05.13.07.52.05; author thor; state Exp; branches; next 1.2; commitid pzUa9aqJ3KUPAXSC; 1.2 date 2021.05.12.14.32.51; author thor; state Exp; branches; next 1.1; commitid 0g7m2JyqBB6nQRSC; 1.1 date 2020.10.12.21.51.57; author bacon; state Exp; branches; next ; commitid 568C66J21E1N0FrC; desc @@ 1.8 log @lapack and derived packages: update to 3.12.1 What’s Changed Enables Fortran before including CheckFortranFunctionExists in CMakeL… by @@weslleyspereira in 948 Fixes for the NAG Fortran compiler by @@ACSimon33 inhttps://github.com/Reference-LAPACK/lapack/pull/951[951] Fixed HAS_ATTRIBUTE_WEAK_SUPPORT flag for CBLAS objects by @@ACSimon33 in 950 Fixed memory leak in testing framework by @@ACSimon33 in 953 Fixed search phrase for determining the amount of successful tests by @@ACSimon33 in 954 handle and document corner cases of lwork in lapack by @@dklyuchinskiy in 942 fix some DMD issues by @@dklyuchinskiy in 959 Remove executable permissions from source files by @@turboencabulator in 970 CMake: restore compatibility with v3.10 and older by @@christoph-conrads in 976 Re-sync Doxyfile with CMake by @@turboencabulator in 978 Fix Doxygen warnings by @@turboencabulator in 979 {C,Z}LARFGP: re-scale input vector more often by @@christoph-conrads in 981 Typo by @@FrK5E in 984 Add Index-64 API as extended API with _64 suffix for LAPACKE by @@mkrainiuk in 888 Two small fixes of bdsqr by @@angsch in 989 xGEDMD(Q): silence warning with 64-bit integers by @@christoph-conrads in 993 xSY/HEEVR: clarify use of multiple algorithms by @@christoph-conrads inhttps://github.com/Reference-LAPACK/lapack/pull/998[998] fix comments by @@jip in 1004 fix comments by @@jip in 1007 #1008 Allow installing binaries to subdirectory while keeping CMake package scripts in the same place by @@lepus2589 in 1009 fix LARFB documentation, #1011 by @@EduardFedorenkov in 1016 fix out-of-bounds access in orhr_col by @@mgates3 in 1018 Allow User Configuration of RPATH Settings by @@ahnaf-tahmid-chowdhury in 1002 changing the order of loop to improve performance by @@Goddan-wq in 1023 Use more modern CMake by @@ACSimon33 in 1022 Fix infinite loop when an error occurs in tests ddrvst and sdrvst by @@cenewcombe in 1024 Configurable type of hidden Fortran strlen arguments by @@ACSimon33 in 1025 develop DLARF1F and implement in ORM2R, #1011 by @@EduardFedorenkov in 1019 Fix the wrong implementation of the new tests for xblat1.f by @@cdluminate in 964 Implementation of dorm2r and dlarf1f by @@jprhyne in 1020 Fix lto type mismatch by @@ACSimon33 in 1027 Fix NAG Fortran compiler flag by @@ACSimon33 in 1028 align documentation of BDSQR workspace with code by @@dklyuchinskiy in 1029 Fixed usage of uninitialized variables in TESTING by @@ACSimon33 in 961 fix few typos and sytrd boundary workspace by @@dklyuchinskiy in 1030 Implement xGEMMTR and cblas_xGEMMTR by @@grisuthedragon in 887 Prevent compilers from using FMA instructions by @@ACSimon33 in 1033 Clarify documentation of singularity/rank-deficiency checks by @@TiborGY in 924 PR contains bug fixes found in ?tfsm (triangular solve for a RFP matrix) by @@sergey-v-kuznetsov in 1042 Remove CMake < 3 CMP0042 workarounds by @@haampie in 1040 Declare project dependency on C to avoid the CMAKE default of C,C++ by @@martin-frbg in 1044 DOC:trsly3: Add dtrsyl3/strsyl3 grouping statements by @@ilayn in 1051 Add a few forgotten API_SUFFIX wrappers in the recently changed LAPACKE ?TFSM by @@martin-frbg in 1046 Revert "Add a few forgotten API_SUFFIX wrappers in the recently changed LAPACKE ?TFSM" by @@langou in 1058 Revert "Revert "Add a few forgotten API_SUFFIX wrappers in the recently changed LAPACKE ?TFSM"" by @@weslleyspereira in 1059 CI: Update the MacOS jobs to use gcc-14 in github workflows by @@martin-frbg in 1045 fix leading dimension for matrix B in test routine get52 by @@dklyuchinskiy in 1064 Remove comparison as these conditions are never true by @@schnorr in 1062 Use GEMMTR for SY/HE linear updates by @@angsch in 1069 [Github workflow] Bump scorecard version by @@angsch in 1071 updating gitignore to ignore the mod files when we compile by @@jprhyne in 1082 Fixing misspelling of triangular in {s,d,c,z}gemmtr.f by @@jprhyne in 1081 Fix line lengths for the extended API by @@hjjvandam in 1079 Adding a recursive xLARFT by @@jprhyne in 1080 @ text @$NetBSD: patch-CMakeLists.txt,v 1.7 2025/01/14 11:41:00 wiz Exp $ A changeset that I pushed upstream in a PR, to enable separate libblas build, un-break standalone CBLAS build with included BLAS, not unconditionally require unnecessary C++ compiler. Also, they forgot to increment the patch version for the release ... See: https://github.com/Reference-LAPACK/lapack/pull/972 --- CMakeLists.txt.orig 2024-12-03 11:39:11.000000000 +0000 +++ CMakeLists.txt @@@@ -4,7 +4,7 @@@@ project(LAPACK C) set(LAPACK_MAJOR_VERSION 3) set(LAPACK_MINOR_VERSION 12) -set(LAPACK_PATCH_VERSION 0) +set(LAPACK_PATCH_VERSION 1) set( LAPACK_VERSION ${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION} @@@@ -246,9 +246,15 @@@@ endif() # Neither user specified or optimized BLAS libraries can be used if(NOT BLAS_FOUND) + # Workaround to enable build of CBLAS with BLAS but without LAPACK. + # There should a cleaner way for sure. --ThOr message(STATUS "Using supplied NETLIB BLAS implementation") + set(LAPACK_INSTALL_EXPORT_NAME_CACHE ${LAPACK_INSTALL_EXPORT_NAME}) + set(LAPACK_INSTALL_EXPORT_NAME ${BLASLIB}-targets) add_subdirectory(BLAS) set(BLAS_LIBRARIES ${BLASLIB}) + set(LAPACK_INSTALL_EXPORT_NAME ${LAPACK_INSTALL_EXPORT_NAME_CACHE}) + unset(LAPACK_INSTALL_EXPORT_NAME_CACHE) else() add_link_options(${BLAS_LINKER_FLAGS}) endif() @@@@ -272,6 +278,10 @@@@ endif() option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library instead of included netlib LAPACK" OFF) +option(LAPACK "Whether to build or use LAPACK (to enable a BLAS-only build)" ON) + +if(LAPACK) + # -------------------------------------------------- # LAPACK # User did not provide a LAPACK Library but specified to search for one @@@@ -335,6 +345,8 @@@@ else() add_link_options(${LAPACK_LINKER_FLAGS}) endif() +endif() + if(BUILD_TESTING) add_subdirectory(TESTING) endif() @@@@ -400,6 +412,7 @@@@ function(_display_cpp_implementation_msg message(STATUS "----------------") endfunction() if (BLAS++) + enable_language(CXX) _display_cpp_implementation_msg("BLAS") include(ExternalProject) ExternalProject_Add(blaspp @@@@ -411,6 +424,7 @@@@ if (BLAS++) ExternalProject_Add_StepDependencies(blaspp build ${BLAS_LIBRARIES}) endif() if (LAPACK++) + enable_language(CXX) message (STATUS "linking lapack++ against ${LAPACK_LIBRARIES}") _display_cpp_implementation_msg("LAPACK") include(ExternalProject) @@@@ -469,10 +483,14 @@@@ if(NOT BLAS_FOUND) set(ALL_TARGETS ${ALL_TARGETS} ${BLASLIB}) endif() +if(LAPACK) if(NOT LATESTLAPACK_FOUND) set(ALL_TARGETS ${ALL_TARGETS} ${LAPACKLIB}) + set(BUILD_LAPACK ON) +endif() endif() +if(LAPACK) # Export lapack targets, not including lapacke, from the # install tree, if any. set(_lapack_config_install_guard_target "") @@@@ -486,6 +504,7 @@@@ if(ALL_TARGETS) # lapack-config.cmake to load targets from the install tree. list(GET ALL_TARGETS 0 _lapack_config_install_guard_target) endif() +endif() # Include cblas in targets exported from the build tree. if(CBLAS) @@@@ -501,6 +520,8 @@@@ if(NOT LAPACK_WITH_TMGLIB_FOUND AND LAPA set(ALL_TARGETS ${ALL_TARGETS} ${TMGLIB}) endif() +if(BUILD_LAPACK) + # Export lapack and lapacke targets from the build tree, if any. set(_lapack_config_build_guard_target "") if(ALL_TARGETS) @@@@ -538,6 +559,9 @@@@ install(FILES DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LAPACKLIB}-${LAPACK_VERSION} COMPONENT Development ) + +endif() # BUILD_LAPACK + if (LAPACK++) install( DIRECTORY "${LAPACK_BINARY_DIR}/lib/" @@@@ -549,6 +573,7 @@@@ if (LAPACK++) DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" FILES_MATCHING REGEX "\\.(h|hh)$" ) + include(CMakePackageConfigHelpers) write_basic_package_version_file( "lapackppConfigVersion.cmake" VERSION 2020.10.02 @@@@ -562,6 +587,7 @@@@ if (LAPACK++) endif() if (BLAS++) + include(CMakePackageConfigHelpers) write_basic_package_version_file( "blasppConfigVersion.cmake" VERSION 2020.10.02 @ 1.7 log @lapack: standardize patches to make updates easier Clean some pkglint while here. @ text @d1 1 a1 1 $NetBSD$ d7 2 d11 1 a11 1 --- CMakeLists.txt.orig 2023-11-24 20:41:15.000000000 +0000 d13 1 a13 5 @@@@ -1,6 +1,6 @@@@ cmake_minimum_required(VERSION 3.6) -project(LAPACK) +project(LAPACK Fortran C) d17 7 a23 1 @@@@ -244,8 +244,12 @@@@ endif() d26 2 d36 3 a38 3 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${BLAS_LINKER_FLAGS}" @@@@ -277,6 +281,10 @@@@ endif() d42 1 a42 1 +option(LAPACK "Whether to build or use LAPACK (to enable a BLAS-only build)") d49 2 a50 2 @@@@ -348,6 +356,8 @@@@ else() CACHE STRING "Linker flags for shared libs" FORCE) d58 1 a58 1 @@@@ -413,6 +423,7 @@@@ function(_display_cpp_implementation_msg d66 1 a66 1 @@@@ -424,6 +435,7 @@@@ if (BLAS++) d74 1 a74 1 @@@@ -482,10 +494,14 @@@@ if(NOT BLAS_FOUND) d89 1 a89 1 @@@@ -499,6 +515,7 @@@@ if(ALL_TARGETS) d97 1 a97 1 @@@@ -514,6 +531,8 @@@@ if(NOT LAPACK_WITH_TMGLIB_FOUND AND LAPA d106 1 a106 1 @@@@ -551,6 +570,9 @@@@ install(FILES d116 1 a116 1 @@@@ -562,6 +584,7 @@@@ if (LAPACK++) d124 1 a124 1 @@@@ -575,6 +598,7 @@@@ if (LAPACK++) @ 1.6 log @math/{lapack*,cblas*}: update netlib BLAS to 3.12.0 This drops the static libraries along with the custom patches for those. Also, the hack of linking CBLAS as Fortran library as opposed to C is gone. If this breaks some NetBSD install, it should be investigated and fixed properly. The only patch now is one unified one I already submitted for inclusion upstream. Maybe soon we can drop any patches. Yay! Here is a list of upstream changes: LAPACK 3.12.0: What’s new Download: lapack-3.12.0.tar.gz This is a major release and also addressing multiple bug fixes. Dynamic Mode Decomposition (DMD) xGEDMD computes the Dynamic Mode Decomposition (DMD) for a pair of data snapshot matrices. For the input matrices X and Y such that Y = A*X with an inaccessible matrix A, xGEDMD computes a certain number of Ritz pairs of A using the standard Rayleigh-Ritz extraction from a subspace of range(X) that is determined using the leading left singular vectors of X. Optionally, xGEDMD returns the residuals of the computed Ritz pairs, the information needed for a refinement of the Ritz vectors, or the eigenvectors of the Exact DMD. xGEDMDQ does the same as xGEDMD but uses a QR factorization based compression of the data. See: Z. Drmac: A LAPACK implementation of the Dynamic Mode Decomposition I. Technical report. AIMDyn Inc. and LAPACK Working Note 298. Developed and coded by Zlatko Drmac, Faculty of Science, University of Zagreb. In cooperation with AIMdyn Inc., Santa Barbara, CA. And supported by (1) DARPA SBIR project "Koopman Operator-Based Forecasting for Nonstationary Processes from Near-Term, Limited Observational Data", Contract No: W31P4Q-21-C-0007; (2) DARPA PAI project "Physics-Informed Machine Learning Methodologies", Contract No: HR0011-18-9-0033; (3) DARPA MoDyL project "A Data-Driven, Operator-Theoretic Framework for Space-Time Analysis of Process Dynamics", Contract No: HR0011-16-C-0116. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author and do not necessarily reflect the views of the DARPA SBIR Program Office. Distribution Statement A: Approved for Public Release, Distribution Unlimited. Cleared by DARPA on September 29, 2022 Adding Dynamic Mode Decomposition (DMD) into LAPACK by @@dbielich in PR 736 Update C prototypes and LAPACKE interfaces for ?GEDMD/?GEDMDQ by @@martin-frbg in PR 880 Truncated QR with Column Pivoting The routine computes a truncated (rank K) or full rank Householder QR factorization with column pivoting of a real M-by-N matrix A using Level 3 BLAS. The truncation criteria (i.e. when to stop the factorization) can be any of the following: (1) The input parameter KMAX, the maximum number of columns KMAX to factorize; (2) The input parameter ABSTOL, the absolute tolerance for the maximum column 2-norm of the residual matrix R22(K); (3) The input parameter RELTOL, the tolerance for the maximum column 2-norm matrix of the residual matrix R22(K) divided by the maximum column 2-norm of the original matrix A, which is equal to abs(R(1,1)). The algorithm stops when any of these conditions is first satisfied, otherwise the whole matrix A is factorized. Truncated QR with Column Pivoting by @@scr2016 in PR 891 Reciprocal Scaling of complex vectors [C/Z]RSCL multiplies an n-element complex vector x by the complex scalar 1/a. This is done without overflow or underflow as long as the final result x/a does not overflow or underflow. See: "An algorithm for scaling vectors by the reciprocal of a complex number", Weslley da Silva Pereira, [arXiv:2311.05736](https://arxiv.org/abs/2311.05736) Adds CRSCL by @@weslleyspereira in PR 839 Improvements in the 64-bit API Fix CBLAS tests with 64-bit indexing by @@svillemot in PR 767 Add Index-64 API as extended API with _64 suffix for CBLAS by @@mkrainiuk in PR 846 Revert "Add Index-64 API as extended API with _64 suffix for CBLAS" by @@langou in PR 856 Add Index-64 API as extended API with _64 suffix for CBLAS by @@mkrainiuk in PR 867 Create DOCS/CBLAS.md by @@mkrainiuk in PR 863 Reduce number of macros in fortran compilation line for BLAS _64 API by @@mkrainiuk in PR 861 Bug fixes and other changes Windows build fix by @@ACSimon33 in PR 760 Added option to enable flat namespace on macOS by @@ACSimon33 in PR 762 Fix bug in new test case for LAPACK 3.11 SLATRS3 by @@dklyuchinskiy in PR 755 Check for NaNs in *GECON by @@weslleyspereira in PR 765 Fixed bug in array bounds in complex syl01 test by @@dklyuchinskiyin PR 758 Fix uninitialized M when quick return in DLARRD and SLARRD by @@akobotov in PR 769 In LAPACKE tgsen, allocate iwork when ijob = 0. Fixes #772. by @@mgates3 in PR 773 Fix SLATRS3 and CLATRS3 tests by @@bartoldeman in PR 764 Fix uninitialized out variables in LARR functions by @@echeresh in PR 775 Warnings supression in some LAPACKE functions by @@jgpallero in PR 780 Revert "Warnings supression in some LAPACKE functions" by @@langou in PR 781 Warnings supression and deletion of unnecessary check in some LAPACKE xLARFB functions by @@jgpallero in PR 782 remove redundant space from xerbla call sbgv/hbgv by @@dklyuchinskiy in PR 792 don’t subtract N_DEFLATED from istop twice by @@thijssteel in PR 794 fix rfp test for DIAG = U by @@dklyuchinskiy in PR 796 fix bug in complex precision tests (c|z)het21 by @@EduardFedorenkov in PR 798 CMake: Disable TEST_FORTRAN_COMPILER by @@jschueller in PR 761 Fix typos in documentation by @@angsch in PR 750 Add minimum permissions to workflows by @@gabibguti in PR 804 Add numerical tests for trevc3 by @@angsch in PR 682 Remove legacy function LABAD by @@angsch in PR 805 Refactor xGEBAL by @@eprovst in PR 808 Fix typos and errors in comments by @@jip in PR 809 cmake: allow setting a prefix for the library names by @@joseeroman in PR 810 Fix typos in comments by @@jip in PR 811 fix #813 by @@langou in PR 814 Replace the (partially defined) constant index variable INDIBL in ?SBGVX and related by @@martin-frbg in PR 807 CTGEVC, ZTGEVC: fix typo in description of VR argument by @@svillemot in PR 812 Add Security Policy by @@gabibguti in PR 819 typos by @@musvaage in PR 820 extend tests for error exit sysv sytd2 gehd2 by @@dklyuchinskiy in PR 795 CMake: avoid "make" in blas++ and lapack++ by @@nim65s in PR 821 appveyor: output test failures by @@nim65s in PR 822 Reference actions by commit SHA by @@gabibguti in PR 829 LAPACKE interfaces for [cz]unhr_col and [sd]orhr_col by @@sknepper in PR 827 fix segfault problem when executing LAPACKE_*geqrt on row major #766 by @@sbite0138 in PR 768 Adds comment related to zero-sized matrix B in GELSY by @@weslleyspereira in PR 833 update brief descriptions of function purpose, Closes #230 by @@weslleyspereira in PR 831 Fix scaling in (S/D)TGSNA, fix #103, thanks to @@elivanova by @@weslleyspereira in PR 830 Exits xLARUV when N < 1 by @@weslleyspereira in PR 837 Create GitHub action to test CMake build system on Windows by @@weslleyspereira in PR 524 Fix bug in lapacke_[s,d]geesx by @@weslleyspereira in PR 836 Removes unused SMIN from bdsqr by @@weslleyspereira in PR 832 Use a better (more informative) message when we say the compiler intr… by @@weslleyspereira in PR 845 Improve variants of Cholesky and QR by @@angsch in PR 847 fixes #848 by @@jaganmn in PR 849 Attempt to fix Appveyor on Windows by @@angsch in PR 854 fix dlasd0 / slasd0 documentation issue by @@mtowara in PR 855 Remove legacy warning for non IEEE 754 compliant machines by @@angsch in PR 852 Add verbose build to CI by @@mkrainiuk in PR 858 [cz]hetrd_hb2st.F, [sd]sytrd_sb2st.F OpenMP fixes by @@chrwarm in PR 860 new doxygen group structure by @@mgates3 in PR 802 Correct the order of returned eigenvalue and eigenvectors for 2x2 matrices with IL=IU in C/D/S/Z/STEMR by @@aravindh-krishnamoorthy in PR 867 fix nrhs=0 case in ?gelss by @@eaberendeev in PR 876 Fix computation of uplo in LAPACKE_xlarfb by @@vladimir-ch in PR 878 Fix workspace query corner cases by @@angsch in PR 883 Fix actual arguments in some procedure calls by @@mjacobse in PR 885 Improve Cholesky variants by @@angsch in PR 889 Removes usage of Experimental (interactive) mode in ctest by @@weslleyspereira in PR 892 Updates the documentation of xGEMV and xGBMV related to when M=0 and N=0 by @@weslleyspereira in PR 843 Add Scorecard by @@gabibguti in PR 895 Remove auxiliary GEQRS, GELQS by @@angsch in PR 900 CMake config for IntelLLVM (ifx) and NVIDIA HPC SDK (nvfortran) by @@ACSimon33 in PR 898 Fix build for CMake >= 3.27 by @@scivision in PR 910 allow absolute GNU install dirs by @@chayleaf in PR 893 dtgex2: add 2 to iwork length to prevent OOB interaction in Dtgsy2 by @@soypat in PR 907 Adds OpenSSF Scorecard badge by @@weslleyspereira in PR 896 Fix issue #908 related to accumulation in xLASSQ by @@weslleyspereira in PR 909 Apply ROUNDUP_LWORK function in lapack by @@kleineLi in PR 904 Compilation of LAPACKE possibly independent from Fortran by @@weslleyspereira in PR 834 Always use C as linker language for CBLAS by @@weslleyspereira in PR 920 Uses Valgrind for ExperimentalMemCheck in ctest by @@weslleyspereira in PR 844 Adding in quotes in cmake for Intel ifx and linux build by @@colleeneb in PR 922 Fix complex BDSQR maxit by @@pleshkovvli in PR 927 xORBDB6/xUNBDB6: fix a constant by @@christoph-conrads in PR 928 Fixed Fortran preprocessor flag for NAG Fortran compiler by @@ACSimon33 in PR 939 Fixed void main() for AppleClang by @@ACSimon33 in PR 940 @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.5 2021/11/23 22:45:01 wiz Exp $ d3 3 a5 3 Avoid installation of LAPACK CMake and pkg-config files when not installing LAPACK, also allowing explicitly to switch off LAPACK build for BLAS-only packaging. d7 3 a9 1 --- CMakeLists.txt.orig 2021-06-28 16:39:12.000000000 +0000 d11 2 a12 2 @@@@ -157,6 +157,9 @@@@ endif() d14 2 a15 5 # -------------------------------------------------- + +if(LAPACK) + set(LAPACK_INSTALL_EXPORT_NAME ${LAPACKLIB}-targets) d17 16 a32 21 macro(lapack_install_library lib) @@@@ -168,6 +171,18 @@@@ macro(lapack_install_library lib) ) endmacro() +else() + +macro(lapack_install_library lib) + install(TARGETS ${lib} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT RuntimeLibraries + ) +endmacro() + +endif() + set(PKG_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig) # -------------------------------------------------- @@@@ -298,6 +313,10 @@@@ endif() d43 1 a43 1 @@@@ -339,6 +358,8 @@@@ else() d52 17 a68 1 @@@@ -464,10 +485,14 @@@@ if(NOT BLAS_FOUND) d83 1 a83 1 @@@@ -481,6 +506,7 @@@@ if(ALL_TARGETS) d91 1 a91 1 @@@@ -496,6 +522,8 @@@@ if(NOT LAPACK_WITH_TMGLIB_FOUND AND LAPA d100 1 a100 1 @@@@ -533,6 +561,9 @@@@ install(FILES d110 16 @ 1.5 log @lapack: update lapack*, cblas*, and blas* to 3.10.0 This is a major release and also addressing multiple bug fixes. @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.4 2021/05/17 11:31:29 thor Exp $ @ 1.4 log @math/lapack: remove spurious hook from lokal build in CMake patch This added a rather irrelevant local search path and just polluted the patch with a local directory from by builds. @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.3 2021/05/13 07:52:05 thor Exp $ d7 1 a7 1 --- CMakeLists.txt.orig 2021-03-25 18:25:15.000000000 +0000 d9 1 a9 1 @@@@ -160,6 +160,9 @@@@ endif() d19 1 a19 1 @@@@ -171,6 +174,18 @@@@ macro(lapack_install_library lib) d38 1 a38 1 @@@@ -301,6 +316,10 @@@@ endif() d49 1 a49 1 @@@@ -342,6 +361,8 @@@@ else() d58 1 a58 1 @@@@ -450,14 +471,18 @@@@ if(NOT BLAS_FOUND) a68 4 if(BUILD_TESTING OR LAPACKE_WITH_TMG) set(ALL_TARGETS ${ALL_TARGETS} ${TMGLIB}) endif() d73 1 a73 1 @@@@ -471,6 +496,7 @@@@ if(ALL_TARGETS) d81 2 a82 2 @@@@ -482,6 +508,8 @@@@ if(LAPACKE) set(ALL_TARGETS ${ALL_TARGETS} ${LAPACKELIB}) d90 1 a90 1 @@@@ -519,6 +547,9 @@@@ install(FILES @ 1.3 log @cblas: Restore: Fix link to Fortran libraries by using Fortran compiler as linker This was lost on the recent rework of the patches: On NetBSD. In PKGSRC_FORTRAM=gfortran case, libcblas has no RPATH=/usr/pkg/gccXX/lib and libgfortran and libquadmath are not found. In PKGSRC_FORTRAN=g95 case, libcblas has no RPATH=/usr/pkg/lib/gcc-lib/x86_64--netbsd/4.1.2 and libf95 is not found. Use Fortran compiler as linker instread of C compiler to fix link. @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.2 2021/05/12 14:32:51 thor Exp $ a8 9 @@@@ -11,7 +11,7 @@@@ set( ) # Add the CMake directory for custom CMake modules -set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH}) +set (CMAKE_MODULE_PATH "/data/pkgwork/math/lapack/work/.buildlink/cmake-Modules" "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH}) # Export all symbols on Windows when building shared libraries SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) @ 1.2 log @math/lapack, blas, cblas, lapacke: update to version 3.9.1 This includes a rework of the build system patches, which I'll try to push upstream … @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.1 2020/10/12 21:51:57 bacon Exp $ d9 9 @ 1.1 log @math/blas, math/lapack: Install interchangeable BLAS system Install the new interchangeable BLAS system created by Thomas Orgis, currently supporting Netlib BLAS/LAPACK, OpenBLAS, cblas, lapacke, and Apple's Accelerate.framework. This system allows the user to select any BLAS implementation without modifying packages or using package options, by setting PKGSRC_BLAS_TYPES in mk.conf. See mk/blas.buildlink3.mk for details. This commit should not alter behavior of existing packages as the system defaults to Netlib BLAS/LAPACK, which until now has been the only supported implementation. Details: Add new mk/blas.buildlink3.mk for inclusion in dependent packages Install compatible Netlib math/blas and math/lapack packages Update math/blas and math/lapack MAINTAINER approved by adam@@ OpenBLAS, cblas, and lapacke will follow in separate commits Update direct dependents to use mk/blas.buildlink3.mk Perform recursive revbump @ text @d1 1 a1 1 $NetBSD$ d7 3 a9 3 --- CMakeLists.txt.orig 2020-03-03 15:36:43.155560348 +0100 +++ CMakeLists.txt 2020-03-03 15:36:34.827560837 +0100 @@@@ -112,8 +112,10 @@@@ d13 1 a13 2 -set(LAPACK_INSTALL_EXPORT_NAME lapack-targets) d16 2 a17 1 +set(LAPACK_INSTALL_EXPORT_NAME lapack-targets) d19 1 a19 3 install(TARGETS ${lib} EXPORT ${LAPACK_INSTALL_EXPORT_NAME} @@@@ -123,6 +125,18 @@@@ d38 1 a38 1 @@@@ -252,6 +266,10 @@@@ d49 1 a49 1 @@@@ -293,6 +311,8 @@@@ d58 2 a59 2 @@@@ -374,14 +394,18 @@@@ set(ALL_TARGETS ${ALL_TARGETS} blas) d64 1 a64 1 set(ALL_TARGETS ${ALL_TARGETS} lapack) d70 1 a70 1 set(ALL_TARGETS ${ALL_TARGETS} tmglib) d77 1 a77 1 @@@@ -395,6 +419,7 @@@@ d85 2 a86 2 @@@@ -406,6 +431,7 @@@@ set(ALL_TARGETS ${ALL_TARGETS} lapacke) d89 2 a90 1 +if(LAPACK) d94 10 a103 59 @@@@ -415,32 +441,34 @@@@ # for lapack-config.cmake to load targets from the build tree. list(GET ALL_TARGETS 0 _lapack_config_build_guard_target) endif() +endif() -configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-build.cmake.in - ${LAPACK_BINARY_DIR}/lapack-config.cmake @@ONLY) - +if(BUILD_LAPACK) + configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-build.cmake.in + ${LAPACK_BINARY_DIR}/lapack-config.cmake @@ONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc @@ONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc @@ONLY) install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc - DESTINATION ${PKG_CONFIG_DIR} - COMPONENT Development - ) + ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc + DESTINATION ${PKG_CONFIG_DIR} + COMPONENT Development + ) -configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-install.cmake.in - ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake @@ONLY) + configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-install.cmake.in + ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake @@ONLY) -include(CMakePackageConfigHelpers) -write_basic_package_version_file( - ${LAPACK_BINARY_DIR}/lapack-config-version.cmake - VERSION ${LAPACK_VERSION} - COMPATIBILITY SameMajorVersion - ) + include(CMakePackageConfigHelpers) + write_basic_package_version_file( + ${LAPACK_BINARY_DIR}/lapack-config-version.cmake + VERSION ${LAPACK_VERSION} + COMPATIBILITY SameMajorVersion + ) -install(FILES - ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake - ${LAPACK_BINARY_DIR}/lapack-config-version.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION} - COMPONENT Development - ) - \ Kein Zeilenumbruch am Dateiende. + install(FILES + ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake + ${LAPACK_BINARY_DIR}/lapack-config-version.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION} + COMPONENT Development + ) +endif() + @