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

Pcl 1.11.1 #59146

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
67 changes: 54 additions & 13 deletions Formula/pcl.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Pcl < Formula
desc "Library for 2D/3D image and point cloud processing"
homepage "https://pointclouds.org/"
url "https://github.com/PointCloudLibrary/pcl/archive/pcl-1.9.1.tar.gz"
sha256 "0add34d53cd27f8c468a59b8e931a636ad3174b60581c0387abb98a9fc9cddb6"
url "https://github.com/PointCloudLibrary/pcl/archive/pcl-1.11.1.tar.gz"
sha256 "a61558e53abafbc909e0996f91cfd2d7a400fcadf6b8cfb0ea3172b78422c74e"
license "BSD-3-Clause"
revision 9
head "https://github.com/PointCloudLibrary/pcl.git"

bottle do
Expand All @@ -13,37 +12,32 @@ class Pcl < Formula
sha256 "d14889b636e81d1427a7d0300c028b571ac038e54b3760eba8900a7175d210c1" => :high_sierra
end

depends_on "cmake" => :build
depends_on "cmake" => [:build, :test]
depends_on "pkg-config" => :build
depends_on "boost"
depends_on "cminpack"

Choose a reason for hiding this comment

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

This is no longer needed

depends_on "eigen"
depends_on "flann"
depends_on "glew"

Choose a reason for hiding this comment

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

This is needed again.

depends_on "libomp"
depends_on "libpcap"
depends_on "libusb"
depends_on "qhull"
depends_on "vtk"

# Upstream patch for boost 1.70.0
patch do
url "https://github.com/PointCloudLibrary/pcl/commit/648932bc.diff?full_index=1"
sha256 "23f2cced7786715c59b49a48e4037eb9dea9abee099c4c5c92d95a647636b5ec"
end

def install
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_examples:BOOL=OFF
-DBUILD_global_tests:BOOL=OFF
-DBUILD_outofcore:BOOL=AUTO_OFF
-DBUILD_people:BOOL=AUTO_OFF
-DBUILD_simulation:BOOL=AUTO_OFF
-DBUILD_simulation:BOOL=ON
-DWITH_CUDA:BOOL=OFF
-DWITH_DOCS:BOOL=OFF
-DWITH_QT:BOOL=FALSE
Expand All @@ -65,5 +59,52 @@ def install

test do
assert_match "tiff files", shell_output("#{bin}/pcl_tiff2pcd -h", 255)
# inspired by https://pointclouds.org/documentation/tutorials/writing_pcd.html
(testpath/"CMakeLists.txt").write <<~EOS
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(pcd_write)
find_package(PCL 1.2 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable (pcd_write pcd_write.cpp)
target_link_libraries (pcd_write ${PCL_LIBRARIES})
EOS
(testpath/"pcd_write.cpp").write <<~EOS
#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>

int main (int argc, char** argv)
{
pcl::PointCloud<pcl::PointXYZ> cloud;

// Fill in the cloud data
cloud.width = 2;
cloud.height = 1;
cloud.is_dense = false;
cloud.points.resize (cloud.width * cloud.height);
int i = 1;
for (auto& point: cloud)
{
point.x = i++;
point.y = i++;
point.z = i++;
}

pcl::io::savePCDFileASCII ("test_pcd.pcd", cloud);
return (0);
}
EOS
mkdir "build" do
system "cmake", "..", *std_cmake_args
system "make"
system "./pcd_write"
dtrodrigues marked this conversation as resolved.
Show resolved Hide resolved
assert_predicate (testpath/"build/test_pcd.pcd"), :exist?
output = File.read("test_pcd.pcd")
assert_match "POINTS 2", output
assert_match "1 2 3", output
assert_match "4 5 6", output
end
end
end
8 changes: 7 additions & 1 deletion Formula/visp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Visp < Formula
homepage "https://visp.inria.fr/"
url "https://gforge.inria.fr/frs/download.php/latestfile/475/visp-3.3.0.tar.gz"
sha256 "f2ed11f8fee52c89487e6e24ba6a31fa604b326e08fb0f561a22c877ebdb640d"
revision 7
revision 8

livecheck do
url "https://visp.inria.fr/download/"
Expand All @@ -27,6 +27,12 @@ class Visp < Formula
depends_on "pcl"
depends_on "zbar"

# from first commit at https://github.com/lagadic/visp/pull/768 - remove in next release
patch do
url "https://github.com/lagadic/visp/commit/61c8beb8442f9e0fe7df8966e2e874929af02344.patch?full_index=1"
sha256 "429bf02498fc03fff7bc2a2ad065dea6d8a8bfbde6bb1adb516fa821b1e5c96f"
end

# Fixes build on OpenCV >= 4.4.0
# Extracted from https://github.com/lagadic/visp/pull/795
patch :DATA
Expand Down