Here is an update to osrm-backend 5.27.1.
Index: Makefile =================================================================== RCS file: /home/cvs/ports/geo/osrm-backend/Makefile,v retrieving revision 1.10 diff -u -p -u -p -r1.10 Makefile --- Makefile 8 Nov 2022 11:14:48 -0000 1.10 +++ Makefile 2 Jun 2023 04:53:41 -0000 @@ -6,12 +6,11 @@ COMMENT = high-performance road network GH_ACCOUNT = Project-OSRM GH_PROJECT = osrm-backend -GH_TAGNAME = v5.22.0 -REVISION = 0 +GH_TAGNAME = v5.27.1 CATEGORIES = geo -HOMEPAGE = http://project-osrm.org/ +HOMEPAGE = https://project-osrm.org/ # BSD 2-clause PERMIT_PACKAGE = Yes @@ -19,9 +18,9 @@ PERMIT_PACKAGE = Yes WANTLIB += ${COMPILER_LIBCXX} ${MODLUA_WANTLIB} WANTLIB += boost_chrono-mt boost_date_time-mt boost_filesystem-mt WANTLIB += boost_iostreams-mt boost_program_options-mt boost_regex-mt -WANTLIB += boost_system-mt boost_thread-mt bz2 c expat m tbb tbbmalloc z +WANTLIB += boost_system-mt boost_thread-mt bz2 c expat m tbb z -COMPILER = base-clang ports-gcc base-gcc +COMPILER = base-clang ports-gcc MODULES = devel/cmake \ lang/lua Index: distinfo =================================================================== RCS file: /home/cvs/ports/geo/osrm-backend/distinfo,v retrieving revision 1.2 diff -u -p -u -p -r1.2 distinfo --- distinfo 18 May 2020 17:02:35 -0000 1.2 +++ distinfo 2 Jun 2023 03:53:02 -0000 @@ -1,2 +1,2 @@ -SHA256 (osrm-backend-5.22.0.tar.gz) = 3wmHoEvPZddPnE4Y80oBmCvzu5eqR/nYbPuLNfF6alU= -SIZE (osrm-backend-5.22.0.tar.gz) = 6492998 +SHA256 (osrm-backend-5.27.1.tar.gz) = UjkVgOD5JmPdeyHLzHuQZNZwRHDiYBvz7FxRcLRxYpo= +SIZE (osrm-backend-5.27.1.tar.gz) = 10979468 Index: patches/patch-CMakeLists_txt =================================================================== RCS file: /home/cvs/ports/geo/osrm-backend/patches/patch-CMakeLists_txt,v retrieving revision 1.3 diff -u -p -u -p -r1.3 patch-CMakeLists_txt --- patches/patch-CMakeLists_txt 11 Mar 2022 19:06:15 -0000 1.3 +++ patches/patch-CMakeLists_txt 2 Jun 2023 04:38:50 -0000 @@ -1,16 +1,7 @@ Index: CMakeLists.txt --- CMakeLists.txt.orig +++ CMakeLists.txt -@@ -325,7 +325,7 @@ if (ENABLE_SANITIZER) - endif() - - # Configuring compilers --set(OSRM_WARNING_FLAGS "-Werror=all -Werror=extra -Werror=uninitialized -Werror=unreachable-code -Werror=unused-variable -Werror=unreachable-code -Wno-error=cpp -Wpedantic") -+set(OSRM_WARNING_FLAGS "-Werror=extra -Werror=uninitialized -Werror=unreachable-code -Werror=unused-variable -Werror=unreachable-code -Wno-error=cpp -Wpedantic") - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OSRM_WARNING_FLAGS} -Werror=strict-overflow=2 -Wno-error=unused-local-typedef -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC -fcolor-diagnostics -ftemplate-depth=1024 -Wno-unused-command-line-argument") - elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") -@@ -379,7 +379,7 @@ if("${LINKER_VERSION}" MATCHES "GNU gold" OR "${LINKER +@@ -389,7 +389,7 @@ if("${LINKER_VERSION}" MATCHES "GNU gold" OR "${LINKER set(LINKER_FLAGS "${LINKER_FLAGS} -Wl,--gc-sections") endif() # Default linker optimization flags @@ -19,21 +10,12 @@ Index: CMakeLists.txt else() message(STATUS "Using unknown linker, not setting linker optimizations") -@@ -410,10 +410,6 @@ if(APPLE) - message(STATUS "linking against libc++") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") +@@ -419,7 +419,7 @@ if(APPLE) endif() --endif() -- + endif() + -if(UNIX AND NOT APPLE) -- set(MAYBE_RT_LIBRARY -lrt) ++if(UNIX AND NOT APPLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES "OpenBSD") + set(MAYBE_RT_LIBRARY -lrt) endif() - find_package(Threads REQUIRED) -@@ -873,4 +869,4 @@ if (ENABLE_NODE_BINDINGS) - endforeach() - add_library(check-headers STATIC EXCLUDE_FROM_ALL ${sources}) - set_target_properties(check-headers PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${check_headers_dir}) --endif() -\ No newline at end of file -+endif() Index: patches/patch-src_extractor_edge_based_graph_factory_cpp =================================================================== RCS file: patches/patch-src_extractor_edge_based_graph_factory_cpp diff -N patches/patch-src_extractor_edge_based_graph_factory_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_extractor_edge_based_graph_factory_cpp 2 Jun 2023 04:32:36 -0000 @@ -0,0 +1,60 @@ +make it tolerant of TBB 2020 +https://github.com/Project-OSRM/osrm-backend/pull/6493 + +Index: src/extractor/edge_based_graph_factory.cpp +--- src/extractor/edge_based_graph_factory.cpp.orig ++++ src/extractor/edge_based_graph_factory.cpp +@@ -32,7 +32,11 @@ + + #include <tbb/blocked_range.h> + #include <tbb/parallel_for.h> ++#if TBB_VERSION_MAJOR == 2020 ++#include <tbb/pipeline.h> ++#else + #include <tbb/parallel_pipeline.h> ++#endif + + namespace std + { +@@ -582,8 +586,13 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( + const constexpr unsigned GRAINSIZE = 100; + + // First part of the pipeline generates iterator ranges of IDs in sets of GRAINSIZE ++#if TBB_VERSION_MAJOR == 2020 ++ tbb::filter_t<void, tbb::blocked_range<NodeID>> generator_stage( ++ tbb::filter::serial_in_order, [&](tbb::flow_control &fc) { ++#else + tbb::filter<void, tbb::blocked_range<NodeID>> generator_stage( + tbb::filter_mode::serial_in_order, [&](tbb::flow_control &fc) { ++#endif + if (current_node < node_count) + { + auto next_node = std::min(current_node + GRAINSIZE, node_count); +@@ -721,8 +730,13 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( + // + // Edge-based-graph stage + // ++#if TBB_VERSION_MAJOR == 2020 ++ tbb::filter_t<tbb::blocked_range<NodeID>, EdgesPipelineBufferPtr> processor_stage( ++ tbb::filter::parallel, ++#else + tbb::filter<tbb::blocked_range<NodeID>, EdgesPipelineBufferPtr> processor_stage( + tbb::filter_mode::parallel, ++#endif + [&](const tbb::blocked_range<NodeID> &intersection_node_range) { + auto buffer = std::make_shared<EdgesPipelineBuffer>(); + buffer->nodes_processed = intersection_node_range.size(); +@@ -1132,8 +1146,13 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( + util::UnbufferedLog log; + util::Percent routing_progress(log, node_count); + std::vector<EdgeWithData> delayed_data; ++#if TBB_VERSION_MAJOR == 2020 ++ tbb::filter_t<EdgesPipelineBufferPtr, void> output_stage( ++ tbb::filter::serial_in_order, [&](auto buffer) { ++#else + tbb::filter<EdgesPipelineBufferPtr, void> output_stage( + tbb::filter_mode::serial_in_order, [&](auto buffer) { ++#endif + routing_progress.PrintAddition(buffer->nodes_processed); + + m_connectivity_checksum = buffer->checksum.update_checksum(m_connectivity_checksum); Index: patches/patch-src_extractor_extractor_cpp =================================================================== RCS file: patches/patch-src_extractor_extractor_cpp diff -N patches/patch-src_extractor_extractor_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_extractor_extractor_cpp 2 Jun 2023 04:33:06 -0000 @@ -0,0 +1,100 @@ +make it tolerant of TBB 2020 +https://github.com/Project-OSRM/osrm-backend/pull/6493 + +Index: src/extractor/extractor.cpp +--- src/extractor/extractor.cpp.orig ++++ src/extractor/extractor.cpp +@@ -44,7 +44,11 @@ + #include <osmium/thread/pool.hpp> + #include <osmium/visitor.hpp> + #include <tbb/global_control.h> ++#if TBB_VERSION_MAJOR == 2020 ++#include <tbb/pipeline.h> ++#else + #include <tbb/parallel_pipeline.h> ++#endif + + #include <algorithm> + #include <atomic> +@@ -445,8 +449,13 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(Scrip + ExtractionRelationContainer relations; + + const auto buffer_reader = [](osmium::io::Reader &reader) { ++#if TBB_VERSION_MAJOR == 2020 ++ return tbb::filter_t<void, SharedBuffer>( ++ tbb::filter::serial_in_order, [&reader](tbb::flow_control &fc) { ++#else + return tbb::filter<void, SharedBuffer>( + tbb::filter_mode::serial_in_order, [&reader](tbb::flow_control &fc) { ++#endif + if (auto buffer = reader.read()) + { + return std::make_shared<osmium::memory::Buffer>(std::move(buffer)); +@@ -467,15 +476,25 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(Scrip + osmium_index_type location_cache; + osmium_location_handler_type location_handler(location_cache); + ++#if TBB_VERSION_MAJOR == 2020 ++ tbb::filter_t<SharedBuffer, SharedBuffer> location_cacher( ++ tbb::filter::serial_in_order, [&location_handler](SharedBuffer buffer) { ++#else + tbb::filter<SharedBuffer, SharedBuffer> location_cacher( + tbb::filter_mode::serial_in_order, [&location_handler](SharedBuffer buffer) { ++#endif + osmium::apply(buffer->begin(), buffer->end(), location_handler); + return buffer; + }); + + // OSM elements Lua parser ++#if TBB_VERSION_MAJOR == 2020 ++ tbb::filter_t<SharedBuffer, ParsedBuffer> buffer_transformer( ++ tbb::filter::parallel, ++#else + tbb::filter<SharedBuffer, ParsedBuffer> buffer_transformer( + tbb::filter_mode::parallel, ++#endif + // NOLINTNEXTLINE(performance-unnecessary-value-param) + [&](const SharedBuffer buffer) { + ParsedBuffer parsed_buffer; +@@ -496,8 +515,13 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(Scrip + unsigned number_of_ways = 0; + unsigned number_of_restrictions = 0; + unsigned number_of_maneuver_overrides = 0; ++#if TBB_VERSION_MAJOR == 2020 ++ tbb::filter_t<ParsedBuffer, void> buffer_storage( ++ tbb::filter::serial_in_order, [&](const ParsedBuffer &parsed_buffer) { ++#else + tbb::filter<ParsedBuffer, void> buffer_storage( + tbb::filter_mode::serial_in_order, [&](const ParsedBuffer &parsed_buffer) { ++#endif + number_of_nodes += parsed_buffer.resulting_nodes.size(); + // put parsed objects thru extractor callbacks + for (const auto &result : parsed_buffer.resulting_nodes) +@@ -523,8 +547,13 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(Scrip + } + }); + ++#if TBB_VERSION_MAJOR == 2020 ++ tbb::filter_t<SharedBuffer, std::shared_ptr<ExtractionRelationContainer>> buffer_relation_cache( ++ tbb::filter::parallel, ++#else + tbb::filter<SharedBuffer, std::shared_ptr<ExtractionRelationContainer>> buffer_relation_cache( + tbb::filter_mode::parallel, ++#endif + // NOLINTNEXTLINE(performance-unnecessary-value-param) + [&](const SharedBuffer buffer) { + if (!buffer) +@@ -561,8 +590,13 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(Scrip + }); + + unsigned number_of_relations = 0; ++#if TBB_VERSION_MAJOR == 2020 ++ tbb::filter_t<std::shared_ptr<ExtractionRelationContainer>, void> buffer_storage_relation( ++ tbb::filter::serial_in_order, ++#else + tbb::filter<std::shared_ptr<ExtractionRelationContainer>, void> buffer_storage_relation( + tbb::filter_mode::serial_in_order, ++#endif + // NOLINTNEXTLINE(performance-unnecessary-value-param) + [&](const std::shared_ptr<ExtractionRelationContainer> parsed_relations) { + number_of_relations += parsed_relations->GetRelationsNum(); Index: patches/patch-src_guidance_guidance_processing_cpp =================================================================== RCS file: patches/patch-src_guidance_guidance_processing_cpp diff -N patches/patch-src_guidance_guidance_processing_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_guidance_guidance_processing_cpp 2 Jun 2023 04:33:16 -0000 @@ -0,0 +1,60 @@ +make it tolerant of TBB 2020 +https://github.com/Project-OSRM/osrm-backend/pull/6493 + +Index: src/guidance/guidance_processing.cpp +--- src/guidance/guidance_processing.cpp.orig ++++ src/guidance/guidance_processing.cpp +@@ -9,7 +9,11 @@ + #include "util/percent.hpp" + + #include <tbb/blocked_range.h> ++#if TBB_VERSION_MAJOR == 2020 ++#include <tbb/pipeline.h> ++#else + #include <tbb/parallel_pipeline.h> ++#endif + + #include <thread> + +@@ -97,8 +101,13 @@ void annotateTurns(const util::NodeBasedDynamicGraph & + const constexpr unsigned GRAINSIZE = 100; + + // First part of the pipeline generates iterator ranges of IDs in sets of GRAINSIZE ++#if TBB_VERSION_MAJOR == 2020 ++ tbb::filter_t<void, tbb::blocked_range<NodeID>> generator_stage( ++ tbb::filter::serial_in_order, [&](tbb::flow_control &fc) { ++#else + tbb::filter<void, tbb::blocked_range<NodeID>> generator_stage( + tbb::filter_mode::serial_in_order, [&](tbb::flow_control &fc) { ++#endif + if (current_node < node_count) + { + auto next_node = std::min(current_node + GRAINSIZE, node_count); +@@ -116,8 +125,13 @@ void annotateTurns(const util::NodeBasedDynamicGraph & + // + // Guidance stage + // ++#if TBB_VERSION_MAJOR == 2020 ++ tbb::filter_t<tbb::blocked_range<NodeID>, TurnsPipelineBufferPtr> guidance_stage( ++ tbb::filter::parallel, ++#else + tbb::filter<tbb::blocked_range<NodeID>, TurnsPipelineBufferPtr> guidance_stage( + tbb::filter_mode::parallel, ++#endif + [&](const tbb::blocked_range<NodeID> &intersection_node_range) { + auto buffer = std::make_shared<TurnsPipelineBuffer>(); + buffer->nodes_processed = intersection_node_range.size(); +@@ -308,8 +322,13 @@ void annotateTurns(const util::NodeBasedDynamicGraph & + util::Percent guidance_progress(log, node_count); + std::vector<guidance::TurnData> delayed_turn_data; + ++#if TBB_VERSION_MAJOR == 2020 ++ tbb::filter_t<TurnsPipelineBufferPtr, void> guidance_output_stage( ++ tbb::filter::serial_in_order, [&](auto buffer) { ++#else + tbb::filter<TurnsPipelineBufferPtr, void> guidance_output_stage( + tbb::filter_mode::serial_in_order, [&](auto buffer) { ++#endif + guidance_progress.PrintAddition(buffer->nodes_processed); + + connectivity_checksum = buffer->checksum.update_checksum(connectivity_checksum); Index: patches/patch-src_partitioner_recursive_bisection_cpp =================================================================== RCS file: patches/patch-src_partitioner_recursive_bisection_cpp diff -N patches/patch-src_partitioner_recursive_bisection_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_partitioner_recursive_bisection_cpp 2 Jun 2023 04:33:26 -0000 @@ -0,0 +1,27 @@ +make it tolerant of TBB 2020 +https://github.com/Project-OSRM/osrm-backend/pull/6493 + +Index: src/partitioner/recursive_bisection.cpp +--- src/partitioner/recursive_bisection.cpp.orig ++++ src/partitioner/recursive_bisection.cpp +@@ -64,12 +64,20 @@ RecursiveBisection::RecursiveBisection(BisectionGraph + return TreeNode{std::move(graph), internal_state.SCCDepth()}; + }); + ++#if TBB_VERSION_MAJOR == 2020 ++ using Feeder = tbb::parallel_do_feeder<TreeNode>; ++#else + using Feeder = tbb::feeder<TreeNode>; ++#endif + + TIMER_START(bisection); + + // Bisect graph into two parts. Get partition point and recurse left and right in parallel. ++#if TBB_VERSION_MAJOR == 2020 ++ tbb::parallel_do(begin(forest), end(forest), [&](const TreeNode &node, Feeder &feeder) { ++#else + tbb::parallel_for_each(begin(forest), end(forest), [&](const TreeNode &node, Feeder &feeder) { ++#endif + const auto cut = + computeInertialFlowCut(node.graph, num_optimizing_cuts, balance, boundary_factor); + const auto center = internal_state.ApplyBisection( Index: pkg/PLIST =================================================================== RCS file: /home/cvs/ports/geo/osrm-backend/pkg/PLIST,v retrieving revision 1.6 diff -u -p -u -p -r1.6 PLIST --- pkg/PLIST 8 Nov 2022 11:14:48 -0000 1.6 +++ pkg/PLIST 2 Jun 2023 04:35:18 -0000 @@ -8,6 +8,21 @@ @bin bin/osrm-extract @bin bin/osrm-partition @bin bin/osrm-routed +include/flatbuffers/ +include/flatbuffers/base.h +include/flatbuffers/code_generators.h +include/flatbuffers/flatbuffers.h +include/flatbuffers/flatc.h +include/flatbuffers/flexbuffers.h +include/flatbuffers/grpc.h +include/flatbuffers/hash.h +include/flatbuffers/idl.h +include/flatbuffers/minireflect.h +include/flatbuffers/reflection.h +include/flatbuffers/reflection_generated.h +include/flatbuffers/registry.h +include/flatbuffers/stl_emulation.h +include/flatbuffers/util.h include/mapbox/ include/mapbox/optional.hpp include/mapbox/recursive_wrapper.hpp @@ -28,6 +43,7 @@ include/osrm/customizer_config.hpp include/osrm/engine/ include/osrm/engine/api/ include/osrm/engine/api/base_parameters.hpp +include/osrm/engine/api/base_result.hpp include/osrm/engine/api/match_parameters.hpp include/osrm/engine/api/nearest_parameters.hpp include/osrm/engine/api/route_parameters.hpp @@ -81,6 +97,7 @@ include/osrm/util/typedefs.hpp @static-lib lib/libosrm_contract.a @static-lib lib/libosrm_customize.a @static-lib lib/libosrm_extract.a +@static-lib lib/libosrm_guidance.a @static-lib lib/libosrm_partition.a @static-lib lib/libosrm_store.a @static-lib lib/libosrm_update.a @@ -90,6 +107,7 @@ share/osrm/profiles/ share/osrm/profiles/bicycle.lua share/osrm/profiles/car.lua share/osrm/profiles/debug_example.lua +share/osrm/profiles/debug_way.lua share/osrm/profiles/examples/ share/osrm/profiles/examples/postgis.lua share/osrm/profiles/foot.lua @@ -105,6 +123,7 @@ share/osrm/profiles/lib/relations.lua share/osrm/profiles/lib/sequence.lua share/osrm/profiles/lib/set.lua share/osrm/profiles/lib/tags.lua +share/osrm/profiles/lib/traffic_signal.lua share/osrm/profiles/lib/utils.lua share/osrm/profiles/lib/way_handlers.lua share/osrm/profiles/rasterbot.lua
