2014-01-07 17:29:49 +01:00
|
|
|
#
|
|
|
|
# This helper is for templates using WAF with python3 to build/install.
|
|
|
|
#
|
|
|
|
do_configure() {
|
2016-04-30 17:32:26 +02:00
|
|
|
: ${configure_script:=waf}
|
2020-12-15 06:28:00 +01:00
|
|
|
local cross_args
|
2016-04-30 17:32:26 +02:00
|
|
|
|
2020-12-15 06:28:00 +01:00
|
|
|
if [[ $build_helper = *"qemu"* ]] && [ "$CROSS_BUILD" ]; then
|
|
|
|
# If the qemu build helper is specified, use it for cross builds
|
|
|
|
cross_args="--cross-compile --hostcc=${CC_FOR_BUILD}
|
|
|
|
--cross-execute=qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
|
|
|
|
fi
|
|
|
|
|
|
|
|
PYTHON=/usr/bin/python3 python3 ${configure_script} configure \
|
2020-12-22 22:06:08 +01:00
|
|
|
--prefix=/usr --libdir=/usr/lib${XBPS_TARGET_WORDSIZE} \
|
|
|
|
${configure_args} ${cross_args}
|
2014-01-07 17:29:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
2016-04-30 17:32:26 +02:00
|
|
|
: ${configure_script:=waf}
|
|
|
|
|
2018-08-09 19:53:32 +02:00
|
|
|
PYTHON=/usr/bin/python3 python3 ${configure_script} build ${make_build_args}
|
2014-01-07 17:29:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2016-04-30 17:32:26 +02:00
|
|
|
: ${configure_script:=waf}
|
|
|
|
|
2018-08-09 19:53:32 +02:00
|
|
|
PYTHON=/usr/bin/python3 python3 ${configure_script} install --destdir=${DESTDIR} ${make_install_args}
|
2014-01-07 17:29:49 +01:00
|
|
|
}
|