Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions ports/lapack-reference/implicit-link.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58e59be8fb..572478de83 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -520,6 +520,25 @@ endif()
configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-build.cmake.in
${LAPACK_BINARY_DIR}/${LAPACKLIB}-config.cmake @ONLY)

+set(FORTRAN_IMPLICIT_LIBS "")
+set(FORTRAN_IMPLICIT_LINK_DIRS "")
+if(NOT BUILD_SHARED_LIBS)
+ set(FORTRAN_IMPLICIT_LIBS ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
+ set(FORTRAN_IMPLICIT_LINK_DIRS ${CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES})
+ list(REVERSE FORTRAN_IMPLICIT_LIBS)
+ list(REMOVE_DUPLICATES FORTRAN_IMPLICIT_LIBS)
+ list(REVERSE FORTRAN_IMPLICIT_LIBS)
+ list(REMOVE_ITEM FORTRAN_IMPLICIT_LIBS ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES})
+ list(REMOVE_ITEM FORTRAN_IMPLICIT_LINK_DIRS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
+ list(JOIN FORTRAN_IMPLICIT_LIBS " -l" FORTRAN_IMPLICIT_LIBS)
+ list(JOIN FORTRAN_IMPLICIT_LINK_DIRS " -L" FORTRAN_IMPLICIT_LINK_DIRS)
+ if(FORTRAN_IMPLICIT_LIBS)
+ set(FORTRAN_IMPLICIT_LIBS "-l${FORTRAN_IMPLICIT_LIBS}")
+ endif()
+ if(FORTRAN_IMPLICIT_LINK_DIRS)
+ set(FORTRAN_IMPLICIT_LINK_DIRS "-L${FORTRAN_IMPLICIT_LINK_DIRS}")
+ endif()
+endif()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${LAPACKLIB}.pc @ONLY)
install(FILES
diff --git a/lapack.pc.in b/lapack.pc.in
index 316c871011..4d7f3f7b56 100644
--- a/lapack.pc.in
+++ b/lapack.pc.in
@@ -5,5 +5,5 @@ Name: LAPACK
Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage
Version: @LAPACK_VERSION@
URL: http://www.netlib.org/lapack/
-Libs: -L${libdir} -llapack
+Libs: -L${libdir} -llapack @FORTRAN_IMPLICIT_LINK_DIRS@ @FORTRAN_IMPLICIT_LIBS@
Requires.private: blas
1 change: 1 addition & 0 deletions ports/lapack-reference/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ vcpkg_from_github(
PATCHES
cmake-config.patch
fix_prefix.patch
implicit-link.patch
)

if(NOT VCPKG_TARGET_IS_WINDOWS)
Expand Down
1 change: 1 addition & 0 deletions ports/lapack-reference/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "lapack-reference",
"version": "3.12.1",
"port-version": 1,
"description": "LAPACK - Linear Algebra PACKage",
"homepage": "https://netlib.org/lapack/",
"license": "BSD-3-Clause-Open-MPI",
Expand Down
3 changes: 2 additions & 1 deletion scripts/ci.feature.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2140,7 +2140,8 @@ itk[cuda]:x64-linux = feature-fails
ixwebsocket[core,mbedtls,openssl,sectransp,ssl] = options # you can only choose one ssl backend or none
kissfft[openmp](osx) = feature-fails # No openmp on osx
ktx[tools](uwp) = feature-fails # build error. See https://github.com/microsoft/vcpkg/issues/33687
lapack-reference[core,cblas,noblas] = options # Cannot built feature 'cblas' together with feature 'noblas'. cblas requires blas.
lapack-reference[blas-select,cblas,noblas] = options # Cannot built feature 'cblas' together with feature 'noblas'. cblas requires blas.
lapack-reference(android)=fail # no fortran compiler
libalkimia[tools](linux) = feature-fails # link errors. See https://github.com/microsoft/vcpkg/issues/32361
libcanberra[core] = combination-fails # configure: error: *** No backend enabled. ***
libcanberra[core](osx) = combination-fails # see https://github.com/microsoft/vcpkg/issues/31032
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4458,7 +4458,7 @@
},
"lapack-reference": {
"baseline": "3.12.1",
"port-version": 0
"port-version": 1
},
"lastools": {
"baseline": "2.0.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/lapack-reference.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2cb3ab92f81e3a04378f80e0efb1c1fac10a6164",
"version": "3.12.1",
"port-version": 1
},
{
"git-tree": "213d4eb32b530eda6f90aeab2e9e92e4940e852f",
"version": "3.12.1",
Expand Down