Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate formulae to openssl@3 #133144

Closed
wants to merge 13 commits into from
5 changes: 3 additions & 2 deletions Formula/apr-util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class AprUtil < Formula
mirror "https://archive.apache.org/dist/apr/apr-util-1.6.3.tar.bz2"
sha256 "a41076e3710746326c3945042994ad9a4fcac0ce0277dd8fea076fec3c9772b5"
license "Apache-2.0"
revision 1

bottle do
sha256 arm64_ventura: "6934399a13fd918d1b923b0f3c11b147b7f95252fb5346e6c2c1ff0ea469dd47"
Expand All @@ -19,7 +20,7 @@ class AprUtil < Formula
keg_only :shadowed_by_macos, "Apple's CLT provides apr (but not apr-util)"

depends_on "apr"
depends_on "openssl@1.1"
depends_on "openssl@3"

uses_from_macos "expat"
uses_from_macos "libxcrypt"
Expand All @@ -34,7 +35,7 @@ def install
system "./configure", *std_configure_args,
"--with-apr=#{Formula["apr"].opt_prefix}",
"--with-crypto",
"--with-openssl=#{Formula["openssl@1.1"].opt_prefix}",
"--with-openssl=#{Formula["openssl@3"].opt_prefix}",
"--without-pgsql"

system "make"
Expand Down
5 changes: 3 additions & 2 deletions Formula/curl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class Curl < Formula
mirror "http://fresh-center.net/linux/www/legacy/curl-8.1.2.tar.bz2"
sha256 "b54974d32fd610acace92e3df1f643144015ac65847f0a041fdc17db6f43f243"
license "curl"
revision 1

livecheck do
url "https://curl.se/download/"
Expand Down Expand Up @@ -40,7 +41,7 @@ class Curl < Formula
depends_on "libnghttp2"
depends_on "libssh2"
depends_on "openldap"
depends_on "openssl@1.1"
depends_on "openssl@3"
depends_on "rtmpdump"
depends_on "zstd"

Expand All @@ -55,7 +56,7 @@ def install
--disable-dependency-tracking
--disable-silent-rules
--prefix=#{prefix}
--with-ssl=#{Formula["openssl@1.1"].opt_prefix}
--with-ssl=#{Formula["openssl@3"].opt_prefix}
--without-ca-bundle
--without-ca-path
--with-ca-fallback
Expand Down
5 changes: 3 additions & 2 deletions Formula/freetds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class Freetds < Formula
desc "Libraries to talk to Microsoft SQL Server and Sybase databases"
homepage "https://www.freetds.org/"
license "GPL-2.0-or-later"
revision 1

stable do
url "https://www.freetds.org/files/stable/freetds-1.3.18.tar.bz2", using: :homebrew_curl
Expand Down Expand Up @@ -39,7 +40,7 @@ class Freetds < Formula
end

depends_on "pkg-config" => :build
depends_on "openssl@1.1"
depends_on "openssl@3"
depends_on "unixodbc"

uses_from_macos "krb5"
Expand All @@ -55,7 +56,7 @@ def install
--mandir=#{man}
--sysconfdir=#{etc}
--with-unixodbc=#{Formula["unixodbc"].opt_prefix}
--with-openssl=#{Formula["openssl@1.1"].opt_prefix}
--with-openssl=#{Formula["openssl@3"].opt_prefix}
--enable-sybase-compat
--enable-krb5
--enable-odbc-wide
Expand Down
3 changes: 2 additions & 1 deletion Formula/krb5.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Krb5 < Formula
url "https://kerberos.org/dist/krb5/1.21/krb5-1.21.tar.gz"
sha256 "69f8aaff85484832df67a4bbacd99b9259bd95aab8c651fbbe65cdc9620ea93b"
license :cannot_represent
revision 1

livecheck do
url :homepage
Expand All @@ -22,7 +23,7 @@ class Krb5 < Formula

keg_only :provided_by_macos

depends_on "openssl@1.1"
depends_on "openssl@3"

uses_from_macos "bison" => :build
uses_from_macos "libedit"
Expand Down
3 changes: 2 additions & 1 deletion Formula/libevent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Libevent < Formula
url "https://github.com/libevent/libevent/archive/release-2.1.12-stable.tar.gz"
sha256 "7180a979aaa7000e1264da484f712d403fcf7679b1e9212c4e3d09f5c93efc24"
license "BSD-3-Clause"
revision 1

