Skip to content

Commit 4dc33ec

Browse files
committed
Automatically set PKG_CONFIG_PATH for compiling OpenSSL on macOS
* See #1830 (cherry picked from commit 97d2635)
1 parent 16f91ee commit 4dc33ec

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ New features:
55
* Enable and document `--coverage` option (#1840, @chrisseaton).
66
* Update the internal LLVM toolchain to LLVM 9 and reduce its download size.
77
* Updated to Ruby 2.6.5 (#1749).
8+
* Automatically set `PKG_CONFIG_PATH` as needed for compiling OpenSSL on macOS (#1830).
89

910
Bug fixes:
1011

lib/truffle/truffle/openssl-prefix.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@
2222
abort 'Could not find OpenSSL headers, install via Homebrew or MacPorts or set OPENSSL_PREFIX'
2323
end
2424
end
25+
26+
if openssl_prefix = ENV['OPENSSL_PREFIX']
27+
# We need to set PKG_CONFIG_PATH too, see https://github.com/oracle/truffleruby/issues/1830
28+
# OpenSSL's extconf.rb calls the pkg_config() helper.
29+
ENV['PKG_CONFIG_PATH'] = ["#{openssl_prefix}/lib/pkgconfig", *ENV['PKG_CONFIG_PATH']].join(':')
30+
end

0 commit comments

Comments
 (0)