Magellan Linux

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

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

revision 20977 by niro, Wed Feb 19 11:32:53 2014 UTC revision 22066 by niro, Fri Aug 22 12:04:19 2014 UTC
# 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) ]]
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}
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
# Line 351  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}
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 munpack) ]]  if [[ ! -z $(typeset -f munpack) ]]
404  then  then
405   # rename the old one   # rename the old one
406   old_munpack=old$(typeset -f munpack)   old_munpack=old$(typeset -f munpack)
407   eval "${old_munpack}"   eval "${old_munpack}"
408  fi  
409  munpack()  munpack()
410  {  {
411   local abi   local abi
# Line 378  munpack() Line 421  munpack()
421   mv ${SRCDIR} ${SRCDIR}-${abi} || die   mv ${SRCDIR} ${SRCDIR}-${abi} || die
422   done   done
423  }  }
424    fi
425    
426  if [[ ! -z $(typeset -f mmake) ]]  if [[ ! -z $(typeset -f mmake) ]]
427  then  then
428   # rename the old one   # rename the old one
429   old_mmake=old$(typeset -f mmake)   old_mmake=old$(typeset -f mmake)
430   eval "${old_mmake}"   eval "${old_mmake}"
431  fi  
432  mmake()  mmake()
433  {  {
434   local abi   local abi
# Line 400  mmake() Line 444  mmake()
444   abi-${abi} oldmmake $@ || die   abi-${abi} oldmmake $@ || die
445   done   done
446  }  }
447    fi
448    
449  if [[ ! -z $(typeset -f minstall) ]]  if [[ ! -z $(typeset -f minstall) ]]
450  then  then
451   # rename the old one   # rename the old one
452   old_minstall=old$(typeset -f minstall)   old_minstall=old$(typeset -f minstall)
453   eval "${old_minstall}"   eval "${old_minstall}"
454  fi  
455  minstall()  minstall()
456  {  {
457   local abi   local abi
# Line 422  minstall() Line 467  minstall()
467   abi-${abi} oldminstall $@ || die   abi-${abi} oldminstall $@ || die
468   done   done
469  }  }
470    fi
471    
472  minstall_destdir()  minstall_destdir()
473  {  {
# Line 444  then Line 490  then
490   # rename the old one   # rename the old one
491   old_mpatch=old$(typeset -f mpatch)   old_mpatch=old$(typeset -f mpatch)
492   eval "${old_mpatch}"   eval "${old_mpatch}"
493  fi  
494  mpatch()  mpatch()
495  {  {
496   local abi   local abi
# Line 460  mpatch() Line 506  mpatch()
506   oldmpatch $@ || die   oldmpatch $@ || die
507   done   done
508  }  }
509    fi
510    
511  if [[ ! -z $(typeset -f mlibtoolize) ]]  if [[ ! -z $(typeset -f mlibtoolize) ]]
512  then  then
513   # rename the old one   # rename the old one
514   old_mlibtoolize=old$(typeset -f mlibtoolize)   old_mlibtoolize=old$(typeset -f mlibtoolize)
515   eval "${old_mlibtoolize}"   eval "${old_mlibtoolize}"
516  fi  
517  mlibtoolize()  mlibtoolize()
518  {  {
519   local abi   local abi
# Line 482  mlibtoolize() Line 529  mlibtoolize()
529   oldmlibtoolize $@ || die   oldmlibtoolize $@ || die
530   done   done
531  }  }
532    fi
533    
534  if [[ ! -z $(typeset -f mautoreconf) ]]  if [[ ! -z $(typeset -f mautoreconf) ]]
535  then  then
536   # rename the old one   # rename the old one
537   old_mautoreconf=old$(typeset -f mautoreconf)   old_mautoreconf=old$(typeset -f mautoreconf)
538   eval "${old_mautoreconf}"   eval "${old_mautoreconf}"
539  fi  
540  mautoreconf()  mautoreconf()
541  {  {
542   local abi   local abi
# Line 504  mautoreconf() Line 552  mautoreconf()
552   oldmautoreconf $@ || die   oldmautoreconf $@ || die
553   done   done
554  }  }
555    fi
556    
557  if [[ ! -z $(typeset -f minstalldocs) ]]  if [[ ! -z $(typeset -f minstalldocs) ]]
558  then  then
559   # rename the old one   # rename the old one
560   old_minstalldocs=old$(typeset -f minstalldocs)   old_minstalldocs=old$(typeset -f minstalldocs)
561   eval "${old_minstalldocs}"   eval "${old_minstalldocs}"
562  fi  
563  minstalldocs()  minstalldocs()
564  {  {
565   local abi   local abi
# Line 527  minstalldocs() Line 576  minstalldocs()
576   oldminstalldocs $@ || die   oldminstalldocs $@ || die
577   done   done
578  }  }
579    fi
580    
581  ##  ##
582  # multilib mbuild wrappers  # multilib mbuild wrappers
# Line 561  multilib_src_install() Line 611  multilib_src_install()
611  {  {
612   if [[ ! -z $(typeset -f cmake_src_install) ]]   if [[ ! -z $(typeset -f cmake_src_install) ]]
613   then   then
614   cmake_src_compile || die   cmake_src_install || die
615   else   else
616   mmake DESTDIR=${BINDIR} install || die   mmake DESTDIR=${BINDIR} install || die
617   fi   fi

Legend:
Removed from v.20977  
changed lines
  Added in v.22066