summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/cmake-utils.eclass')
-rw-r--r--eclass/cmake-utils.eclass27
1 files changed, 21 insertions, 6 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 46a1630f52f3..d6a7dee83d9f 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.8 2008/04/23 11:55:51 ingmar Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.9 2008/09/28 16:19:06 jmbsvicetto Exp $
# @ECLASS: cmake-utils.eclass
# @MAINTAINER:
@@ -21,7 +21,7 @@ DESCRIPTION="Based on the ${ECLASS} eclass"
DEPEND=">=dev-util/cmake-2.4.6"
-EXPORT_FUNCTIONS src_compile src_test src_install
+EXPORT_FUNCTIONS src_configure src_compile src_test src_install
# Internal function use by cmake-utils_use_with and cmake-utils_use_enable
_use_me_now() {
@@ -70,11 +70,11 @@ cmake-utils_use_want() { _use_me_now WANT "$@" ; }
# and -DHAVE_FOO=OFF if it is disabled.
cmake-utils_has() { _use_me_now HAVE "$@" ; }
-# @FUNCTION: cmake-utils_src_compile
+# @FUNCTION: cmake-utils_src_configure
# @DESCRIPTION:
-# General function for compiling with cmake. Default behaviour is to start an
-# out-of-source build. All arguments are passed to cmake-utils_src_make.
-cmake-utils_src_compile() {
+# General function for configuring with cmake. Default behaviour is to start an
+# out-of-source build.
+cmake-utils_src_configure() {
debug-print-function $FUNCNAME $*
if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then
@@ -82,6 +82,21 @@ cmake-utils_src_compile() {
else
cmake-utils_src_configureout
fi
+}
+
+# @FUNCTION: cmake-utils_src_compile
+# @DESCRIPTION:
+# General function for compiling with cmake. Default behaviour is to check for
+# eapi and based on it configure or only compile
+cmake-utils_src_compile() {
+ case ${EAPI} in
+ 2 | 2_pre3 | 2_pre2 | 2_pre1)
+ ;;
+ *)
+ cmake-utils_src_configure
+ ;;
+ esac
+
cmake-utils_src_make "$@"
}