mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 08:56:58 +02:00
eclass/multibuild: Sync with Gentoo
It's from Gentoo commit c8af7eb1285a2683460618b71e2e9a14ca6badcd.
This commit is contained in:
parent
fafb1d9195
commit
c3780924d0
@ -6,21 +6,17 @@
|
|||||||
# Michał Górny <mgorny@gentoo.org>
|
# Michał Górny <mgorny@gentoo.org>
|
||||||
# @AUTHOR:
|
# @AUTHOR:
|
||||||
# Author: Michał Górny <mgorny@gentoo.org>
|
# Author: Michał Górny <mgorny@gentoo.org>
|
||||||
# @SUPPORTED_EAPIS: 6 7 8
|
# @SUPPORTED_EAPIS: 7 8
|
||||||
# @BLURB: A generic eclass for building multiple variants of packages.
|
# @BLURB: A generic eclass for building multiple variants of packages.
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# The multibuild eclass aims to provide a generic framework for building
|
# The multibuild eclass aims to provide a generic framework for building
|
||||||
# multiple 'variants' of a package (e.g. multilib, Python
|
# multiple 'variants' of a package (e.g. multilib, Python
|
||||||
# implementations).
|
# implementations).
|
||||||
|
|
||||||
if [[ ! ${_MULTIBUILD_ECLASS} ]]; then
|
if [[ -z ${_MULTIBUILD_ECLASS} ]]; then
|
||||||
_MULTIBUILD_ECLASS=1
|
_MULTIBUILD_ECLASS=1
|
||||||
|
|
||||||
case ${EAPI} in
|
case ${EAPI} in
|
||||||
6)
|
|
||||||
ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
|
|
||||||
ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
|
|
||||||
;;
|
|
||||||
7|8)
|
7|8)
|
||||||
# backwards compatibility for run_in_build_dir
|
# backwards compatibility for run_in_build_dir
|
||||||
inherit out-of-source-utils
|
inherit out-of-source-utils
|
||||||
@ -99,7 +95,7 @@ esac
|
|||||||
# nevertheless. It is preferred to call 'die' inside of the passed
|
# nevertheless. It is preferred to call 'die' inside of the passed
|
||||||
# function.
|
# function.
|
||||||
multibuild_foreach_variant() {
|
multibuild_foreach_variant() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
[[ ${MULTIBUILD_VARIANTS} ]] \
|
[[ ${MULTIBUILD_VARIANTS} ]] \
|
||||||
|| die "MULTIBUILD_VARIANTS need to be set"
|
|| die "MULTIBUILD_VARIANTS need to be set"
|
||||||
@ -150,7 +146,7 @@ multibuild_foreach_variant() {
|
|||||||
#
|
#
|
||||||
# The function returns command exit status.
|
# The function returns command exit status.
|
||||||
multibuild_for_best_variant() {
|
multibuild_for_best_variant() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
[[ ${MULTIBUILD_VARIANTS} ]] \
|
[[ ${MULTIBUILD_VARIANTS} ]] \
|
||||||
|| die "MULTIBUILD_VARIANTS need to be set"
|
|| die "MULTIBUILD_VARIANTS need to be set"
|
||||||
@ -166,7 +162,7 @@ multibuild_for_best_variant() {
|
|||||||
# be placed in directories matching BUILD_DIRs used by
|
# be placed in directories matching BUILD_DIRs used by
|
||||||
# multibuild_foreach().
|
# multibuild_foreach().
|
||||||
multibuild_copy_sources() {
|
multibuild_copy_sources() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
local _MULTIBUILD_INITIAL_BUILD_DIR=${BUILD_DIR:-${S}}
|
local _MULTIBUILD_INITIAL_BUILD_DIR=${BUILD_DIR:-${S}}
|
||||||
|
|
||||||
@ -188,7 +184,7 @@ multibuild_copy_sources() {
|
|||||||
# (the real root). Both directories have to be real, absolute paths
|
# (the real root). Both directories have to be real, absolute paths
|
||||||
# (i.e. including ${D}). Source root will be removed.
|
# (i.e. including ${D}). Source root will be removed.
|
||||||
multibuild_merge_root() {
|
multibuild_merge_root() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
local src=${1}
|
local src=${1}
|
||||||
local dest=${2}
|
local dest=${2}
|
||||||
|
Loading…
Reference in New Issue
Block a user