pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/cmake devel/cmake: add support for choosing BLAS...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0b63771bd573
branches:  trunk
changeset: 381132:0b63771bd573
user:      thor <thor%pkgsrc.org@localhost>
date:      Wed Jun 29 11:34:47 2022 +0000

description:
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:

 devel/cmake/Makefile                               |   3 +-
 devel/cmake/distinfo                               |   4 +-
 devel/cmake/patches/patch-Modules_FindBLAS.cmake   |  33 +++++++++++++++++++++
 devel/cmake/patches/patch-Modules_FindLAPACK.cmake |  34 ++++++++++++++++++++++
 4 files changed, 72 insertions(+), 2 deletions(-)

diffs (108 lines):

diff -r 5cc999d5ae8a -r 0b63771bd573 devel/cmake/Makefile
--- a/devel/cmake/Makefile      Wed Jun 29 11:31:54 2022 +0000
+++ b/devel/cmake/Makefile      Wed Jun 29 11:34:47 2022 +0000
@@ -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 -r 5cc999d5ae8a -r 0b63771bd573 devel/cmake/distinfo
--- a/devel/cmake/distinfo      Wed Jun 29 11:31:54 2022 +0000
+++ b/devel/cmake/distinfo      Wed Jun 29 11:34:47 2022 +0000
@@ -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 -r 5cc999d5ae8a -r 0b63771bd573 devel/cmake/patches/patch-Modules_FindBLAS.cmake
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/cmake/patches/patch-Modules_FindBLAS.cmake  Wed Jun 29 11:34:47 2022 +0000
@@ -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 -r 5cc999d5ae8a -r 0b63771bd573 devel/cmake/patches/patch-Modules_FindLAPACK.cmake
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/cmake/patches/patch-Modules_FindLAPACK.cmake        Wed Jun 29 11:34:47 2022 +0000
@@ -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}")



Home | Main Index | Thread Index | Old Index