Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cmake/Makefile,v
retrieving revision 1.182
diff -u -r1.182 Makefile
--- devel/cmake/Makefile	30 Apr 2021 06:45:13 -0000	1.182
+++ devel/cmake/Makefile	12 Jul 2021 21:53:35 -0000
@@ -3,6 +3,7 @@
 .include "Makefile.common"
 
 COMMENT=	Cross platform make
+PKGREVISION=	1
 
 USE_TOOLS+=		gmake
 GCC_REQD+=		4.8
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cmake/distinfo,v
retrieving revision 1.180
diff -u -r1.180 distinfo
--- devel/cmake/distinfo	24 Jun 2021 09:30:55 -0000	1.180
+++ devel/cmake/distinfo	12 Jul 2021 21:53:35 -0000
@@ -6,8 +6,10 @@
 Size (cmake-3.20.5.tar.gz) = 9441947 bytes
 SHA1 (patch-CMakeLists.txt) = fabdb0590f4b97c34c2242749ae3b6af18aefc0a
 SHA1 (patch-Modules_Compiler_GNU.cmake) = e091c53ac3f3a6cd811119d3231563df32e76bf9
+SHA1 (patch-Modules_FindBLAS.cmake) = 190023bd3de4889691ecd2ad5f2a0c3d4a636eea
 SHA1 (patch-Modules_FindCurses.cmake) = 98cac805a6abafcfb8b61e441b50a1d6aec27ad0
 SHA1 (patch-Modules_FindGTK2.cmake) = 51b7520d35fdec2a7bfcf494fe35ce0e3863e4ee
+SHA1 (patch-Modules_FindLAPACK.cmake) = 2a6365db1d3dd639071585423030e60b44bddb5e
 SHA1 (patch-Modules_FindPythonInterp.cmake) = d1b39bdcd654f2a4fc63463cd20de656cce3cf8f
 SHA1 (patch-Modules_FindPythonLibs.cmake) = b5cedc6a2354beaf08e06d416c150154a7dc1f05
 SHA1 (patch-Modules_FindPython_Support.cmake) = 24ac481659fa3d5306e0e00b05c2be083a2a9906
Index: patches/patch-Modules_FindBLAS.cmake
===================================================================
RCS file: patches/patch-Modules_FindBLAS.cmake
diff -N patches/patch-Modules_FindBLAS.cmake
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ devel/cmake/patches/patch-Modules_FindBLAS.cmake	12 Jul 2021 21:53:35 -0000
@@ -0,0 +1,31 @@
+$NetBSD$
+
+Add BLA_PKGCONFIG_BLAS to select the actual pkg-config package name
+for BLAS (in our case: blas, openblas, openblas_openmp, ...).
+
+--- Modules/FindBLAS.cmake.orig	2021-07-02 19:32:38.111965562 +0000
++++ Modules/FindBLAS.cmake
+@@ -88,6 +88,10 @@ The following variables may be set to in
+   if set ``pkg-config`` will be used to search for a BLAS library first
+   and if one is found that is preferred
+ 
++``BLA_PKGCONFIG_BLAS``
++  If set, the ``pkg-config`` method will look for this module name instead of
++  just ``blas``.
++
+ Imported targets
+ ^^^^^^^^^^^^^^^^
+ 
+@@ -174,8 +178,11 @@ cmake_push_check_state()
+ set(CMAKE_REQUIRED_QUIET ${BLAS_FIND_QUIETLY})
+ 
+ if(BLA_PREFER_PKGCONFIG)
++  if(NOT BLA_PKGCONFIG_BLAS)
++    set(BLA_PKGCONFIG_BLAS "blas")
++  endif()
+   find_package(PkgConfig)
+-  pkg_check_modules(PKGC_BLAS blas)
++  pkg_check_modules(PKGC_BLAS ${BLA_PKGCONFIG_BLAS})
+   if(PKGC_BLAS_FOUND)
+     set(BLAS_FOUND ${PKGC_BLAS_FOUND})
+     set(BLAS_LIBRARIES "${PKGC_BLAS_LINK_LIBRARIES}")
Index: patches/patch-Modules_FindLAPACK.cmake
===================================================================
RCS file: patches/patch-Modules_FindLAPACK.cmake
diff -N patches/patch-Modules_FindLAPACK.cmake
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ devel/cmake/patches/patch-Modules_FindLAPACK.cmake	12 Jul 2021 21:53:35 -0000
@@ -0,0 +1,31 @@
+$NetBSD$
+
+Add BLA_PKGCONFIG_LAPACK to select the actual pkg-config package name 
+for LAPACK (in our case: lapack, openblas, openblas_openmp, ...).
+
+--- Modules/FindLAPACK.cmake.orig	2021-07-02 19:40:33.974993369 +0000
++++ Modules/FindLAPACK.cmake
+@@ -78,6 +78,10 @@ The following variables may be set to in
+   if set ``pkg-config`` will be used to search for a LAPACK library first
+   and if one is found that is preferred
+ 
++``BLA_PKGCONFIG_LAPACK``
++  If set, the ``pkg-config`` method will look for this module name instead of
++  just ``lapack``.
++
+ Imported targets
+ ^^^^^^^^^^^^^^^^
+ 
+@@ -293,8 +297,11 @@ endif()
+ 
+ # Search with pkg-config if specified
+ if(BLA_PREFER_PKGCONFIG)
++  if(NOT BLA_PKGCONFIG_LAPACK)
++    set(BLA_PKGCONFIG_LAPACK "lapack")
++  endif()
+   find_package(PkgConfig)
+-  pkg_check_modules(PKGC_LAPACK lapack)
++  pkg_check_modules(PKGC_LAPACK ${BLA_PKGCONFIG_LAPACK})
+   if(PKGC_LAPACK_FOUND)
+     set(LAPACK_FOUND TRUE)
+     set(LAPACK_LIBRARIES "${PKGC_LAPACK_LINK_LIBRARIES}")
