The cmake-3.0.0 ebuild installs a broken FindLAPACK.cmake package: Reproducible: Always Steps to Reproduce: 1. Emerge cmake-3.0.0 2. Have no blas/lapack installed (other case not tested) 3. configure with the following minimal CMakeLists.txt: cmake_minimum_required(VERSION 3.0) project(test C) find_package(LAPACK) Actual Results: Configuration bails out with: -- A library with LAPACK API not found. Please specify library location. CMake Error at /usr/share/cmake/Modules/FindLAPACK.cmake:374 (endif): endif An ENDIF command was found outside of a proper IF ENDIF structure. Or its arguments did not match the opening IF command. Call Stack (most recent call first): CMakeLists.txt:3 (find_package) -- Configuring incomplete, errors occurred! ... Expected Results: Configuration should succeed with no internal error: -- A library with LAPACK API not found. Please specify library location. -- Configuring done ... Current stable cmake-2.8.12.2-r1 works fine. Note that FindLAPACK.cmake has 20 opening if()-statements and 22 closing endif()-statements. Given the fact that cmake-3.0.0-FindLAPACK.patch injects a matching amount of if() and endif()-statements, this might be an upstream error that badly interacts with the patch. But I haven't investigated any further.
Update: This also happens with installed blas/lapack.
In the patch, we do if(PC_LAPACK_FOUND) inside macro(Check_Lapack_Libraries ... ), then endif(PC_LAPACK_FOUND) *outside* the macro. It appears that this awful behaviour is now illegal, so the patch needs refactoring.
Created attachment 384812 [details, diff] updated FindLAPACK patch Allowed me to compile media-gfx/hugin
Thanks you all. This is fixed in cvs now. Please sync in some hours to get the changes. + + 15 Sep 2014; Johannes Huber <johu@gentoo.org> +cmake-3.0.2.ebuild, + +files/cmake-3.0.2-FindLAPACK.patch, -cmake-3.0.0.ebuild, + -files/cmake-3.0.0-FindLAPACK.patch: + Version bump, adds updated patch for FindLAPACK module by Eugene Shalygin + <eugene.shalygin@gmail.com>, bug #518910. Remove old. +