File:  [cvs.NetBSD.org] / pkgsrc / math / lapack / patches / Attic / patch-SRC_CMakeLists.txt
Revision 1.1: download - view: text, annotated - select for diffs
Mon Oct 12 21:51:57 2020 UTC (4 years, 6 months ago) by bacon
Branches: MAIN
CVS tags: pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, HEAD
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

$NetBSD: patch-SRC_CMakeLists.txt,v 1.1 2020/10/12 21:51:57 bacon Exp $

Support combined build of shared and static libraries.

--- SRC/CMakeLists.txt.orig	2019-11-21 08:57:43.000000000 +0100
+++ SRC/CMakeLists.txt	2020-01-03 19:53:12.452257316 +0100
@@ -518,3 +518,23 @@
 endif()
 
 lapack_install_library(lapack)
+
+if(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
+  add_library(lapack_static STATIC ${SOURCES})
+  set_target_properties(
+    lapack_static PROPERTIES
+    OUTPUT_NAME lapack
+    )
+
+  if(USE_XBLAS)
+    target_link_libraries(lapack_static PRIVATE ${XBLAS_LIBRARY})
+  endif()
+  target_link_libraries(lapack_static PRIVATE ${BLAS_LIBRARIES})
+
+  if (_is_coverage_build)
+    target_link_libraries(lapack_static PRIVATE gcov)
+    add_coverage(lapack_static)
+  endif()
+
+  lapack_install_library(lapack_static)
+endif()

CVSweb <webmaster@jp.NetBSD.org>