void 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #!/usr/bin/env bash
  2. requirements_void_lib_installed()
  3. {
  4. xbps-query -l | __rvm_grep "ii $1-[0-9]" >/dev/null || return $?
  5. }
  6. requirements_void_libs_install()
  7. {
  8. __rvm_try_sudo xbps-install -S "$@" || return $?
  9. }
  10. requirements_void_libs_remove()
  11. {
  12. __rvm_try_sudo xbps-remove -R "$@" || return $?
  13. }
  14. requirements_void_define_base()
  15. {
  16. requirements_check "$@" \
  17. autoconf automake bison ca-certificates curl \
  18. gdbm-devel glibc-devel gmp-devel \
  19. libffi-devel libressl-devel libtool libyaml-devel \
  20. make ncurses-devel \
  21. patch pkg-config readline-devel \
  22. sqlite-devel zlib-devel
  23. # libc6-dev > glibc-devel ?
  24. # libgdbm-dev > gdbm-devel
  25. # libncurses5-dev > ncurses-devel
  26. # libreadline-dev > readline-devel
  27. # libgmp-dev > gmp-devel
  28. # libssl-dev > libssl45 ???
  29. # libsqlite3-dev > sqlite-devel
  30. # libyaml-dev > libyaml-devel
  31. # sqlite3 > sqlite
  32. # zlib1g > zlib
  33. # zlib1g-dev > zlib-devel
  34. # check https://www.reddit.com/r/voidlinux/comments/9i42l1/installing_asdf_version_manager_with_openssl/
  35. }
  36. requirements_void_define()
  37. {
  38. # https://voidlinux.org/packages/
  39. if [[ "$1" == *head ]]
  40. then
  41. requirements_check git
  42. fi
  43. case "$1" in
  44. (rvm)
  45. requirements_check bash curl patch bzip2 gawk
  46. ;;
  47. (jruby*)
  48. # Not implemented
  49. true
  50. ;;
  51. (ir*)
  52. # Not implemented
  53. true
  54. ;;
  55. (opal)
  56. # Not implemented
  57. true
  58. ;;
  59. (rbx*|rubinius*)
  60. # Not implemented
  61. true
  62. ;;
  63. (truffleruby*)
  64. # Not implemented
  65. true
  66. ;;
  67. (*)
  68. requirements_void_define_base gcc
  69. ;;
  70. esac
  71. }