talimat 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Tanım: Web için son derece optimize JavaScript içine C ve C++ derleyen LLVM tabanlı proje
  2. # URL: http://emscripten.org
  3. # Paketçi: Cihan_Alkan
  4. # Gerekler: node python cmake libxml2
  5. # Grup: geliştirme
  6. isim=emscripten
  7. surum=1.37.29
  8. devir=1
  9. kaynak=(https://github.com/kripken/emscripten/archive/$surum.tar.gz::$isim-$surum.tar.gz
  10. https://github.com/kripken/emscripten-fastcomp/archive/$surum.tar.gz::$isim-fastcomp-$surum.tar.gz
  11. https://github.com/kripken/emscripten-fastcomp-clang/archive/$surum.tar.gz::emscripten-fastcomp-clang-$surum.tar.gz
  12. emscripten.sh)
  13. derle() {
  14. cd emscripten-fastcomp-$surum
  15. # reset folder for out-of-source build
  16. rm -rf build
  17. mkdir build
  18. # put clang source into the right place (http://git.io/i1GBkg)
  19. rm -rf tools/clang
  20. ln -s "$SRC"/emscripten-fastcomp-clang-$surum tools/clang
  21. # python2 shebang fixes
  22. cd ../emscripten-$surum
  23. sed '1s|python$|python2|' -i $(find third_party tools -name \*.py) emrun
  24. # adapt config file template to use our custom environment variable and path
  25. sed -e "s|getenv('LLVM')|getenv('EMSCRIPTEN_FASTCOMP')|" \
  26. -e 's|{{{ LLVM_ROOT }}}|/usr/lib/emscripten-fastcomp|' \
  27. -i tools/settings_template_readonly.py
  28. cd $SRC/emscripten-fastcomp-$surum/build
  29. CC=gcc CXX=g++ cmake .. -DPYTHON_EXECUTABLE=/usr/bin/python \
  30. -DCMAKE_BUILD_TYPE=Release \
  31. -DCMAKE_SKIP_RPATH=YES \
  32. -DLLVM_TARGETS_TO_BUILD="X86;JSBackend" \
  33. -DLLVM_BUILD_RUNTIME=OFF \
  34. -DLLVM_INCLUDE_EXAMPLES=OFF \
  35. -DLLVM_INCLUDE_TESTS=OFF \
  36. -DCLANG_INCLUDE_TESTS=OFF
  37. make
  38. # exported variables
  39. install -Dm755 "$SRC"/emscripten.sh "$SRC"/etc/profile.d/emscripten.sh
  40. # LLVM-backend, TODO: include only needed tools
  41. cd "$SRC"/emscripten-fastcomp-$surum
  42. install -Dm644 emscripten-version.txt "$PKG"/usr/lib/emscripten-fastcomp/emscripten-version.txt
  43. install -m755 build/bin/* "$PKG"/usr/lib/emscripten-fastcomp
  44. # copy structure
  45. cd "$SRC"/emscripten-$surum
  46. install -d "$PKG"/usr/lib/emscripten
  47. cp -rup em* cmake site src system third_party tools "$PKG"/usr/lib/emscripten
  48. # remove clutter
  49. rm "$PKG"/usr/lib/emscripten-fastcomp/{*-test,llvm-lit}
  50. rm "$PKG"/usr/lib/emscripten/*.bat
  51. # docs
  52. install -d "$PKG"/usr/share/doc
  53. ln -s /usr/lib/emscripten/site/source/docs "$PKG"/usr/share/doc/$isim
  54. # license
  55. install -Dm644 LICENSE "$PKG"/usr/share/licenses/$isim/LICENSE
  56. }