[MacPorts] #64379: lapack @3.12.0_1: cmake config files can't be found automatically. They should be moved into ${prefix}/lib/cmake where other ports put their cmake config files.

MacPorts noreply at macports.org
Fri Mar 29 18:56:01 UTC 2024


#64379: lapack @3.12.0_1: cmake config files can't be found automatically. They
should be moved into ${prefix}/lib/cmake where other ports put their cmake
config files.
------------------------+----------------------
  Reporter:  lepus2589  |      Owner:  (none)
      Type:  defect     |     Status:  reopened
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.7.1
Resolution:             |   Keywords:  haspatch
      Port:  lapack     |
------------------------+----------------------

Comment (by kencu):

 It looks like prior to the commit moving the cmake files in a post-
 destroot block, the lapack cmake config files were being installed like
 this:

 {{{
 x ./opt/local/lib/lapack/cmake/lapacke-3.12.0/lapacke-config-version.cmake
 x ./opt/local/lib/lapack/cmake/lapacke-3.12.0/lapacke-config.cmake
 x ./opt/local/lib/lapack/cmake/lapacke-3.12.0/lapacke-targets.cmake
 x ./opt/local/lib/lapack/cmake/lapacke-3.12.0/lapacke-targets-
 macports.cmake
 x ./opt/local/lib/lapack/cmake/lapack-3.12.0/lapack-config.cmake
 x ./opt/local/lib/lapack/cmake/lapack-3.12.0/lapack-config-version.cmake
 x ./opt/local/lib/lapack/cmake/lapack-3.12.0/lapack-targets.cmake
 x ./opt/local/lib/lapack/cmake/lapack-3.12.0/lapack-targets-macports.cmake
 x ./opt/local/lib/lapack/cmake/cblas-3.12.0/cblas-config.cmake
 x ./opt/local/lib/lapack/cmake/cblas-3.12.0/cblas-targets.cmake
 x ./opt/local/lib/lapack/cmake/cblas-3.12.0/cblas-config-version.cmake
 x ./opt/local/lib/lapack/cmake/cblas-3.12.0/cblas-targets-macports.cmake
 }}}

 so the problem is they are not installed in:

 {{{
 /opt/local/lib/cmake
 }}}
 they are being installed in:
 {{{
 /opt/local/lib/lapack/cmake
 }}}

 and in there, they can't be found by cmake.

 The reason they are being installed in that subdirectory is that the
 Portfile forces them to be installed there by setting this:
 {{{
  -DCMAKE_INSTALL_LIBDIR=${prefix}/lib/${name}
 }}}

 and so the cmake config files wind up tucked away in a special place with
 the default build where cmake can't find them. I presume the Portfile does
 that so the libraries are sequestered and other ports can also supply
 similar libraries without conflicting.

 I can't see an elegant solution immediately, other than manually moving
 the files in a corrected post-destroot block...

-- 
Ticket URL: <https://trac.macports.org/ticket/64379#comment:21>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list