Magellan Linux

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

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

revision 1651 by niro, Fri Jan 13 22:26:20 2012 UTC revision 1684 by niro, Mon Feb 6 10:22:30 2012 UTC
# Line 7  Line 7 
7  smagesource()  smagesource()
8  {  {
9   local file="$1"   local file="$1"
10   local mystate   local localstate
11     local distfilestate
12   local mytag   local mytag
13    
14   source ${file}   source ${file}
# Line 29  smagesource() Line 30  smagesource()
30   fi   fi
31   fi   fi
32    
33   [[ -n ${STATE} ]] && mystate="${STATE}"   [[ -n ${STATE} ]] && localstate="${STATE}"
34   [[ -n ${DISTROTAG} ]] && mytag="${DISTROTAG}"   [[ -n ${DISTROTAG} ]] && mytag="${DISTROTAG}"
35    
  # do not overide if local state was broken or disabled!  
  case ${STATE} in  
  broken) return ;;  
  disabled) return ;;  
  esac  
   
36   if [ -f ${SMAGESCRIPTSDIR}/distribution ]   if [ -f ${SMAGESCRIPTSDIR}/distribution ]
37   then   then
38   source ${SMAGESCRIPTSDIR}/distribution   source ${SMAGESCRIPTSDIR}/distribution
39   [[ -n ${STATE} ]] && mystate="${STATE}"   [[ -n ${STATE} ]] && distfilestate="${STATE}"
40   [[ -n ${DISTROTAG} ]] && mytag="${DISTROTAG}"   [[ -n ${DISTROTAG} ]] && mytag="${DISTROTAG}"
41   fi   fi
42   # now switch state and export it   # now switch state and export it but do not overide any local states
43   STATE="${mystate}"   if [[ ! -z ${localstate} ]]
44     then
45     STATE="${localstate}"
46     else
47     STATE="${distfilestate}"
48     fi
49    
50   if mqueryfeature "pkgdistrotag"   if mqueryfeature "pkgdistrotag"
51   then   then
# Line 59  smagesource() Line 59  smagesource()
59   echo -e "${COLRED}Requested 'pkgdistrotag' but no \$DISTROTAG found!${COLDEFAULT}"   echo -e "${COLRED}Requested 'pkgdistrotag' but no \$DISTROTAG found!${COLDEFAULT}"
60   echo -e "${COLRED}Disabled the feature for pkgbuild sanity!${COLDEFAULT}"   echo -e "${COLRED}Disabled the feature for pkgbuild sanity!${COLDEFAULT}"
61   else   else
62   # now switch state and export it   # now switch state and export it but do not overide any local states
63   export DISTROTAG="${mytag}"   export DISTROTAG="${mytag}"
64   fi   fi
65   else   else
# Line 281  mconfigure() Line 281  mconfigure()
281   fi   fi
282   fi   fi
283    
284   # always enable shared by default   # always enable shared by default but not for waf configure
285   if [[ ! -z $(./configure --help | grep -- '--.*able-shared') ]]   if [[ ! -z $(./configure --help | grep -- '--.*able-shared') ]] &&
286     [[ -z $(./configure --version | grep waf) ]]
287   then   then
288   myopts+=" --enable-shared"   myopts+=" --enable-shared"
289   fi   fi
# Line 1183  source_pkg_build() Line 1184  source_pkg_build()
1184   [[ ! -d ${SRCPKGDIR} ]] && install -d ${SRCPKGDIR}   [[ ! -d ${SRCPKGDIR} ]] && install -d ${SRCPKGDIR}
1185   mv ${BUILDDIR}/${PNAME}-${PVER}-${PBUILD}.tar.bz2 ${SRCPKGDIR}/${PNAME}-${PVER}-${PBUILD}.${SRCPKGSUFFIX}   mv ${BUILDDIR}/${PNAME}-${PVER}-${PBUILD}.tar.bz2 ${SRCPKGDIR}/${PNAME}-${PVER}-${PBUILD}.${SRCPKGSUFFIX}
1186    
1187   echo -e "${COLGREEN}Source package ${COLBLUE}${PNAME}-${PVER}-${PBUILD}.${SRCPKGSUFFIX} ${COLGREEN}successfully builded.${COLDEFAULT}"   echo -e "${COLGREEN}Source package ${COLBLUE}${PNAME}-${PVER}-${PBUILD}.${SRCPKGSUFFIX} ${COLGREEN}successfully builded.${COLDEFAULT}\n"
1188  }  }
1189    
1190  step_by_step()  step_by_step()

Legend:
Removed from v.1651  
changed lines
  Added in v.1684