FIXUPHACK 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #this is only for intrepid and maybe debian...
  2. #120320 intrepid has i486-linux-gnu, precise pangolin has i686-linux-gnu, etc...
  3. GCCSUB="`find ../gcc_dev_DEV/usr/lib/gcc/ -maxdepth 1 -mindepth 1 -type d | head -n 1`" #ex: ../gcc_dev_DEV/usr/lib/gcc/i686-linux-gnu
  4. if [ "$GCCSUB" ];then
  5. DIRSPEC="`find ${GCCSUB}/ -maxdepth 1 -mindepth 1 -type d | head -n 1`" #Intrepid, finds '4.3'.
  6. if [ "$DIRSPEC" ];then
  7. SUBDIR="`echo -n "$DIRSPEC" | head -n 1 | rev | cut -f 2 -d '/' | rev`"
  8. SUBSUBDIR="`echo -n "$DIRSPEC" | head -n 1 | rev | cut -f 1 -d '/' | rev`"
  9. mkdir -p usr/lib/gcc/$SUBDIR/$SUBSUBDIR
  10. ln -snf /lib/libgcc_s.so.1 usr/lib/gcc/$SUBDIR/$SUBSUBDIR/libgcc_s.so
  11. [ -e usr/lib/libgomp.so.1 ] && ln -snf ../../../libgomp.so.1 usr/lib/gcc/$SUBDIR/$SUBSUBDIR/libgomp.so
  12. [ -e usr/lib/libquadmath.so.0 ] && ln -snf ../../../libquadmath.so.0 usr/lib/gcc/$SUBDIR/$SUBSUBDIR/libquadmath.so #precise pangolin
  13. fi
  14. fi
  15. #this is for slackware...
  16. if [ -d ../gcc_dev_DEV/usr/lib/gcc/i486-slackware-linux ];then
  17. DIRSPEC="`find ../gcc_dev_DEV/usr/lib/gcc/i486-slackware-linux/ -maxdepth 1 -mindepth 1 -type d`"
  18. #specialdirdistro="`ls -1 usr/lib/gcc/`" #slackware: i486-slackware-linux
  19. #specialdirversion="`ls -1 usr/lib/gcc/${specialdirdistro}`"
  20. if [ "$DIRSPEC" != "" ];then
  21. SUBDIR="`echo -n "$DIRSPEC" | head -n 1 | rev | cut -f 1 -d '/' | rev`"
  22. #for the _DEV only...
  23. rm -rf usr/lib/gcc/i486-slackware-linux/$SUBDIR/*
  24. fi
  25. fi
  26. #arch has the fortran compiler in the gcc pkg...
  27. rm -f usr/lib/libgfortran* 2> /dev/null
  28. BADFINCLUDE="`find usr/lib/gcc -type d -name finclude | head -n 1`"
  29. [ "$BADFINCLUDE" != "" ] && rm -rf $BADFINCLUDE
  30. #also ada... um, no, arch gcc pkg does not have ada, but leave this here...
  31. BADFINCLUDE="`find usr/lib/gcc -type d -name adainclude | head -n 1`"
  32. [ "$BADFINCLUDE" != "" ] && rm -rf $BADFINCLUDE
  33. BADFINCLUDE="`find usr/lib/gcc -type d -name adalib | head -n 1`"
  34. [ "$BADFINCLUDE" != "" ] && rm -rf $BADFINCLUDE
  35. #also objc...
  36. rm -f usr/lib/libobjc* 2> /dev/null
  37. #fixup for gentoo...
  38. if [ ! -e usr/lib/libgcc_s.so.1 ];then
  39. if [ -d usr/lib/gcc ];then
  40. FNDGCCS="`find usr/lib/gcc -name 'libgcc_s.so.1' | head -n 1`"
  41. if [ "$FNDGCCS" ];then
  42. GCCSPATH="`dirname $FNDGCCS`"
  43. cp -a -f --remove-destination ${GCCSPATH}/libgcc_s.so* usr/lib/ 2>/dev/null
  44. cp -a -f --remove-destination ${GCCSPATH}/libgomp.so* usr/lib/ 2>/dev/null
  45. cp -a -f --remove-destination ${GCCSPATH}/libmudflap.so* usr/lib/ 2>/dev/null
  46. cp -a -f --remove-destination ${GCCSPATH}/libmudflapth.so* usr/lib/ 2>/dev/null
  47. cp -a -f --remove-destination ${GCCSPATH}/libstdc++.so* usr/lib/ 2>/dev/null
  48. ln -snf libgcc_s.so.1 usr/lib/libgcc_s.so 2>/dev/null
  49. ln -snf libgomp.so.1 usr/lib/libgomp.so 2>/dev/null
  50. ln -snf libmudflap.so.0 usr/lib/libmudflap.so 2>/dev/null
  51. ln -snf libmudflapth.so.0 usr/lib/libmudflapth.so 2>/dev/null
  52. ln -snf libstdc++.so.6 usr/lib/libstdc++.so 2>/dev/null
  53. sync
  54. rm -rf usr/lib/gcc
  55. fi
  56. fi
  57. fi
  58. #130707...
  59. BADPYLIB="$(find usr/lib -mindepth 1 -maxdepth 1 -iname 'libstdc*.py' | tr '\n' ' ')"
  60. if [ "$BADPYLIB" ];then
  61. for ABADPYLIB in $BADPYLIB
  62. do
  63. rm -f $ABADPYLIB
  64. done
  65. fi