[pgRouting] Should finally do what was advertised before
Volker Fröhlich
volter at fedoraproject.org
Sun Mar 31 17:10:50 UTC 2013
commit f10fe52218da06a4d074e71ab07330bb1c794ec4
Author: Volker Fröhlich <volker27 at gmx.at>
Date: Sun Mar 31 19:09:46 2013 +0200
Should finally do what was advertised before
pgRouting.spec | 6 ++
pgrouting-1.05-issue35.patch | 25 ++++++
pgrouting-1.05-libboost.patch | 164 ++++++++++++++++++++++-------------------
3 files changed, 120 insertions(+), 75 deletions(-)
---
diff --git a/pgRouting.spec b/pgRouting.spec
index 292cf4a..77f1a88 100644
--- a/pgRouting.spec
+++ b/pgRouting.spec
@@ -24,6 +24,10 @@ Patch1: %{tarname}-1.05-flags.patch
# https://github.com/pgRouting/pgrouting/issues/77
Patch2: %{tarname}-1.05-libboost.patch
+# Solve issue with NULL geometries
+# https://github.com/pgRouting/pgrouting/issues/35
+Patch3: %{tarname}-1.05-issue35.patch
+
BuildRequires: boost-devel
BuildRequires: boost-graph
BuildRequires: boost-thread
@@ -58,6 +62,7 @@ It provides functions for:
%setup -qn %{tarname}-%{version}
%patch1 -p1 -b .flags~
%patch2 -p1 -b .libboost~
+%patch3 -p1 -b .nullgeom~
# Correct FSF address
# https://github.com/pgRouting/pgrouting/issues/63
@@ -96,6 +101,7 @@ make -C build install DESTDIR=%{buildroot}
- Link to gmp
- Move most stuff from prep section to patches
- Solve FTBFS (BZ #914327), due to upstream issue 77
+- Solve upstream bug 35, issue with NULL geometries
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.05-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
diff --git a/pgrouting-1.05-issue35.patch b/pgrouting-1.05-issue35.patch
new file mode 100644
index 0000000..650c961
--- /dev/null
+++ b/pgrouting-1.05-issue35.patch
@@ -0,0 +1,25 @@
+From 1be144ec4cc11f9748eca881a44668a4bdf3343b Mon Sep 17 00:00:00 2001
+From: Daniel Kastl <daniel at georepublic.de>
+Date: Mon, 20 Jun 2011 16:05:22 +0900
+Subject: [PATCH] Issue #35: assign_vertex_id should ignore NULL geometries
+
+---
+ core/sql/routing_topology.sql | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/core/sql/routing_topology.sql b/core/sql/routing_topology.sql
+index f844e06..183a490 100644
+--- a/core/sql/routing_topology.sql
++++ b/core/sql/routing_topology.sql
+@@ -84,7 +84,7 @@ BEGIN
+ FOR _r IN EXECUTE 'SELECT ' || quote_ident(gid_cname) || ' AS id,'
+ || ' StartPoint('|| quote_ident(geo_cname) ||') AS source,'
+ || ' EndPoint('|| quote_ident(geo_cname) ||') as target'
+- || ' FROM ' || quote_ident(geom_table)
++ || ' FROM ' || quote_ident(geom_table) || ' WHERE ' || quote_ident(geo_cname) || ' IS NOT NULL '
+ LOOP
+
+ source_id := point_to_id(setsrid(_r.source, srid), tolerance);
+--
+1.8.1.5
+
diff --git a/pgrouting-1.05-libboost.patch b/pgrouting-1.05-libboost.patch
index 47df4de..e01ffde 100644
--- a/pgrouting-1.05-libboost.patch
+++ b/pgrouting-1.05-libboost.patch
@@ -1,72 +1,33 @@
-From dc6bff6b6923a565986eb4e314351299dc101f9a Mon Sep 17 00:00:00 2001
-From: Daniel Kastl <daniel at georepublic.de>
-Date: Tue, 30 Nov 2010 23:31:12 +0900
-Subject: [PATCH] fixed boost/property_map path for includes
-
----
- core/src/edge_visitors.hpp | 2 +-
- core/src/shooting_star_boost_wrapper.cpp | 2 +-
- core/src/shooting_star_relax.hpp | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/core/src/edge_visitors.hpp b/core/src/edge_visitors.hpp
-index 45e37ee..11c5ca0 100644
---- a/core/src/edge_visitors.hpp
-+++ b/core/src/edge_visitors.hpp
-@@ -3,7 +3,7 @@
+diff -Nur pgrouting-1.05/core/src/astar_boost_wrapper.cpp pgrouting-1.05-libboost/core/src/astar_boost_wrapper.cpp
+--- pgrouting-1.05/core/src/astar_boost_wrapper.cpp 2010-11-17 03:42:21.000000000 +0100
++++ pgrouting-1.05-libboost/core/src/astar_boost_wrapper.cpp 2013-03-31 18:51:59.778990343 +0200
+@@ -139,8 +139,8 @@
- #include <iosfwd>
- #include <boost/config.hpp>
--#include <boost/property_map.hpp>
-+#include <boost/property_map/property_map.hpp>
- #include <boost/graph/graph_traits.hpp>
- #include <boost/limits.hpp>
- #include <boost/graph/detail/is_same.hpp>
-diff --git a/core/src/shooting_star_boost_wrapper.cpp b/core/src/shooting_star_boost_wrapper.cpp
-index 55c8e38..bf28713 100644
---- a/core/src/shooting_star_boost_wrapper.cpp
-+++ b/core/src/shooting_star_boost_wrapper.cpp
-@@ -23,7 +23,7 @@
+ graph_t graph(num_nodes);
- #include <boost/graph/graph_traits.hpp>
- #include <boost/graph/adjacency_list.hpp>
--#include <boost/vector_property_map.hpp>
-+#include <boost/property_map/vector_property_map.hpp>
- #include <shooting_star_search.hpp>
+- property_map<graph_t, edge_weight_t>::type weightmap = get(edge_weight,
+- graph);
++//property_map<graph_t, edge_weight_t>::type weightmap = get(edge_weight,
++// graph);
- #include "shooting_star.h"
-diff --git a/core/src/shooting_star_relax.hpp b/core/src/shooting_star_relax.hpp
-index 8e65be6..95b222e 100644
---- a/core/src/shooting_star_relax.hpp
-+++ b/core/src/shooting_star_relax.hpp
-@@ -15,7 +15,7 @@
- #include <functional>
- #include <boost/limits.hpp> // for numeric limits
- #include <boost/graph/graph_traits.hpp>
--#include <boost/property_map.hpp>
-+#include <boost/property_map/property_map.hpp>
+ for (std::size_t j = 0; j < count; ++j)
+ {
+diff -Nur pgrouting-1.05/core/src/boost_wrapper.cpp pgrouting-1.05-libboost/core/src/boost_wrapper.cpp
+--- pgrouting-1.05/core/src/boost_wrapper.cpp 2010-11-17 03:42:21.000000000 +0100
++++ pgrouting-1.05-libboost/core/src/boost_wrapper.cpp 2013-03-31 18:51:59.779990294 +0200
+@@ -73,7 +73,7 @@
- #include <postgres.h>
+ graph_t graph(num_nodes);
---
-1.7.7.6
-
-From dc6bff6b6923a565986eb4e314351299dc101f9a Mon Sep 17 00:00:00 2001
-From: Daniel Kastl <daniel at georepublic.de>
-Date: Tue, 30 Nov 2010 23:31:12 +0900
-Subject: [PATCH] fixed boost/property_map path for includes
-
----
- core/src/edge_visitors.hpp | 2 +-
- core/src/shooting_star_boost_wrapper.cpp | 2 +-
- core/src/shooting_star_relax.hpp | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/core/src/edge_visitors.hpp b/core/src/edge_visitors.hpp
-index 45e37ee..11c5ca0 100644
---- a/core/src/edge_visitors.hpp
-+++ b/core/src/edge_visitors.hpp
-@@ -3,7 +3,7 @@
+- property_map<graph_t, edge_weight_t>::type weightmap = get(edge_weight, graph);
++ //property_map<graph_t, edge_weight_t>::type weightmap = get(edge_weight, graph);
+
+ for (std::size_t j = 0; j < count; ++j)
+ {
+diff -Nur pgrouting-1.05/core/src/edge_visitors.hpp pgrouting-1.05-libboost/core/src/edge_visitors.hpp
+--- pgrouting-1.05/core/src/edge_visitors.hpp 2010-11-17 03:42:21.000000000 +0100
++++ pgrouting-1.05-libboost/core/src/edge_visitors.hpp 2013-03-31 18:51:59.780990245 +0200
+@@ -3,10 +3,15 @@
#include <iosfwd>
#include <boost/config.hpp>
@@ -74,11 +35,54 @@ index 45e37ee..11c5ca0 100644
+#include <boost/property_map/property_map.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/limits.hpp>
++#include <boost/version.hpp>
++#if BOOST_VERSION <= 14700
#include <boost/graph/detail/is_same.hpp>
-diff --git a/core/src/shooting_star_boost_wrapper.cpp b/core/src/shooting_star_boost_wrapper.cpp
-index 55c8e38..bf28713 100644
---- a/core/src/shooting_star_boost_wrapper.cpp
-+++ b/core/src/shooting_star_boost_wrapper.cpp
++#else
++#include <boost/type_traits/is_same.hpp>
++#endif
+
+ namespace boost
+ {
+diff -Nur pgrouting-1.05/core/src/edge_visitors.hpp.orig pgrouting-1.05-libboost/core/src/edge_visitors.hpp.orig
+--- pgrouting-1.05/core/src/edge_visitors.hpp.orig 1970-01-01 01:00:00.000000000 +0100
++++ pgrouting-1.05-libboost/core/src/edge_visitors.hpp.orig 2010-11-17 03:42:21.000000000 +0100
+@@ -0,0 +1,32 @@
++#ifndef EDGE_VISITORS_HPP
++#define EDGE_VISITORS_HPP
++
++#include <iosfwd>
++#include <boost/config.hpp>
++#include <boost/property_map.hpp>
++#include <boost/graph/graph_traits.hpp>
++#include <boost/limits.hpp>
++#include <boost/graph/detail/is_same.hpp>
++
++namespace boost
++{
++ // Event Tags
++
++ namespace detail
++ {
++ // For partial specialization workaround
++ enum event_edge_visitor_enum
++ {
++ on_initialize_edge_num, on_start_edge_num,
++ on_discover_edge_num, on_finish_edge_num
++ };
++ }
++
++ struct on_initialize_edge { enum { num = detail::on_initialize_edge_num }; };
++ struct on_start_edge { enum { num = detail::on_start_edge_num }; };
++ struct on_discover_edge { enum { num = detail::on_discover_edge_num }; };
++ struct on_finish_edge { enum { num = detail::on_finish_edge_num }; };
++
++}
++
++#endif
+diff -Nur pgrouting-1.05/core/src/shooting_star_boost_wrapper.cpp pgrouting-1.05-libboost/core/src/shooting_star_boost_wrapper.cpp
+--- pgrouting-1.05/core/src/shooting_star_boost_wrapper.cpp 2010-11-17 03:42:21.000000000 +0100
++++ pgrouting-1.05-libboost/core/src/shooting_star_boost_wrapper.cpp 2013-03-31 18:51:59.792989661 +0200
@@ -23,7 +23,7 @@
#include <boost/graph/graph_traits.hpp>
@@ -88,10 +92,9 @@ index 55c8e38..bf28713 100644
#include <shooting_star_search.hpp>
#include "shooting_star.h"
-diff --git a/core/src/shooting_star_relax.hpp b/core/src/shooting_star_relax.hpp
-index 8e65be6..95b222e 100644
---- a/core/src/shooting_star_relax.hpp
-+++ b/core/src/shooting_star_relax.hpp
+diff -Nur pgrouting-1.05/core/src/shooting_star_relax.hpp pgrouting-1.05-libboost/core/src/shooting_star_relax.hpp
+--- pgrouting-1.05/core/src/shooting_star_relax.hpp 2010-11-17 03:42:21.000000000 +0100
++++ pgrouting-1.05-libboost/core/src/shooting_star_relax.hpp 2013-03-31 18:51:59.793989612 +0200
@@ -15,7 +15,7 @@
#include <functional>
#include <boost/limits.hpp> // for numeric limits
@@ -101,6 +104,17 @@ index 8e65be6..95b222e 100644
#include <postgres.h>
---
-1.7.7.6
-
+diff -Nur pgrouting-1.05/extra/driving_distance/src/boost_drivedist.cpp pgrouting-1.05-libboost/extra/driving_distance/src/boost_drivedist.cpp
+--- pgrouting-1.05/extra/driving_distance/src/boost_drivedist.cpp 2010-11-17 03:42:21.000000000 +0100
++++ pgrouting-1.05-libboost/extra/driving_distance/src/boost_drivedist.cpp 2013-03-31 18:51:59.780990245 +0200
+@@ -84,8 +84,8 @@
+
+ graph_t graph( num_nodes );
+
+- property_map<graph_t, edge_weight_t>::type weightmap =
+- get(edge_weight, graph);
++ //property_map<graph_t, edge_weight_t>::type weightmap =
++ // get(edge_weight, graph);
+
+ for (std::size_t j = 0; j < count; ++j)
+ {
More information about the scm-commits
mailing list