diff options
author | Andreas Hüttel <dilfridge@gentoo.org> | 2012-05-08 21:27:10 +0000 |
---|---|---|
committer | Andreas Hüttel <dilfridge@gentoo.org> | 2012-05-08 21:27:10 +0000 |
commit | 6801d6afc4d10c1636d527f3beb6d3e8dba54241 (patch) | |
tree | 913a4fb5ebc1da5509455f00211f213e039f6828 /eclass/cmake-utils.eclass | |
parent | Stable on amd64 wrt bug #414553 (diff) | |
download | historical-6801d6afc4d10c1636d527f3beb6d3e8dba54241.tar.gz historical-6801d6afc4d10c1636d527f3beb6d3e8dba54241.tar.bz2 historical-6801d6afc4d10c1636d527f3beb6d3e8dba54241.zip |
Update cmake-utils.eclass from kde overlay: make builds verbose by default, fix usage of PREFIX (bug 358059)
Diffstat (limited to 'eclass/cmake-utils.eclass')
-rw-r--r-- | eclass/cmake-utils.eclass | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 7fed05403d1e..4aec421fbb89 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.78 2012/04/16 10:28:47 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.79 2012/05/08 21:27:10 dilfridge Exp $ # @ECLASS: cmake-utils.eclass # @MAINTAINER: @@ -139,13 +139,15 @@ _use_me_now_inverted() { # @ECLASS-VARIABLE: CMAKE_VERBOSE # @DESCRIPTION: -# Set to enable verbose messages during compilation. +# Set to OFF to disable verbose messages during compilation +: ${CMAKE_VERBOSE:=ON} # @ECLASS-VARIABLE: PREFIX # @DESCRIPTION: # Eclass respects PREFIX variable, though it's not recommended way to set # install/lib/bin prefixes. # Use -DCMAKE_INSTALL_PREFIX=... CMake variable instead. +: ${PREFIX:=/usr} # @ECLASS-VARIABLE: CMAKE_BINARY # @DESCRIPTION: @@ -334,13 +336,13 @@ enable_cmake-utils_src_configure() { ELSE () - SET(CMAKE_PREFIX_PATH "${EPREFIX}${PREFIX:-/usr}" CACHE STRING ""FORCE) + SET(CMAKE_PREFIX_PATH "${EPREFIX}${PREFIX}" CACHE STRING ""FORCE) SET(CMAKE_SKIP_BUILD_RPATH OFF CACHE BOOL "" FORCE) SET(CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE) SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE CACHE BOOL "") - SET(CMAKE_INSTALL_RPATH "${EPREFIX}${PREFIX:-/usr}/lib;${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" CACHE STRING "" FORCE) + SET(CMAKE_INSTALL_RPATH "${EPREFIX}${PREFIX}/lib;${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" CACHE STRING "" FORCE) SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "" FORCE) - SET(CMAKE_INSTALL_NAME_DIR "${EPREFIX}${PREFIX:-/usr}/lib" CACHE STRING "" FORCE) + SET(CMAKE_INSTALL_NAME_DIR "${EPREFIX}${PREFIX}/lib" CACHE STRING "" FORCE) ENDIF (NOT APPLE) _EOF_ @@ -351,7 +353,7 @@ enable_cmake-utils_src_configure() { local libdir=$(get_libdir) cat > "${common_config}" <<- _EOF_ SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE) - SET (CMAKE_INSTALL_LIBDIR ${libdir} CACHE PATH "Output directory for libraries") + SET (CMAKE_INSTALL_LIBDIR ${PREFIX}/${libdir} CACHE PATH "Output directory for libraries") _EOF_ [[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}" @@ -370,7 +372,7 @@ enable_cmake-utils_src_configure() { local cmakeargs=( --no-warn-unused-cli -C "${common_config}" - -DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX:-/usr}" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}" "${mycmakeargs_local[@]}" -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_INSTALL_DO_STRIP=OFF @@ -403,7 +405,7 @@ cmake-utils_src_make() { pushd "${CMAKE_BUILD_DIR}" > /dev/null # first check if Makefile exist otherwise die [[ -e Makefile ]] || die "Makefile not found. Error during configure stage." - if [[ -n ${CMAKE_VERBOSE} ]]; then + if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then emake VERBOSE=1 "$@" || die "Make failed!" else emake "$@" || die "Make failed!" |