Magellan Linux

Diff of /branches/R11-unstable/include/multilib.sminc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 20978 by niro, Wed Feb 19 12:10:12 2014 UTC revision 29786 by niro, Thu Oct 12 07:24:27 2017 UTC
# Line 42  then Line 42  then
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    
# Line 261  then Line 261  then
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
# Line 276  mconfigure() Line 276  mconfigure()
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
# Line 294  cmake_configure() Line 295  cmake_configure()
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
# Line 334  cmake_src_compile() Line 342  cmake_src_compile()
342   abi-${abi} oldmmake $@ || die   abi-${abi} oldmmake $@ || die
343   done   done
344  }  }
345    fi
346    
347  if [[ ! -z $(typeset -f cmake_src_check) ]]  if [[ ! -z $(typeset -f cmake_src_check) ]]
348  then  then
349   # rename the old one   # rename the old one
350   old_cmake_src_check=old$(typeset -f cmake_src_check)   old_cmake_src_check=old$(typeset -f cmake_src_check)
351   eval "${old_cmake_check}"   eval "${old_cmake_check}"
352  fi  
353  cmake_src_check()  cmake_src_check()
354  {  {
355   local abi   local abi
# Line 351  cmake_src_check() Line 360  cmake_src_check()
360    
361   for abi in ${abis_to_run}   for abi in ${abis_to_run}
362   do   do
363   cd ${BUILDDIR}/build-${abi}   # 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   mmake -j1 -k check || die
371   done   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
# Line 372  cmake_src_install() Line 388  cmake_src_install()
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    
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
530   old_munpack=old$(typeset -f munpack)   old_munpack=old$(typeset -f munpack)
531   eval "${old_munpack}"   eval "${old_munpack}"
532  fi  
533  munpack()  munpack()
534  {  {
535   local abi   local abi
# Line 399  munpack() Line 545  munpack()
545   mv ${SRCDIR} ${SRCDIR}-${abi} || die   mv ${SRCDIR} ${SRCDIR}-${abi} || die
546   done   done
547  }  }
548    fi
549    
550  if [[ ! -z $(typeset -f mmake) ]]  if [[ ! -z $(typeset -f mmake) ]]
551  then  then
552   # rename the old one   # rename the old one
553   old_mmake=old$(typeset -f mmake)   old_mmake=old$(typeset -f mmake)
554   eval "${old_mmake}"   eval "${old_mmake}"
555  fi  
556  mmake()  mmake()
557  {  {
558   local abi   local abi
# Line 421  mmake() Line 568  mmake()
568   abi-${abi} oldmmake $@ || die   abi-${abi} oldmmake $@ || die
569   done   done
570  }  }
571    fi
572    
573  if [[ ! -z $(typeset -f minstall) ]]  if [[ ! -z $(typeset -f minstall) ]]
574  then  then
575   # rename the old one   # rename the old one
576   old_minstall=old$(typeset -f minstall)   old_minstall=old$(typeset -f minstall)
577   eval "${old_minstall}"   eval "${old_minstall}"
578  fi  
579  minstall()  minstall()
580  {  {
581   local abi   local abi
# Line 443  minstall() Line 591  minstall()
591   abi-${abi} oldminstall $@ || die   abi-${abi} oldminstall $@ || die
592   done   done
593  }  }
594    fi
595    
596  minstall_destdir()  minstall_destdir()
597  {  {
# Line 465  then Line 614  then
614   # rename the old one   # rename the old one
615   old_mpatch=old$(typeset -f mpatch)   old_mpatch=old$(typeset -f mpatch)
616   eval "${old_mpatch}"   eval "${old_mpatch}"
617  fi  
618  mpatch()  mpatch()
619  {  {
620   local abi   local abi
# Line 481  mpatch() Line 630  mpatch()
630   oldmpatch $@ || die   oldmpatch $@ || die
631   done   done
632  }  }
633    fi
634    
635  if [[ ! -z $(typeset -f mlibtoolize) ]]  if [[ ! -z $(typeset -f mlibtoolize) ]]
636  then  then
637   # rename the old one   # rename the old one
638   old_mlibtoolize=old$(typeset -f mlibtoolize)   old_mlibtoolize=old$(typeset -f mlibtoolize)
639   eval "${old_mlibtoolize}"   eval "${old_mlibtoolize}"
640  fi  
641  mlibtoolize()  mlibtoolize()
642  {  {
643   local abi   local abi
# Line 503  mlibtoolize() Line 653  mlibtoolize()
653   oldmlibtoolize $@ || die   oldmlibtoolize $@ || die
654   done   done
655  }  }
656    fi
657    
658  if [[ ! -z $(typeset -f mautoreconf) ]]  if [[ ! -z $(typeset -f mautoreconf) ]]
659  then  then
660   # rename the old one   # rename the old one
661   old_mautoreconf=old$(typeset -f mautoreconf)   old_mautoreconf=old$(typeset -f mautoreconf)
662   eval "${old_mautoreconf}"   eval "${old_mautoreconf}"
663  fi  
664  mautoreconf()  mautoreconf()
665  {  {
666   local abi   local abi
# Line 525  mautoreconf() Line 676  mautoreconf()
676   oldmautoreconf $@ || die   oldmautoreconf $@ || die
677   done   done
678  }  }
679    fi
680    
681  if [[ ! -z $(typeset -f minstalldocs) ]]  if [[ ! -z $(typeset -f minstalldocs) ]]
682  then  then
683   # rename the old one   # rename the old one
684   old_minstalldocs=old$(typeset -f minstalldocs)   old_minstalldocs=old$(typeset -f minstalldocs)
685   eval "${old_minstalldocs}"   eval "${old_minstalldocs}"
686  fi  
687  minstalldocs()  minstalldocs()
688  {  {
689   local abi   local abi
# Line 548  minstalldocs() Line 700  minstalldocs()
700   oldminstalldocs $@ || die   oldminstalldocs $@ || die
701   done   done
702  }  }
703    fi
704    
705  ##  ##
706  # multilib mbuild wrappers  # multilib mbuild wrappers
# Line 582  multilib_src_install() Line 735  multilib_src_install()
735  {  {
736   if [[ ! -z $(typeset -f cmake_src_install) ]]   if [[ ! -z $(typeset -f cmake_src_install) ]]
737   then   then
738   cmake_src_compile || die   cmake_src_install || die
739   else   else
740   mmake DESTDIR=${BINDIR} install || die   mmake DESTDIR=${BINDIR} install || die
741   fi   fi

Legend:
Removed from v.20978  
changed lines
  Added in v.29786