Skip to content

Commit 3c002b7

Browse files
committed
erlang@25: switch to wxwidgets@3.2
This will be needed after #230768. This isn't included there since `erlang@25` is deprecated, but it is easy enough to fix now so let's keep it working until it's disabled next month.
1 parent 3d7a487 commit 3c002b7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Formula/e/erlang@25.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class ErlangAT25 < Formula
55
url "https://github.com/erlang/otp/releases/download/OTP-25.3.2.21/otp_src_25.3.2.21.tar.gz"
66
sha256 "99296fcd97a2053c5fcde7dc0ded2ba261a3baf1491c745fca71bd9804d51443"
77
license "Apache-2.0"
8+
revision 1
89

910
livecheck do
1011
url :stable
@@ -29,7 +30,7 @@ class ErlangAT25 < Formula
2930

3031
depends_on "openssl@3"
3132
depends_on "unixodbc"
32-
depends_on "wxwidgets" # for GUI apps like observer
33+
depends_on "wxwidgets@3.2" # for GUI apps like observer
3334

3435
uses_from_macos "libxslt" => :build # for xsltproc
3536
uses_from_macos "ncurses"
@@ -58,6 +59,8 @@ def install
5859
# Do this if building from a checkout to generate configure
5960
system "./otp_build", "autoconf" unless File.exist? "configure"
6061

62+
wxwidgets = deps.find { |dep| dep.name.match?(/^wxwidgets(@\d+(\.\d+)*)?$/) }.to_formula
63+
wx_config = wxwidgets.opt_bin/"wx-config-#{wxwidgets.version.major_minor}"
6164
args = %W[
6265
--disable-debug
6366
--disable-silent-rules
@@ -71,6 +74,7 @@ def install
7174
--with-odbc=#{Formula["unixodbc"].opt_prefix}
7275
--with-ssl=#{Formula["openssl@3"].opt_prefix}
7376
--without-javac
77+
--with-wx-config=#{wx_config}
7478
]
7579

7680
if OS.mac?
@@ -79,6 +83,9 @@ def install
7983
args << "--with-dynamic-trace=dtrace" if MacOS::CLT.installed?
8084
end
8185

86+
# The definition of `WX_CC` does not use our configuration of `--with-wx-config`, unfortunately.
87+
inreplace "lib/wx/configure", "WX_CC=`wx-config --cc`", "WX_CC=`#{wx_config} --cc`"
88+
8289
system "./configure", *args
8390
system "make"
8491
system "make", "install"

0 commit comments

Comments
 (0)