Skip to content

Commit bcfcae8

Browse files
committed
[email protected]: fix build error with tcl-tk v9
1 parent 5e24f9a commit bcfcae8

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

Formula/[email protected]

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,21 @@ class OpencascadeAT772 < Formula
3939
depends_on "freeimage"
4040
depends_on "freetype"
4141
depends_on "tbb"
42-
depends_on "tcl-tk"
42+
depends_on "tcl-tk@8" # TCL 9 issue: https://tracker.dev.opencascade.org/view.php?id=33725
4343

4444
on_linux do
45+
depends_on "libx11"
4546
depends_on "mesa" # For OpenGL
4647
end
4748

49+
# Backport fix for incorrect type
50+
patch do
51+
url "https://github.com/Open-Cascade-SAS/OCCT/commit/7236e83dcc1e7284e66dc61e612154617ef715d6.patch?full_index=1"
52+
sha256 "ed8848b3891df4894de56ae8f8c51f6a4b78477c0063d957321c1cace4613c29"
53+
end
54+
4855
def install
49-
tcltk = Formula["tcl-tk"]
56+
tcltk = Formula["tcl-tk@8"]
5057
libtcl = tcltk.opt_lib/shared_library("libtcl#{tcltk.version.major_minor}")
5158
libtk = tcltk.opt_lib/shared_library("libtk#{tcltk.version.major_minor}")
5259

@@ -96,8 +103,12 @@ def install
96103
\.(\d+) # 4
97104
(\.dylib)? # 5
98105
/x
106+
107+
# NOTE: ipatch, `audit_result: false` should resolve the below
108+
# MethodDeprecatedError: Calling gsub!(before, after, false) is deprecated!
109+
# ...Use gsub!(before, after, audit_result: false) instead.
99110
inreplace (lib/"cmake/opencascade").glob("*.cmake") do |s|
100-
s.gsub! tbb_regex, 'libtbb\1\2.\3\5', false
111+
s.gsub! tbb_regex, 'libtbb\1\2.\3\5', audit_result: false
101112
end
102113

103114
bin.env_script_all_files(libexec, CASROOT: prefix)

0 commit comments

Comments
 (0)