Skip to content

Commit 8d4dcbc

Browse files
committed
[email protected]: update openssl gem for OpenSSL 3.6+
1 parent f82e111 commit 8d4dcbc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Formula/r/[email protected]

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ class RubyAT33 < Formula
44
url "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.9.tar.gz"
55
sha256 "d1991690a4e17233ec6b3c7844c1e1245c0adce3e00d713551d0458467b727b1"
66
license "Ruby"
7+
revision 1
78

89
livecheck do
910
url "https://www.ruby-lang.org/en/downloads/"
@@ -47,6 +48,13 @@ class RubyAT33 < Formula
4748
end
4849
end
4950

51+
# Update the bundled openssl gem for compatibility with OpenSSL 3.6+
52+
# Using 3.2.x series to match major/minor version of bundled gem
53+
resource "openssl" do
54+
url "https://github.com/ruby/openssl/archive/refs/tags/v3.2.2.tar.gz"
55+
sha256 "07b282b43090e9b223c7f1df54d5883851a63fa90faebcc4e18217a2e3c7faba"
56+
end
57+
5058
def api_version
5159
"3.3.0"
5260
end
@@ -56,6 +64,15 @@ def rubygems_bindir
5664
end
5765

5866
def install
67+
openssl_gem_version = File.read("ext/openssl/openssl.gemspec")[/spec\.version\s*=\s*"(\d+(?:\.\d+)+)/, 1]
68+
odie "Remove openssl resource!" if Version.new(openssl_gem_version) >= "3.2.2"
69+
rm_r(%w[ext/openssl test/openssl])
70+
resource("openssl").stage do
71+
(buildpath/"ext").install "ext/openssl"
72+
(buildpath/"ext/openssl").install "lib", "History.md", "openssl.gemspec"
73+
(buildpath/"test").install "test/openssl"
74+
end
75+
5976
# otherwise `gem` command breaks
6077
ENV.delete("SDKROOT")
6178

0 commit comments

Comments
 (0)