From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QiUkW-0004oL-HH for garchives@archives.gentoo.org; Sun, 17 Jul 2011 17:03:25 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5609821C29A; Sun, 17 Jul 2011 17:03:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 228E621C1F6 for ; Sun, 17 Jul 2011 17:03:15 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1CAE21B4006 for ; Sun, 17 Jul 2011 17:03:14 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 7FF798003F for ; Sun, 17 Jul 2011 17:03:13 +0000 (UTC) From: "Andreas Hüttel" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Hüttel" Message-ID: <1ec63a310dfc5bdcd1cafaae987847450ea942fd.dilfridge@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: eclass/ X-VCS-Repository: proj/sci X-VCS-Files: eclass/cmake-utils.eclass X-VCS-Directories: eclass/ X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas Hüttel X-VCS-Revision: 1ec63a310dfc5bdcd1cafaae987847450ea942fd Date: Sun, 17 Jul 2011 17:03:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: bc2956b2c8a94cd3fada3610c9b7ef41 commit: 1ec63a310dfc5bdcd1cafaae987847450ea942fd Author: Andreas K. Huettel (dilfridge) gentoo o= rg> AuthorDate: Sun Jul 17 17:02:55 2011 +0000 Commit: Andreas H=C3=BCttel gentoo org> CommitDate: Sun Jul 17 17:02:55 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/sci.git;a=3Dc= ommit;h=3D1ec63a31 Add CMAKE_REMOVE_MODULES feature --- eclass/cmake-utils.eclass | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 deletions(-) diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 6a58226..041b636 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -33,6 +33,12 @@ WANT_CMAKE=3D"${WANT_CMAKE:-always}" # Specify the minimum required CMake version. Default is 2.8.1 CMAKE_MIN_VERSION=3D"${CMAKE_MIN_VERSION:-2.8.1}" =20 +# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES +# @DESCRIPTION: +# Space-separated list of CMake modules that will be removed in $S durin= g src_prepare,=20 +# in order to force packages to use the system version. +CMAKE_REMOVE_MODULES=3D"${CMAKE_REMOVE_MODULES:-FindBLAS}" + CMAKEDEPEND=3D"" case ${WANT_CMAKE} in always) @@ -46,7 +52,7 @@ inherit toolchain-funcs multilib flag-o-matic base =20 CMAKE_EXPF=3D"src_compile src_test src_install" case ${EAPI:-0} in - 4|3|2) CMAKE_EXPF+=3D" src_configure" ;; + 4|3|2) CMAKE_EXPF+=3D" src_prepare src_configure" ;; 1|0) ;; *) die "Unknown EAPI, Bug eclass maintainers." ;; esac @@ -268,6 +274,15 @@ _modify-cmakelists() { _EOF_ } =20 +enable_cmake-utils_src_prepare() { + debug-print-function ${FUNCNAME} "$@" + + local name + for name in ${CMAKE_REMOVE_MODULES} ; do + find "${S}" -name ${name}.cmake -exec rm -v {} + + done +} + enable_cmake-utils_src_configure() { debug-print-function ${FUNCNAME} "$@" =20 @@ -372,6 +387,7 @@ enable_cmake-utils_src_configure() { enable_cmake-utils_src_compile() { debug-print-function ${FUNCNAME} "$@" =20 + has src_prepare ${CMAKE_EXPF} || cmake-utils_src_prepare has src_configure ${CMAKE_EXPF} || cmake-utils_src_configure cmake-utils_src_make "$@" } @@ -425,6 +441,14 @@ enable_cmake-utils_src_test() { popd > /dev/null } =20 +# @FUNCTION: cmake-utils_src_prepare +# @DESCRIPTION: +# General function for configuring with cmake. Default behaviour is to s= tart an +# out-of-source build. +cmake-utils_src_prepare() { + _execute_optionaly "src_prepare" "$@" +} + # @FUNCTION: cmake-utils_src_configure # @DESCRIPTION: # General function for configuring with cmake. Default behaviour is to s= tart an