class Pcl < Formula desc "Library for 2D/3D image and point cloud processing" homepage "http://www.pointclouds.org/" revision 4 head "https://github.com/PointCloudLibrary/pcl.git" stable do url "https://github.com/PointCloudLibrary/pcl/archive/pcl-1.8.1.tar.gz" sha256 "5a102a2fbe2ba77c775bf92c4a5d2e3d8170be53a68c3a76cfc72434ff7b9783" # VTK 8.1 compat # Upstream commit from 10 Nov 2017 "VTK function change since version 7.1 (#2063)" # See https://github.com/PointCloudLibrary/pcl/pull/2063 patch do url "https://github.com/PointCloudLibrary/pcl/commit/6555b9a91f.patch?full_index=1" sha256 "860a7b8e7964725b2d11a4237d6a6b65a42f049bc855ecbfcdc406b8e505b478" end end bottle do sha256 "2bab97939b9af9238391df29d00c1959d2f4e1d9786279ae56af5ee2684cf3ca" => :high_sierra sha256 "c90c0dd905b0883dd60d4eb4f940cdf087f6ffcb39847c54a2bcf099ed5a10fe" => :sierra sha256 "5f485acc6e2590c030cbaed865e201414384555ca6bdcc51f62feb8cac23d931" => :el_capitan end depends_on "cmake" => :build depends_on "pkg-config" => :build depends_on "boost" depends_on "cminpack" depends_on "eigen" depends_on "flann" depends_on "glew" depends_on "libusb" depends_on "qhull" depends_on "vtk" def install # Fix "error: no matching constructor for initialization of # 'boost::uuids::random_generator' (aka 'boost::uuids::random_generator_pure')" # Upstream issue 18 Apr 2018 "Fails to build against Boost 1.67" # See https://github.com/PointCloudLibrary/pcl/issues/2284 ENV.append "CXXFLAGS", "-DBOOST_UUID_RANDOM_GENERATOR_COMPAT" args = std_cmake_args + %w[ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_apps=AUTO_OFF -DBUILD_apps_3d_rec_framework=AUTO_OFF -DBUILD_apps_cloud_composer=AUTO_OFF -DBUILD_apps_in_hand_scanner=AUTO_OFF -DBUILD_apps_optronic_viewer=AUTO_OFF -DBUILD_apps_point_cloud_editor=AUTO_OFF -DBUILD_examples:BOOL=ON -DBUILD_global_tests:BOOL=OFF -DBUILD_outofcore:BOOL=AUTO_OFF -DBUILD_people:BOOL=AUTO_OFF -DBUILD_simulation:BOOL=AUTO_OFF -DWITH_CUDA:BOOL=OFF -DWITH_DOCS:BOOL=OFF -DWITH_QT:BOOL=FALSE -DWITH_TUTORIALS:BOOL=OFF ] if build.head? args << "-DBUILD_apps_modeler=AUTO_OFF" else args << "-DBUILD_apps_modeler:BOOL=OFF" end mkdir "build" do system "cmake", "..", *args system "make", "install" prefix.install Dir["#{bin}/*.app"] end end test do assert_match "tiff files", shell_output("#{bin}/pcl_tiff2pcd -h", 255) end end