Magellan Linux

Diff of /smage/branches/alx07x-unstable/include/multilib.sminc

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

revision 5869 by niro, Fri Oct 17 08:03:03 2014 UTC revision 11529 by niro, Thu Dec 21 09:38:37 2017 UTC
# Line 113  abi-m32() Line 113  abi-m32()
113   fi   fi
114    
115   # run any given command   # run any given command
116     if [[ ${MULTILIB_VERBOSE} = true ]]
117     then
118     echo -e "${COLGREEN}Executing:${COLDEFAULT} '$@'"
119     fi
120   eval $@ || die   eval $@ || die
121    
122   unset ABI CC CXX ABI_LIBDIR   unset ABI CC CXX ABI_LIBDIR
# Line 162  abi-m64() Line 166  abi-m64()
166   fi   fi
167    
168   # run any given command   # run any given command
169     if [[ ${MULTILIB_VERBOSE} = true ]]
170     then
171     echo -e "${COLGREEN}Executing:${COLDEFAULT} '$@'"
172     fi
173   eval $@ || die   eval $@ || die
174    
175   unset ABI CC CXX ABI_LIBDIR   unset ABI CC CXX ABI_LIBDIR
# Line 278  mconfigure() Line 286  mconfigure()
286  }  }
287  fi  fi
288    
 if [[ ! -z $(typeset -f cmake_configure) ]]  
 then  
  # rename the old one  
  old_cmake_configure=old$(typeset -f cmake_configure)  
  eval "${old_cmake_configure}"  
   
 cmake_configure()  
 {  
  local abi  
  local abis_to_run="${MULTILIB_ABIS}"  
   
  # respect MULTILIB_ONLY_ABI variable  
  [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"  
   
  local saved_SRCDIR="${SRCDIR}"  
  for abi in ${abis_to_run}  
  do  
  SRCDIR="${saved_SRCDIR}-${abi}"  
  # honor inside and outside build-dir builds  
  if [ -d ${BUILDDIR}/build-${abi} ]  
  then  
  cd ${BUILDDIR}/build-${abi}  
  else  
  cd ${SRCDIR}  
  fi  
  abi-${abi} oldcmake_configure $@ || die  
  done  
  # restore SRCDIR  
  SRCDIR="${saved_SRCDIR}"  
 }  
 fi  
   
 if [[ ! -z $(typeset -f cmake_src_compile) ]]  
 then  
  # rename the old one  
  old_cmake_src_compile=old$(typeset -f cmake_src_compile)  
  eval "${old_cmake_src_compile}"  
   
 cmake_src_compile()  
 {  
  local abi  
  local abis_to_run="${MULTILIB_ABIS}"  
   
  # respect MULTILIB_ONLY_ABI variable  
  [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"  
   
  for abi in ${abis_to_run}  
  do  
  # remove build dir if exist  
  [[ -d ${BUILDDIR}/build-${abi} ]] && rm -rf ${BUILDDIR}/build-${abi}  
   
  # build outside of the source dir  
  install -d ${BUILDDIR}/build-${abi} || die  
  cd ${BUILDDIR}/build-${abi}  
  done  
   
  cmake_configure || die  
   
  for abi in ${abis_to_run}  
  do  
  cd ${BUILDDIR}/build-${abi}  
  abi-${abi} oldmmake $@ || die  
  done  
 }  
 fi  
   
 if [[ ! -z $(typeset -f cmake_src_check) ]]  
 then  
  # rename the old one  
  old_cmake_src_check=old$(typeset -f cmake_src_check)  
  eval "${old_cmake_check}"  
   
 cmake_src_check()  
 {  
  local abi  
  local abis_to_run="${MULTILIB_ABIS}"  
   
  # respect MULTILIB_ONLY_ABI variable  
  [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"  
   
  for abi in ${abis_to_run}  
  do  
  # honor inside and outside build-dir builds  
  if [ -d ${BUILDDIR}/build-${abi} ]  
  then  
  cd ${BUILDDIR}/build-${abi}  
  else  
  cd ${SRCDIR}-${abi}  
  fi  
  mmake -j1 -k check || die  
  done  
 }  
 fi  
   
 if [[ ! -z $(typeset -f cmake_src_install) ]]  
 then  
  # rename the old one  
  old_cmake_src_install=old$(typeset -f cmake_src_install)  
  eval "${old_cmake_install}"  
   
 cmake_src_install()  
 {  
  local abi  
  local abis_to_run="${MULTILIB_ABIS}"  
   
  # respect MULTILIB_ONLY_ABI variable  
  [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"  
   
  for abi in ${abis_to_run}  
  do  
  # honor inside and outside build-dir builds  
  if [ -d ${BUILDDIR}/build-${abi} ]  
  then  
  cd ${BUILDDIR}/build-${abi}  
  else  
  cd ${SRCDIR}-${abi}  
  fi  
  abi-${abi} oldmmake DESTDIR=${BINDIR} $@ install || die  
  done  
 }  
 fi  
   
289  if [[ ! -z $(typeset -f munpack) ]]  if [[ ! -z $(typeset -f munpack) ]]
290  then  then
291   # rename the old one   # rename the old one
# Line 577  minstalldocs() Line 463  minstalldocs()
463   done   done
464  }  }
465  fi  fi
   
 ##  
 # multilib mbuild wrappers  
 ##  
 multilib_src_prepare()  
 {  
  munpack ${SRCFILE} || die  
 }  
   
 multilib_src_compile()  
 {  
  if [[ ! -z $(typeset -f cmake_src_compile) ]]  
  then  
  cmake_src_compile || die  
  else  
  mconfigure || die  
  mmake || die  
  fi  
 }  
   
 multilib_src_check()  
 {  
  if [[ ! -z $(typeset -f cmake_src_check) ]]  
  then  
  cmake_src_check || die  
  else  
  mmake -j1 -k check || die  
  fi  
 }  
   
 multilib_src_install()  
 {  
  if [[ ! -z $(typeset -f cmake_src_install) ]]  
  then  
  cmake_src_install || die  
  else  
  mmake DESTDIR=${BINDIR} install || die  
  fi  
   
  local i  
  for abi in ${MULTILIB_ABIS}  
  do  
  cd ${SRCDIR}-${abi}/${SRCSUBDIR}  
  for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \  
  FAQ LICENSE NEWS README TODO  
  do  
  if [ -f ${SRCDIR}-${abi}/${i} ]  
  then  
  minstalldocs ${i} || die  
  fi  
  done  
  done  
 }  
   
 export_inherits multilib src_prepare src_compile src_check src_install  

Legend:
Removed from v.5869  
changed lines
  Added in v.11529