diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-03-09 13:51:02 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-03-09 13:51:02 +0000 |
commit | b2ef495a79bf3cc2f3f22d8b04d2981bf4827f81 (patch) | |
tree | 77516d6385d5b5069358fdb64f6a21903ceed3ac /eclass | |
parent | Version bump. Move nss_myhostname to rootfs and install zsh completion (both ... (diff) | |
download | historical-b2ef495a79bf3cc2f3f22d8b04d2981bf4827f81.tar.gz historical-b2ef495a79bf3cc2f3f22d8b04d2981bf4827f81.tar.bz2 historical-b2ef495a79bf3cc2f3f22d8b04d2981bf4827f81.zip |
Introduce multibuild_copy_sources as a generic source duplicating function.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/multibuild.eclass | 23 |
2 files changed, 26 insertions, 2 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 0ae0011d7ed9..3e471db22143 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.721 2013/03/09 13:13:02 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.722 2013/03/09 13:51:02 mgorny Exp $ + + 09 Mar 2013; Michał Górny <mgorny@gentoo.org> multibuild.eclass: + Introduce multibuild_copy_sources as a generic source duplicating function. 09 Mar 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass: Use doins instead of dodoc to install examples, due to PMS limitations. Bug diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass index 8ccd3b62d06b..87c7cc7bbca3 100644 --- a/eclass/multibuild.eclass +++ b/eclass/multibuild.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/multibuild.eclass,v 1.4 2013/03/04 19:27:24 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.5 2013/03/09 13:51:02 mgorny Exp $ # @ECLASS: multibuild # @MAINTAINER: @@ -205,6 +205,27 @@ multibuild_for_best_variant() { multibuild_foreach_variant "${@}" } +# @FUNCTION: multibuild_copy_sources +# @DESCRIPTION: +# Create per-variant copies of source tree. The source tree is assumed +# to be in ${BUILD_DIR}, or ${S} if the former is unset. The copies will +# be placed in directories matching BUILD_DIRs used by +# multibuild_foreach(). +multibuild_copy_sources() { + debug-print-function ${FUNCNAME} "${@}" + + local _MULTIBUILD_INITIAL_BUILD_DIR=${BUILD_DIR:-${S}} + + einfo "Will copy sources from ${_MULTIBUILD_INITIAL_BUILD_DIR}" + + _multibuild_create_source_copy() { + einfo "${impl}: copying to ${BUILD_DIR}" + cp -pr "${_MULTIBUILD_INITIAL_BUILD_DIR}" "${BUILD_DIR}" || die + } + + multibuild_foreach_variant _multibuild_create_source_copy +} + # @FUNCTION: run_in_build_dir # @USAGE: <argv>... # @DESCRIPTION: |