Magellan Linux

Diff of /trunk/mage/usr/lib/mage/smage2.sh

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

revision 1784 by niro, Mon Mar 12 23:27:53 2012 UTC revision 2159 by niro, Wed Aug 14 07:55:29 2013 UTC
# Line 318  export MAKEOPTS="${MAKEOPTS}" || die "MA Line 318  export MAKEOPTS="${MAKEOPTS}" || die "MA
318  # setup for distcc goes *before* ccache, so ccache comes before distcc in path  # setup for distcc goes *before* ccache, so ccache comes before distcc in path
319  mqueryfeature "distcc" && setup_distcc_environment  mqueryfeature "distcc" && setup_distcc_environment
320    
321    # setup icecc
322    # setup for icecc goes *before* ccache, so ccache comes before icecc in path
323    mqueryfeature "icecream" && setup_icecc_environment
324    
325  # setup ccache  # setup ccache
326  mqueryfeature "ccache" && setup_ccache_environment  mqueryfeature "ccache" && setup_ccache_environment
327    
# Line 409  else Line 413  else
413   split_info_${subpackage}   split_info_${subpackage}
414   if [[ ${PKGTYPE} = virtual ]]   if [[ ${PKGTYPE} = virtual ]]
415   then   then
416     echo
417     echo -en "${COLBLUE}*** ${COLDEFAULT}"
418     echo -en "Virtual package detected"
419     echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}"
420     echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..."
421    
422   echo "virtual package detected; nothing will be build ..."   echo "virtual package detected; nothing will be build ..."
423   # automatically set !pkgbuild here too   # automatically set !pkgbuild here too
424   msetfeature "!pkgbuild"   msetfeature "!pkgbuild"
# Line 423  else Line 433  else
433    
434   echo   echo
435   echo -en "${COLBLUE}*** ${COLDEFAULT}"   echo -en "${COLBLUE}*** ${COLDEFAULT}"
436   echo -en "  Running ${COLGREEN}split src_install()${COLDEFAULT}"   echo -en "Running ${COLGREEN}split src_install()${COLDEFAULT}"
437   echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}"   echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}"
438   echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..."   echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..."
439    
# Line 433  else Line 443  else
443   step_by_step src_install_${subpackage}   step_by_step src_install_${subpackage}
444   fi   fi
445   fi   fi
446     # restore smage environment
447     split_restore_variables
448   done   done
  # restore bindir & pname  
  split_restore_variables  
