add a (slightly naive) packaging of osrm-backend and its missing dependencies

This commit is contained in:
Robert Scott
2015-02-22 14:34:24 +00:00
parent d44573e16f
commit 4147050550
8 changed files with 202 additions and 0 deletions
@@ -0,0 +1,18 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b6a40f9..87ca301 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -261,9 +261,10 @@ target_link_libraries(OSRM ${STXXL_LIBRARY})
target_link_libraries(osrm-extract ${STXXL_LIBRARY})
target_link_libraries(osrm-prepare ${STXXL_LIBRARY})
-if(MINGW)
- # STXXL needs OpenMP library
- target_link_libraries(osrm-extract gomp)
+find_package(OpenMP)
+if (OPENMP_FOUND)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
find_package( OSMPBF REQUIRED )
+20
View File
@@ -0,0 +1,20 @@
{stdenv, fetchurl, cmake, luabind, libosmpbf, stxxl, tbb, boost, expat, protobuf, bzip2, zlib}:
stdenv.mkDerivation rec {
name = "osrm-backend-4.5.0";
src = fetchurl {
url = "https://github.com/Project-OSRM/osrm-backend/archive/v4.5.0.tar.gz";
sha256 = "af61e883051f2ecb73520ace6f17cc6da30edc413208ff7cf3d87992eca0756c";
};
patches = [ ./4.5.0-openmp.patch ];
buildInputs = [ cmake luabind luabind.lua libosmpbf stxxl tbb boost expat protobuf bzip2 zlib ];
meta = {
homepage = https://github.com/Project-OSRM/osrm-backend/wiki;
description = "Open Source Routing Machine computes shortest paths in a graph. It was designed to run well with map data from the Openstreetmap Project.";
license = stdenv.lib.licenses.bsd2;
};
}