The Gentoo patch for the FindLAPACK.cmake module is broken: it saves the CMAKE_FIND_LIBRARY_SUFFIXES only if pkg-config could not find LAPACK, thereby resetting them when pkg-config succeeds. The endif(NOT LAPACK_FOUND) of the added IF should be moved down to the end. Attached is a corrected version of the patch that should be dropped in the files directory. Reproducible: Always
Created attachment 291075 [details, diff] Corrected FindLAPACK patch
The patch works. I'm now able to compile hugin with 'lapack' enabled.
Fixed in 2.8.6-r2, thanks!