diff options
| author | Tomas Chvatal <scarabeus@gentoo.org> | 2009-02-20 20:47:27 +0100 |
|---|---|---|
| committer | Tomas Chvatal <scarabeus@gentoo.org> | 2009-02-20 20:47:27 +0100 |
| commit | 5f135ffc978a2d00421dc35e588dd81c43eaf6b0 (patch) | |
| tree | 15cb7041e35c01d7dec4986cc669a4bd5899ce2e /eclass/cmake-utils.eclass | |
| parent | 7c68ec84c8e10390e695ccf05631e8c6dc8f4ddc (diff) | |
| download | kde-5f135ffc978a2d00421dc35e588dd81c43eaf6b0.tar.gz kde-5f135ffc978a2d00421dc35e588dd81c43eaf6b0.tar.bz2 kde-5f135ffc978a2d00421dc35e588dd81c43eaf6b0.zip | |
Make it work again (why the crap it did not export the darn global
variable :((()
Diffstat (limited to 'eclass/cmake-utils.eclass')
| -rw-r--r-- | eclass/cmake-utils.eclass | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 1fdf6a13d72..9f610f6cf7a 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -42,11 +42,17 @@ _use_me_now() { # @DESCRIPTION: # Documents to dodoc -# @VARIABLE: CMAKE_BUILD_DIR +# @FUNCTION: _check_build_type # @DESCRIPTION: # Determine using IN or OUT source build -CMAKE_BUILD_DIR="" # defined in src_configure (not needed earlier). - +_check_build_type() { + # in/out source build + if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then + CMAKE_BUILD_DIR="${S}" + else + CMAKE_BUILD_DIR="${WORKDIR}/${PN}_build" + fi +} # @FUNCTION: cmake-utils_use_with # @USAGE: <USE flag> [flag name] # @DESCRIPTION: @@ -90,12 +96,7 @@ cmake-utils_has() { _use_me_now HAVE "$@" ; } cmake-utils_src_configure() { debug-print-function $FUNCNAME $* - # in/out source build - if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then - CMAKE_BUILD_DIR="${S}" - else - CMAKE_BUILD_DIR="${WORKDIR}/${PN}_build" - fi + _check_build_type _common_configure_code local cmakeargs="${mycmakeargs} ${EXTRA_ECONF} -DCMAKE_INSTALL_DO_STRIP=OFF" @@ -113,6 +114,7 @@ cmake-utils_src_configure() { # 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() { + debug-print-function $FUNCNAME $* case ${EAPI} in 2) ;; *) cmake-utils_src_configure ;; @@ -180,6 +182,7 @@ _EOF_ cmake-utils_src_make() { debug-print-function $FUNCNAME $* + _check_build_type pushd "${CMAKE_BUILD_DIR}" > /dev/null if ! [[ -z ${CMAKE_COMPILER_VERBOSE} ]]; then emake VERBOSE=1 "$@" || die "Make failed!" @@ -195,7 +198,7 @@ cmake-utils_src_make() { cmake-utils_src_install() { debug-print-function $FUNCNAME $* - + _check_build_type pushd "${CMAKE_BUILD_DIR}" > /dev/null emake install DESTDIR="${D}" || die "Make install failed" popd > /dev/null @@ -210,8 +213,7 @@ cmake-utils_src_install() { cmake-utils_src_test() { debug-print-function $FUNCNAME $* - # At this point we can automatically check if it's an out-of-source or an - # in-source build + _check_build_type pushd "${CMAKE_BUILD_DIR}" > /dev/null # Standard implementation of src_test if emake -j1 check -n &> /dev/null; then |
