pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/cmake



Module Name:    pkgsrc
Committed By:   thor
Date:           Wed Jun 29 11:34:47 UTC 2022

Modified Files:
        pkgsrc/devel/cmake: Makefile distinfo
Added Files:
        pkgsrc/devel/cmake/patches: patch-Modules_FindBLAS.cmake
            patch-Modules_FindLAPACK.cmake

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 pkgsrc/devel/cmake/Makefile
cvs rdiff -u -r1.195 -r1.196 pkgsrc/devel/cmake/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/cmake/patches/patch-Modules_FindBLAS.cmake \
    pkgsrc/devel/cmake/patches/patch-Modules_FindLAPACK.cmake

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/cmake/Makefile
diff -u pkgsrc/devel/cmake/Makefile:1.192 pkgsrc/devel/cmake/Makefile:1.193
--- pkgsrc/devel/cmake/Makefile:1.192   Mon Apr 18 11:01:33 2022
+++ pkgsrc/devel/cmake/Makefile Wed Jun 29 11:34:47 2022
@@ -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

Index: pkgsrc/devel/cmake/distinfo
diff -u pkgsrc/devel/cmake/distinfo:1.195 pkgsrc/devel/cmake/distinfo:1.196
--- pkgsrc/devel/cmake/distinfo:1.195   Thu May 26 08:53:59 2022
+++ pkgsrc/devel/cmake/distinfo Wed Jun 29 11:34:47 2022
@@ -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

Added files:

Index: pkgsrc/devel/cmake/patches/patch-Modules_FindBLAS.cmake
diff -u /dev/null pkgsrc/devel/cmake/patches/patch-Modules_FindBLAS.cmake:1.1
--- /dev/null   Wed Jun 29 11:34:47 2022
+++ pkgsrc/devel/cmake/patches/patch-Modules_FindBLAS.cmake     Wed Jun 29 11:34:47 2022
@@ -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}")
Index: pkgsrc/devel/cmake/patches/patch-Modules_FindLAPACK.cmake
diff -u /dev/null pkgsrc/devel/cmake/patches/patch-Modules_FindLAPACK.cmake:1.1
--- /dev/null   Wed Jun 29 11:34:47 2022
+++ pkgsrc/devel/cmake/patches/patch-Modules_FindLAPACK.cmake   Wed Jun 29 11:34:47 2022
@@ -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