Magellan Linux

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

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

revision 2831 by niro, Fri Sep 19 11:18:38 2014 UTC revision 3081 by niro, Tue May 22 14:09:28 2018 UTC
# Line 498  mstriplibs() Line 498  mstriplibs()
498    
499   [[ -z ${stripdir} ]] && stripdir="${BINDIR}"   [[ -z ${stripdir} ]] && stripdir="${BINDIR}"
500   [[ -z ${STRIP_DYN_LIB} ]] && STRIP_DYN_LIB="--strip-debug"   [[ -z ${STRIP_DYN_LIB} ]] && STRIP_DYN_LIB="--strip-debug"
501   find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_LIB} 2> /dev/null   find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep "[shared object|pie executable]" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_LIB} 2> /dev/null
502  }  }
503    
504  mstripbins()  mstripbins()
# Line 507  mstripbins() Line 507  mstripbins()
507    
508   [[ -z ${stripdir} ]] && stripdir="${BINDIR}"   [[ -z ${stripdir} ]] && stripdir="${BINDIR}"
509   [[ -z ${STRIP_DYN_BIN} ]] && STRIP_DYN_BIN="--strip-debug"   [[ -z ${STRIP_DYN_BIN} ]] && STRIP_DYN_BIN="--strip-debug"
510   find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep "executable" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_BIN} 2> /dev/null   find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep -v "pie executable" | grep "executable" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_BIN} 2> /dev/null
511  }  }
512    
513  mstripstatic()  mstripstatic()
# Line 595  march() Line 595  march()
595   return "${retval}"   return "${retval}"
596  }  }
597    
598  marchsrcfile()  marchvariable()
599  {  {
600   local retval   local retval
601   local var="$1"   local var="$1"
602    
603   [[ -z ${var} ]] && var="SRCFILE"   [[ -n ${var} ]] || die "marchvariable(): missing variable"
604    
605   if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]]   if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]]
606   then   then
# Line 613  marchsrcfile() Line 613  marchsrcfile()
613   return "${retval}"   return "${retval}"
614  }  }
615    
616    marchsrcfile()
617    {
618     local retval
619     local var="$1"
620    
621     [[ -z ${var} ]] && var="SRCFILE"
622    
623     marchvariable "${var}" || die
624    }
625    
626  marchsrcdir()  marchsrcdir()
627  {  {
628   local retval   local retval
# Line 620  marchsrcdir() Line 630  marchsrcdir()
630    
631   [[ -z ${var} ]] && var="SRCDIR"   [[ -z ${var} ]] && var="SRCDIR"
632    
633   if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]]   marchvariable "${var}" || die
  then  
  eval echo \$${var}_${ARCH/i*86/x86} | tr ';' '\n'  
  retval=0  
  else  
  retval=1  
  fi  
   
  return "${retval}"  
634  }  }
635    
636  marchdepend()  marchdepend()
# Line 1192  generate_package_md5sum() Line 1194  generate_package_md5sum()
1194    
1195  source_pkg_build()  source_pkg_build()
1196  {  {
  if [[ ${PKGTYPE} = virtual ]]  
  then  
  echo "Virtual package detected; src-pkg-tarball not necessary ..."  
  return 0  
  fi  
   
1197   if [[ ! -d ${SOURCEDIR}/${PNAME} ]]   if [[ ! -d ${SOURCEDIR}/${PNAME} ]]
1198   then   then
1199   echo "No SRC_URI defined; src-pkg-tarball not necessary ..."   install -d ${SOURCEDIR}/${PNAME}
  return 0  
1200   fi   fi
1201    
1202   [ -z "${SRCPKGDIR}" ] && die "\$SRCPKGDIR not found. Please setup your ${MAGERC} correctly."   [ -z "${SRCPKGDIR}" ] && die "\$SRCPKGDIR not found. Please setup your ${MAGERC} correctly."

Legend:
Removed from v.2831  
changed lines
  Added in v.3081