talimat 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # Tanım: GNU compiler collection, which includes the C, C++, fortran and objc compilers.
  2. # URL: http://gcc.gnu.org
  3. # Paketçi: milisarge@gmail.com
  4. # Gerekler:
  5. isim=gcc
  6. surum=5.3.0
  7. devir=1
  8. kaynak=(http://ftp.gnu.org/gnu/gcc/gcc-$surum/gcc-$surum.tar.bz2)
  9. derle()
  10. {
  11. cd gcc-$surum
  12. mkdir -v ../gcc-build
  13. cd ../gcc-build
  14. SED=sed \
  15. ../gcc-$surum/configure --prefix=/usr \
  16. --enable-languages=c,c++,objc,fortran \
  17. --disable-multilib --disable-bootstrap --with-system-zlib
  18. make
  19. make DESTDIR=$PKG install
  20. mkdir $PKG/lib
  21. ln -sv ../usr/bin/cpp $PKG/lib/cpp
  22. ln -sv gcc $PKG/usr/bin/cc
  23. install -dm755 $PKG/usr/share/gdb/auto-load/usr/lib
  24. install -dm755 $PKG/usr/lib/bfd-plugins
  25. cd $PKG/usr/lib/bfd-plugins
  26. case `uname -m` in
  27. i?86) sed -i "s|-L$SRC[^ ]* ||g" \
  28. $PKG/usr/lib/{libstdc++.la,libsupc++.la}
  29. mv -v $PKG/usr/lib/*gdb.py \
  30. $PKG/usr/share/gdb/auto-load/usr/lib
  31. ln -sfv ../../libexec/gcc/i686-pc-linux-gnu/$surum/liblto_plugin.so;;
  32. x86_64)
  33. sed -i "s|-L$SRC[^ ]* ||g" \
  34. $PKG/usr/lib64/{libstdc++.la,libsupc++.la}
  35. mv -v $PKG/usr/lib64/*gdb.py \
  36. $PKG/usr/share/gdb/auto-load/usr/lib
  37. ln -sfv ../../libexec/gcc/x86_64-unknown-linux-gnu/$surum/liblto_plugin.so;;
  38. esac
  39. rm -rf $PKG/usr/share/info/dir
  40. # Move the needed runtime libraries
  41. case `uname -m` in
  42. i?86) mkdir -pv $PKG/usr/lib
  43. mv -v $PKG/usr/lib/libgfortran.{a,la} \
  44. $PKG/lib/
  45. ln -sv ../../lib/libgfortran.{la,a} $PKG/usr/lib
  46. mv -v $PKG/usr/lib/libgfortran.so{,.3,.3.0.0} \
  47. $PKG/lib/
  48. ln -svf ../../lib/libgfortran.so{,.3,.3.0.0} $PKG/usr/lib
  49. mv -v $PKG/usr/lib/libgcc_s.so{,.1} \
  50. $PKG/lib
  51. ln -sv ../../lib/libgcc_s.so{,.1} $PKG/usr/lib
  52. mv -v $PKG/usr/lib/libstdc++.* \
  53. $PKG/lib/
  54. mv -v $PKG/usr/lib/libsupc++.{la,a} \
  55. $PKG/lib
  56. ln -sv ../../lib/libstdc++.so{,.6,.6.0.30} \
  57. $PKG/usr/lib
  58. ln -sv ../../lib/libstdc++.{a,la} \
  59. $PKG/usr/lib
  60. ln -sv ../../lib/libsupc++.{la,a} \
  61. $PKG/usr/lib;;
  62. x86_64) mkdir -pv $PKG/usr/lib64
  63. mv -v $PKG/usr/lib64/libgfortran.{a,la} \
  64. $PKG/lib
  65. ln -sv ../../lib/libgfortran.{la,a} $PKG/usr/lib64
  66. mv -v $PKG/usr/lib64/libgfortran.so{,.3,.3.0.0} \
  67. $PKG/lib
  68. ln -sv ../../lib/libgfortran.so{,.3,.3.0.0} $PKG/usr/lib64
  69. mv -v $PKG/usr/lib64/libgcc_s.so{,.1} \
  70. $PKG/lib
  71. ln -sv ../../lib/libgcc_s.so{,.1} $PKG/usr/lib64
  72. mv -v $PKG/usr/lib64/libstdc++.* \
  73. $PKG/lib
  74. mv -v $PKG/usr/lib64/libsupc++.{la,a} \
  75. $PKG/lib
  76. ln -sv ../../lib/libstdc++.so{,.6,.6.0.30} \
  77. $PKG/usr/lib64
  78. ln -sv ../../lib/libstdc++.{a,la} \
  79. $PKG/usr/lib64
  80. ln -sv ../../lib/libsupc++.{la,a} \
  81. $PKG/usr/lib64;;
  82. esac
  83. }