ubuntu 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/usr/bin/env bash
  2. source "$rvm_scripts_path/functions/requirements/debian"
  3. requirements_ubuntu_define_libgmp()
  4. {
  5. requirements_check libgmp-dev
  6. }
  7. requirements_ubuntu_define_libreadline()
  8. {
  9. if
  10. __rvm_version_compare ${_system_version} -ge 16.10
  11. then
  12. requirements_check libreadline-dev
  13. else
  14. requirements_check libreadline6-dev
  15. fi
  16. }
  17. requirements_ubuntu_define_libssl()
  18. {
  19. # Legacy libssl-dev required by older version of ruby has been renamed to libssl1.0-dev
  20. # starting from Ubuntu 17.10 (Artful Aardvark)
  21. case "$1" in
  22. (ruby-2.3*|ruby-2.2*|ruby-2.1*|ruby-2.0*|ruby-1.9*|ruby-1.8*)
  23. if
  24. __rvm_version_compare ${_system_version} -ge 17.10
  25. then
  26. undesired_check libssl-dev
  27. requirements_check libssl1.0-dev
  28. else
  29. requirements_check libssl-dev
  30. fi
  31. ;;
  32. (*)
  33. requirements_check libssl-dev
  34. ;;
  35. esac
  36. }
  37. requirements_ubuntu_define_clang_llvm()
  38. {
  39. if
  40. __rvm_version_compare ${_system_version} -ge 17.04
  41. then
  42. requirements_check clang-4.0 llvm-4.0 llvm-4.0-dev libc++-dev libc++abi-dev
  43. rvm_configure_flags+=( --cc=clang-4.0 --cxx=clang++-4.0 --llvm-config=llvm-config-4.0)
  44. __rvm_update_configure_env CXXFLAGS="-nostdinc++ -I/usr/include/c++/v1" LDFLAGS="-stdlib=libc++ -lc++"
  45. else
  46. requirements_check clang-3.6 llvm-3.6 llvm-3.6-dev
  47. rvm_configure_flags+=( --cc=clang-3.6 --cxx=clang++-3.6 --llvm-config=llvm-config-3.6)
  48. fi
  49. }
  50. requirements_ubuntu_define()
  51. {
  52. __lib_type=debian
  53. requirements_debian_define "$@"
  54. }