blob: ebcf5f01477f20282e3c5488f8204616cc1345ce (
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
 | require "formula"
class Tippecanoe < Formula
  homepage "https://github.com/mapbox/tippecanoe"
  url "https://github.com/mapbox/tippecanoe/archive/v1.1.0.tar.gz"
  sha1 "5b50dc19c1e56ea4051dee5e790dd5cd328df005"
  bottle do
    cellar :any
    sha1 "6fa77446f3ad21f346f25ab42c6bbb83f29e58b4" => :yosemite
    sha1 "ee7a92d3ad37e334eb386a45764b5018467e6f5f" => :mavericks
    sha1 "98ee5c744cdd44a4e85475028bf043f15a9f5e2a" => :mountain_lion
  end
  depends_on "protobuf-c"
  def install
    system "make"
    system "make", "install", "PREFIX=#{prefix}"
  end
  test do
    path = testpath/"test.json"
    path.write <<-EOS.undent
      {"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0,0]}}
    EOS
    output = `#{bin}/tippecanoe -o test.mbtiles #{path}`.strip
    assert_equal 0, $?.exitstatus
    assert_equal "using layer name test", output
  end
end
 |