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

vtk: clean up problematic include paths #60380

Closed
wants to merge 1 commit into from
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
19 changes: 18 additions & 1 deletion Formula/vtk.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
class Vtk < Formula
desc "Toolkit for 3D computer graphics, image processing, and visualization"
homepage "https://www.vtk.org/"
revision 10
license "BSD-3-Clause"
revision 11
head "https://github.com/Kitware/VTK.git"

stable do
Expand All @@ -19,6 +20,12 @@ class Vtk < Formula
url "https://gitlab.kitware.com/vtk/vtk/commit/257b9d7b18d5f3db3fe099dc18f230e23f7dfbab.diff"
sha256 "572c06a4ba279a133bfdcf0190fec2eff5f330fa85ad6a2a0b0f6dfdea01ca69"
end

# Qt 5.15 support
patch do
url "https://gitlab.kitware.com/vtk/vtk/-/commit/797f28697d5ba50c1fa2bc5596af626a3c277826.diff"
sha256 "cb3b3a0e6978889a9cb95be35f3d4a6928397d3b843ab72ecaaf96554c6d4fc7"
end
end

bottle do
Expand All @@ -40,6 +47,9 @@ class Vtk < Formula
depends_on "qt"

def install
# Do not record compiler path because it references the shim directory
inreplace "Common/Core/vtkConfigure.h.in", "@CMAKE_CXX_COMPILER@", "clang++"

pyver = Language::Python.major_minor_version "python3"
args = std_cmake_args + %W[
-DBUILD_SHARED_LIBS=ON
Expand Down Expand Up @@ -79,6 +89,13 @@ def install
inreplace Dir["#{lib}/cmake/**/vtkhdf5.cmake"].first,
Formula["hdf5"].prefix.realpath,
Formula["hdf5"].opt_prefix
# get rid of bad include paths on 10.14+
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this issue submitted upstream?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not, but it doesn't seem to be present in 9.x but I think most formulae need changes to support 9.x. I'm not positive where precisely the actual root cause is, but this will allow pcl to build which has been broken in homebrew since boost was merged in a month ago.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you start an upgrade to 9.x after this then? We should always provide the latest available version of software.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I can start the upgrade process for it after this. The cleanup after the install of vtk in this PR really isn't ideal but I think it's worth getting out so we can upgrade pcl and may be affecting other formulae using vtk.

if MacOS.version >= :mojave
inreplace Dir["#{lib}/cmake/vtk-*/Modules/vtklibxml2.cmake"], %r{;/Library/Developer/CommandLineTools[^"]*}, ""
inreplace Dir["#{lib}/cmake/vtk-*/Modules/vtkexpat.cmake"], %r{;/Library/Developer/CommandLineTools[^"]*}, ""
inreplace Dir["#{lib}/cmake/vtk-*/Modules/vtkzlib.cmake"], %r{;/Library/Developer/CommandLineTools[^"]*}, ""
inreplace Dir["#{lib}/cmake/vtk-*/Modules/vtkpng.cmake"], %r{;/Library/Developer/CommandLineTools[^"]*}, ""
end
end

test do
Expand Down