42 |
# the var ist decided with our common eval+echo magic |
# the var ist decided with our common eval+echo magic |
43 |
if [[ -z ${SDEPEND} ]] |
if [[ -z ${SDEPEND} ]] |
44 |
then |
then |
45 |
SDEPEND="\$(eval echo \\\$EMUL_LINUX_32_SDEPEND_\${ARCH/i*86/x86} | tr ';' '\n')" |
SDEPEND="$(marchsdepend EMUL_LINUX_32_SDEPEND)" |
46 |
else |
else |
47 |
SDEPEND="${SDEPEND} |
SDEPEND="${SDEPEND} |
48 |
\$(eval echo \\\$EMUL_LINUX_32_SDEPEND_\${ARCH/i*86/x86} | tr ';' '\n')" |
$(marchsdepend EMUL_LINUX_32_SDEPEND)" |
49 |
fi |
fi |
50 |
fi |
fi |
51 |
|
|
400 |
} |
} |
401 |
fi |
fi |
402 |
|
|
403 |
|
|
404 |
|
if [[ ! -z $(typeset -f meson_configure) ]] |
405 |
|
then |
406 |
|
# rename the old one |
407 |
|
old_meson_configure=old$(typeset -f meson_configure) |
408 |
|
eval "${old_meson_configure}" |
409 |
|
|
410 |
|
meson_configure() |
411 |
|
{ |
412 |
|
local abi |
413 |
|
local abis_to_run="${MULTILIB_ABIS}" |
414 |
|
|
415 |
|
# respect MULTILIB_ONLY_ABI variable |
416 |
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
417 |
|
|
418 |
|
local saved_SRCDIR="${SRCDIR}" |
419 |
|
for abi in ${abis_to_run} |
420 |
|
do |
421 |
|
SRCDIR="${saved_SRCDIR}-${abi}" |
422 |
|
# honor inside and outside build-dir builds |
423 |
|
if [ -d ${BUILDDIR}/build-${abi} ] |
424 |
|
then |
425 |
|
cd ${BUILDDIR}/build-${abi} |
426 |
|
else |
427 |
|
cd ${SRCDIR} |
428 |
|
fi |
429 |
|
abi-${abi} oldmeson_configure $@ || die |
430 |
|
done |
431 |
|
# restore SRCDIR |
432 |
|
SRCDIR="${saved_SRCDIR}" |
433 |
|
} |
434 |
|
fi |
435 |
|
|
436 |
|
if [[ ! -z $(typeset -f meson_src_compile) ]] |
437 |
|
then |
438 |
|
# rename the old one |
439 |
|
old_meson_src_compile=old$(typeset -f meson_src_compile) |
440 |
|
eval "${old_meson_src_compile}" |
441 |
|
|
442 |
|
meson_src_compile() |
443 |
|
{ |
444 |
|
local abi |
445 |
|
local abis_to_run="${MULTILIB_ABIS}" |
446 |
|
|
447 |
|
# respect MULTILIB_ONLY_ABI variable |
448 |
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
449 |
|
|
450 |
|
for abi in ${abis_to_run} |
451 |
|
do |
452 |
|
# remove build dir if exist |
453 |
|
[[ -d ${BUILDDIR}/build-${abi} ]] && rm -rf ${BUILDDIR}/build-${abi} |
454 |
|
|
455 |
|
# build outside of the source dir |
456 |
|
install -d ${BUILDDIR}/build-${abi} || die |
457 |
|
cd ${BUILDDIR}/build-${abi} |
458 |
|
done |
459 |
|
|
460 |
|
meson_configure || die |
461 |
|
|
462 |
|
for abi in ${abis_to_run} |
463 |
|
do |
464 |
|
cd ${BUILDDIR}/build-${abi} |
465 |
|
abi-${abi} ninja $@ || die |
466 |
|
done |
467 |
|
} |
468 |
|
fi |
469 |
|
|
470 |
|
if [[ ! -z $(typeset -f meson_src_check) ]] |
471 |
|
then |
472 |
|
# rename the old one |
473 |
|
old_meson_src_check=old$(typeset -f meson_src_check) |
474 |
|
eval "${old_meson_check}" |
475 |
|
|
476 |
|
meson_src_check() |
477 |
|
{ |
478 |
|
local abi |
479 |
|
local abis_to_run="${MULTILIB_ABIS}" |
480 |
|
|
481 |
|
# respect MULTILIB_ONLY_ABI variable |
482 |
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
483 |
|
|
484 |
|
for abi in ${abis_to_run} |
485 |
|
do |
486 |
|
# honor inside and outside build-dir builds |
487 |
|
if [ -d ${BUILDDIR}/build-${abi} ] |
488 |
|
then |
489 |
|
cd ${BUILDDIR}/build-${abi} |
490 |
|
else |
491 |
|
cd ${SRCDIR}-${abi} |
492 |
|
fi |
493 |
|
meson test || die |
494 |
|
done |
495 |
|
} |
496 |
|
fi |
497 |
|
|
498 |
|
if [[ ! -z $(typeset -f meson_src_install) ]] |
499 |
|
then |
500 |
|
# rename the old one |
501 |
|
old_meson_src_install=old$(typeset -f meson_src_install) |
502 |
|
eval "${old_meson_install}" |
503 |
|
|
504 |
|
meson_src_install() |
505 |
|
{ |
506 |
|
local abi |
507 |
|
local abis_to_run="${MULTILIB_ABIS}" |
508 |
|
|
509 |
|
# respect MULTILIB_ONLY_ABI variable |
510 |
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
511 |
|
|
512 |
|
for abi in ${abis_to_run} |
513 |
|
do |
514 |
|
# honor inside and outside build-dir builds |
515 |
|
if [ -d ${BUILDDIR}/build-${abi} ] |
516 |
|
then |
517 |
|
cd ${BUILDDIR}/build-${abi} |
518 |
|
else |
519 |
|
cd ${SRCDIR}-${abi} |
520 |
|
fi |
521 |
|
abi-${abi} DESTDIR=${BINDIR} ninja $@ install || die |
522 |
|
done |
523 |
|
} |
524 |
|
fi |
525 |
|
|
526 |
|
|
527 |
if [[ ! -z $(typeset -f munpack) ]] |
if [[ ! -z $(typeset -f munpack) ]] |
528 |
then |
then |
529 |
# rename the old one |
# rename the old one |