class OsrmBackend < Formula desc "High performance routing engine" homepage "http://project-osrm.org/" url "https://github.com/Project-OSRM/osrm-backend/archive/v5.4.3.tar.gz" sha256 "501b9302d4ae622f04305debacd2f59941409c6345056ebb272779ac375f874d" revision 2 head "https://github.com/Project-OSRM/osrm-backend.git" bottle do cellar :any sha256 "72c18b03a4856feaf45dbda1cdb45f525d2e1616fb32c27f02afdd333117ea63" => :sierra sha256 "657a7fb717477ab7f79a6cf1edcf55c7ef71dfb37d3041ecb6d6cb88ef3c27b9" => :el_capitan sha256 "e65bf2c7c5f6baa953e85702a30f952acebba68c5cf20d99795a813f39f18441" => :yosemite end depends_on "cmake" => :build depends_on "boost" depends_on "libstxxl" depends_on "libxml2" depends_on "libzip" depends_on "lua@5.1" depends_on "luabind" depends_on "tbb" def install mkdir "build" do system "cmake", "..", *std_cmake_args system "make" system "make", "install" end pkgshare.install "profiles" end test do (testpath/"test.osm").write <<-EOS.undent EOS (testpath/"tiny-profile.lua").write <<-EOS.undent function way_function (way, result) result.forward_mode = mode.driving result.forward_speed = 1 end EOS safe_system "#{bin}/osrm-extract", "test.osm", "--profile", "tiny-profile.lua" safe_system "#{bin}/osrm-contract", "test.osrm" assert File.exist?("#{testpath}/test.osrm"), "osrm-extract generated no output!" end end