Skip to content

Commit

Permalink
extconf.rb - fixup to detect openssl info in Ruby build (#3271)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSP-Greg committed Oct 30, 2023
1 parent c2fe0ed commit cdb2341
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ext/puma_http11/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@

unless ENV["PUMA_DISABLE_SSL"]
# don't use pkg_config('openssl') if '--with-openssl-dir' is used
has_openssl_dir = dir_config('openssl').any?
# macOS TruffleRuby problem
found_pkg_config = RUBY_ENGINE == 'truffleruby' &&
RUBY_PLATFORM.include?('darwin') && ENV['GITHUB_ACTIONS'] == 'true' ?
false : !has_openssl_dir && pkg_config('openssl')
# also looks within the Ruby build for directory info
has_openssl_dir = dir_config('openssl').any? ||
RbConfig::CONFIG['configure_args']&.include?('openssl') ||
Dir.exist?("#{RbConfig::TOPDIR}/src/main/c/openssl") # TruffleRuby

found_pkg_config = !has_openssl_dir && pkg_config('openssl')

found_ssl = if !$mingw && found_pkg_config
puts 'using OpenSSL pkgconfig (openssl.pc)'
Expand Down

0 comments on commit cdb2341

Please sign in to comment.