Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osrm-backend: use tbb for HEAD build #110153

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions Formula/osrm-backend.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
class OsrmBackend < Formula
desc "High performance routing engine"
homepage "http://project-osrm.org/"
url "https://github.com/Project-OSRM/osrm-backend/archive/v5.26.0.tar.gz"
sha256 "45e986db540324bd0fc881b746e96477b054186698e8d14610ff7c095e906dcd"
license "BSD-2-Clause"
revision 2
head "https://github.com/Project-OSRM/osrm-backend.git", branch: "master"

stable do
url "https://github.com/Project-OSRM/osrm-backend/archive/v5.26.0.tar.gz"
sha256 "45e986db540324bd0fc881b746e96477b054186698e8d14610ff7c095e906dcd"
depends_on "tbb@2020"
end

livecheck do
url :stable
Expand All @@ -21,27 +24,30 @@ class OsrmBackend < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "1e78299d0601d9aefce6ba8d0597e256ae57dfc7890b88a9f03701e10155d08a"
end

head do
url "https://github.com/Project-OSRM/osrm-backend.git", branch: "master"
depends_on "tbb"
end

depends_on "cmake" => :build
depends_on "boost"
depends_on "libstxxl"
depends_on "libxml2"
depends_on "libzip"
depends_on "lua"
depends_on "tbb@2020"

conflicts_with "flatbuffers", because: "both install flatbuffers headers"

def install
lua = Formula["lua"]
luaversion = lua.version.major_minor
mkdir "build" do
system "cmake", "..", "-DENABLE_CCACHE:BOOL=OFF",
"-DLUA_INCLUDE_DIR=#{lua.opt_include}/lua#{luaversion}",
"-DLUA_LIBRARY=#{lua.opt_lib}/#{shared_library("liblua", luaversion)}",
*std_cmake_args
system "make"
system "make", "install"
end
system "cmake", "-S", ".", "-B", "build",
"-DENABLE_CCACHE:BOOL=OFF",
"-DLUA_INCLUDE_DIR=#{lua.opt_include}/lua#{luaversion}",
"-DLUA_LIBRARY=#{lua.opt_lib/shared_library("liblua", luaversion)}",
*std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
pkgshare.install "profiles"
end

Expand Down