aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/points2grid.rb
blob: f0846bfb999b3b02b8f48ed15ed4c795b7c73734 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'formula'

class Points2grid < Formula
  homepage 'https://github.com/CRREL/points2grid'
  url 'https://github.com/CRREL/points2grid/archive/1.3.0.tar.gz'
  sha1 'a12a54a70559d9920753256966bd2ce7eade752c'

  bottle do
    cellar :any
    sha1 "8b4752b61af2d4305d19fa774c52fb7ed609905e" => :mavericks
    sha1 "6c6afa9b2a8943f37b47909b5946d6682d6ffa3f" => :mountain_lion
    sha1 "5e258c25970c646b3406bde73de58505bbb21366" => :lion
  end

  depends_on 'cmake' => :build
  depends_on 'boost'
  depends_on 'gdal'

  def install
    args = std_cmake_args + ["-DWITH_GDAL=ON"]
    libexec.install "example.las"
    system "cmake", ".", *args
    system "make install"
  end

  test do
    mktemp do
      system bin/"points2grid",
             "-i", libexec/"example.las",
             "-o", "example",
             "--max", "--output_format", "grid"
      assert_equal 5, %x(grep -c '423.820000' < example.max.grid).strip.to_i
    end
  end
end