livecheck do
url :homepage
Expand All @@ -27,7 +28,7 @@ class Libevent < Formula
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
depends_on "openssl@1.1"
depends_on "openssl@3"

def install
system "./autogen.sh"
Expand Down
3 changes: 2 additions & 1 deletion Formula/libpq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Libpq < Formula
url "https://ftp.postgresql.org/pub/source/v15.3/postgresql-15.3.tar.bz2"
sha256 "ffc7d4891f00ffbf5c3f4eab7fbbced8460b8c0ee63c5a5167133b9e6599d932"
license "PostgreSQL"
revision 1

livecheck do
url "https://ftp.postgresql.org/pub/source/"
Expand All @@ -26,7 +27,7 @@ class Libpq < Formula
# See https://github.com/Homebrew/homebrew-core/issues/47494.
depends_on "krb5"

depends_on "openssl@1.1"
depends_on "openssl@3"

uses_from_macos "zlib"

Expand Down
5 changes: 3 additions & 2 deletions Formula/libssh2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Libssh2 < Formula
mirror "http://download.openpkg.org/components/cache/libssh2/libssh2-1.11.0.tar.gz"
sha256 "3736161e41e2693324deb38c26cfdc3efe6209d634ba4258db1cecff6a5ad461"
license "BSD-3-Clause"
revision 1

livecheck do
url "https://www.libssh2.org/download/"
Expand All @@ -30,7 +31,7 @@ class Libssh2 < Formula
depends_on "libtool" => :build
end

depends_on "openssl@1.1"
depends_on "openssl@3"

uses_from_macos "zlib"

Expand All @@ -40,7 +41,7 @@ def install
--disable-examples-build
--with-openssl
--with-libz
--with-libssl-prefix=#{Formula["openssl@1.1"].opt_prefix}
--with-libssl-prefix=#{Formula["openssl@3"].opt_prefix}
]

system "./buildconf" if build.head?
Expand Down
11 changes: 7 additions & 4 deletions Formula/node.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
class Node < Formula
desc "Platform built on V8 to build network applications"
homepage "https://nodejs.org/"
# TODO: Re-enable LTO after OpenSSL migration.
url "https://nodejs.org/dist/v20.3.0/node-v20.3.0.tar.xz"
sha256 "1ba8d49423ed3a75729066bb3ea26493ee9cb7d6568ef948597fc9ef454f7435"
license "MIT"
revision 1
head "https://github.com/nodejs/node.git", branch: "main"

livecheck do
Expand All @@ -28,7 +30,7 @@ class Node < Formula
depends_on "icu4c"
depends_on "libnghttp2"
depends_on "libuv"
depends_on "openssl@1.1"
depends_on "openssl@3"

uses_from_macos "python", since: :catalina
uses_from_macos "zlib"
Expand Down Expand Up @@ -76,8 +78,8 @@ def install
--shared-libuv-libpath=#{Formula["libuv"].lib}
--shared-nghttp2-includes=#{Formula["libnghttp2"].include}
--shared-nghttp2-libpath=#{Formula["libnghttp2"].lib}
--shared-openssl-includes=#{Formula["openssl@1.1"].include}
--shared-openssl-libpath=#{Formula["openssl@1.1"].lib}
--shared-openssl-includes=#{Formula["openssl@3"].include}
--shared-openssl-libpath=#{Formula["openssl@3"].lib}
--shared-brotli-includes=#{Formula["brotli"].include}
--shared-brotli-libpath=#{Formula["brotli"].lib}
--shared-cares-includes=#{Formula["c-ares"].include}
Expand All @@ -90,7 +92,8 @@ def install
# terminate called after throwing an instance of 'std::out_of_range'
# Pre-Catalina macOS also can't build with LTO
# LTO is unpleasant if you have to build from source.
args << "--enable-lto" if MacOS.version >= :catalina && build.bottle?
# TODO: Re-enable LTO after OpenSSL migration.
# args << "--enable-lto" if MacOS.version >= :catalina && build.bottle?

system "./configure", *args
system "make", "install"
Expand Down
3 changes: 2 additions & 1 deletion Formula/openldap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Openldap < Formula
mirror "http://fresh-center.net/linux/misc/legacy/openldap-2.6.4.tgz"
sha256 "d51704e50178430c06cf3d8aa174da66badf559747a47d920bb54b2d4aa40991"
license "OLDAP-2.8"
revision 1

livecheck do
url "https://www.openldap.org/software/download/OpenLDAP/openldap-release/"
Expand All @@ -25,7 +26,7 @@ class Openldap < Formula

