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

opencascade@7.7.3: fix build error use tcl-tk v8 #648

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Formula/opencascade@7.7.2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,21 @@ class OpencascadeAT772 < Formula
depends_on "freeimage"
depends_on "freetype"
depends_on "tbb"
depends_on "tcl-tk"
depends_on "tcl-tk@8" # TCL 9 issue: https://tracker.dev.opencascade.org/view.php?id=33725

on_linux do
depends_on "libx11"
depends_on "mesa" # For OpenGL
end

# Backport fix for incorrect type
patch do
url "https://github.com/Open-Cascade-SAS/OCCT/commit/7236e83dcc1e7284e66dc61e612154617ef715d6.patch?full_index=1"
sha256 "ed8848b3891df4894de56ae8f8c51f6a4b78477c0063d957321c1cace4613c29"
end

def install
tcltk = Formula["tcl-tk"]
tcltk = Formula["tcl-tk@8"]
libtcl = tcltk.opt_lib/shared_library("libtcl#{tcltk.version.major_minor}")
libtk = tcltk.opt_lib/shared_library("libtk#{tcltk.version.major_minor}")

Expand Down Expand Up @@ -96,8 +103,12 @@ def install
\.(\d+) # 4
(\.dylib)? # 5
/x

# NOTE: ipatch, `audit_result: false` should resolve the below
# MethodDeprecatedError: Calling gsub!(before, after, false) is deprecated!
# ...Use gsub!(before, after, audit_result: false) instead.
inreplace (lib/"cmake/opencascade").glob("*.cmake") do |s|
s.gsub! tbb_regex, 'libtbb\1\2.\3\5', false
s.gsub! tbb_regex, 'libtbb\1\2.\3\5', audit_result: false
end

bin.env_script_all_files(libexec, CASROOT: prefix)
Expand Down
Loading