Merge pull request #6867 from risicle/master
New packages for luabind, stxxl and osrm-backend
This commit is contained in:
commit
3af17021d4
22
pkgs/development/libraries/libosmpbf/default.nix
Normal file
22
pkgs/development/libraries/libosmpbf/default.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{stdenv, fetchurl, protobuf}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "libosmpbf-1.3.3";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/scrosby/OSM-binary/archive/v1.3.3.tar.gz";
|
||||||
|
sha256 = "a109f338ce6a8438a8faae4627cd08599d0403b8977c185499de5c17b92d0798";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ protobuf ];
|
||||||
|
|
||||||
|
sourceRoot = "OSM-binary-1.3.3/src";
|
||||||
|
|
||||||
|
installFlags = "PREFIX=$(out)";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = https://github.com/scrosby/OSM-binary;
|
||||||
|
description = "C library to read and write OpenStreetMap PBF files.";
|
||||||
|
license = stdenv.lib.licenses.lgpl3;
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
diff --git a/luabind/object.hpp b/luabind/object.hpp
|
||||||
|
index f7b7ca5..1c18e04 100644
|
||||||
|
--- a/luabind/object.hpp
|
||||||
|
+++ b/luabind/object.hpp
|
||||||
|
@@ -536,6 +536,8 @@ namespace detail
|
||||||
|
handle m_key;
|
||||||
|
};
|
||||||
|
|
||||||
|
+#if BOOST_VERSION < 105700
|
||||||
|
+
|
||||||
|
// Needed because of some strange ADL issues.
|
||||||
|
|
||||||
|
#define LUABIND_OPERATOR_ADL_WKND(op) \
|
||||||
|
@@ -557,7 +559,8 @@ namespace detail
|
||||||
|
LUABIND_OPERATOR_ADL_WKND(!=)
|
||||||
|
|
||||||
|
#undef LUABIND_OPERATOR_ADL_WKND
|
||||||
|
-
|
||||||
|
+
|
||||||
|
+#endif // BOOST_VERSION < 105700
|
||||||
|
} // namespace detail
|
||||||
|
|
||||||
|
namespace adl
|
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/Jamroot b/Jamroot
|
||||||
|
index 94494bf..83dfcbb 100755
|
||||||
|
--- a/Jamroot
|
||||||
|
+++ b/Jamroot
|
||||||
|
@@ -64,7 +64,7 @@ else if [ os.name ] in LINUX MACOSX FREEBSD
|
||||||
|
$(LUA_PATH) $(HOME)/Library/Frameworks /Library/Frameworks /usr /usr/local /opt/local /opt ;
|
||||||
|
|
||||||
|
local possible-suffixes =
|
||||||
|
- include/lua5.1 include/lua51 include/lua include ;
|
||||||
|
+ include/lua5.1 include/lua51 include/lua include include/luajit-2.0 ;
|
||||||
|
|
||||||
|
local includes = [ GLOB $(possible-prefixes)/$(possible-suffixes) : lua.h ] ;
|
||||||
|
|
||||||
|
@@ -83,7 +83,7 @@ else if [ os.name ] in LINUX MACOSX FREEBSD
|
||||||
|
|
||||||
|
local lib = $(prefix)/lib ;
|
||||||
|
|
||||||
|
- local names = liblua5.1 liblua51 liblua ;
|
||||||
|
+ local names = liblua5.1 liblua51 liblua libluajit-5.1 ;
|
||||||
|
local extensions = .a .so ;
|
||||||
|
|
||||||
|
library = [ GLOB $(lib)/lua51 $(lib)/lua5.1 $(lib)/lua $(lib) :
|
@ -0,0 +1,59 @@
|
|||||||
|
diff --git luabind-0.9.1/luabind/detail/call_function.hpp luabind-0.9.1-fixed/luabind/detail/call_function.hpp
|
||||||
|
index 1b45ec1..8f5afff 100644
|
||||||
|
--- luabind-0.9.1/luabind/detail/call_function.hpp
|
||||||
|
+++ luabind-0.9.1-fixed/luabind/detail/call_function.hpp
|
||||||
|
@@ -323,7 +323,8 @@ namespace luabind
|
||||||
|
|
||||||
|
#endif // LUABIND_CALL_FUNCTION_HPP_INCLUDED
|
||||||
|
|
||||||
|
-#elif BOOST_PP_ITERATION_FLAGS() == 1
|
||||||
|
+#else
|
||||||
|
+#if BOOST_PP_ITERATION_FLAGS() == 1
|
||||||
|
|
||||||
|
#define LUABIND_TUPLE_PARAMS(z, n, data) const A##n *
|
||||||
|
#define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n
|
||||||
|
@@ -440,4 +441,5 @@ namespace luabind
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
diff --git luabind-0.9.1/luabind/detail/call_member.hpp luabind-0.9.1-fixed/luabind/detail/call_member.hpp
|
||||||
|
index de8d563..e63555b 100644
|
||||||
|
--- luabind-0.9.1/luabind/detail/call_member.hpp
|
||||||
|
+++ luabind-0.9.1-fixed/luabind/detail/call_member.hpp
|
||||||
|
@@ -316,7 +316,8 @@ namespace luabind
|
||||||
|
|
||||||
|
#endif // LUABIND_CALL_MEMBER_HPP_INCLUDED
|
||||||
|
|
||||||
|
-#elif BOOST_PP_ITERATION_FLAGS() == 1
|
||||||
|
+#else
|
||||||
|
+#if BOOST_PP_ITERATION_FLAGS() == 1
|
||||||
|
|
||||||
|
#define LUABIND_TUPLE_PARAMS(z, n, data) const A##n *
|
||||||
|
#define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n
|
||||||
|
@@ -360,4 +361,5 @@ namespace luabind
|
||||||
|
#undef LUABIND_TUPLE_PARAMS
|
||||||
|
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
diff --git luabind-0.9.1/luabind/wrapper_base.hpp luabind-0.9.1-fixed/luabind/wrapper_base.hpp
|
||||||
|
index d54c668..0f88cc5 100755
|
||||||
|
--- luabind-0.9.1/luabind/wrapper_base.hpp
|
||||||
|
+++ luabind-0.9.1-fixed/luabind/wrapper_base.hpp
|
||||||
|
@@ -89,7 +89,8 @@ namespace luabind
|
||||||
|
|
||||||
|
#endif // LUABIND_WRAPPER_BASE_HPP_INCLUDED
|
||||||
|
|
||||||
|
-#elif BOOST_PP_ITERATION_FLAGS() == 1
|
||||||
|
+#else
|
||||||
|
+#if BOOST_PP_ITERATION_FLAGS() == 1
|
||||||
|
|
||||||
|
#define LUABIND_TUPLE_PARAMS(z, n, data) const A##n *
|
||||||
|
#define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n
|
||||||
|
@@ -188,3 +189,4 @@ namespace luabind
|
||||||
|
#undef N
|
||||||
|
|
||||||
|
#endif
|
||||||
|
+#endif
|
30
pkgs/development/libraries/luabind/default.nix
Normal file
30
pkgs/development/libraries/luabind/default.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{stdenv, fetchurl, boost-build, lua, boost}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "luabind-0.9.1";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/luabind/luabind/archive/v0.9.1.tar.gz";
|
||||||
|
sha256 = "0e5ead50a07668d29888f2fa6f53220f900c886e46a2c99c7e8656842f05ff2d";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [ ./0.9.1_modern_boost_fix.patch ./0.9.1_boost_1.57_fix.patch ./0.9.1_discover_luajit.patch ];
|
||||||
|
|
||||||
|
buildInputs = [ boost-build lua boost ];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ lua ];
|
||||||
|
|
||||||
|
buildPhase = "LUA_PATH=${lua} bjam release";
|
||||||
|
|
||||||
|
installPhase = "LUA_PATH=${lua} bjam --prefix=$out release install";
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
inherit lua;
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = https://github.com/luabind/luabind;
|
||||||
|
description = "Luabind is a library that helps you create bindings between C++ and Lua.";
|
||||||
|
license = stdenv.lib.licenses.mit;
|
||||||
|
};
|
||||||
|
}
|
24
pkgs/development/libraries/stxxl/default.nix
Normal file
24
pkgs/development/libraries/stxxl/default.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{stdenv, fetchurl, cmake, parallel ? true }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "stxxl-1.4.1";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/stxxl/stxxl/archive/1.4.1.tar.gz";
|
||||||
|
sha256 = "54006a5fccd1435abc2f3ec201997a4d7dacddb984d2717f62191798e5372f6c";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ cmake ];
|
||||||
|
|
||||||
|
cmakeFlags = let parallel_str = if parallel then "ON" else "OFF"; in "-DUSE_GNU_PARALLEL=${parallel_str}";
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
inherit parallel;
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = https://github.com/stxxl/stxxl;
|
||||||
|
description = "STXXL is an implementation of the C++ standard template library STL for external memory (out-of-core) computations.";
|
||||||
|
license = stdenv.lib.licenses.boost;
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/extractor/extractor_options.cpp b/extractor/extractor_options.cpp
|
||||||
|
index d14d8d9..c64d7fd 100644
|
||||||
|
--- a/extractor/extractor_options.cpp
|
||||||
|
+++ b/extractor/extractor_options.cpp
|
||||||
|
@@ -50,7 +50,7 @@ bool ExtractorOptions::ParseArguments(int argc, char *argv[], ExtractorConfig &e
|
||||||
|
boost::program_options::options_description config_options("Configuration");
|
||||||
|
config_options.add_options()("profile,p",
|
||||||
|
boost::program_options::value<boost::filesystem::path>(
|
||||||
|
- &extractor_config.profile_path)->default_value("profile.lua"),
|
||||||
|
+ &extractor_config.profile_path)->default_value("@out@/profiles/car.lua"),
|
||||||
|
"Path to LUA routing profile")(
|
||||||
|
"threads,t",
|
||||||
|
boost::program_options::value<unsigned int>(&extractor_config.requested_num_threads)
|
18
pkgs/servers/osrm-backend/4.5.0-openmp.patch
Normal file
18
pkgs/servers/osrm-backend/4.5.0-openmp.patch
Normal file
@ -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 )
|
27
pkgs/servers/osrm-backend/default.nix
Normal file
27
pkgs/servers/osrm-backend/default.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{stdenv, fetchurl, cmake, luabind, libosmpbf, stxxl, tbb, boost, expat, protobuf, bzip2, zlib, substituteAll}:
|
||||||
|
|
||||||
|
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
|
||||||
|
(substituteAll {
|
||||||
|
src = ./4.5.0-default-profile-path.template.patch;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [ cmake luabind libosmpbf stxxl tbb boost expat protobuf bzip2 zlib ];
|
||||||
|
|
||||||
|
postInstall = "mkdir -p $out/share/osrm-backend && cp -r ../profiles $out/share/osrm-backend/profiles";
|
||||||
|
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
}
|
@ -6612,6 +6612,8 @@ let
|
|||||||
|
|
||||||
libosip_3 = callPackage ../development/libraries/osip/3.nix {};
|
libosip_3 = callPackage ../development/libraries/osip/3.nix {};
|
||||||
|
|
||||||
|
libosmpbf = callPackage ../development/libraries/libosmpbf {};
|
||||||
|
|
||||||
libotr = callPackage ../development/libraries/libotr {
|
libotr = callPackage ../development/libraries/libotr {
|
||||||
libgcrypt = libgcrypt_1_6;
|
libgcrypt = libgcrypt_1_6;
|
||||||
};
|
};
|
||||||
@ -6875,6 +6877,10 @@ let
|
|||||||
|
|
||||||
loudmouth = callPackage ../development/libraries/loudmouth { };
|
loudmouth = callPackage ../development/libraries/loudmouth { };
|
||||||
|
|
||||||
|
luabind = callPackage ../development/libraries/luabind { lua = lua5_1; };
|
||||||
|
|
||||||
|
luabind_luajit = callPackage ../development/libraries/luabind { lua = luajit; };
|
||||||
|
|
||||||
lzo = callPackage ../development/libraries/lzo { };
|
lzo = callPackage ../development/libraries/lzo { };
|
||||||
|
|
||||||
matio = callPackage ../development/libraries/matio { };
|
matio = callPackage ../development/libraries/matio { };
|
||||||
@ -7460,6 +7466,8 @@ let
|
|||||||
|
|
||||||
srtp_linphone = callPackage ../development/libraries/srtp/linphone.nix { };
|
srtp_linphone = callPackage ../development/libraries/srtp/linphone.nix { };
|
||||||
|
|
||||||
|
stxxl = callPackage ../development/libraries/stxxl { parallel = true; };
|
||||||
|
|
||||||
sqlite = lowPrio (callPackage ../development/libraries/sqlite { });
|
sqlite = lowPrio (callPackage ../development/libraries/sqlite { });
|
||||||
|
|
||||||
sqlite-interactive = appendToName "interactive" (sqlite.override { interactive = true; });
|
sqlite-interactive = appendToName "interactive" (sqlite.override { interactive = true; });
|
||||||
@ -8263,6 +8271,10 @@ let
|
|||||||
|
|
||||||
opensmtpd = callPackage ../servers/mail/opensmtpd { };
|
opensmtpd = callPackage ../servers/mail/opensmtpd { };
|
||||||
|
|
||||||
|
osrm-backend = callPackage ../servers/osrm-backend { };
|
||||||
|
|
||||||
|
osrm-backend_luajit = callPackage ../servers/osrm-backend { luabind = luabind_luajit; };
|
||||||
|
|
||||||
petidomo = callPackage ../servers/mail/petidomo { };
|
petidomo = callPackage ../servers/mail/petidomo { };
|
||||||
|
|
||||||
popa3d = callPackage ../servers/mail/popa3d { };
|
popa3d = callPackage ../servers/mail/popa3d { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user