diff options
Diffstat (limited to 'dev-util/cmake/files')
3 files changed, 236 insertions, 0 deletions
diff --git a/dev-util/cmake/files/cmake-3.14.0_rc1-FindBLAS.patch b/dev-util/cmake/files/cmake-3.14.0_rc1-FindBLAS.patch new file mode 100644 index 000000000000..3a308f57cea1 --- /dev/null +++ b/dev-util/cmake/files/cmake-3.14.0_rc1-FindBLAS.patch @@ -0,0 +1,37 @@ +From 12b2c3ad6a5c5c7f67afe87fec3f81761de0b909 Mon Sep 17 00:00:00 2001 +From: Lars Wendler <polynomial-c@gentoo.org> +Date: Sun, 10 Feb 2019 22:54:51 +0100 +Subject: [PATCH] Prefer pkgconfig in FindBLAS + +--- + Modules/FindBLAS.cmake | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake +index 0aa4f5035b..7b67c95f1f 100644 +--- a/Modules/FindBLAS.cmake ++++ b/Modules/FindBLAS.cmake +@@ -7,6 +7,10 @@ FindBLAS + + 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, +@@ -85,6 +89,9 @@ This module defines the following variables: + find_package(BLAS) + #]=======================================================================] + ++# first, try PkgConfig ++set(BLA_PREFER_PKGCONFIG On) ++ + include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake) +-- +2.20.1 + diff --git a/dev-util/cmake/files/cmake-3.14.0_rc1-FindLAPACK.patch b/dev-util/cmake/files/cmake-3.14.0_rc1-FindLAPACK.patch new file mode 100644 index 000000000000..ebd83f38d187 --- /dev/null +++ b/dev-util/cmake/files/cmake-3.14.0_rc1-FindLAPACK.patch @@ -0,0 +1,55 @@ +From 6d4d97b328f48862923bb55c1c0976b1d532dcc3 Mon Sep 17 00:00:00 2001 +From: Lars Wendler <polynomial-c@gentoo.org> +Date: Sun, 10 Feb 2019 23:01:53 +0100 +Subject: [PATCH] Prefer pkgconfig in FindLAPACK + +--- + Modules/FindLAPACK.cmake | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake +index d6646eaacf..ef5f324670 100644 +--- a/Modules/FindLAPACK.cmake ++++ b/Modules/FindLAPACK.cmake +@@ -7,6 +7,10 @@ FindLAPACK + + Find LAPACK 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 + LAPACK linear-algebra interface (see http://www.netlib.org/lapack/). + +@@ -181,6 +185,21 @@ endif() + + endmacro() + ++# first, try PkgConfig ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(PC_LAPACK lapack) ++if(PC_LAPACK_FOUND) ++ foreach(PC_LIB ${PC_LAPACK_LIBRARIES}) ++ find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_LAPACK_LIBRARY_DIRS} ) ++ if (NOT ${PC_LIB}_LIBRARY) ++ message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_LAPACK_LIBRARY_DIRS}") ++ endif (NOT ${PC_LIB}_LIBRARY) ++ list(APPEND LAPACK_LIBRARIES ${${PC_LIB}_LIBRARY}) ++ endforeach(PC_LIB) ++ find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARIES) ++ mark_as_advanced(LAPACK_LIBRARIES) ++else(PC_LAPACK_FOUND) ++message(STATUS "No PkgConfig configuration for LAPACK found; starting more extensive search.") + + set(LAPACK_LINKER_FLAGS) + set(LAPACK_LIBRARIES) +@@ -428,3 +447,5 @@ endif() + + cmake_pop_check_state() + set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) ++ ++endif(PC_LAPACK_FOUND) +-- +2.20.1 + diff --git a/dev-util/cmake/files/cmake-3.14.0_rc1-prefix-dirs.patch b/dev-util/cmake/files/cmake-3.14.0_rc1-prefix-dirs.patch new file mode 100644 index 000000000000..a4890ffbb2fa --- /dev/null +++ b/dev-util/cmake/files/cmake-3.14.0_rc1-prefix-dirs.patch @@ -0,0 +1,144 @@ +From c5d74cb5b1cf87ee933f7547f62dbbb96134964d Mon Sep 17 00:00:00 2001 +From: Lars Wendler <polynomial-c@gentoo.org> +Date: Sun, 10 Feb 2019 22:40:33 +0100 +Subject: [PATCH] Set some proper paths to make cmake find our tools. + +The ebuild now adds an extra / at the end of $EPREFIX so that it is +never the empty string (so that CMAKE_SYSTEM_PREFIX_PATH remains +correct) + +Original patch by Heiko Przybyl. +Updated by Chris Reffett (cmake-2.8.8) +Updated by Johannes Huber (cmake-2.8.9) +Updated by Michael Palimaka (cmake-2.8.10) +Updated by Chris Reffett (cmake-2.8.11) +Updated by Michael Palimaka (cmake-3.0.0) +Updated by Lars Wendler (cmake-3.9.0_rc2) +Updated by Benda Xu (cmake-3.13.4) +Updated by Lars Wendler (cmake-3.14.0_rc1) +--- + Modules/Platform/Darwin.cmake | 12 ++++++---- + Modules/Platform/UnixPaths.cmake | 38 ++++++++++++++++++++++++-------- + 2 files changed, 37 insertions(+), 13 deletions(-) + +diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake +index a73ffbae75..d00eac4ca4 100644 +--- a/Modules/Platform/Darwin.cmake ++++ b/Modules/Platform/Darwin.cmake +@@ -116,9 +116,9 @@ set(CMAKE_C_FRAMEWORK_SEARCH_FLAG -F) + set(CMAKE_CXX_FRAMEWORK_SEARCH_FLAG -F) + set(CMAKE_Fortran_FRAMEWORK_SEARCH_FLAG -F) + +-# default to searching for frameworks first ++# default to searching for frameworks last + if(NOT DEFINED CMAKE_FIND_FRAMEWORK) +- set(CMAKE_FIND_FRAMEWORK FIRST) ++ set(CMAKE_FIND_FRAMEWORK LAST) + endif() + + # Older OS X linkers do not report their framework search path +@@ -140,6 +140,8 @@ endif() + + # set up the default search directories for frameworks + set(CMAKE_SYSTEM_FRAMEWORK_PATH ++ @GENTOO_PORTAGE_EPREFIX@Frameworks ++ @GENTOO_PORTAGE_EPREFIX@usr/lib + ~/Library/Frameworks + ) + if(_CMAKE_OSX_SYSROOT_PATH) +@@ -186,13 +188,15 @@ if(CMAKE_OSX_SYSROOT) + endif() + endif() + +-# default to searching for application bundles first ++# default to searching for application bundles last + if(NOT DEFINED CMAKE_FIND_APPBUNDLE) +- set(CMAKE_FIND_APPBUNDLE FIRST) ++ set(CMAKE_FIND_APPBUNDLE LAST) + endif() + # set up the default search directories for application bundles + set(_apps_paths) + foreach(_path ++ @GENTOO_PORTAGE_EPREFIX@Applications ++ @GENTOO_PORTAGE_EPREFIX@usr/bin + "~/Applications" + "/Applications" + "${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+ +diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake +index 4ae451472b..aa34bd9a31 100644 +--- a/Modules/Platform/UnixPaths.cmake ++++ b/Modules/Platform/UnixPaths.cmake +@@ -23,7 +23,8 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) + # search types. + list(APPEND CMAKE_SYSTEM_PREFIX_PATH + # Standard +- /usr/local /usr / ++ @GENTOO_PORTAGE_EPREFIX@usr/local @GENTOO_PORTAGE_EPREFIX@usr @GENTOO_PORTAGE_EPREFIX@ ++ @GENTOO_HOST@/usr/local /usr / + + # CMake install location + "${_CMAKE_INSTALL_DIR}" +@@ -50,33 +51,52 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH + + # List common include file locations not under the common prefixes. + list(APPEND CMAKE_SYSTEM_INCLUDE_PATH +- # X11 +- /usr/include/X11 ++ @GENTOO_PORTAGE_EPREFIX@usr/include + ) + + list(APPEND CMAKE_SYSTEM_LIBRARY_PATH +- # X11 +- /usr/lib/X11 ++ @GENTOO_PORTAGE_GCCLIBDIR@/gcc ++ @GENTOO_PORTAGE_GCCLIBDIR@ ++ @GENTOO_PORTAGE_EPREFIX@usr/lib64 ++ @GENTOO_PORTAGE_EPREFIX@usr/libx32 ++ @GENTOO_PORTAGE_EPREFIX@usr/lib32 ++ @GENTOO_PORTAGE_EPREFIX@usr/lib ++ @GENTOO_PORTAGE_EPREFIX@lib ++ ) ++ ++list(APPEND CMAKE_SYSTEM_PROGRAM_PATH ++ @GENTOO_PORTAGE_EPREFIX@usr/bin ++ @GENTOO_PORTAGE_EPREFIX@bin + ) + + list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES +- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64 ++ @GENTOO_PORTAGE_GCCLIBDIR@/gcc ++ @GENTOO_PORTAGE_GCCLIBDIR@ ++ @GENTOO_PORTAGE_EPREFIX@usr/lib64 ++ @GENTOO_PORTAGE_EPREFIX@usr/libx32 ++ @GENTOO_PORTAGE_EPREFIX@usr/lib32 ++ @GENTOO_PORTAGE_EPREFIX@usr/lib ++ @GENTOO_PORTAGE_EPREFIX@lib ++ @GENTOO_HOST@/lib /usr/lib /usr/lib32 /usr/lib64 /usr/libx32 + ) + + # Platform-wide directories to avoid adding via -I<dir>. + list(APPEND CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES +- /usr/include ++ @GENTOO_PORTAGE_EPREFIX@usr/include ++ @GENTOO_HOST@/usr/include + ) + + # Default per-language values. These may be later replaced after + # parsing the implicit directory information from compiler output. + set(_CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES_INIT + ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES} +- /usr/include ++ @GENTOO_PORTAGE_EPREFIX@usr/include ++ @GENTOO_HOST@/usr/include + ) + set(_CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES_INIT + ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} +- /usr/include ++ @GENTOO_PORTAGE_EPREFIX@usr/include ++ @GENTOO_HOST@/usr/include + ) + set(_CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES_INIT + ${CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES} +-- +2.20.1 + |