FIXUPHACK 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #t2 readline pkg is broken. symlinks broken...
  2. RLREALLIBS="`find usr/lib -type f -name \*.so.\* | tr '\n' ' '`"
  3. for ONEREALLIB in $RLREALLIBS
  4. do
  5. BASEREALLIB="`basename $ONEREALLIB`"
  6. BASEREALNAME="`echo -n "$BASEREALLIB" | cut -f 1 -d '.'`"
  7. ln -snf $BASEREALLIB usr/lib/${BASEREALNAME}.so
  8. ln -snf $BASEREALLIB usr/lib/${BASEREALNAME}.so.5
  9. ln -snf $BASEREALLIB usr/lib/${BASEREALNAME}.so.6
  10. done
  11. if [ ! -e usr/lib/libreadline.so.5 ];then
  12. if [ ! -e lib/libreadline.so.5 ];then
  13. [ -e usr/lib/libreadline.so.6 ] && ln -s libreadline.so.6 usr/lib/libreadline.so.5
  14. [ -e lib/libreadline.so.6 ] && ln -s libreadline.so.6 lib/libreadline.so.5
  15. fi
  16. fi
  17. if [ ! -e usr/lib/libhistory.so.5 ];then
  18. if [ ! -e lib/libhistory.so.5 ];then
  19. [ -e usr/lib/libhistory.so.6 ] && ln -s libhistory.so.6 usr/lib/libhistory.so.5
  20. [ -e lib/libhistory.so.6 ] && ln -s libhistory.so.6 lib/libhistory.so.5
  21. fi
  22. fi
  23. #120315 NOTICE: below situation quite a lot of pkgs, so have put a big fix into 3builddistro...
  24. ##120315 Precise Pangolin Ubuntu has moved the libs (ditto for glibc)...
  25. #if [ ! -e ./lib/libreadline.so.5 -a ! -e ./lib/libreadline.so.6 ];then
  26. # #all the libs are in /lib/i386-linux-gnu/
  27. # GLIBCLIBS="`find lib -mindepth 2 -name 'libreadline.so.*' | head -n 1`"
  28. # if [ "$GLIBCLIBS" ];then
  29. # GLIBCPATH="`dirname $GLIBCLIBS`"
  30. # cp -a -f --remove-destination ${GLIBCPATH}/* ./lib/
  31. # sync
  32. # rm -rf $GLIBCPATH
  33. # #need this symlink, as when move libs in devx below, symlinked libs are wrong...
  34. # ln -s ./ $GLIBCPATH
  35. # #devx, move these to readline_DEV/lib also...
  36. # if [ -d ../readline_DEV/${GLIBCPATH} ];then
  37. # cp -a -f --remove-destination ../readline_DEV/${GLIBCPATH}/* ../readline_DEV/lib/
  38. # sync
  39. # rm -rf ../readline_DEV/$GLIBCPATH
  40. # fi
  41. # #something weird in 2createpackages, /lib/i386-linux-gnu get built at readline_DEV/usr/lib/i386-linux-gnu...
  42. # if [ -d ../readline_DEV/usr/${GLIBCPATH} ];then
  43. # mkdir -p ../readline_DEV/lib
  44. # cp -a -f --remove-destination ../readline_DEV/usr/${GLIBCPATH}/* ../readline_DEV/lib/
  45. # sync
  46. # rm -rf ../readline_DEV/usr/$GLIBCPATH
  47. # fi
  48. # fi
  49. #fi