Magellan Linux

Diff of /branches/R11-unstable/include/multilib.sminc

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

revision 20978 by niro, Wed Feb 19 12:10:12 2014 UTC revision 29792 by niro, Thu Oct 12 11:37:16 2017 UTC
# Line 7  export MULTILIB_BUILD="true" Line 7  export MULTILIB_BUILD="true"
7  # be verbose or nor (true|false}  # be verbose or nor (true|false}
8  : ${MULTILIB_VERBOSE="true"}  : ${MULTILIB_VERBOSE="true"}
9    
10    # enter SRCDIR of each abi an abi runs
11    : ${ABI_DO_NOT_ENTER_SRCDIR="true"}
12    
13  # multilib should call all dependant includes, which gets overridden  # multilib should call all dependant includes, which gets overridden
14  sminclude mtools  sminclude mtools
15    
# Line 42  then Line 45  then
45   # the var ist decided with our common eval+echo magic   # the var ist decided with our common eval+echo magic
46   if [[ -z ${SDEPEND} ]]   if [[ -z ${SDEPEND} ]]
47   then   then
48   SDEPEND="\$(eval echo \\\$EMUL_LINUX_32_SDEPEND_\${ARCH/i*86/x86} | tr ';' '\n')"   SDEPEND="$(marchsdepend EMUL_LINUX_32_SDEPEND)"
49   else   else
50   SDEPEND="${SDEPEND}   SDEPEND="${SDEPEND}
51   \$(eval echo \\\$EMUL_LINUX_32_SDEPEND_\${ARCH/i*86/x86} | tr ';' '\n')"   $(marchsdepend EMUL_LINUX_32_SDEPEND)"
52   fi   fi
53  fi  fi
54    
# Line 182  only-m32() Line 185  only-m32()
185   # export this for mpatch etc (to repect only-${abi})   # export this for mpatch etc (to repect only-${abi})
186   export MULTILIB_ONLY_ABI=${abi}   export MULTILIB_ONLY_ABI=${abi}
187    
188   cd ${SRCDIR}-${abi}/${SRCSUBDIR}   if [[ ${ABI_DO_NOT_ENTER_SRCDIR} != true ]]
189     then
190     cd ${SRCDIR}-${abi}/${SRCSUBDIR}
191     fi
192   abi-${abi} $@ || die   abi-${abi} $@ || die
193    
194   # unset this is very important   # unset this is very important
# Line 203  only-m64() Line 209  only-m64()
209   # export this for mpatch etc (to repect only-${abi})   # export this for mpatch etc (to repect only-${abi})
210   export MULTILIB_ONLY_ABI=${abi}   export MULTILIB_ONLY_ABI=${abi}
211    
212   cd ${SRCDIR}-${abi}/${SRCSUBDIR}   if [[ ${ABI_DO_NOT_ENTER_SRCDIR} != true ]]
213     then
214     cd ${SRCDIR}-${abi}/${SRCSUBDIR}
215     fi
216   abi-${abi} $@ || die   abi-${abi} $@ || die
217    
218   # unset this is very important   # unset this is very important
# Line 217  all-abis() Line 226  all-abis()
226   local abi   local abi
227   for abi in ${MULTILIB_ABIS}   for abi in ${MULTILIB_ABIS}
228   do   do
229   cd ${SRCDIR}-${abi}/${SRCSUBDIR}   if [[ ${ABI_DO_NOT_ENTER_SRCDIR} != true ]]
230     then
231     cd ${SRCDIR}-${abi}/${SRCSUBDIR}
232     fi
233   abi-${abi} $@ || die   abi-${abi} $@ || die
234   done   done
235  }  }
# Line 261  then Line 273  then
273   # rename the old one   # rename the old one
274   old_mconfigure=old$(typeset -f mconfigure)   old_mconfigure=old$(typeset -f mconfigure)
275   eval "${old_mconfigure}"   eval "${old_mconfigure}"
276  fi  
277  mconfigure()  mconfigure()
278  {  {
279   local abi   local abi
# Line 276  mconfigure() Line 288  mconfigure()
288   abi-${abi} oldmconfigure $@ || die   abi-${abi} oldmconfigure $@ || die
289   done   done
290  }  }
291    fi
292    
293  if [[ ! -z $(typeset -f cmake_configure) ]]  if [[ ! -z $(typeset -f cmake_configure) ]]
294  then  then
295   # rename the old one   # rename the old one
296   old_cmake_configure=old$(typeset -f cmake_configure)   old_cmake_configure=old$(typeset -f cmake_configure)
297   eval "${old_cmake_configure}"   eval "${old_cmake_configure}"
298  fi  
299  cmake_configure()  cmake_configure()
300  {  {
301   local abi   local abi
# Line 294  cmake_configure() Line 307  cmake_configure()
307   local saved_SRCDIR="${SRCDIR}"   local saved_SRCDIR="${SRCDIR}"
308   for abi in ${abis_to_run}   for abi in ${abis_to_run}
309   do   do
  cd ${BUILDDIR}/build-${abi}  
310   SRCDIR="${saved_SRCDIR}-${abi}"   SRCDIR="${saved_SRCDIR}-${abi}"
311     # honor inside and outside build-dir builds
312     if [ -d ${BUILDDIR}/build-${abi} ]
313     then
314     cd ${BUILDDIR}/build-${abi}
315     else
316     cd ${SRCDIR}
317     fi
318   abi-${abi} oldcmake_configure $@ || die   abi-${abi} oldcmake_configure $@ || die
319   done   done
320   # restore SRCDIR   # restore SRCDIR
321   SRCDIR="${saved_SRCDIR}"   SRCDIR="${saved_SRCDIR}"
322  }  }
323    fi
324    
325  if [[ ! -z $(typeset -f cmake_src_compile) ]]  if [[ ! -z $(typeset -f cmake_src_compile) ]]
326  then  then
327   # rename the old one   # rename the old one
328   old_cmake_src_compile=old$(typeset -f cmake_src_compile)   old_cmake_src_compile=old$(typeset -f cmake_src_compile)
329   eval "${old_cmake_src_compile}"   eval "${old_cmake_src_compile}"
330  fi  
331  cmake_src_compile()  cmake_src_compile()
332  {  {
333   local abi   local abi
# Line 334  cmake_src_compile() Line 354  cmake_src_compile()
354   abi-${abi} oldmmake $@ || die   abi-${abi} oldmmake $@ || die
355   done   done
356  }  }
357    fi
358    
359  if [[ ! -z $(typeset -f cmake_src_check) ]]  if [[ ! -z $(typeset -f cmake_src_check) ]]
360  then  then
361   # rename the old one   # rename the old one
362   old_cmake_src_check=old$(typeset -f cmake_src_check)   old_cmake_src_check=old$(typeset -f cmake_src_check)
363   eval "${old_cmake_check}"   eval "${old_cmake_check}"
364  fi  
365  cmake_src_check()  cmake_src_check()
366  {  {
367   local abi   local abi
# Line 351  cmake_src_check() Line 372  cmake_src_check()
372    
373   for abi in ${abis_to_run}   for abi in ${abis_to_run}
374   do   do
375   cd ${BUILDDIR}/build-${abi}   # honor inside and outside build-dir builds
376     if [ -d ${BUILDDIR}/build-${abi} ]
377     then
378     cd ${BUILDDIR}/build-${abi}
379     else
380     cd ${SRCDIR}-${abi}
381     fi
382   mmake -j1 -k check || die   mmake -j1 -k check || die
383   done   done
384  }  }
385    fi
386    
387  if [[ ! -z $(typeset -f cmake_src_install) ]]  if [[ ! -z $(typeset -f cmake_src_install) ]]
388  then  then
389   # rename the old one   # rename the old one
390   old_cmake_src_install=old$(typeset -f cmake_src_install)   old_cmake_src_install=old$(typeset -f cmake_src_install)
391   eval "${old_cmake_install}"   eval "${old_cmake_install}"
392  fi  
393  cmake_src_install()  cmake_src_install()
394  {  {
395   local abi   local abi
# Line 372  cmake_src_install() Line 400  cmake_src_install()
400    
401   for abi in ${abis_to_run}   for abi in ${abis_to_run}
402   do   do
403   # install build outside of the source dir   # honor inside and outside build-dir builds
404   cd ${BUILDDIR}/build-${abi}   if [ -d ${BUILDDIR}/build-${abi} ]
405     then
406     cd ${BUILDDIR}/build-${abi}
407     else
408     cd ${SRCDIR}-${abi}
409     fi
410   abi-${abi} oldmmake DESTDIR=${BINDIR} $@ install || die   abi-${abi} oldmmake DESTDIR=${BINDIR} $@ install || die
411   done   done
412  }  }
413    fi
414    
415  if [[ ! -z $(typeset -f munpack) ]]  if [[ ! -z $(typeset -f munpack) ]]
416  then  then
417   # rename the old one   # rename the old one
418   old_munpack=old$(typeset -f munpack)   old_munpack=old$(typeset -f munpack)
419   eval "${old_munpack}"   eval "${old_munpack}"
420  fi  
421  munpack()  munpack()
422  {  {
423   local abi   local abi
# Line 399  munpack() Line 433  munpack()
433   mv ${SRCDIR} ${SRCDIR}-${abi} || die   mv ${SRCDIR} ${SRCDIR}-${abi} || die
434   done   done
435  }  }
436    fi
437    
438  if [[ ! -z $(typeset -f mmake) ]]  if [[ ! -z $(typeset -f mmake) ]]
439  then  then
440   # rename the old one   # rename the old one
441   old_mmake=old$(typeset -f mmake)   old_mmake=old$(typeset -f mmake)
442   eval "${old_mmake}"   eval "${old_mmake}"
443  fi  
444  mmake()  mmake()
445  {  {
446   local abi   local abi
# Line 421  mmake() Line 456  mmake()
456   abi-${abi} oldmmake $@ || die   abi-${abi} oldmmake $@ || die
457   done   done
458  }  }
459    fi
460    
461  if [[ ! -z $(typeset -f minstall) ]]  if [[ ! -z $(typeset -f minstall) ]]
462  then  then
463   # rename the old one   # rename the old one
464   old_minstall=old$(typeset -f minstall)   old_minstall=old$(typeset -f minstall)
465   eval "${old_minstall}"   eval "${old_minstall}"
466  fi  
467  minstall()  minstall()
468  {  {
469   local abi   local abi
# Line 443  minstall() Line 479  minstall()
479   abi-${abi} oldminstall $@ || die   abi-${abi} oldminstall $@ || die
480   done   done
481  }  }
482    fi
483    
484  minstall_destdir()  minstall_destdir()
485  {  {
# Line 465  then Line 502  then
502   # rename the old one   # rename the old one
503   old_mpatch=old$(typeset -f mpatch)   old_mpatch=old$(typeset -f mpatch)
504   eval "${old_mpatch}"   eval "${old_mpatch}"
505  fi  
506  mpatch()  mpatch()
507  {  {
508   local abi   local abi
# Line 481  mpatch() Line 518  mpatch()
518   oldmpatch $@ || die   oldmpatch $@ || die
519   done   done
520  }  }
521    fi
522    
523  if [[ ! -z $(typeset -f mlibtoolize) ]]  if [[ ! -z $(typeset -f mlibtoolize) ]]
524  then  then
525   # rename the old one   # rename the old one
526   old_mlibtoolize=old$(typeset -f mlibtoolize)   old_mlibtoolize=old$(typeset -f mlibtoolize)
527   eval "${old_mlibtoolize}"   eval "${old_mlibtoolize}"
528  fi  
529  mlibtoolize()  mlibtoolize()
530  {  {
531   local abi   local abi
# Line 503  mlibtoolize() Line 541  mlibtoolize()
541   oldmlibtoolize $@ || die   oldmlibtoolize $@ || die
542   done   done
543  }  }
544    fi
545    
546  if [[ ! -z $(typeset -f mautoreconf) ]]  if [[ ! -z $(typeset -f mautoreconf) ]]
547  then  then
548   # rename the old one   # rename the old one
549   old_mautoreconf=old$(typeset -f mautoreconf)   old_mautoreconf=old$(typeset -f mautoreconf)
550   eval "${old_mautoreconf}"   eval "${old_mautoreconf}"
551  fi  
552  mautoreconf()  mautoreconf()
553  {  {
554   local abi   local abi
# Line 525  mautoreconf() Line 564  mautoreconf()
564   oldmautoreconf $@ || die   oldmautoreconf $@ || die
565   done   done
566  }  }
567    fi
568    
569  if [[ ! -z $(typeset -f minstalldocs) ]]  if [[ ! -z $(typeset -f minstalldocs) ]]
570  then  then
571   # rename the old one   # rename the old one
572   old_minstalldocs=old$(typeset -f minstalldocs)   old_minstalldocs=old$(typeset -f minstalldocs)
573   eval "${old_minstalldocs}"   eval "${old_minstalldocs}"
574  fi  
575  minstalldocs()  minstalldocs()
576  {  {
577   local abi   local abi
# Line 548  minstalldocs() Line 588  minstalldocs()
588   oldminstalldocs $@ || die   oldminstalldocs $@ || die
589   done   done
590  }  }
591    fi
592    
593  ##  ##
594  # multilib mbuild wrappers  # multilib mbuild wrappers
# Line 582  multilib_src_install() Line 623  multilib_src_install()
623  {  {
624   if [[ ! -z $(typeset -f cmake_src_install) ]]   if [[ ! -z $(typeset -f cmake_src_install) ]]
625   then   then
626   cmake_src_compile || die   cmake_src_install || die
627   else   else
628   mmake DESTDIR=${BINDIR} install || die   mmake DESTDIR=${BINDIR} install || die
629   fi   fi

Legend:
Removed from v.20978  
changed lines
  Added in v.29792