Skip to content

Commit 752a18c

Browse files
committed
erlang@24: switch to wxwidgets@3.2
This is needed after #230768. This wasn't done in that PR since `erlang@24` is deprecated, and will be disabled in 2 days. Let's update it anyway since it's relatively straightforward to do, and ensures that `brew extract` works properly even after this is disabled.
1 parent 1dd0876 commit 752a18c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Formula/e/erlang@24.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class ErlangAT24 < Formula
55
url "https://github.com/erlang/otp/releases/download/OTP-24.3.4.17/otp_src_24.3.4.17.tar.gz"
66
sha256 "0bf449184ef4ca71f9af79fc086d941f4532922e01957e84a4fec192c2db5c0c"
77
license "Apache-2.0"
8-
revision 1
8+
revision 2
99

1010
bottle do
1111
sha256 cellar: :any, arm64_sequoia: "4b033ab7693bc346cfcdc745afe84cabb0a67326ec1651cd2294e6f0bb84eb24"
@@ -25,7 +25,7 @@ class ErlangAT24 < Formula
2525

2626
depends_on "openssl@3"
2727
depends_on "unixodbc"
28-
depends_on "wxwidgets" # for GUI apps like observer
28+
depends_on "wxwidgets@3.2" # for GUI apps like observer
2929

3030
uses_from_macos "libxslt" => :build # for xsltproc
3131

@@ -48,6 +48,8 @@ def install
4848
# Do this if building from a checkout to generate configure
4949
system "./otp_build", "autoconf" unless File.exist? "configure"
5050

51+
wxwidgets = deps.find { |dep| dep.name.match?(/^wxwidgets(@\d+(\.\d+)*)?$/) }.to_formula
52+
wx_config = wxwidgets.opt_bin/"wx-config-#{wxwidgets.version.major_minor}"
5153
args = %W[
5254
--disable-debug
5355
--disable-silent-rules
@@ -61,6 +63,7 @@ def install
6163
--with-odbc=#{Formula["unixodbc"].opt_prefix}
6264
--with-ssl=#{Formula["openssl@3"].opt_prefix}
6365
--without-javac
66+
--with-wx-config=#{wx_config}
6467
]
6568

6669
if OS.mac?
@@ -69,6 +72,9 @@ def install
6972
args << "--with-dynamic-trace=dtrace" if MacOS::CLT.installed?
7073
end
7174

75+
# The definition of `WX_CC` does not use our configuration of `--with-wx-config`, unfortunately.
76+
inreplace "lib/wx/configure", "WX_CC=`wx-config --cc`", "WX_CC=`#{wx_config} --cc`"
77+
7278
system "./configure", *args
7379
system "make"
7480
system "make", "install"

0 commit comments

Comments
 (0)