From 1df3a3b451ebfe26594056fd52de0987a1b6bb46 Mon Sep 17 00:00:00 2001 From: Brian Gupta Date: Mon, 5 Apr 2021 16:06:11 -0400 Subject: [PATCH 1/7] Update openssl@1.0.rb --- Formula/openssl@1.0.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/openssl@1.0.rb b/Formula/openssl@1.0.rb index 5152463..ab96367 100644 --- a/Formula/openssl@1.0.rb +++ b/Formula/openssl@1.0.rb @@ -33,7 +33,7 @@ def install no-zlib shared enable-cms - darwin64-x86_64-cc +# darwin64-x86_64-cc enable-ec_nistp_64_gcc_128 ] system "perl", "./Configure", *args From 39a798d46e10be656bbd76a7a4bd902ab418c780 Mon Sep 17 00:00:00 2001 From: Brian Gupta Date: Mon, 5 Apr 2021 16:07:17 -0400 Subject: [PATCH 2/7] Update openssl@1.0.rb --- Formula/openssl@1.0.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/Formula/openssl@1.0.rb b/Formula/openssl@1.0.rb index ab96367..608d263 100644 --- a/Formula/openssl@1.0.rb +++ b/Formula/openssl@1.0.rb @@ -33,7 +33,6 @@ def install no-zlib shared enable-cms -# darwin64-x86_64-cc enable-ec_nistp_64_gcc_128 ] system "perl", "./Configure", *args From 15a22227677bccf4be2e7a2581cbd2d7d77e7985 Mon Sep 17 00:00:00 2001 From: Brian Gupta Date: Mon, 5 Apr 2021 16:09:48 -0400 Subject: [PATCH 3/7] Update openssl@1.0.rb --- Formula/openssl@1.0.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/openssl@1.0.rb b/Formula/openssl@1.0.rb index 608d263..c93600d 100644 --- a/Formula/openssl@1.0.rb +++ b/Formula/openssl@1.0.rb @@ -32,6 +32,7 @@ def install no-ssl3 no-zlib shared + linux-x86_64 enable-cms enable-ec_nistp_64_gcc_128 ] From cb461d272e85302acb1e6eb6aa0c406b0f3132e8 Mon Sep 17 00:00:00 2001 From: Brian Gupta Date: Mon, 5 Apr 2021 17:01:31 -0400 Subject: [PATCH 4/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 27d13c4..4086a96 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,5 @@ ## Installing Ruby 2.3 or older on macOS -1. `brew install rbenv/tap/openssl@1.0` +1. `brew install bgupta/tap/openssl@1.0` 2. `RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.0)" rbenv install 2.3.8` From 8f1a449aa37554beebdea9506b1f7b0d99b9448e Mon Sep 17 00:00:00 2001 From: Brian Gupta Date: Mon, 5 Apr 2021 17:27:45 -0400 Subject: [PATCH 5/7] Add conditional support for Linux --- Formula/openssl@1.0.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Formula/openssl@1.0.rb b/Formula/openssl@1.0.rb index c93600d..568623e 100644 --- a/Formula/openssl@1.0.rb +++ b/Formula/openssl@1.0.rb @@ -23,7 +23,12 @@ def install # along with perl modules in PERL5LIB. ENV.delete("PERL") ENV.delete("PERL5LIB") - + case RUBY_PLATFORM + when /x86_64-linux/ + build_target="linux-x86_64" + when /x86_64-darwin/ + build_target="darwin64-x86_64-cc" + end ENV.deparallelize args = %W[ --prefix=#{prefix} @@ -32,8 +37,8 @@ def install no-ssl3 no-zlib shared - linux-x86_64 enable-cms + #{build_target} enable-ec_nistp_64_gcc_128 ] system "perl", "./Configure", *args From c44612f873b5e6b14d00f153e1c66573ff5cd88f Mon Sep 17 00:00:00 2001 From: Brian Gupta Date: Mon, 5 Apr 2021 17:32:08 -0400 Subject: [PATCH 6/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4086a96..27d13c4 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,5 @@ ## Installing Ruby 2.3 or older on macOS -1. `brew install bgupta/tap/openssl@1.0` +1. `brew install rbenv/tap/openssl@1.0` 2. `RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.0)" rbenv install 2.3.8` From 2612a8c451e9abfd100763852c203881c1388516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Fri, 10 Jan 2025 20:12:34 +0100 Subject: [PATCH 7/7] arch_args --- Formula/openssl@1.0.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Formula/openssl@1.0.rb b/Formula/openssl@1.0.rb index cd1fcf4..1792790 100644 --- a/Formula/openssl@1.0.rb +++ b/Formula/openssl@1.0.rb @@ -30,6 +30,15 @@ def install ENV.O1 if ENV.compiler == :clang end + arch_args = [] + if OS.mac? + arch_args += %W[darwin64-#{Hardware::CPU.arch}-cc enable-ec_nistp_64_gcc_128] + elsif Hardware::CPU.intel? + arch_args << (Hardware::CPU.is_64_bit? ? "linux-x86_64" : "linux-elf") + elsif Hardware::CPU.arm? + arch_args << (Hardware::CPU.is_64_bit? ? "linux-aarch64" : "linux-armv4") + end + ENV.deparallelize args = %W[ --prefix=#{prefix} @@ -39,10 +48,8 @@ def install no-zlib shared enable-cms - darwin64-#{Hardware::CPU.arch}-cc - enable-ec_nistp_64_gcc_128 ] - system "perl", "./Configure", *args + system "perl", "./Configure", *(args + arch_args) system "make", "depend" system "make" # The make_ec step fails on arm64 macOS, so let's skip the test phase