diff options
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/python-r1.eclass | 21 |
2 files changed, 24 insertions, 2 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index f3c0cd71ac91..273524cf2821 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.647 2013/01/27 16:35:33 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.648 2013/01/27 16:36:21 mgorny Exp $ + + 27 Jan 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass: + Introduce run_in_build_dir() function as used by GNOME ebuilds. 27 Jan 2013; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass: Introduce python_doheader(), to install headers specific to a Python diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 63dc556b3497..f02244bd1dce 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.37 2013/01/21 19:28:16 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.38 2013/01/27 16:36:21 mgorny Exp $ # @ECLASS: python-r1 # @MAINTAINER: @@ -681,5 +681,24 @@ python_replicate_script() { done } +# @FUNCTION: run_in_build_dir +# @USAGE: <argv>... +# @DESCRIPTION: +# Run the given command in the directory pointed by BUILD_DIR. +run_in_build_dir() { + debug-print-function ${FUNCNAME} "${@}" + local ret + + [[ ${#} -ne 0 ]] || die "${FUNCNAME}: no command specified." + [[ ${BUILD_DIR} ]] || die "${FUNCNAME}: BUILD_DIR not set." + + pushd "${BUILD_DIR}" &>/dev/null || die + "${@}" + ret=${?} + popd &>/dev/null || die + + return ${ret} +} + _PYTHON_R1=1 fi |