Merge pull request #6867 from risicle/master

New packages for luabind, stxxl and osrm-backend

lethalman 3af17021 a11078a7

+250
+22
pkgs/development/libraries/libosmpbf/default.nix
··· 1 + {stdenv, fetchurl, protobuf}: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "libosmpbf-1.3.3"; 5 + 6 + src = fetchurl { 7 + url = "https://github.com/scrosby/OSM-binary/archive/v1.3.3.tar.gz"; 8 + sha256 = "a109f338ce6a8438a8faae4627cd08599d0403b8977c185499de5c17b92d0798"; 9 + }; 10 + 11 + buildInputs = [ protobuf ]; 12 + 13 + sourceRoot = "OSM-binary-1.3.3/src"; 14 + 15 + installFlags = "PREFIX=$(out)"; 16 + 17 + meta = { 18 + homepage = https://github.com/scrosby/OSM-binary; 19 + description = "C library to read and write OpenStreetMap PBF files."; 20 + license = stdenv.lib.licenses.lgpl3; 21 + }; 22 + }
+23
pkgs/development/libraries/luabind/0.9.1_boost_1.57_fix.patch
··· 1 + diff --git a/luabind/object.hpp b/luabind/object.hpp 2 + index f7b7ca5..1c18e04 100644 3 + --- a/luabind/object.hpp 4 + +++ b/luabind/object.hpp 5 + @@ -536,6 +536,8 @@ namespace detail 6 + handle m_key; 7 + }; 8 + 9 + +#if BOOST_VERSION < 105700 10 + + 11 + // Needed because of some strange ADL issues. 12 + 13 + #define LUABIND_OPERATOR_ADL_WKND(op) \ 14 + @@ -557,7 +559,8 @@ namespace detail 15 + LUABIND_OPERATOR_ADL_WKND(!=) 16 + 17 + #undef LUABIND_OPERATOR_ADL_WKND 18 + - 19 + + 20 + +#endif // BOOST_VERSION < 105700 21 + } // namespace detail 22 + 23 + namespace adl
+22
pkgs/development/libraries/luabind/0.9.1_discover_luajit.patch
··· 1 + diff --git a/Jamroot b/Jamroot 2 + index 94494bf..83dfcbb 100755 3 + --- a/Jamroot 4 + +++ b/Jamroot 5 + @@ -64,7 +64,7 @@ else if [ os.name ] in LINUX MACOSX FREEBSD 6 + $(LUA_PATH) $(HOME)/Library/Frameworks /Library/Frameworks /usr /usr/local /opt/local /opt ; 7 + 8 + local possible-suffixes = 9 + - include/lua5.1 include/lua51 include/lua include ; 10 + + include/lua5.1 include/lua51 include/lua include include/luajit-2.0 ; 11 + 12 + local includes = [ GLOB $(possible-prefixes)/$(possible-suffixes) : lua.h ] ; 13 + 14 + @@ -83,7 +83,7 @@ else if [ os.name ] in LINUX MACOSX FREEBSD 15 + 16 + local lib = $(prefix)/lib ; 17 + 18 + - local names = liblua5.1 liblua51 liblua ; 19 + + local names = liblua5.1 liblua51 liblua libluajit-5.1 ; 20 + local extensions = .a .so ; 21 + 22 + library = [ GLOB $(lib)/lua51 $(lib)/lua5.1 $(lib)/lua $(lib) :
+59
pkgs/development/libraries/luabind/0.9.1_modern_boost_fix.patch
··· 1 + diff --git luabind-0.9.1/luabind/detail/call_function.hpp luabind-0.9.1-fixed/luabind/detail/call_function.hpp 2 + index 1b45ec1..8f5afff 100644 3 + --- luabind-0.9.1/luabind/detail/call_function.hpp 4 + +++ luabind-0.9.1-fixed/luabind/detail/call_function.hpp 5 + @@ -323,7 +323,8 @@ namespace luabind 6 + 7 + #endif // LUABIND_CALL_FUNCTION_HPP_INCLUDED 8 + 9 + -#elif BOOST_PP_ITERATION_FLAGS() == 1 10 + +#else 11 + +#if BOOST_PP_ITERATION_FLAGS() == 1 12 + 13 + #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n * 14 + #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n 15 + @@ -440,4 +441,5 @@ namespace luabind 16 + 17 + 18 + #endif 19 + +#endif 20 + 21 + diff --git luabind-0.9.1/luabind/detail/call_member.hpp luabind-0.9.1-fixed/luabind/detail/call_member.hpp 22 + index de8d563..e63555b 100644 23 + --- luabind-0.9.1/luabind/detail/call_member.hpp 24 + +++ luabind-0.9.1-fixed/luabind/detail/call_member.hpp 25 + @@ -316,7 +316,8 @@ namespace luabind 26 + 27 + #endif // LUABIND_CALL_MEMBER_HPP_INCLUDED 28 + 29 + -#elif BOOST_PP_ITERATION_FLAGS() == 1 30 + +#else 31 + +#if BOOST_PP_ITERATION_FLAGS() == 1 32 + 33 + #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n * 34 + #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n 35 + @@ -360,4 +361,5 @@ namespace luabind 36 + #undef LUABIND_TUPLE_PARAMS 37 + 38 + #endif 39 + +#endif 40 + 41 + diff --git luabind-0.9.1/luabind/wrapper_base.hpp luabind-0.9.1-fixed/luabind/wrapper_base.hpp 42 + index d54c668..0f88cc5 100755 43 + --- luabind-0.9.1/luabind/wrapper_base.hpp 44 + +++ luabind-0.9.1-fixed/luabind/wrapper_base.hpp 45 + @@ -89,7 +89,8 @@ namespace luabind 46 + 47 + #endif // LUABIND_WRAPPER_BASE_HPP_INCLUDED 48 + 49 + -#elif BOOST_PP_ITERATION_FLAGS() == 1 50 + +#else 51 + +#if BOOST_PP_ITERATION_FLAGS() == 1 52 + 53 + #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n * 54 + #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n 55 + @@ -188,3 +189,4 @@ namespace luabind 56 + #undef N 57 + 58 + #endif 59 + +#endif
+30
pkgs/development/libraries/luabind/default.nix
··· 1 + {stdenv, fetchurl, boost-build, lua, boost}: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "luabind-0.9.1"; 5 + 6 + src = fetchurl { 7 + url = "https://github.com/luabind/luabind/archive/v0.9.1.tar.gz"; 8 + sha256 = "0e5ead50a07668d29888f2fa6f53220f900c886e46a2c99c7e8656842f05ff2d"; 9 + }; 10 + 11 + patches = [ ./0.9.1_modern_boost_fix.patch ./0.9.1_boost_1.57_fix.patch ./0.9.1_discover_luajit.patch ]; 12 + 13 + buildInputs = [ boost-build lua boost ]; 14 + 15 + propagatedBuildInputs = [ lua ]; 16 + 17 + buildPhase = "LUA_PATH=${lua} bjam release"; 18 + 19 + installPhase = "LUA_PATH=${lua} bjam --prefix=$out release install"; 20 + 21 + passthru = { 22 + inherit lua; 23 + }; 24 + 25 + meta = { 26 + homepage = https://github.com/luabind/luabind; 27 + description = "Luabind is a library that helps you create bindings between C++ and Lua."; 28 + license = stdenv.lib.licenses.mit; 29 + }; 30 + }
+24
pkgs/development/libraries/stxxl/default.nix
··· 1 + {stdenv, fetchurl, cmake, parallel ? true }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "stxxl-1.4.1"; 5 + 6 + src = fetchurl { 7 + url = "https://github.com/stxxl/stxxl/archive/1.4.1.tar.gz"; 8 + sha256 = "54006a5fccd1435abc2f3ec201997a4d7dacddb984d2717f62191798e5372f6c"; 9 + }; 10 + 11 + buildInputs = [ cmake ]; 12 + 13 + cmakeFlags = let parallel_str = if parallel then "ON" else "OFF"; in "-DUSE_GNU_PARALLEL=${parallel_str}"; 14 + 15 + passthru = { 16 + inherit parallel; 17 + }; 18 + 19 + meta = { 20 + homepage = https://github.com/stxxl/stxxl; 21 + description = "STXXL is an implementation of the C++ standard template library STL for external memory (out-of-core) computations."; 22 + license = stdenv.lib.licenses.boost; 23 + }; 24 + }
+13
pkgs/servers/osrm-backend/4.5.0-default-profile-path.template.patch
··· 1 + diff --git a/extractor/extractor_options.cpp b/extractor/extractor_options.cpp 2 + index d14d8d9..c64d7fd 100644 3 + --- a/extractor/extractor_options.cpp 4 + +++ b/extractor/extractor_options.cpp 5 + @@ -50,7 +50,7 @@ bool ExtractorOptions::ParseArguments(int argc, char *argv[], ExtractorConfig &e 6 + boost::program_options::options_description config_options("Configuration"); 7 + config_options.add_options()("profile,p", 8 + boost::program_options::value<boost::filesystem::path>( 9 + - &extractor_config.profile_path)->default_value("profile.lua"), 10 + + &extractor_config.profile_path)->default_value("@out@/profiles/car.lua"), 11 + "Path to LUA routing profile")( 12 + "threads,t", 13 + boost::program_options::value<unsigned int>(&extractor_config.requested_num_threads)
+18
pkgs/servers/osrm-backend/4.5.0-openmp.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index b6a40f9..87ca301 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -261,9 +261,10 @@ target_link_libraries(OSRM ${STXXL_LIBRARY}) 6 + target_link_libraries(osrm-extract ${STXXL_LIBRARY}) 7 + target_link_libraries(osrm-prepare ${STXXL_LIBRARY}) 8 + 9 + -if(MINGW) 10 + - # STXXL needs OpenMP library 11 + - target_link_libraries(osrm-extract gomp) 12 + +find_package(OpenMP) 13 + +if (OPENMP_FOUND) 14 + + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") 15 + + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") 16 + endif() 17 + 18 + find_package( OSMPBF REQUIRED )
+27
pkgs/servers/osrm-backend/default.nix
··· 1 + {stdenv, fetchurl, cmake, luabind, libosmpbf, stxxl, tbb, boost, expat, protobuf, bzip2, zlib, substituteAll}: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "osrm-backend-4.5.0"; 5 + 6 + src = fetchurl { 7 + url = "https://github.com/Project-OSRM/osrm-backend/archive/v4.5.0.tar.gz"; 8 + sha256 = "af61e883051f2ecb73520ace6f17cc6da30edc413208ff7cf3d87992eca0756c"; 9 + }; 10 + 11 + patches = [ 12 + ./4.5.0-openmp.patch 13 + (substituteAll { 14 + src = ./4.5.0-default-profile-path.template.patch; 15 + }) 16 + ]; 17 + 18 + buildInputs = [ cmake luabind libosmpbf stxxl tbb boost expat protobuf bzip2 zlib ]; 19 + 20 + postInstall = "mkdir -p $out/share/osrm-backend && cp -r ../profiles $out/share/osrm-backend/profiles"; 21 + 22 + meta = { 23 + homepage = https://github.com/Project-OSRM/osrm-backend/wiki; 24 + description = "Open Source Routing Machine computes shortest paths in a graph. It was designed to run well with map data from the Openstreetmap Project."; 25 + license = stdenv.lib.licenses.bsd2; 26 + }; 27 + }
+12
pkgs/top-level/all-packages.nix
··· 6612 6612 6613 6613 libosip_3 = callPackage ../development/libraries/osip/3.nix {}; 6614 6614 6615 + libosmpbf = callPackage ../development/libraries/libosmpbf {}; 6616 + 6615 6617 libotr = callPackage ../development/libraries/libotr { 6616 6618 libgcrypt = libgcrypt_1_6; 6617 6619 }; ··· 6874 6876 log4cplus = callPackage ../development/libraries/log4cplus { }; 6875 6877 6876 6878 loudmouth = callPackage ../development/libraries/loudmouth { }; 6879 + 6880 + luabind = callPackage ../development/libraries/luabind { lua = lua5_1; }; 6881 + 6882 + luabind_luajit = callPackage ../development/libraries/luabind { lua = luajit; }; 6877 6883 6878 6884 lzo = callPackage ../development/libraries/lzo { }; 6879 6885 ··· 7460 7466 7461 7467 srtp_linphone = callPackage ../development/libraries/srtp/linphone.nix { }; 7462 7468 7469 + stxxl = callPackage ../development/libraries/stxxl { parallel = true; }; 7470 + 7463 7471 sqlite = lowPrio (callPackage ../development/libraries/sqlite { }); 7464 7472 7465 7473 sqlite-interactive = appendToName "interactive" (sqlite.override { interactive = true; }); ··· 8262 8270 openresty = callPackage ../servers/http/openresty { }; 8263 8271 8264 8272 opensmtpd = callPackage ../servers/mail/opensmtpd { }; 8273 + 8274 + osrm-backend = callPackage ../servers/osrm-backend { }; 8275 + 8276 + osrm-backend_luajit = callPackage ../servers/osrm-backend { luabind = luabind_luajit; }; 8265 8277 8266 8278 petidomo = callPackage ../servers/mail/petidomo { }; 8267 8279