class OsmiumTool < Formula desc "Libosmium-based command-line tool for processing OpenStreetMap data" homepage "https://osmcode.org/osmium-tool/" url "https://github.com/osmcode/osmium-tool/archive/v1.11.1.tar.gz" sha256 "ea47ca909d167951b975673b8a818600f988aeb35a5a911d4a3a0004bc76f04a" bottle do cellar :any sha256 "3a94cc46c4eded84287fee50fed5582f93ce29f158286018b322f9f98dc1a25f" => :catalina sha256 "6c9706f35cafe0e4ca47f4001ef2a79464f012d2b067fca3e1f63a9624d576c8" => :mojave sha256 "beda680852c644ddda11b7f4f13290efbc28630f36260a77bf1027c9e447345a" => :high_sierra end depends_on "cmake" => :build depends_on "libosmium" => :build depends_on "boost" def install protozero = Formula["libosmium"].opt_libexec/"include" system "cmake", ".", "-DPROTOZERO_INCLUDE_DIR=#{protozero}", *std_cmake_args system "make", "install" end test do (testpath/"test.osm").write <<~EOS EOS output = shell_output("#{bin}/osmium fileinfo test.osm") assert_match /Compression.+generator=handwritten/m, output system bin/"osmium", "tags-filter", "test.osm", "w/name=line", "-f", "osm" end end