Skip to content

Commit

Permalink
Merge pull request #2274 from rbenv/ruby-configure-opts
Browse files Browse the repository at this point in the history
Avoid compiling OpenSSL if the user supplied `--with-openssl-dir` on the command line
  • Loading branch information
mislav committed Oct 14, 2023
2 parents 7773f82 + 9b87491 commit 1d9b4e2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/ruby-build
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ require_llvm() {
}

needs_yaml() {
[[ "$RUBY_CONFIGURE_OPTS" != *--with-libyaml-dir=* ]] &&
[[ "$RUBY_CONFIGURE_OPTS ${RUBY_CONFIGURE_OPTS_ARRAY[*]}" != *--with-libyaml-dir=* ]] &&
! use_homebrew_yaml
}

Expand Down Expand Up @@ -1050,7 +1050,7 @@ system_openssl_version() {

# openssl gem 1.1.1
needs_openssl_096_102() {
[[ "$RUBY_CONFIGURE_OPTS" == *--with-openssl-dir=* ]] && return 1
[[ "$RUBY_CONFIGURE_OPTS ${RUBY_CONFIGURE_OPTS_ARRAY[*]}" == *--with-openssl-dir=* ]] && return 1
has_broken_mac_openssl && return 0

local version
Expand All @@ -1060,7 +1060,7 @@ needs_openssl_096_102() {

# openssl gem 2.2.1
needs_openssl_101_111() {
[[ "$RUBY_CONFIGURE_OPTS" == *--with-openssl-dir=* ]] && return 1
[[ "$RUBY_CONFIGURE_OPTS ${RUBY_CONFIGURE_OPTS_ARRAY[*]}" == *--with-openssl-dir=* ]] && return 1
has_broken_mac_openssl && return 0

local version
Expand All @@ -1070,7 +1070,7 @@ needs_openssl_101_111() {

# openssl gem 3.0.0
needs_openssl_102_300() {
[[ "$RUBY_CONFIGURE_OPTS" == *--with-openssl-dir=* ]] && return 1
[[ "$RUBY_CONFIGURE_OPTS ${RUBY_CONFIGURE_OPTS_ARRAY[*]}" == *--with-openssl-dir=* ]] && return 1
has_broken_mac_openssl && return 0

local version
Expand Down Expand Up @@ -1209,7 +1209,7 @@ build_package_ldflags_dirs() {
}

build_package_enable_shared() {
if [[ " ${RUBY_CONFIGURE_OPTS} " != *" --disable-shared"* ]]; then
if [[ " ${RUBY_CONFIGURE_OPTS} ${RUBY_CONFIGURE_OPTS_ARRAY[*]}" != *" --disable-shared"* ]]; then
package_option ruby configure --enable-shared
fi
}
Expand Down

0 comments on commit 1d9b4e2

Please sign in to comment.