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 |
|
|
261 |
# rename the old one |
# rename the old one |
262 |
old_mconfigure=old$(typeset -f mconfigure) |
old_mconfigure=old$(typeset -f mconfigure) |
263 |
eval "${old_mconfigure}" |
eval "${old_mconfigure}" |
264 |
fi |
|
265 |
mconfigure() |
mconfigure() |
266 |
{ |
{ |
267 |
local abi |
local abi |
276 |
abi-${abi} oldmconfigure $@ || die |
abi-${abi} oldmconfigure $@ || die |
277 |
done |
done |
278 |
} |
} |
279 |
|
fi |
280 |
|
|
281 |
if [[ ! -z $(typeset -f cmake_configure) ]] |
if [[ ! -z $(typeset -f cmake_configure) ]] |
282 |
then |
then |
283 |
# rename the old one |
# rename the old one |
284 |
old_cmake_configure=old$(typeset -f cmake_configure) |
old_cmake_configure=old$(typeset -f cmake_configure) |
285 |
eval "${old_cmake_configure}" |
eval "${old_cmake_configure}" |
286 |
fi |
|
287 |
cmake_configure() |
cmake_configure() |
288 |
{ |
{ |
289 |
local abi |
local abi |
295 |
local saved_SRCDIR="${SRCDIR}" |
local saved_SRCDIR="${SRCDIR}" |
296 |
for abi in ${abis_to_run} |
for abi in ${abis_to_run} |
297 |
do |
do |
|
cd ${BUILDDIR}/build-${abi} |
|
298 |
SRCDIR="${saved_SRCDIR}-${abi}" |
SRCDIR="${saved_SRCDIR}-${abi}" |
299 |
|
# honor inside and outside build-dir builds |
300 |
|
if [ -d ${BUILDDIR}/build-${abi} ] |
301 |
|
then |
302 |
|
cd ${BUILDDIR}/build-${abi} |
303 |
|
else |
304 |
|
cd ${SRCDIR} |
305 |
|
fi |
306 |
abi-${abi} oldcmake_configure $@ || die |
abi-${abi} oldcmake_configure $@ || die |
307 |
done |
done |
308 |
# restore SRCDIR |
# restore SRCDIR |
309 |
SRCDIR="${saved_SRCDIR}" |
SRCDIR="${saved_SRCDIR}" |
310 |
} |
} |
311 |
|
fi |
312 |
|
|
313 |
if [[ ! -z $(typeset -f cmake_src_compile) ]] |
if [[ ! -z $(typeset -f cmake_src_compile) ]] |
314 |
then |
then |
315 |
# rename the old one |
# rename the old one |
316 |
old_cmake_src_compile=old$(typeset -f cmake_src_compile) |
old_cmake_src_compile=old$(typeset -f cmake_src_compile) |
317 |
eval "${old_cmake_src_compile}" |
eval "${old_cmake_src_compile}" |
318 |
fi |
|
319 |
cmake_src_compile() |
cmake_src_compile() |
320 |
{ |
{ |
321 |
local abi |
local abi |
342 |
abi-${abi} oldmmake $@ || die |
abi-${abi} oldmmake $@ || die |
343 |
done |
done |
344 |
} |
} |
345 |
|
fi |
346 |
|
|
347 |
|
if [[ ! -z $(typeset -f cmake_src_check) ]] |
348 |
|
then |
349 |
|
# rename the old one |
350 |
|
old_cmake_src_check=old$(typeset -f cmake_src_check) |
351 |
|
eval "${old_cmake_check}" |
352 |
|
|
353 |
|
cmake_src_check() |
354 |
|
{ |
355 |
|
local abi |
356 |
|
local abis_to_run="${MULTILIB_ABIS}" |
357 |
|
|
358 |
|
# respect MULTILIB_ONLY_ABI variable |
359 |
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
360 |
|
|
361 |
|
for abi in ${abis_to_run} |
362 |
|
do |
363 |
|
# honor inside and outside build-dir builds |
364 |
|
if [ -d ${BUILDDIR}/build-${abi} ] |
365 |
|
then |
366 |
|
cd ${BUILDDIR}/build-${abi} |
367 |
|
else |
368 |
|
cd ${SRCDIR}-${abi} |
369 |
|
fi |
370 |
|
mmake -j1 -k check || die |
371 |
|
done |
372 |
|
} |
373 |
|
fi |
374 |
|
|
375 |
if [[ ! -z $(typeset -f cmake_src_install) ]] |
if [[ ! -z $(typeset -f cmake_src_install) ]] |
376 |
then |
then |
377 |
# rename the old one |
# rename the old one |
378 |
old_cmake_src_install=old$(typeset -f cmake_src_install) |
old_cmake_src_install=old$(typeset -f cmake_src_install) |
379 |
eval "${old_cmake_install}" |
eval "${old_cmake_install}" |
380 |
fi |
|
381 |
cmake_src_install() |
cmake_src_install() |
382 |
{ |
{ |
383 |
local abi |
local abi |
388 |
|
|
389 |
for abi in ${abis_to_run} |
for abi in ${abis_to_run} |
390 |
do |
do |
391 |
# install build outside of the source dir |
# honor inside and outside build-dir builds |
392 |
cd ${BUILDDIR}/build-${abi} |
if [ -d ${BUILDDIR}/build-${abi} ] |
393 |
|
then |
394 |
|
cd ${BUILDDIR}/build-${abi} |
395 |
|
else |
396 |
|
cd ${SRCDIR}-${abi} |
397 |
|
fi |
398 |
abi-${abi} oldmmake DESTDIR=${BINDIR} $@ install || die |
abi-${abi} oldmmake DESTDIR=${BINDIR} $@ install || die |
399 |
done |
done |
400 |
} |
} |
401 |
|
fi |
402 |
|
|
403 |
|
if [[ ! -z $(typeset -f mninja) ]] |
404 |
|
then |
405 |
|
# rename the old one |
406 |
|
old_mninja=old$(typeset -f mninja) |
407 |
|
eval "${old_mninja}" |
408 |
|
|
409 |
|
mninja() |
410 |
|
{ |
411 |
|
local abi |
412 |
|
local abis_to_run="${MULTILIB_ABIS}" |
413 |
|
|
414 |
|
# respect MULTILIB_ONLY_ABI variable |
415 |
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
416 |
|
|
417 |
|
for abi in ${abis_to_run} |
418 |
|
do |
419 |
|
echo -e "${COLBLUE}*** ${COLGREEN}compiling for ABI -${abi}${COLDEFAULT}" |
420 |
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
421 |
|
abi-${abi} oldmninja $@ || die |
422 |
|
done |
423 |
|
} |
424 |
|
fi |
425 |
|
|
426 |
|
if [[ ! -z $(typeset -f meson_configure) ]] |
427 |
|
then |
428 |
|
# rename the old one |
429 |
|
old_meson_configure=old$(typeset -f meson_configure) |
430 |
|
eval "${old_meson_configure}" |
431 |
|
|
432 |
|
meson_configure() |
433 |
|
{ |
434 |
|
local abi |
435 |
|
local abis_to_run="${MULTILIB_ABIS}" |
436 |
|
|
437 |
|
# respect MULTILIB_ONLY_ABI variable |
438 |
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
439 |
|
|
440 |
|
local saved_SRCDIR="${SRCDIR}" |
441 |
|
for abi in ${abis_to_run} |
442 |
|
do |
443 |
|
SRCDIR="${saved_SRCDIR}-${abi}" |
444 |
|
# honor inside and outside build-dir builds |
445 |
|
if [ -d ${BUILDDIR}/build-${abi} ] |
446 |
|
then |
447 |
|
cd ${BUILDDIR}/build-${abi} |
448 |
|
else |
449 |
|
cd ${SRCDIR} |
450 |
|
fi |
451 |
|
abi-${abi} oldmeson_configure $@ || die |
452 |
|
done |
453 |
|
# restore SRCDIR |
454 |
|
SRCDIR="${saved_SRCDIR}" |
455 |
|
} |
456 |
|
fi |
457 |
|
|
458 |
|
if [[ ! -z $(typeset -f meson_src_compile) ]] |
459 |
|
then |
460 |
|
# rename the old one |
461 |
|
old_meson_src_compile=old$(typeset -f meson_src_compile) |
462 |
|
eval "${old_meson_src_compile}" |
463 |
|
|
464 |
|
meson_src_compile() |
465 |
|
{ |
466 |
|
local abi |
467 |
|
local abis_to_run="${MULTILIB_ABIS}" |
468 |
|
|
469 |
|
# respect MULTILIB_ONLY_ABI variable |
470 |
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
471 |
|
|
472 |
|
for abi in ${abis_to_run} |
473 |
|
do |
474 |
|
# remove build dir if exist |
475 |
|
[[ -d ${BUILDDIR}/build-${abi} ]] && rm -rf ${BUILDDIR}/build-${abi} |
476 |
|
|
477 |
|
# build outside of the source dir |
478 |
|
install -d ${BUILDDIR}/build-${abi} || die |
479 |
|
cd ${BUILDDIR}/build-${abi} |
480 |
|
done |
481 |
|
|
482 |
|
meson_configure || die |
483 |
|
|
484 |
|
for abi in ${abis_to_run} |
485 |
|
do |
486 |
|
cd ${BUILDDIR}/build-${abi} |
487 |
|
abi-${abi} oldmninja $@ || die |
488 |
|
done |
489 |
|
} |
490 |
|
fi |
491 |
|
|
492 |
|
if [[ ! -z $(typeset -f meson_src_check) ]] |
493 |
|
then |
494 |
|
# rename the old one |
495 |
|
old_meson_src_check=old$(typeset -f meson_src_check) |
496 |
|
eval "${old_meson_check}" |
497 |
|
|
498 |
|
meson_src_check() |
499 |
|
{ |
500 |
|
local abi |
501 |
|
local abis_to_run="${MULTILIB_ABIS}" |
502 |
|
|
503 |
|
# respect MULTILIB_ONLY_ABI variable |
504 |
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
505 |
|
|
506 |
|
for abi in ${abis_to_run} |
507 |
|
do |
508 |
|
# honor inside and outside build-dir builds |
509 |
|
if [ -d ${BUILDDIR}/build-${abi} ] |
510 |
|
then |
511 |
|
cd ${BUILDDIR}/build-${abi} |
512 |
|
else |
513 |
|
cd ${SRCDIR}-${abi} |
514 |
|
fi |
515 |
|
meson test || die |
516 |
|
done |
517 |
|
} |
518 |
|
fi |
519 |
|
|
520 |
|
if [[ ! -z $(typeset -f meson_src_install) ]] |
521 |
|
then |
522 |
|
# rename the old one |
523 |
|
old_meson_src_install=old$(typeset -f meson_src_install) |
524 |
|
eval "${old_meson_install}" |
525 |
|
|
526 |
|
meson_src_install() |
527 |
|
{ |
528 |
|
local abi |
529 |
|
local abis_to_run="${MULTILIB_ABIS}" |
530 |
|
|
531 |
|
# respect MULTILIB_ONLY_ABI variable |
532 |
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
533 |
|
|
534 |
|
for abi in ${abis_to_run} |
535 |
|
do |
536 |
|
# honor inside and outside build-dir builds |
537 |
|
if [ -d ${BUILDDIR}/build-${abi} ] |
538 |
|
then |
539 |
|
cd ${BUILDDIR}/build-${abi} |
540 |
|
else |
541 |
|
cd ${SRCDIR}-${abi} |
542 |
|
fi |
543 |
|
abi-${abi} DESTDIR=${BINDIR} oldmninja $@ install || die |
544 |
|
done |
545 |
|
} |
546 |
|
fi |
547 |
|
|
548 |
if [[ ! -z $(typeset -f munpack) ]] |
if [[ ! -z $(typeset -f munpack) ]] |
549 |
then |
then |
550 |
# rename the old one |
# rename the old one |
551 |
old_munpack=old$(typeset -f munpack) |
old_munpack=old$(typeset -f munpack) |
552 |
eval "${old_munpack}" |
eval "${old_munpack}" |
553 |
fi |
|
554 |
munpack() |
munpack() |
555 |
{ |
{ |
556 |
local abi |
local abi |
566 |
mv ${SRCDIR} ${SRCDIR}-${abi} || die |
mv ${SRCDIR} ${SRCDIR}-${abi} || die |
567 |
done |
done |
568 |
} |
} |
569 |
|
fi |
570 |
|
|
571 |
if [[ ! -z $(typeset -f mmake) ]] |
if [[ ! -z $(typeset -f mmake) ]] |
572 |
then |
then |
573 |
# rename the old one |
# rename the old one |
574 |
old_mmake=old$(typeset -f mmake) |
old_mmake=old$(typeset -f mmake) |
575 |
eval "${old_mmake}" |
eval "${old_mmake}" |
576 |
fi |
|
577 |
mmake() |
mmake() |
578 |
{ |
{ |
579 |
local abi |
local abi |
589 |
abi-${abi} oldmmake $@ || die |
abi-${abi} oldmmake $@ || die |
590 |
done |
done |
591 |
} |
} |
592 |
|
fi |
593 |
|
|
594 |
if [[ ! -z $(typeset -f minstall) ]] |
if [[ ! -z $(typeset -f minstall) ]] |
595 |
then |
then |
596 |
# rename the old one |
# rename the old one |
597 |
old_minstall=old$(typeset -f minstall) |
old_minstall=old$(typeset -f minstall) |
598 |
eval "${old_minstall}" |
eval "${old_minstall}" |
599 |
fi |
|
600 |
minstall() |
minstall() |
601 |
{ |
{ |
602 |
local abi |
local abi |
612 |
abi-${abi} oldminstall $@ || die |
abi-${abi} oldminstall $@ || die |
613 |
done |
done |
614 |
} |
} |
615 |
|
fi |
616 |
|
|
617 |
minstall_destdir() |
minstall_destdir() |
618 |
{ |
{ |
635 |
# rename the old one |
# rename the old one |
636 |
old_mpatch=old$(typeset -f mpatch) |
old_mpatch=old$(typeset -f mpatch) |
637 |
eval "${old_mpatch}" |
eval "${old_mpatch}" |
638 |
fi |
|
639 |
mpatch() |
mpatch() |
640 |
{ |
{ |
641 |
local abi |
local abi |
651 |
oldmpatch $@ || die |
oldmpatch $@ || die |
652 |
done |
done |
653 |
} |
} |
654 |
|
fi |
655 |
|
|
656 |
if [[ ! -z $(typeset -f mlibtoolize) ]] |
if [[ ! -z $(typeset -f mlibtoolize) ]] |
657 |
then |
then |
658 |
# rename the old one |
# rename the old one |
659 |
old_mlibtoolize=old$(typeset -f mlibtoolize) |
old_mlibtoolize=old$(typeset -f mlibtoolize) |
660 |
eval "${old_mlibtoolize}" |
eval "${old_mlibtoolize}" |
661 |
fi |
|
662 |
mlibtoolize() |
mlibtoolize() |
663 |
{ |
{ |
664 |
local abi |
local abi |
674 |
oldmlibtoolize $@ || die |
oldmlibtoolize $@ || die |
675 |
done |
done |
676 |
} |
} |
677 |
|
fi |
678 |
|
|
679 |
if [[ ! -z $(typeset -f mautoreconf) ]] |
if [[ ! -z $(typeset -f mautoreconf) ]] |
680 |
then |
then |
681 |
# rename the old one |
# rename the old one |
682 |
old_mautoreconf=old$(typeset -f mautoreconf) |
old_mautoreconf=old$(typeset -f mautoreconf) |
683 |
eval "${old_mautoreconf}" |
eval "${old_mautoreconf}" |
684 |
fi |
|
685 |
mautoreconf() |
mautoreconf() |
686 |
{ |
{ |
687 |
local abi |
local abi |
697 |
oldmautoreconf $@ || die |
oldmautoreconf $@ || die |
698 |
done |
done |
699 |
} |
} |
700 |
|
fi |
701 |
|
|
702 |
if [[ ! -z $(typeset -f minstalldocs) ]] |
if [[ ! -z $(typeset -f minstalldocs) ]] |
703 |
then |
then |
704 |
# rename the old one |
# rename the old one |
705 |
old_minstalldocs=old$(typeset -f minstalldocs) |
old_minstalldocs=old$(typeset -f minstalldocs) |
706 |
eval "${old_minstalldocs}" |
eval "${old_minstalldocs}" |
707 |
fi |
|
708 |
minstalldocs() |
minstalldocs() |
709 |
{ |
{ |
710 |
local abi |
local abi |
721 |
oldminstalldocs $@ || die |
oldminstalldocs $@ || die |
722 |
done |
done |
723 |
} |
} |
724 |
|
fi |
725 |
|
|
726 |
## |
## |
727 |
# multilib mbuild wrappers |
# multilib mbuild wrappers |
756 |
{ |
{ |
757 |
if [[ ! -z $(typeset -f cmake_src_install) ]] |
if [[ ! -z $(typeset -f cmake_src_install) ]] |
758 |
then |
then |
759 |
cmake_src_compile || die |
cmake_src_install || die |
760 |
else |
else |
761 |
mmake DESTDIR=${BINDIR} install || die |
mmake DESTDIR=${BINDIR} install || die |
762 |
fi |
fi |