From 14d16bdb1ad8e98d76ec2c43b2c1c412ff707d0b Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Fri, 21 Jul 2023 16:42:42 +0200 Subject: [PATCH] [ruby/openssl] Always respect the openssl prefix chosen by truffle/openssl-prefix on TruffleRuby * See https://github.com/ruby/openssl/issues/650#issuecomment-1645699608 https://github.com/ruby/openssl/commit/ca738e7e13 --- ext/openssl/extconf.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index 551c470a70..368145d23a 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -13,7 +13,14 @@ require "mkmf" -dir_config_given = dir_config("openssl").any? +if defined?(::TruffleRuby) + # Always respect the openssl prefix chosen by truffle/openssl-prefix + require 'truffle/openssl-prefix' + dir_config_given = dir_config("openssl", ENV["OPENSSL_PREFIX"]).any? +else + dir_config_given = dir_config("openssl").any? +end + dir_config("kerberos") Logging::message "=== OpenSSL for Ruby configurator ===\n"