--- trunk/mage/usr/lib/mage/smage2.functions.sh 2012/01/13 22:26:20 1651 +++ trunk/mage/usr/lib/mage/smage2.functions.sh 2012/02/06 10:22:30 1684 @@ -7,7 +7,8 @@ smagesource() { local file="$1" - local mystate + local localstate + local distfilestate local mytag source ${file} @@ -29,23 +30,22 @@ fi fi - [[ -n ${STATE} ]] && mystate="${STATE}" + [[ -n ${STATE} ]] && localstate="${STATE}" [[ -n ${DISTROTAG} ]] && mytag="${DISTROTAG}" - # do not overide if local state was broken or disabled! - case ${STATE} in - broken) return ;; - disabled) return ;; - esac - if [ -f ${SMAGESCRIPTSDIR}/distribution ] then source ${SMAGESCRIPTSDIR}/distribution - [[ -n ${STATE} ]] && mystate="${STATE}" + [[ -n ${STATE} ]] && distfilestate="${STATE}" [[ -n ${DISTROTAG} ]] && mytag="${DISTROTAG}" fi - # now switch state and export it - STATE="${mystate}" + # now switch state and export it but do not overide any local states + if [[ ! -z ${localstate} ]] + then + STATE="${localstate}" + else + STATE="${distfilestate}" + fi if mqueryfeature "pkgdistrotag" then @@ -59,7 +59,7 @@ echo -e "${COLRED}Requested 'pkgdistrotag' but no \$DISTROTAG found!${COLDEFAULT}" echo -e "${COLRED}Disabled the feature for pkgbuild sanity!${COLDEFAULT}" else - # now switch state and export it + # now switch state and export it but do not overide any local states export DISTROTAG="${mytag}" fi else @@ -281,8 +281,9 @@ fi fi - # always enable shared by default - if [[ ! -z $(./configure --help | grep -- '--.*able-shared') ]] + # always enable shared by default but not for waf configure + if [[ ! -z $(./configure --help | grep -- '--.*able-shared') ]] && + [[ -z $(./configure --version | grep waf) ]] then myopts+=" --enable-shared" fi @@ -1183,7 +1184,7 @@ [[ ! -d ${SRCPKGDIR} ]] && install -d ${SRCPKGDIR} mv ${BUILDDIR}/${PNAME}-${PVER}-${PBUILD}.tar.bz2 ${SRCPKGDIR}/${PNAME}-${PVER}-${PBUILD}.${SRCPKGSUFFIX} - 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" } step_by_step()