diff options
author | thor <thor@pkgsrc.org> | 2021-05-13 07:52:05 +0000 |
---|---|---|
committer | thor <thor@pkgsrc.org> | 2021-05-13 07:52:05 +0000 |
commit | b4e75c1a35d3269739d71afd293c68db8daccf23 (patch) | |
tree | 90fad5697711f8f092a8bf9434240cef9745d5c4 /math | |
parent | 35704aaff6f351e3f3a5b2afb779e8fe80ee9d96 (diff) | |
download | pkgsrc-b4e75c1a35d3269739d71afd293c68db8daccf23.tar.gz |
cblas: Restore: Fix link to Fortran libraries by using Fortran compiler as linker
This was lost on the recent rework of the patches:
On NetBSD.
In PKGSRC_FORTRAM=gfortran case, libcblas has no RPATH=/usr/pkg/gccXX/lib
and libgfortran and libquadmath are not found.
In PKGSRC_FORTRAN=g95 case, libcblas has no
RPATH=/usr/pkg/lib/gcc-lib/x86_64--netbsd/4.1.2 and libf95 is not found.
Use Fortran compiler as linker instread of C compiler to fix link.
Diffstat (limited to 'math')
-rw-r--r-- | math/lapack/distinfo | 7 | ||||
-rw-r--r-- | math/lapack/patches/patch-CBLAS_src_CMakeLists.txt | 16 | ||||
-rw-r--r-- | math/lapack/patches/patch-CMakeLists.txt | 11 |
3 files changed, 26 insertions, 8 deletions
diff --git a/math/lapack/distinfo b/math/lapack/distinfo index 4f23308fb46..2f6e700e5cc 100644 --- a/math/lapack/distinfo +++ b/math/lapack/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.25 2021/05/12 14:32:51 thor Exp $ +$NetBSD: distinfo,v 1.26 2021/05/13 07:52:05 thor Exp $ SHA1 (lapack-3.9.1.tar.gz) = ccb1e9cb6e7fa7db8a680292457d7d990f25d286 RMD160 (lapack-3.9.1.tar.gz) = 380a2072eb7d8358ec8bf100e3d114600fc71444 @@ -6,9 +6,10 @@ SHA512 (lapack-3.9.1.tar.gz) = 1c70892ce22eb1f5c0be1e0384d00dc876622e6254e853616 Size (lapack-3.9.1.tar.gz) = 7543209 bytes SHA1 (patch-BLAS_SRC_CMakeLists.txt) = 8773f93b1f907ed02d41677a3819f5bb655a331a SHA1 (patch-CBLAS_cblas.pc.in) = cc97fbab08024220739929b5ad95c266965da06d -SHA1 (patch-CBLAS_src_CMakeLists.txt) = c174bb5d790e5f7e50226d0b7a758d0417d90100 -SHA1 (patch-CMakeLists.txt) = 3c8e9125f164625198fb7197982746f43bf4aab5 +SHA1 (patch-CBLAS_src_CMakeLists.txt) = 64abbfb4458943483fba8897df0c8bf62c3f949e +SHA1 (patch-CMakeLists.txt) = 37ec278c2349d79e8cbd7cff110fce7984b42e6e SHA1 (patch-LAPACKE_CMakeLists.txt) = 13e4662585088aa53f61f7079d103fdfcf985c4e SHA1 (patch-LAPACKE_lapacke.pc.in) = 6bbd72205120501cd60daf0b22b00ef7979fb329 +SHA1 (patch-LAPACKE_src_CMakeLists.txt) = da39a3ee5e6b4b0d3255bfef95601890afd80709 SHA1 (patch-SRC_CMakeLists.txt) = 4031bb41100f1fde71c70aa53fc55bee7a852fb7 SHA1 (patch-TESTING_MATGEN_CMakeLists.txt) = 07946678945dba3a7752849791f12e0666345983 diff --git a/math/lapack/patches/patch-CBLAS_src_CMakeLists.txt b/math/lapack/patches/patch-CBLAS_src_CMakeLists.txt index a0e804e3534..2b1f63a69bd 100644 --- a/math/lapack/patches/patch-CBLAS_src_CMakeLists.txt +++ b/math/lapack/patches/patch-CBLAS_src_CMakeLists.txt @@ -1,10 +1,19 @@ -$NetBSD: patch-CBLAS_src_CMakeLists.txt,v 1.3 2021/05/12 14:32:51 thor Exp $ +$NetBSD: patch-CBLAS_src_CMakeLists.txt,v 1.4 2021/05/13 07:52:05 thor Exp $ -Support combined build of shared and static libraries. +- Support combined build of shared and static libraries. +- Link CBLAS with Fortran compiler to fix build on NetBSD. --- CBLAS/src/CMakeLists.txt.orig 2021-03-25 18:25:15.000000000 +0000 +++ CBLAS/src/CMakeLists.txt -@@ -129,3 +129,19 @@ target_include_directories(${CBLASLIB} P +@@ -116,7 +116,6 @@ list(REMOVE_DUPLICATES SOURCES) + add_library(${CBLASLIB} ${SOURCES}) + set_target_properties( + ${CBLASLIB} PROPERTIES +- LINKER_LANGUAGE C + VERSION ${LAPACK_VERSION} + SOVERSION ${LAPACK_MAJOR_VERSION} + ) +@@ -129,3 +128,18 @@ target_include_directories(${CBLASLIB} P ) target_link_libraries(${CBLASLIB} PRIVATE ${BLAS_LIBRARIES}) lapack_install_library(${CBLASLIB}) @@ -13,7 +22,6 @@ Support combined build of shared and static libraries. + add_library(${CBLASLIB}_static STATIC ${SOURCES}) + set_target_properties( + ${CBLASLIB}_static PROPERTIES -+ LINKER_LANGUAGE C + OUTPUT_NAME ${CBLASLIB} + ) + target_include_directories(${CBLASLIB}_static PUBLIC diff --git a/math/lapack/patches/patch-CMakeLists.txt b/math/lapack/patches/patch-CMakeLists.txt index c14846adc72..17c04a3406e 100644 --- a/math/lapack/patches/patch-CMakeLists.txt +++ b/math/lapack/patches/patch-CMakeLists.txt @@ -1,4 +1,4 @@ -$NetBSD: patch-CMakeLists.txt,v 1.2 2021/05/12 14:32:51 thor Exp $ +$NetBSD: patch-CMakeLists.txt,v 1.3 2021/05/13 07:52:05 thor Exp $ Avoid installation of LAPACK CMake and pkg-config files when not installing LAPACK, also allowing explicitly to switch off LAPACK build for BLAS-only @@ -6,6 +6,15 @@ packaging. --- CMakeLists.txt.orig 2021-03-25 18:25:15.000000000 +0000 +++ CMakeLists.txt +@@ -11,7 +11,7 @@ set( + ) + + # Add the CMake directory for custom CMake modules +-set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH}) ++set (CMAKE_MODULE_PATH "/data/pkgwork/math/lapack/work/.buildlink/cmake-Modules" "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH}) + + # Export all symbols on Windows when building shared libraries + SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) @@ -160,6 +160,9 @@ endif() |