Magellan Linux

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

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

revision 439 by niro, Mon Mar 19 19:09:59 2007 UTC revision 447 by niro, Tue Mar 20 01:15:31 2007 UTC
# Line 4  Line 4 
4  # needs pkgbuild_dir (mage)  # needs pkgbuild_dir (mage)
5    
6  # SMAGE2  # SMAGE2
7  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.53 2007-03-19 19:09:59 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.55 2007-03-20 01:15:31 niro Exp $
8    
9  #01.10.2004  #01.10.2004
10  # added ccache support  # added ccache support
# Line 399  mpatch() Line 399  mpatch()
399  {  {
400   local PATCHOPTS   local PATCHOPTS
401   local PATCHFILE   local PATCHFILE
402     local i
403    
404   PATCHOPTS=$1   PATCHOPTS=$1
405   PATCHFILE=$2   PATCHFILE=$2
406    
407     if [[ -z $2 ]]
408     then
409     PATCHFILE=$1
410    
411     ## patch level auto-detection, get patch level
412     for ((i=0; i < 10; i++))
413     do
414     patch --dry-run -Np${i} -i ${SOURCEDIR}/${PNAME}/${PATCHFILE} > /dev/null
415     if [[ $? = 0 ]]
416     then
417     PATCHOPTS="-Np${i}"
418     break
419     fi
420     done
421     fi
422    
423   echo -e "${COLBLUE}*** ${COLGREEN}Applying patch '${PATCHFILE}'${COLDEFAULT}"   echo -e "${COLBLUE}*** ${COLGREEN}Applying patch '${PATCHFILE}'${COLDEFAULT}"
424   patch "${PATCHOPTS}" -i ${SOURCEDIR}/${PNAME}/${PATCHFILE}   patch "${PATCHOPTS}" -i ${SOURCEDIR}/${PNAME}/${PATCHFILE}
425  }  }
# Line 461  setup_distcc_environment() Line 478  setup_distcc_environment()
478  {  {
479   if [ -x /usr/bin/distcc ]   if [ -x /usr/bin/distcc ]
480   then   then
481   echo "Using DistCC for compilation ..."   echo -e "${COLBLUE}---${COLGREEN} Using DistCC for compilation ...${COLDEFAULT}"
482   export PATH=/usr/$(mlibdir)/distcc/bin:${PATH} || die "distcc: could not export new $PATH"   export PATH=/usr/$(mlibdir)/distcc/bin:${PATH} || die "distcc: could not export new $PATH"
483    
484   export DISTCC_DIR="${DISTCC_DIR}" || die "distcc_dir export failed"   export DISTCC_DIR="${DISTCC_DIR}" || die "distcc_dir export failed"
# Line 476  setup_ccache_environment() Line 493  setup_ccache_environment()
493  {  {
494   if [ -x /usr/bin/ccache ]   if [ -x /usr/bin/ccache ]
495   then   then
496   echo "Using CCache for compilation ..."   echo -e "${COLBLUE}---${COLGREEN} Using CCache for compilation ...${COLDEFAULT}"
497   export PATH=/usr/$(mlibdir)/ccache/bin:${PATH} || die "ccache: could not export new $PATH"   export PATH=/usr/$(mlibdir)/ccache/bin:${PATH} || die "ccache: could not export new $PATH"
498   fi   fi
499  }  }
# Line 591  build_mage_script() Line 608  build_mage_script()
608   > ${dest}   > ${dest}
609    
610   # header   # header
611   echo '# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.53 2007-03-19 19:09:59 niro Exp $' >> ${dest}   echo '# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.55 2007-03-20 01:15:31 niro Exp $' >> ${dest}
612   echo  >> ${dest}   echo  >> ${dest}
613    
614   # pgkname and state   # pgkname and state
# Line 1044  if [[ ${CREATE_SRC_PKG_TARBALL} = true ] Line 1061  if [[ ${CREATE_SRC_PKG_TARBALL} = true ]
1061  then  then
1062   if [[ -d ${SOURCEDIR}/${PNAME} ]]   if [[ -d ${SOURCEDIR}/${PNAME} ]]
1063   then   then
1064   echo -e "${COLGREEN}Deleting old sourcefiles ${COLBLUE}${SOURCEDIR}/${PNAME}${COLGREEN} ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} deleting old sourcefiles ${COLBLUE}${SOURCEDIR}/${PNAME}${COLGREEN} ...${COLDEFAULT}"
1065   rm -rf ${SOURCEDIR}/${PNAME}   rm -rf ${SOURCEDIR}/${PNAME}
1066   fi   fi
1067  fi  fi

Legend:
Removed from v.439  
changed lines
  Added in v.447