blob: 37d5f8a0be6dec3532a0630c36f2228b8857ac50 (
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
36
|
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
revision 1
sha1 "6e0f817d0a1c5fa15d88115df5ab2ffd65f86eb3" => :yosemite
sha1 "d02a43cb757016963afcca41c7fd610ad420f846" => :mavericks
sha1 "e89c8c18c41162ce30078bd93cd80509d471047f" => :mountain_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
|