summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorthor <thor@pkgsrc.org>2022-06-29 11:34:47 +0000
committerthor <thor@pkgsrc.org>2022-06-29 11:34:47 +0000
commite5c33c7399abd0a5d15b990afbe1639f3c0c93ec (patch)
tree38c40a7bbbbb47410863414436ea9c6d207b24bd /devel
parent1e1e063b86633353fae1060bdce00cdf5fabe73e (diff)
downloadpkgsrc-e5c33c7399abd0a5d15b990afbe1639f3c0c93ec.tar.gz
devel/cmake: add support for choosing BLAS/LAPACK .pc
This adds already upstreamed patches to FindBLAS.cmake and FindLAPACK.cmake that enables our build infrastructure to better select which BLAS package to locate in cmake-using builds via specifying a name for pkg-config instead of hardcoded 'blas' or 'lapack'. Remove with cmake-3.25.
Diffstat (limited to 'devel')
-rw-r--r--devel/cmake/Makefile3
-rw-r--r--devel/cmake/distinfo4
-rw-r--r--devel/cmake/patches/patch-Modules_FindBLAS.cmake33
-rw-r--r--devel/cmake/patches/patch-Modules_FindLAPACK.cmake34
4 files changed, 72 insertions, 2 deletions
diff --git a/devel/cmake/Makefile b/devel/cmake/Makefile
index 5da2ac2b8a0..e0ef55d7405 100644
--- a/devel/cmake/Makefile
+++ b/devel/cmake/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.192 2022/04/18 11:01:33 adam Exp $
+# $NetBSD: Makefile,v 1.193 2022/06/29 11:34:47 thor Exp $
.include "Makefile.common"
COMMENT= Cross platform make
+PKGREVISION= 1
USE_TOOLS+= gmake
GCC_REQD+= 4.8
diff --git a/devel/cmake/distinfo b/devel/cmake/distinfo
index c1821d78a22..1aff90412a9 100644
--- a/devel/cmake/distinfo
+++ b/devel/cmake/distinfo
@@ -1,12 +1,14 @@
-$NetBSD: distinfo,v 1.195 2022/05/26 08:53:59 adam Exp $
+$NetBSD: distinfo,v 1.196 2022/06/29 11:34:47 thor Exp $
BLAKE2s (cmake-3.23.2.tar.gz) = b44f9a76f3f1e4aa386a4be76174c9d6b7b788106153e8940bb7093893bec458
SHA512 (cmake-3.23.2.tar.gz) = 0925adf973d642fd76d4089b61b3882babb0a85050c4c57d5f5f3bd6b17564a9feb0beed236cd636e25f69072fa30b67ea3f80932380b6b6576f2dd78b8e6931
Size (cmake-3.23.2.tar.gz) = 9987716 bytes
SHA1 (patch-CMakeLists.txt) = 500b8645e7fbfa54dd97555432c453a1b0a57ff3
SHA1 (patch-Modules_Compiler_GNU.cmake) = e091c53ac3f3a6cd811119d3231563df32e76bf9
+SHA1 (patch-Modules_FindBLAS.cmake) = ee73b652fdea0c6c4a5cec37f01b65358c73a1fb
SHA1 (patch-Modules_FindCurses.cmake) = 98cac805a6abafcfb8b61e441b50a1d6aec27ad0
SHA1 (patch-Modules_FindGTK2.cmake) = 51b7520d35fdec2a7bfcf494fe35ce0e3863e4ee
+SHA1 (patch-Modules_FindLAPACK.cmake) = 4ea4b655c3aa649097225f7088efe048e00afec3
SHA1 (patch-Modules_FindPythonInterp.cmake) = d1b39bdcd654f2a4fc63463cd20de656cce3cf8f
SHA1 (patch-Modules_FindPythonLibs.cmake) = b5cedc6a2354beaf08e06d416c150154a7dc1f05
SHA1 (patch-Modules_FindPython_Support.cmake) = aaec7767cad795dd269c851bd110ccefbfc87eb3
diff --git a/devel/cmake/patches/patch-Modules_FindBLAS.cmake b/devel/cmake/patches/patch-Modules_FindBLAS.cmake
new file mode 100644
index 00000000000..d9746ab44d9
--- /dev/null
+++ b/devel/cmake/patches/patch-Modules_FindBLAS.cmake
@@ -0,0 +1,33 @@
+$NetBSD: patch-Modules_FindBLAS.cmake,v 1.1 2022/06/29 11:34:47 thor Exp $
+
+Advance pkg-config usage for BLAS stuff, upstreamed to appear
+in 3.25.
+
+--- Modules/FindBLAS.cmake.orig 2022-05-25 13:42:51.000000000 +0000
++++ Modules/FindBLAS.cmake
+@@ -35,6 +35,12 @@ 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``
++ .. versionadded:: 3.25
++
++ If set, the ``pkg-config`` method will look for this module name instead of
++ just ``blas``.
++
+ ``BLA_SIZEOF_INTEGER``
+ .. versionadded:: 3.22
+
+@@ -273,8 +279,11 @@ endif()
+ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+
+ 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}")
diff --git a/devel/cmake/patches/patch-Modules_FindLAPACK.cmake b/devel/cmake/patches/patch-Modules_FindLAPACK.cmake
new file mode 100644
index 00000000000..a1dd2951fae
--- /dev/null
+++ b/devel/cmake/patches/patch-Modules_FindLAPACK.cmake
@@ -0,0 +1,34 @@
+$NetBSD: patch-Modules_FindLAPACK.cmake,v 1.1 2022/06/29 11:34:47 thor Exp $
+
+Advance pkg-config usage for BLAS stuff, upstreamed to appear
+in 3.25.
+
+--- Modules/FindLAPACK.cmake.orig 2022-05-25 13:42:51.000000000 +0000
++++ Modules/FindLAPACK.cmake
+@@ -35,6 +35,13 @@ 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``
++ .. versionadded:: 3.25
++
++ If set, the ``pkg-config`` method will look for this module name instead of
++ just ``lapack``.
++
++
+ ``BLA_SIZEOF_INTEGER``
+ .. versionadded:: 3.22
+
+@@ -278,8 +285,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}")