keg_only :provided_by_macos

depends_on "openssl@1.1"
depends_on "openssl@3"

on_linux do
depends_on "util-linux"
Expand Down
5 changes: 3 additions & 2 deletions Formula/php.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Php < Formula
mirror "https://fossies.org/linux/www/php-8.2.7.tar.xz"
sha256 "4b9fb3dcd7184fe7582d7e44544ec7c5153852a2528de3b6754791258ffbdfa0"
license "PHP-3.01"
revision 1

livecheck do
url "https://www.php.net/downloads"
Expand Down Expand Up @@ -48,7 +49,7 @@ class Php < Formula
depends_on "libzip"
depends_on "oniguruma"
depends_on "openldap"
depends_on "openssl@1.1"
depends_on "openssl@3"
depends_on "pcre2"
depends_on "sqlite"
depends_on "tidy-html5"
Expand Down Expand Up @@ -211,7 +212,7 @@ def install
end

# Use OpenSSL cert bundle
openssl = Formula["openssl@1.1"]
openssl = Formula["openssl@3"]
%w[development production].each do |mode|
inreplace "php.ini-#{mode}", /; ?openssl\.cafile=/,
"openssl.cafile = \"#{openssl.pkgetc}/cert.pem\""
Expand Down
7 changes: 4 additions & 3 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class PythonAT311 < Formula
url "https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tgz"
sha256 "85c37a265e5c9dd9f75b35f954e31fbfc10383162417285e30ad25cc073a0d63"
license "Python-2.0"
revision 1

livecheck do
url "https://www.python.org/ftp/python/"
Expand All @@ -26,7 +27,7 @@ class PythonAT311 < Formula

depends_on "pkg-config" => :build
depends_on "mpdecimal"
depends_on "openssl@1.1"
depends_on "openssl@3"
depends_on "sqlite"
depends_on "xz"

Expand Down Expand Up @@ -148,7 +149,7 @@ def install
--datadir=#{share}
--without-ensurepip
--enable-loadable-sqlite-extensions
--with-openssl=#{Formula["openssl@1.1"].opt_prefix}
--with-openssl=#{Formula["openssl@3"].opt_prefix}
--enable-optimizations
--with-system-expat
--with-system-libmpdec
Expand Down Expand Up @@ -214,7 +215,7 @@ def install
# `brew install enchant && pip install pyenchant`
inreplace "./Lib/ctypes/macholib/dyld.py" do |f|
f.gsub! "DEFAULT_LIBRARY_FALLBACK = [",
"DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib', '#{Formula["openssl@1.1"].opt_lib}',"
carlocab marked this conversation as resolved.
Show resolved Hide resolved
"DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib', '#{Formula["openssl@3"].opt_lib}',"
f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks',"
end

Expand Down
4 changes: 2 additions & 2 deletions Formula/rtmpdump.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Rtmpdump < Formula
version "2.4+20151223"
sha256 "5c032f5c8cc2937eb55a81a94effdfed3b0a0304b6376147b86f951e225e3ab5"
license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"]
revision 1
revision 2
head "https://git.ffmpeg.org/rtmpdump.git", branch: "master"

livecheck do
Expand All @@ -28,7 +28,7 @@ class Rtmpdump < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "c1d50c3dc8938a0e69c86d29046c924c3e9f7d80c567c8bd848fe368ae0a992e"
end

depends_on "openssl@1.1"
depends_on "openssl@3"

uses_from_macos "zlib"

Expand Down
5 changes: 3 additions & 2 deletions Formula/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class Ruby < Formula
desc "Powerful, clean, object-oriented scripting language"
homepage "https://www.ruby-lang.org/"
license "Ruby"
revision 1

stable do
url "https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz"
Expand Down Expand Up @@ -45,7 +46,7 @@ class Ruby < Formula
depends_on "pkg-config" => :build
depends_on "rust" => :build
depends_on "libyaml"
depends_on "openssl@1.1"
depends_on "openssl@3"
depends_on "readline"

uses_from_macos "gperf"
Expand All @@ -72,7 +73,7 @@ def install

system "./autogen.sh" if build.head?

paths = %w[libyaml openssl@1.1 readline].map { |f| Formula[f].opt_prefix }
paths = %w[libyaml openssl@3 readline].map { |f| Formula[f].opt_prefix }
args = %W[
--prefix=#{prefix}
--enable-shared
Expand Down