113 |
fi |
fi |
114 |
|
|
115 |
# run any given command |
# run any given command |
116 |
|
if [[ ${MULTILIB_VERBOSE} = true ]] |
117 |
|
then |
118 |
|
echo -e "${COLGREEN}Executing:${COLDEFAULT} '$@'" |
119 |
|
fi |
120 |
eval $@ || die |
eval $@ || die |
121 |
|
|
122 |
unset ABI CC CXX ABI_LIBDIR |
unset ABI CC CXX ABI_LIBDIR |
166 |
fi |
fi |
167 |
|
|
168 |
# run any given command |
# run any given command |
169 |
|
if [[ ${MULTILIB_VERBOSE} = true ]] |
170 |
|
then |
171 |
|
echo -e "${COLGREEN}Executing:${COLDEFAULT} '$@'" |
172 |
|
fi |
173 |
eval $@ || die |
eval $@ || die |
174 |
|
|
175 |
unset ABI CC CXX ABI_LIBDIR |
unset ABI CC CXX ABI_LIBDIR |
408 |
} |
} |
409 |
fi |
fi |
410 |
|
|
|
|
|
|
if [[ ! -z $(typeset -f meson_configure) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_meson_configure=old$(typeset -f meson_configure) |
|
|
eval "${old_meson_configure}" |
|
|
|
|
|
meson_configure() |
|
|
{ |
|
|
local abi |
|
|
local abis_to_run="${MULTILIB_ABIS}" |
|
|
|
|
|
# respect MULTILIB_ONLY_ABI variable |
|
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
|
|
|
|
|
local saved_SRCDIR="${SRCDIR}" |
|
|
for abi in ${abis_to_run} |
|
|
do |
|
|
SRCDIR="${saved_SRCDIR}-${abi}" |
|
|
# honor inside and outside build-dir builds |
|
|
if [ -d ${BUILDDIR}/build-${abi} ] |
|
|
then |
|
|
cd ${BUILDDIR}/build-${abi} |
|
|
else |
|
|
cd ${SRCDIR} |
|
|
fi |
|
|
abi-${abi} oldmeson_configure $@ || die |
|
|
done |
|
|
# restore SRCDIR |
|
|
SRCDIR="${saved_SRCDIR}" |
|
|
} |
|
|
fi |
|
|
|
|
|
if [[ ! -z $(typeset -f meson_src_compile) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_meson_src_compile=old$(typeset -f meson_src_compile) |
|
|
eval "${old_meson_src_compile}" |
|
|
|
|
|
meson_src_compile() |
|
|
{ |
|
|
local abi |
|
|
local abis_to_run="${MULTILIB_ABIS}" |
|
|
|
|
|
# respect MULTILIB_ONLY_ABI variable |
|
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
|
|
|
|
|
for abi in ${abis_to_run} |
|
|
do |
|
|
# remove build dir if exist |
|
|
[[ -d ${BUILDDIR}/build-${abi} ]] && rm -rf ${BUILDDIR}/build-${abi} |
|
|
|
|
|
# build outside of the source dir |
|
|
install -d ${BUILDDIR}/build-${abi} || die |
|
|
cd ${BUILDDIR}/build-${abi} |
|
|
done |
|
|
|
|
|
meson_configure || die |
|
|
|
|
|
for abi in ${abis_to_run} |
|
|
do |
|
|
cd ${BUILDDIR}/build-${abi} |
|
|
abi-${abi} ninja $@ || die |
|
|
done |
|
|
} |
|
|
fi |
|
|
|
|
|
if [[ ! -z $(typeset -f meson_src_check) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_meson_src_check=old$(typeset -f meson_src_check) |
|
|
eval "${old_meson_check}" |
|
|
|
|
|
meson_src_check() |
|
|
{ |
|
|
local abi |
|
|
local abis_to_run="${MULTILIB_ABIS}" |
|
|
|
|
|
# respect MULTILIB_ONLY_ABI variable |
|
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
|
|
|
|
|
for abi in ${abis_to_run} |
|
|
do |
|
|
# honor inside and outside build-dir builds |
|
|
if [ -d ${BUILDDIR}/build-${abi} ] |
|
|
then |
|
|
cd ${BUILDDIR}/build-${abi} |
|
|
else |
|
|
cd ${SRCDIR}-${abi} |
|
|
fi |
|
|
meson test || die |
|
|
done |
|
|
} |
|
|
fi |
|
|
|
|
|
if [[ ! -z $(typeset -f meson_src_install) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_meson_src_install=old$(typeset -f meson_src_install) |
|
|
eval "${old_meson_install}" |
|
|
|
|
|
meson_src_install() |
|
|
{ |
|
|
local abi |
|
|
local abis_to_run="${MULTILIB_ABIS}" |
|
|
|
|
|
# respect MULTILIB_ONLY_ABI variable |
|
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
|
|
|
|
|
for abi in ${abis_to_run} |
|
|
do |
|
|
# honor inside and outside build-dir builds |
|
|
if [ -d ${BUILDDIR}/build-${abi} ] |
|
|
then |
|
|
cd ${BUILDDIR}/build-${abi} |
|
|
else |
|
|
cd ${SRCDIR}-${abi} |
|
|
fi |
|
|
abi-${abi} DESTDIR=${BINDIR} ninja $@ install || die |
|
|
done |
|
|
} |
|
|
fi |
|
|
|
|
|
|
|
411 |
if [[ ! -z $(typeset -f munpack) ]] |
if [[ ! -z $(typeset -f munpack) ]] |
412 |
then |
then |
413 |
# rename the old one |
# rename the old one |