Skip to content

Commit 6c937c8

Browse files
committed
Add an environment variable to always build openssl/libssl
* This is useful when one wants to avoid depending e.g. on which openssl version is installed in Homebrew, notably for ruby/setup-ruby#668
1 parent 20496b5 commit 6c937c8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ The build process may be configured through the following environment variables:
8888
| `RUBY_BUILD_TARBALL_OVERRIDE` | Override the URL to fetch the ruby tarball from, optionally followed by `#checksum`. |
8989
| `RUBY_BUILD_DEFINITIONS` | Colon-separated list of paths to search for build definition files. |
9090
| `RUBY_BUILD_ROOT` | The path prefix to search for build definitions files. *Deprecated:* use `RUBY_BUILD_DEFINITIONS`|
91+
| `RUBY_BUILD_VENDOR_OPENSSL` | Build and vendor openssl even if the system openssl is compatible |
9192
| `CC` | Path to the C compiler. |
9293
| `RUBY_CFLAGS` | Additional `CFLAGS` options (_e.g.,_ to override `-O3`). |
9394
| `CONFIGURE_OPTS` | Additional `./configure` options. |

bin/ruby-build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,8 @@ normalize_semver() {
11221122
# If a compatible Homebrew-installed OpenSSL version is found during
11231123
# checking, Ruby will be linked to it and the check will return false.
11241124
needs_openssl() {
1125+
[ -z "$RUBY_BUILD_VENDOR_OPENSSL" ] || return 0
1126+
11251127
[[ "$RUBY_CONFIGURE_OPTS ${RUBY_CONFIGURE_OPTS_ARRAY[*]}" != *--with-openssl-dir=* ]] || return 1
11261128

11271129
local system_version

0 commit comments

Comments
 (0)