449   # unset all saved smage variables   # unset all saved smage variables
450   split_unset_variables   split_unset_variables
451   else   else
# Line 459  else Line 469  else
469   # compressing doc, info & man files   # compressing doc, info & man files
470   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
471   then   then
472     # save smage environment
473     split_save_variables
474   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
475   do   do
476   run_resume post-mcompressdoc_${subpackage} || mcompressdocs ${BINDIR}_${subpackage}   # honor split_info
477   resume_stamp post-mcompressdoc_${subpackage}   split_info_${subpackage}
478     if [[ ${PKGTYPE} = virtual ]]
479     then
480     # automatically set !pkgbuild here too
481     msetfeature "!pkgbuild"
482     fi
483    
484     if mqueryfeature "!compressdoc"
485     then
486     echo -e "!compressdoc detected; documentation of '${subpackage}' will not be compressed ..."
487     elif mqueryfeature "!pkgbuild"
488     then
489     echo "!pkgbuild detected; skipping documentation compression for '${subpackage}' ..."
490     else
491     run_resume post-mcompressdoc_${subpackage} || mcompressdocs ${BINDIR}_${subpackage}
492     resume_stamp post-mcompressdoc_${subpackage}
493     fi
494     # restore smage environment
495     split_restore_variables
496   done   done
497     # unset saved variables
498     split_unset_variables
499   else   else
500   run_resume post-mcompressdoc || mcompressdocs ${BINDIR}   run_resume post-mcompressdoc || mcompressdocs ${BINDIR}
501   resume_stamp post-mcompressdoc   resume_stamp post-mcompressdoc
# Line 478  then Line 510  then
510   else   else
511   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
512   then   then
513     # save smage environment
514     split_save_variables
515   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
516   do   do
517   echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives for '${subpackage}' ...${COLDEFAULT}"   # honor split_info
518   run_resume post-mstriplibtoolarchive_${subpackage} || mstriplibtoolarchive ${BINDIR}_${subpackage}   split_info_${subpackage}
519   resume_stamp post-mstriplibtoolarchive_${subpackage}   if [[ ${PKGTYPE} = virtual ]]
520     then
521     # automatically set !pkgbuild here too
522     msetfeature "!pkgbuild"
523     fi
524    
525     if mqueryfeature "!libtool"
526     then
527     if mqueryfeature "!pkgbuild"
528     then
529     echo "!pkgbuild detected; skipping libtool archive stripping for '${subpackage}'..."
530     else
531     echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives for '${subpackage}' ...${COLDEFAULT}"
532     run_resume post-mstriplibtoolarchive_${subpackage} || mstriplibtoolarchive ${BINDIR}_${subpackage}
533     resume_stamp post-mstriplibtoolarchive_${subpackage}
534     fi
535     fi
536    
537     # restore smage environment
538     split_restore_variables
539   done   done
540     # unset saved variables
541     split_unset_variables
542   else   else
543   echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives ...${COLDEFAULT}"
544   run_resume post-mstriplibtoolarchive || mstriplibtoolarchive ${BINDIR}   run_resume post-mstriplibtoolarchive || mstriplibtoolarchive ${BINDIR}
# Line 496  if mqueryfeature "purge" Line 551  if mqueryfeature "purge"
551  then  then
552   if mqueryfeature "!pkgbuild"   if mqueryfeature "!pkgbuild"
553   then   then
554   echo "!pkgbuild detected; skipping file purgation..."   echo "!pkgbuild detected; skipping file purgation ..."
555   else   else
556   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
557   then   then
558     # save smage environment
559     split_save_variables
560   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
561   do   do
562   echo -e "${COLBLUE}===${COLGREEN} purging all purge targets in '${subpackage}' ...${COLDEFAULT}"   # honor split_info
563   run_resume post-mpurgetargets_${subpackage} || mpurgetargets ${BINDIR}_${subpackage}   split_info_${subpackage}
564   resume_stamp post-mpurgetargets_${subpackage}   if [[ ${PKGTYPE} = virtual ]]
565     then
566     # automatically set !pkgbuild here too
567     msetfeature "!pkgbuild"
568     fi
569    
570     if mqueryfeature "purge"
571     then
572     if mqueryfeature "!pkgbuild"
573     then
574     echo "!pkgbuild detected; skipping file purgation for '${subpackage}' ..."
575     else
576     echo -e "${COLBLUE}===${COLGREEN} purging all purge targets in '${subpackage}' ...${COLDEFAULT}"
577     run_resume post-mpurgetargets_${subpackage} || mpurgetargets ${BINDIR}_${subpackage}
578     resume_stamp post-mpurgetargets_${subpackage}
579     fi
580     fi
581    
582     # restore smage environment
583     split_restore_variables
584   done   done
585     # unset saved variables
586     split_unset_variables
587   else   else
588   echo -e "${COLBLUE}===${COLGREEN} purging all purge targets ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} purging all purge targets ...${COLDEFAULT}"
589   run_resume post-mpurgetargets || mpurgetargets ${BINDIR}   run_resume post-mpurgetargets || mpurgetargets ${BINDIR}
# Line 517  fi Line 595  fi
595  # stripping all bins and libs  # stripping all bins and libs
596  if mqueryfeature "!strip"  if mqueryfeature "!strip"
597  then  then
598   echo -e "!strip detected; Package will not be stripped ..."   echo -e "!strip detected; package will not be stripped ..."
599  elif mqueryfeature "!pkgbuild"  elif mqueryfeature "!pkgbuild"
600  then  then
601   echo "!pkgbuild detected; skipping stripping of the package ..."   echo "!pkgbuild detected; skipping stripping of the package ..."
602  else  else
603   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
604   then   then
605     # save smage environment
606     split_save_variables
607   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
608   do   do
609   echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}"   # honor split_info
610   run_resume post-mstripbins_${subpackage} || mstripbins ${BINDIR}_${subpackage}   split_info_${subpackage}
611   resume_stamp post-mstripbins_${subpackage}   if [[ ${PKGTYPE} = virtual ]]
612   echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries for '${subpackage}' ...${COLDEFAULT}"   then
613   run_resume post-mstriplibs_${subpackage} || mstriplibs ${BINDIR}_${subpackage}   # automatically set !pkgbuild here too
614   resume_stamp post-mstriplibs_${subpackage}   msetfeature "!pkgbuild"
615   echo -e "${COLBLUE}===${COLGREEN} stripping static libraries for '${subpackage}' ...${COLDEFAULT}"   fi
616   run_resume post-mstripstatic_${subpackage} || mstripstatic ${BINDIR}_${subpackage}  
617   resume_stamp post-mstripstatic_${subpackage}   if mqueryfeature "!strip"
618     then
619     echo -e "!strip detected; package '${subpackage}' will not be stripped ..."
620     elif mqueryfeature "!pkgbuild"
621     then
622     echo "!pkgbuild detected; skipping stripping of the package '${subpackage}' ..."
623     else
624     echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}"
625     run_resume post-mstripbins_${subpackage} || mstripbins ${BINDIR}_${subpackage}
626     resume_stamp post-mstripbins_${subpackage}
627     echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries for '${subpackage}' ...${COLDEFAULT}"
628     run_resume post-mstriplibs_${subpackage} || mstriplibs ${BINDIR}_${subpackage}
629     resume_stamp post-mstriplibs_${subpackage}
630     echo -e "${COLBLUE}===${COLGREEN} stripping static libraries for '${subpackage}' ...${COLDEFAULT}"
631     run_resume post-mstripstatic_${subpackage} || mstripstatic ${BINDIR}_${subpackage}
632     resume_stamp post-mstripstatic_${subpackage}
633     fi
634    
635     # restore smage environment
636     split_restore_variables
637   done   done
638     # unset saved variables
639     split_unset_variables
640   else   else
641   echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}"
642   run_resume post-mstripbins || mstripbins ${BINDIR}   run_resume post-mstripbins || mstripbins ${BINDIR}
# Line 549  else Line 650  else
650   fi   fi
651  fi  fi
652    
653    if mqueryfeature "qalint"
654    then
655     if mqueryfeature "!pkgbuild"
656     then
657     echo "!pkgbuild detected; skipping QA lint checks ..."
658     else
659     if [[ -n ${SPLIT_PACKAGES} ]]
660     then
661     # save smage environment
662     split_save_variables
663     for subpackage in ${SPLIT_PACKAGES}
664     do
665     # honor split_info
666     split_info_${subpackage}
667     if [[ ${PKGTYPE} = virtual ]]
668     then
669     # automatically set !pkgbuild here too
670     msetfeature "!pkgbuild"
671     fi
672    
673     if mqueryfeature "qalint"
674     then
675     if mqueryfeature "!pkgbuild"
676     then
677     echo "!pkgbuild detected; skipping QA lint checks for '${subpackage}' ..."
678     else
679     echo -e "${COLBLUE}===${COLGREEN} running QA lint checks for '${subpackage}' ...${COLDEFAULT}"
680     mqalint ${BINDIR}_${subpackage}
681     fi
682     fi
683    
684     # restore smage environment
685     split_restore_variables
686     done
687     # unset saved variables
688     split_unset_variables
689     else
690     echo -e "${COLBLUE}===${COLGREEN} running QA lint checks ...${COLDEFAULT}"
691     mqalint ${BINDIR}
692     fi
693     fi
694    fi
695    
696  if mqueryfeature "!pkgbuild"  if mqueryfeature "!pkgbuild"
697  then  then
698   echo -e "!pkgbuild detected; Package will not be build ..."   echo -e "!pkgbuild detected; Package will not be build ..."
# Line 599  else Line 743  else
743   PCAT="${PCATEGORIE}"   PCAT="${PCATEGORIE}"
744   unset PCATEGORIE   unset PCATEGORIE
745   fi   fi
746     if [[ ${PKGTYPE} = virtual ]]
747     then
748     # automatically set !pkgbuild here too
749     msetfeature "!pkgbuild"
750     fi
751    
752   # jump to next one if !pkgbuild is set in split_info   # jump to next one if !pkgbuild is set in split_info
753   mqueryfeature "!pkgbuild" && continue   if mqueryfeature "!pkgbuild"
754     then
755     # restore smage environment
756     split_restore_variables
757     continue
758     fi
759    
760   # check if an special subpackage_pkgbuild exists   # check if an special subpackage_pkgbuild exists
761   if typeset -f ${PNAME}_pkgbuild > /dev/null   if typeset -f ${PNAME}_pkgbuild > /dev/null

Legend:
Removed from v.1784  
changed lines
  Added in v.2159