mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-09-17 06:31:18 +02:00
Avoid linking to Homebrew Cellar
Links to the Cellar break when packages are upgraded.
This commit is contained in:
parent
3ec7db4629
commit
9df6a7ea9c
2 changed files with 9 additions and 0 deletions
|
@ -1107,6 +1107,11 @@ has_broken_mac_openssl() {
|
|||
}
|
||||
|
||||
pkgconfig_openssl_version() {
|
||||
local libdir
|
||||
libdir="$(pkg-config --variable=prefix openssl 2>/dev/null || true)"
|
||||
# We don't want to link to Homebrew Cellar because links break when packages are upgraded.
|
||||
[[ "$libdir" != */Cellar/* ]] || return 0
|
||||
|
||||
pkg-config --modversion openssl 2>/dev/null || true
|
||||
}
|
||||
|
||||
|
|
|
@ -536,6 +536,9 @@ OUT
|
|||
@test "link to Homebrew OpenSSL" {
|
||||
cached_tarball "ruby-3.2.0" configure
|
||||
|
||||
openssl_libdir="$TMP/homebrew/Cellar/openssl@3/3.0.0"
|
||||
mkdir -p "$openssl_libdir"
|
||||
|
||||
local homebrew_prefix="${TMP}/homebrew"
|
||||
executable "${homebrew_prefix}/opt/openssl@3/bin/openssl" <<EXE
|
||||
#!/$BASH
|
||||
|
@ -563,6 +566,7 @@ EXE
|
|||
stub_repeated brew \
|
||||
'list : printf "git\nopenssl@3\nopenssl-utils\nopenssl@1.1\nopenssl@3.0\nwget\nopenssl@3.1"' \
|
||||
"--prefix : echo '$homebrew_prefix'/opt/\$2 "
|
||||
stub_repeated pkg-config '--modversion openssl : echo 3.0.0' "--variable=prefix openssl : echo '$openssl_libdir'"
|
||||
stub_make_install
|
||||
|
||||
run_inline_definition <<DEF
|
||||
|
|
Loading…
Reference in a new issue