mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-16 17:36:59 +02:00
eclass: update waf-utils.eclass
To be able to use EAPI=7 in net-fs/samba, we need to sync waf-utils with upstream Gentoo.
This commit is contained in:
parent
194ad24a04
commit
819912c974
@ -8,7 +8,7 @@
|
||||
# Original Author: Gilles Dartiguelongue <eva@gentoo.org>
|
||||
# Various improvements based on cmake-utils.eclass: Tomáš Chvátal <scarabeus@gentoo.org>
|
||||
# Proper prefix support: Jonathan Callen <jcallen@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 4 5 6
|
||||
# @SUPPORTED_EAPIS: 4 5 6 7
|
||||
# @BLURB: common ebuild functions for waf-based packages
|
||||
# @DESCRIPTION:
|
||||
# The waf-utils eclass contains functions that make creating ebuild for
|
||||
@ -19,7 +19,7 @@
|
||||
inherit multilib toolchain-funcs multiprocessing
|
||||
|
||||
case ${EAPI:-0} in
|
||||
4|5|6) EXPORT_FUNCTIONS src_configure src_compile src_install ;;
|
||||
4|5|6|7) EXPORT_FUNCTIONS src_configure src_compile src_install ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
@ -69,19 +69,23 @@ waf-utils_src_configure() {
|
||||
|
||||
[[ ${fail} ]] && die "Invalid use of waf-utils.eclass"
|
||||
|
||||
local libdir=()
|
||||
|
||||
# @ECLASS-VARIABLE: WAF_BINARY
|
||||
# @DESCRIPTION:
|
||||
# Eclass can use different waf executable. Usually it is located in "${S}/waf".
|
||||
: ${WAF_BINARY:="${S}/waf"}
|
||||
|
||||
# @ECLASS-VARIABLE: NO_WAF_LIBDIR
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Variable specifying that you don't want to set the libdir for waf script.
|
||||
# Some scripts does not allow setting it at all and die if they find it.
|
||||
[[ -z ${NO_WAF_LIBDIR} ]] && libdir=(--libdir="${EPREFIX}/usr/$(get_libdir)")
|
||||
local conf_args=()
|
||||
|
||||
local waf_help=$("${WAF_BINARY}" --help 2>/dev/null)
|
||||
if [[ ${waf_help} == *--docdir* ]]; then
|
||||
conf_args+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} )
|
||||
fi
|
||||
if [[ ${waf_help} == *--htmldir* ]]; then
|
||||
conf_args+=( --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html )
|
||||
fi
|
||||
if [[ ${waf_help} == *--libdir* ]]; then
|
||||
conf_args+=( --libdir="${EPREFIX}/usr/$(get_libdir)" )
|
||||
fi
|
||||
|
||||
tc-export AR CC CPP CXX RANLIB
|
||||
|
||||
@ -91,7 +95,7 @@ waf-utils_src_configure() {
|
||||
PKGCONFIG="$(tc-getPKG_CONFIG)"
|
||||
"${WAF_BINARY}"
|
||||
"--prefix=${EPREFIX}/usr"
|
||||
"${libdir[@]}"
|
||||
"${conf_args[@]}"
|
||||
"${@}"
|
||||
configure
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user