diff options
author | Andreas Hüttel <dilfridge@gentoo.org> | 2011-07-18 09:08:21 +0000 |
---|---|---|
committer | Andreas Hüttel <dilfridge@gentoo.org> | 2011-07-18 09:08:21 +0000 |
commit | 70230d8d15c0d287b5e81b09a6e78b6aff01b1d6 (patch) | |
tree | 2db0e089a3e3271329a47a6f6c11a5109bb59ab2 /eclass | |
parent | Stable on amd64 wrt bug #375437 (diff) | |
download | historical-70230d8d15c0d287b5e81b09a6e78b6aff01b1d6.tar.gz historical-70230d8d15c0d287b5e81b09a6e78b6aff01b1d6.tar.bz2 historical-70230d8d15c0d287b5e81b09a6e78b6aff01b1d6.zip |
Add CMAKE_REMOVE_MODULES feature to force use of patched system cmake modules where packages bring their own
Diffstat (limited to '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 |