dev-util/cmake: simplify FindBLAS patch
authorRolf Eike Beer <eike@sf-mail.de>
Fri, 9 Mar 2018 20:05:35 +0000 (21:05 +0100)
committerLars Wendler <polynomial-c@gentoo.org>
Mon, 12 Mar 2018 15:32:27 +0000 (16:32 +0100)
Most of the previous Gentoo patch has been upstreamed.
Closes: https://github.com/gentoo/gentoo/pull/7409

dev-util/cmake/cmake-3.11.0_rc3.ebuild
dev-util/cmake/files/cmake-3.11.0_rc2-FindBLAS.patch [new file with mode: 0644]

index ebda7cc29ddc0e02ef80ae01c11a39f117eb39a8..61e5d0065112209ae506e7e091112632efe62863 100644 (file)
@@ -51,7 +51,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch
 
        # handle gentoo packaging in find modules
-       "${FILESDIR}"/${PN}-3.0.0-FindBLAS.patch
+       "${FILESDIR}"/${PN}-3.11.0_rc2-FindBLAS.patch
        "${FILESDIR}"/${PN}-3.8.0_rc2-FindBoost-python.patch
        "${FILESDIR}"/${PN}-3.0.2-FindLAPACK.patch
        "${FILESDIR}"/${PN}-3.5.2-FindQt4.patch
diff --git a/dev-util/cmake/files/cmake-3.11.0_rc2-FindBLAS.patch b/dev-util/cmake/files/cmake-3.11.0_rc2-FindBLAS.patch
new file mode 100644 (file)
index 0000000..6bad45b
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/Modules/FindBLAS.cmake
++++ b/Modules/FindBLAS.cmake
+@@ -4,6 +4,10 @@
+ #
+ # Find BLAS library
+ #
++# Version modified for Gentoo Linux.
++# If a valid PkgConfig configuration is found, this overrides and cancels
++# all further checks.
++#
+ # This module finds an installed fortran library that implements the
+ # BLAS linear-algebra interface (see http://www.netlib.org/blas/).  The
+ # list of libraries searched for is taken from the autoconf macro file,
+@@ -50,6 +54,9 @@
+ # (To distribute this file outside of CMake, substitute the full
+ #  License text for the above reference.)
+ 
++# first, try PkgConfig
++set(BLA_PREFER_PKGCONFIG On)
++
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
+