opensuse 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #!/usr/bin/env bash
  2. source "$rvm_scripts_path/functions/pkg"
  3. requirements_opensuse_lib_available()
  4. {
  5. zypper search --provides --match-exact "$1" >/dev/null 2>&1 || return $?
  6. }
  7. requirements_opensuse_lib_installed()
  8. {
  9. rpm -q --whatprovides "$1" >/dev/null || return $?
  10. }
  11. requirements_opensuse_libs_install()
  12. {
  13. __rvm_try_sudo zypper install -y "$@" || return $?
  14. }
  15. requirements_opensuse_libs_remove()
  16. {
  17. __rvm_try_sudo zypper rm -y "$@" || return $?
  18. }
  19. requirements_opensuse_update_system()
  20. {
  21. __rvm_try_sudo zypper --gpg-auto-import-keys refresh ||
  22. __rvm_try_sudo zypper refresh || # just in case the flag was not supported
  23. return $?
  24. }
  25. requirements_opensuse_install_custom()
  26. {
  27. requirements_rvm_pkg_libs_install "$@" || return $?
  28. }
  29. requirements_opensuse_define_libyaml()
  30. {
  31. requirements_check libyaml-devel
  32. }
  33. requirements_opensuse_define_default()
  34. {
  35. undesired_check libressl-devel
  36. requirements_check automake binutils bison bzip2 libtool m4 make patch \
  37. gdbm-devel glibc-devel libffi-devel libopenssl-devel readline-devel \
  38. sqlite3-devel zlib-devel
  39. requirements_${_system_name_lowercase}_define_libyaml
  40. if
  41. __rvm_version_compare "${_system_version}" -ge 12.0
  42. then requirements_check libdb-4_8
  43. else requirements_check libdb-4_5
  44. fi
  45. }
  46. requirements_opensuse_define()
  47. {
  48. case "$1" in
  49. (rvm)
  50. requirements_check bash curl patch
  51. ;;
  52. (jruby*)
  53. requirements_check make
  54. if is_head_or_disable_binary "$1"
  55. then requirements_check java-devel git
  56. else requirements_check java
  57. fi
  58. case $( jruby_installation_method "$1" ) in
  59. ant) requirements_check ant ;;
  60. mvn) requirements_check_custom_after mvn=maven ;;
  61. esac
  62. ;;
  63. (ir*)
  64. requirements_check mono
  65. ;;
  66. (opal)
  67. requirements_check nodejs
  68. ;;
  69. (*-head)
  70. requirements_check autoconf git
  71. requirements_opensuse_define "${1%-head}"
  72. ;;
  73. (rbx*|rubinius*)
  74. requirements_opensuse_define_default
  75. requirements_check_fallback llvm-devel llvm6-devel llvm5-devel llvm4-devel
  76. requirements_check_fallback clang clang6 clang5 clang4
  77. ;;
  78. (truffleruby*)
  79. requirements_check zlib-devel libopenssl-devel make gcc libxml2
  80. ;;
  81. (*)
  82. requirements_opensuse_define_default
  83. requirements_check gcc gcc-c++
  84. ;;
  85. esac
  86. }