diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-12-18 10:49:55 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-12-18 10:49:55 +0000 |
commit | fc57a01f2353bd829da198d5511ab333de03e9ad (patch) | |
tree | 951af5f963fc263f924f9d77c075539a6eefe2d7 | |
parent | stable x86, security bug 297388 (diff) | |
download | gentoo-2-fc57a01f2353bd829da198d5511ab333de03e9ad.tar.gz gentoo-2-fc57a01f2353bd829da198d5511ab333de03e9ad.tar.bz2 gentoo-2-fc57a01f2353bd829da198d5511ab333de03e9ad.zip |
Bug #297255 - When converting $mycmakeargs to an array inside
enable_cmake-utils_src_configure(), use a local variable since
<=portage-2.1.6.x does not support global arrays.
-rw-r--r-- | eclass/cmake-utils.eclass | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 92237f82f8c2..5e2cb37553ae 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.37 2009/12/14 19:44:15 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.38 2009/12/18 10:49:55 zmedico Exp $ # @ECLASS: cmake-utils.eclass # @MAINTAINER: @@ -317,8 +317,12 @@ enable_cmake-utils_src_configure() { [[ -n ${CMAKE_NO_COLOR} ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}" # Convert mycmakeargs to an array, for backwards compatibility + # Make the array a local variable since <=portage-2.1.6.x does not + # support global arrays (see bug #297255). if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then - mycmakeargs=(${mycmakeargs}) + local mycmakeargs_local=(${mycmakeargs}) + else + local mycmakeargs_local=("${mycmakeargs[@]}") fi has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= @@ -329,7 +333,7 @@ enable_cmake-utils_src_configure() { local cmakeargs=( -C "${common_config}" -DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX:-/usr}" - "${mycmakeargs[@]}" + "${mycmakeargs_local[@]}" -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_INSTALL_DO_STRIP=OFF -DCMAKE_USER_MAKE_RULES_OVERRIDE="${build_rules}" @@ -337,7 +341,7 @@ enable_cmake-utils_src_configure() { mkdir -p "${CMAKE_BUILD_DIR}" pushd "${CMAKE_BUILD_DIR}" > /dev/null - debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${cmakeargs[*]}" + debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}" echo cmake "${cmakeargs[@]}" "${CMAKE_USE_DIR}" cmake "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed" |