32 lines
1 KiB
Ruby
32 lines
1 KiB
Ruby
require "formula"
|
|
|
|
class Tippecanoe < Formula
|
|
desc "Build vector tilesets from collections of GeoJSON features"
|
|
homepage "https://github.com/mapbox/tippecanoe"
|
|
url "https://github.com/mapbox/tippecanoe/archive/v1.2.0.tar.gz"
|
|
sha1 "348563c57629260d17e1761f9aedd85b1a0453ba"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "249c74b9b656aa43b687afd62d202dce1ad308ace3d3d02b60f115d55d17f18f" => :yosemite
|
|
sha256 "6a0663d76c8c3b320dfc0a09dd2ba8d282cab0dbcf227ac86b4ec1af410f13bf" => :mavericks
|
|
sha256 "71c71a42d35fa01a9516bd5731378dbf97087da190207e5a1e8c2222b91a50da" => :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 0 name test", output
|
|
end
|
|
end
|