From a452f1af1aad9ab86aceedda4df6d9a008a5117d Mon Sep 17 00:00:00 2001 From: Postmodern Date: Thu, 4 Apr 2024 12:25:45 -0700 Subject: [PATCH] Combine similar dependency cases together. --- share/ruby-install/jruby/dependencies.sh | 3 +- share/ruby-install/mruby/dependencies.sh | 28 ++--------- share/ruby-install/ruby/dependencies.sh | 50 +++++-------------- .../truffleruby-graalvm/dependencies.sh | 36 +++++-------- .../ruby-install/truffleruby/dependencies.sh | 36 +++++-------- 5 files changed, 42 insertions(+), 111 deletions(-) diff --git a/share/ruby-install/jruby/dependencies.sh b/share/ruby-install/jruby/dependencies.sh index 7b2a8822..c7c6fa9e 100644 --- a/share/ruby-install/jruby/dependencies.sh +++ b/share/ruby-install/jruby/dependencies.sh @@ -2,8 +2,7 @@ case "$package_manager" in apt) ruby_dependencies=(openjdk-8-jdk) ;; - dnf) ruby_dependencies=(java-openjdk) ;; - yum) ruby_dependencies=(java-openjdk) ;; + dnf|yum)ruby_dependencies=(java-openjdk) ;; pacman) ruby_dependencies=(jre8-openjdk) ;; zypper) ruby_dependencies=(java-1.8.0-openjdk) ;; pkg) ruby_dependencies=(openjdk) ;; diff --git a/share/ruby-install/mruby/dependencies.sh b/share/ruby-install/mruby/dependencies.sh index 9b751d60..90a1cb21 100644 --- a/share/ruby-install/mruby/dependencies.sh +++ b/share/ruby-install/mruby/dependencies.sh @@ -7,30 +7,7 @@ case "$package_manager" in bison ) ;; - dnf) - ruby_dependencies=( - gcc - make - bison - ) - ;; - yum) - ruby_dependencies=( - gcc - make - bison - ) - ;; - port) ruby_dependencies=(bison) ;; - brew) ruby_dependencies=(bison) ;; - pacman) - ruby_dependencies=( - gcc - make - bison - ) - ;; - zypper) + dnf|yum|pacman|zypper) ruby_dependencies=( gcc make @@ -44,5 +21,6 @@ case "$package_manager" in bison ) ;; - xbps) ruby_dependencies=(base-devel) ;; + brew|port) ruby_dependencies=(bison) ;; + xbps) ruby_dependencies=(base-devel) ;; esac diff --git a/share/ruby-install/ruby/dependencies.sh b/share/ruby-install/ruby/dependencies.sh index 85fb0d50..2f295ff6 100644 --- a/share/ruby-install/ruby/dependencies.sh +++ b/share/ruby-install/ruby/dependencies.sh @@ -15,7 +15,7 @@ case "$package_manager" in libffi-dev ) ;; - dnf) + dnf|yum) ruby_dependencies=( xz gcc @@ -30,43 +30,6 @@ case "$package_manager" in libffi-devel ) ;; - yum) - ruby_dependencies=( - xz - gcc - automake - bison - zlib-devel - libyaml-devel - openssl-devel - gdbm-devel - readline-devel - ncurses-devel - libffi-devel - ) - ;; - port) - ruby_dependencies=( - xz - automake - bison - readline - libyaml - gdbm - libffi - ) - ;; - brew) - ruby_dependencies=( - xz - automake - bison - readline - libyaml - gdbm - libffi - ) - ;; pacman) ruby_dependencies=( xz @@ -97,6 +60,17 @@ case "$package_manager" in libffi-devel ) ;; + brew|port) + ruby_dependencies=( + xz + automake + bison + readline + libyaml + gdbm + libffi + ) + ;; pkg) ruby_dependencies=( openssl diff --git a/share/ruby-install/truffleruby-graalvm/dependencies.sh b/share/ruby-install/truffleruby-graalvm/dependencies.sh index f57c348e..1e0a364a 100644 --- a/share/ruby-install/truffleruby-graalvm/dependencies.sh +++ b/share/ruby-install/truffleruby-graalvm/dependencies.sh @@ -11,7 +11,7 @@ case "$package_manager" in libyaml-dev ) ;; - dnf) + dnf|yum) ruby_dependencies=( make gcc @@ -21,28 +21,6 @@ case "$package_manager" in libyaml-devel ) ;; - yum) - ruby_dependencies=( - make - gcc - zlib-devel - openssl-devel - libxml2 - libyaml-devel - ) - ;; - port) - ruby_dependencies=( - openssl - libyaml - ) - ;; - brew) - ruby_dependencies=( - openssl@1.1 - libyaml - ) - ;; pacman) ruby_dependencies=( make @@ -72,6 +50,18 @@ case "$package_manager" in libyaml ) ;; + brew) + ruby_dependencies=( + openssl@1.1 + libyaml + ) + ;; + port) + ruby_dependencies=( + openssl + libyaml + ) + ;; xbps) ruby_dependencies=( base-devel diff --git a/share/ruby-install/truffleruby/dependencies.sh b/share/ruby-install/truffleruby/dependencies.sh index f57c348e..18c35d20 100644 --- a/share/ruby-install/truffleruby/dependencies.sh +++ b/share/ruby-install/truffleruby/dependencies.sh @@ -11,7 +11,7 @@ case "$package_manager" in libyaml-dev ) ;; - dnf) + dnf|yum) ruby_dependencies=( make gcc @@ -21,28 +21,6 @@ case "$package_manager" in libyaml-devel ) ;; - yum) - ruby_dependencies=( - make - gcc - zlib-devel - openssl-devel - libxml2 - libyaml-devel - ) - ;; - port) - ruby_dependencies=( - openssl - libyaml - ) - ;; - brew) - ruby_dependencies=( - openssl@1.1 - libyaml - ) - ;; pacman) ruby_dependencies=( make @@ -63,6 +41,18 @@ case "$package_manager" in libyaml-devel ) ;; + port) + ruby_dependencies=( + openssl + libyaml + ) + ;; + brew) + ruby_dependencies=( + openssl@1.1 + libyaml + ) + ;; pkg) ruby_dependencies=( gmake