diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2011-07-18 09:08:21 +0000 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2011-07-18 09:08:21 +0000 |
commit | 97728ad061337fa034d0fe0b92498685ce8f1c0c (patch) | |
tree | 498bc7d9d1ba8e3bbabe9edbb6c110cecb96f034 /eclass/cmake-utils.eclass | |
parent | Stable on amd64 wrt bug #375437 (diff) | |
download | gentoo-2-97728ad061337fa034d0fe0b92498685ce8f1c0c.tar.gz gentoo-2-97728ad061337fa034d0fe0b92498685ce8f1c0c.tar.bz2 gentoo-2-97728ad061337fa034d0fe0b92498685ce8f1c0c.zip |
Add CMAKE_REMOVE_MODULES feature to force use of patched system cmake modules where packages bring their own
Diffstat (limited to 'eclass/cmake-utils.eclass')
-rw-r--r-- | eclass/cmake-utils.eclass | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 6a582266770b..96003fcddc90 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.69 2011/06/27 21:11:57 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.70 2011/07/18 09:08:21 dilfridge Exp $ # @ECLASS: cmake-utils.eclass # @MAINTAINER: @@ -33,6 +33,17 @@ WANT_CMAKE="${WANT_CMAKE:-always}" # Specify the minimum required CMake version. Default is 2.8.1 CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}" +# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST +# @DESCRIPTION: +# Space-separated list of CMake modules that will be removed in $S during src_prepare, +# in order to force packages to use the system version. +CMAKE_REMOVE_MODULES_LIST="${CMAKE_REMOVE_MODULES_LIST:-FindBLAS FindLAPACK}" + +# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES +# @DESCRIPTION: +# Do we want to remove anything? yes or whatever else for no +CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-yes}" + CMAKEDEPEND="" case ${WANT_CMAKE} in always) @@ -271,6 +282,13 @@ _modify-cmakelists() { enable_cmake-utils_src_configure() { debug-print-function ${FUNCNAME} "$@" + [[ "${CMAKE_REMOVE_MODULES}" == "yes" ]] && { + local name + for name in ${CMAKE_REMOVE_MODULES_LIST} ; do + find "${S}" -name ${name}.cmake -exec rm -v {} + + done + } + _check_build_dir # check if CMakeLists.txt exist and if no then die |