postmodern / ruby-install

Installs Ruby, JRuby, TruffleRuby, or mruby
MIT License
1.89k stars 250 forks source link

Convert `dependencies.txt` files into `dependencies.sh` files #477

Closed postmodern closed 1 month ago

postmodern commented 8 months ago

Replace the dependencies.txt file with shell script dependencies.sh files that better allow for dynamically defining package manager dependencies (ex: openssl@1.1 vs. openssl@3 or jemalloc).

Example Code

case "$package_manager" in
    apt)    dependencies=(...) ;;
    brew)
        dependencies=(...)

        case "$ruby_version" in
            2.*|3.0.*)    dependencies+=("openssl@1.1") ;;
            *)            dependencies+=("openssl@3") ;;
        esac
        ;;        
    ...
esac

The install_optional_deps and the fetch functions could also be removed. The load_dependencies function could be replaced with a simple source "$ruby/dependencies.sh" line.

ParadoxV5 commented 7 months ago

No need to install Bison to build Ruby from source code anymore. ⸺ https://github.com/ruby/ruby/blob/v3_3_0/NEWS.md#parser

Similarly for readline, but it’s probably still used by the default gem readline 0.0.4

We no longer need to install libraries like libreadline or libedit. ⸺ https://github.com/ruby/ruby/blob/v3_3_0/NEWS.md#stdlib-compatibility-issues

postmodern commented 1 month ago

Implemented by 25d4780 in the 0.10.0 branch.