summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Trigona-Harany <bosth@alumni.sfu.ca>2013-10-29 21:29:14 +0100
committerRobby Workman <rworkman@slackbuilds.org>2013-10-29 20:12:30 -0500
commit75ccbfff1e53f83101f731c5213d4763ff5f3bea (patch)
tree1f4fff291e19dc6d43ddaa7571cebc657a475603
parent046ba3193abd39bc70a1b9d1c5445eecce088fad (diff)
downloadslackbuilds-75ccbfff1e53f83101f731c5213d4763ff5f3bea.tar.gz
academic/pgrouting: Updated for version 2.0.0.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--academic/pgrouting/README19
-rw-r--r--academic/pgrouting/create_template.sh52
-rw-r--r--academic/pgrouting/pgrouting-1.05-flags.patch14
-rw-r--r--academic/pgrouting/pgrouting-1.05-sql.patch39
-rw-r--r--academic/pgrouting/pgrouting-1.05-weightmap.patch38
-rw-r--r--academic/pgrouting/pgrouting.SlackBuild39
-rw-r--r--academic/pgrouting/pgrouting.info8
7 files changed, 24 insertions, 185 deletions
diff --git a/academic/pgrouting/README b/academic/pgrouting/README
index d9e4197d7a..149c889866 100644
--- a/academic/pgrouting/README
+++ b/academic/pgrouting/README
@@ -2,10 +2,17 @@ pgRouting extends the PostGIS / PostgreSQL geospatial database to provide
geospatial routing functionality.
The following algorithms are compiled:
-* Dijkstra - shortest path algorithm
-* A-star (A*) - shortest path algorithm using heuristical function
-* Shooting star (Shooting*) - shortest path algorithm for real road
- networks with turn restrictions, traffic lights and one way streets
+* All Pairs Shortest Path, Johnson’s Algorithm
+* All Pairs Shortest Path, Floyd-Warshall Algorithm
+* Shortest Path A*
+* Bi-directional Dijkstra Shortest Path
+* Bi-directional A* Shortest Path
+* Shortest Path Dijkstra
+* Driving Distance
+* K-Shortest Path, Multiple Alternative Paths
+* K-Dijkstra, One to Many Shortest Path
+* Traveling Sales Person
+* Turn Restriction Shortest Path
-A script for creating a pgRouting database template on Slackware will be
-added to the documentation directory.
+To build the pgRouting documentation, pass WITH_DOC=YES to the script
+(this requires the Sphinx package to be installed).
diff --git a/academic/pgrouting/create_template.sh b/academic/pgrouting/create_template.sh
deleted file mode 100644
index 777be827c1..0000000000
--- a/academic/pgrouting/create_template.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-# ------------------------------------------------------------------------------
-# Setup template containing PostGIS and/or pgRouting
-# ------------------------------------------------------------------------------
-#
-# To create a GIS database as non-superuser run:
-#
-# "createdb -h hostname -W -T template_postgis mydb
-#
-# Source: http://geospatial.nomad-labs.com/2006/12/24/postgis-template-database/
-#
-# Note: requires "libpq-dev" package
-
-if [ -e `pg_config --sharedir` ]
-then
- echo "PostGIS installed in" `pg_config --sharedir`
- POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib
-else
- POSTGIS_SQL_PATH=/usr/share/postgresql/contrib
-fi
-echo "PostGIS path set as $POSTGIS_SQL_PATH"
-
-ROUTING_SQL_PATH=/usr/share/postlbs
-
-# Create "template_routing"
-# -------------------------
-if sudo -u postgres psql --list | grep -q template_routing ;
-then
- echo "pgRouting template already exists!"
-else
- echo "Create pgRouting template ..."
- sudo -u postgres createdb -E UTF8 template_routing
-
- sudo -u postgres psql --quiet -d template_routing -c "create extension postgis;"
- sudo -u postgres psql --quiet -d template_routing -c "create extension postgis_topology;"
-
- sudo -u postgres psql --quiet -d template_routing -f $ROUTING_SQL_PATH/routing_core.sql
- sudo -u postgres psql --quiet -d template_routing -f $ROUTING_SQL_PATH/routing_core_wrappers.sql
- sudo -u postgres psql --quiet -d template_routing -f $ROUTING_SQL_PATH/routing_topology.sql
- sudo -u postgres psql --quiet -d template_routing -f $ROUTING_SQL_PATH/matching.sql
-
- sudo -u postgres psql --quiet -d template_routing -c "GRANT ALL ON geometry_columns TO PUBLIC;"
- sudo -u postgres psql --quiet -d template_routing -c "GRANT ALL ON geography_columns TO PUBLIC;"
- sudo -u postgres psql --quiet -d template_routing -c "GRANT ALL ON raster_columns TO PUBLIC;"
- sudo -u postgres psql --quiet -d template_routing -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"
-
- sudo -u postgres psql --quiet -d template_routing -c "VACUUM FULL;"
- sudo -u postgres psql --quiet -d template_routing -c "VACUUM FREEZE;"
-
- sudo -u postgres psql --quiet -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_routing';"
- sudo -u postgres psql --quiet -d postgres -c "UPDATE pg_database SET datallowconn='false' WHERE datname='template_routing';"
- echo "... template_routing created."
-fi
diff --git a/academic/pgrouting/pgrouting-1.05-flags.patch b/academic/pgrouting/pgrouting-1.05-flags.patch
deleted file mode 100644
index a802aab38b..0000000000
--- a/academic/pgrouting/pgrouting-1.05-flags.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Nur pgrouting-1.05/CMakeLists.txt pgrouting-1.05-flags/CMakeLists.txt
---- pgrouting-1.05/CMakeLists.txt 2010-11-16 18:42:21.000000000 -0800
-+++ pgrouting-1.05-flags/CMakeLists.txt 2013-03-06 22:05:59.934147381 -0800
-@@ -85,8 +85,8 @@
- LINK_LIBRARIES(postgres)
- ENDIF(WIN32)
-
--SET(CMAKE_C_FLAGS "-O2 -g -frounding-math")
--SET(CMAKE_CXX_FLAGS "-O2 -g -frounding-math")
-+SET(CMAKE_C_FLAGS "${SLKCFLAGS} -frounding-math")
-+SET(CMAKE_CXX_FLAGS "${SLKCFLAGS} -frounding-math")
-
- # Recurse into the subdirectories. This does not actually
- # cause another cmake executable to run. The same process will walk through
diff --git a/academic/pgrouting/pgrouting-1.05-sql.patch b/academic/pgrouting/pgrouting-1.05-sql.patch
deleted file mode 100644
index 43fee1d205..0000000000
--- a/academic/pgrouting/pgrouting-1.05-sql.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff -Nur pgrouting-1.05/core/sql/routing_core.sql pgrouting-1.05-sql/core/sql/routing_core.sql
---- pgrouting-1.05/core/sql/routing_core.sql 2010-11-16 18:42:21.000000000 -0800
-+++ pgrouting-1.05-sql/core/sql/routing_core.sql 2013-03-06 23:07:39.797615201 -0800
-@@ -14,7 +14,7 @@
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
---- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- --
-
-
-@@ -29,7 +29,7 @@
- target_id integer, directed boolean, has_reverse_cost boolean)
- RETURNS SETOF path_result
- AS '$libdir/librouting'
-- LANGUAGE 'C' IMMUTABLE STRICT;
-+ LANGUAGE c IMMUTABLE STRICT;
-
- -----------------------------------------------------------------------
- -- Core function for shortest_path_astar computation
-@@ -40,7 +40,7 @@
- target_id integer,directed boolean, has_reverse_cost boolean)
- RETURNS SETOF path_result
- AS '$libdir/librouting'
-- LANGUAGE 'C' IMMUTABLE STRICT;
-+ LANGUAGE c IMMUTABLE STRICT;
-
- -----------------------------------------------------------------------
- -- Core function for shortest_path_astar computation
-@@ -50,7 +50,7 @@
- target_id integer,directed boolean, has_reverse_cost boolean)
- RETURNS SETOF path_result
- AS '$libdir/librouting'
-- LANGUAGE 'C' IMMUTABLE STRICT;
-+ LANGUAGE c IMMUTABLE STRICT;
-
- -----------------------------------------------------------------------
- -- This function should not be used directly. Use create_graph_tables instead
diff --git a/academic/pgrouting/pgrouting-1.05-weightmap.patch b/academic/pgrouting/pgrouting-1.05-weightmap.patch
deleted file mode 100644
index 350938d215..0000000000
--- a/academic/pgrouting/pgrouting-1.05-weightmap.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -Nur pgrouting-1.05/core/src/astar_boost_wrapper.cpp pgrouting-1.05-weightmap/core/src/astar_boost_wrapper.cpp
---- pgrouting-1.05/core/src/astar_boost_wrapper.cpp 2010-11-16 18:42:21.000000000 -0800
-+++ pgrouting-1.05-weightmap/core/src/astar_boost_wrapper.cpp 2013-03-06 22:06:43.438193285 -0800
-@@ -139,9 +139,6 @@
-
- graph_t graph(num_nodes);
-
-- 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/boost_wrapper.cpp pgrouting-1.05-weightmap/core/src/boost_wrapper.cpp
---- pgrouting-1.05/core/src/boost_wrapper.cpp 2010-11-16 18:42:21.000000000 -0800
-+++ pgrouting-1.05-weightmap/core/src/boost_wrapper.cpp 2013-03-06 22:06:54.689205167 -0800
-@@ -73,8 +73,6 @@
-
- graph_t graph(num_nodes);
-
-- property_map<graph_t, edge_weight_t>::type weightmap = get(edge_weight, graph);
--
- for (std::size_t j = 0; j < count; ++j)
- {
- edge_descriptor e; bool inserted;
-diff -Nur pgrouting-1.05/extra/driving_distance/src/boost_drivedist.cpp pgrouting-1.05-weightmap/extra/driving_distance/src/boost_drivedist.cpp
---- pgrouting-1.05/extra/driving_distance/src/boost_drivedist.cpp 2010-11-16 18:42:21.000000000 -0800
-+++ pgrouting-1.05-weightmap/extra/driving_distance/src/boost_drivedist.cpp 2013-03-06 22:07:23.983236104 -0800
-@@ -84,9 +84,6 @@
-
- graph_t graph( num_nodes );
-
-- property_map<graph_t, edge_weight_t>::type weightmap =
-- get(edge_weight, graph);
--
- for (std::size_t j = 0; j < count; ++j)
- {
- graph_add_edge<graph_t, edge_descriptor>
diff --git a/academic/pgrouting/pgrouting.SlackBuild b/academic/pgrouting/pgrouting.SlackBuild
index ef3557a5b7..88a3b373e3 100644
--- a/academic/pgrouting/pgrouting.SlackBuild
+++ b/academic/pgrouting/pgrouting.SlackBuild
@@ -25,7 +25,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=pgrouting
-VERSION=${VERSION:-1.05}
+VERSION=${VERSION:-2.0.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -62,40 +62,16 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
rm -rf $TMP/$PRGNAM-$VERSION
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/v$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
+ -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ -exec chmod 644 {} \;
-# set build flags
-patch -p1 < $CWD/pgrouting-1.05-flags.patch
-
-# remove broken and unnecessary weightmap declarations
-patch -p1 < $CWD/pgrouting-1.05-weightmap.patch
-
-# fix LANGUAGE 'C' for Postgres 9.2
-patch -p1 < $CWD/pgrouting-1.05-sql.patch
-
-# Some fixes collected by Fedora packagers
-# Correct FSF address
-find . \( -name *.cpp -o -name *.c -o -name *.h -o -name *.sql \) -print | xargs -i \
- sed -i 's/59 Temple Place\(, \| - \)Suite 330/51 Franklin Street, Fifth Floor/;s/02111-1307/02110-1301/' {}
-
-# Fix boost property_map files path
-sed -i "s|boost/vector_property_map.hpp|boost/property_map/vector_property_map.hpp|" \
- core/src/shooting_star_boost_wrapper.cpp
-
-sed -i "s|boost/property_map.hpp|boost/property_map/property_map.hpp|" \
- core/src/shooting_star_relax.hpp \
- core/src/edge_visitors.hpp
-
-# fix to avoid deprecated "boost/graph/detail/is_same.hpp" file
-sed -i "s|boost/graph/detail/is_same.hpp|boost/type_traits/is_same.hpp|" \
- core/src/edge_visitors.hpp
+WITH_DOC=${WITH_DOC:-NO}
mkdir -p build
cd build
@@ -103,7 +79,7 @@ cd build
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release \
+ -DWITH_DOC=$WITH_DOC \
..
make VERBOSE=1
@@ -114,8 +90,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a authors.txt COPYING README.routing RELEASE_NOTES $PKG/usr/doc/$PRGNAM-$VERSION
-cp $CWD/create_template.sh $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir $PKG/install
diff --git a/academic/pgrouting/pgrouting.info b/academic/pgrouting/pgrouting.info
index d5c7c3793b..3333078229 100644
--- a/academic/pgrouting/pgrouting.info
+++ b/academic/pgrouting/pgrouting.info
@@ -1,10 +1,10 @@
PRGNAM="pgrouting"
-VERSION="1.05"
+VERSION="2.0.0"
HOMEPAGE="http://pgrouting.org"
-DOWNLOAD="http://download.osgeo.org/pgrouting/source/pgrouting-1.05.tar.gz"
-MD5SUM="bd7c106e3db3c38f7081f1ee9b0e12ae"
+DOWNLOAD="https://github.com/pgRouting/pgrouting/archive/v2.0.0.tar.gz"
+MD5SUM="a7b573b7aa4d038bdb24d2401bb33013"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="postgis"
+REQUIRES="CGAL postgis"
MAINTAINER="Benjamin Trigona-Harany"
EMAIL="slackbuilds@jaxartes.net"