aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2018-01-15 23:30:33 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2018-01-15 23:30:33 +0000
commitc6f7cf22ce09d47e1e50fdd346eff5d00814febf (patch)
tree6214d59fb57595d6bd116ba7851c20257dfa559f
parenta3460c71c8eade7922726d78707c692584336859 (diff)
downloadports-c6f7cf22ce09d47e1e50fdd346eff5d00814febf.tar.gz
ports-c6f7cf22ce09d47e1e50fdd346eff5d00814febf.zip
Notes
-rw-r--r--converters/Makefile1
-rw-r--r--converters/osm2pgrouting/Makefile37
-rw-r--r--converters/osm2pgrouting/distinfo3
-rw-r--r--converters/osm2pgrouting/files/patch-CMakeLists.txt29
-rw-r--r--converters/osm2pgrouting/files/patch-include_parser_ConfigurationParserCallback.h17
-rw-r--r--converters/osm2pgrouting/files/patch-include_parser_OSMDocumentParserCallback.h18
-rw-r--r--converters/osm2pgrouting/pkg-descr10
-rw-r--r--converters/osm2pgrouting/pkg-plist5
8 files changed, 120 insertions, 0 deletions
diff --git a/converters/Makefile b/converters/Makefile
index f819ee7aa2ee..cbd5a13eb105 100644
--- a/converters/Makefile
+++ b/converters/Makefile
@@ -59,6 +59,7 @@
SUBDIR += ocaml-base64
SUBDIR += ocaml-jsonm
SUBDIR += osm2mp
+ SUBDIR += osm2pgrouting
SUBDIR += osm2pgsql
SUBDIR += p5-Bencode
SUBDIR += p5-Boulder
diff --git a/converters/osm2pgrouting/Makefile b/converters/osm2pgrouting/Makefile
new file mode 100644
index 000000000000..8f161cadc551
--- /dev/null
+++ b/converters/osm2pgrouting/Makefile
@@ -0,0 +1,37 @@
+# $FreeBSD$
+
+PORTNAME= osm2pgrouting
+DISTVERSIONPREFIX= v
+DISTVERSION= 2.3.3
+CATEGORIES= converters databases geography
+
+MAINTAINER= lbartoletti@tuxfamily.org
+COMMENT= Import OSM data into pgRouting database
+
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+LIB_DEPENDS= libboost_system.so:devel/boost-libs \
+ libexpat.so:textproc/expat2 \
+ libpqxx.so:databases/postgresql-libpqxx
+
+USES= cmake:outsource compiler:c++11-lang pgsql
+USE_GITHUB= yes
+GH_ACCOUNT= pgRouting
+WANT_PGSQL= client
+
+OPTIONS_DEFINE= DOCS
+
+PORTDOCS= Readme.md
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|/usr/share/osm2pgrouting/mapconfig.xml|${PREFIX}/etc/mapconfig.xml|' \
+ ${WRKSRC}/src/utilities/prog_options.cpp \
+ ${WRKSRC}/Readme.md
+
+post-install:
+ @for cf in ${STAGEDIR}${PREFIX}/etc/*.xml; do \
+ ${MV} $${cf} $${cf}.sample; \
+ done
+
+.include <bsd.port.mk>
diff --git a/converters/osm2pgrouting/distinfo b/converters/osm2pgrouting/distinfo
new file mode 100644
index 000000000000..b8e2b7577dd1
--- /dev/null
+++ b/converters/osm2pgrouting/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1513628294
+SHA256 (pgRouting-osm2pgrouting-v2.3.3_GH0.tar.gz) = ea58d3b2dd0164cf85dfa66044ce1ea2af3080bee2c16ad6f115aa84aa23ba0f
+SIZE (pgRouting-osm2pgrouting-v2.3.3_GH0.tar.gz) = 181159
diff --git a/converters/osm2pgrouting/files/patch-CMakeLists.txt b/converters/osm2pgrouting/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..e399fbc66ec1
--- /dev/null
+++ b/converters/osm2pgrouting/files/patch-CMakeLists.txt
@@ -0,0 +1,29 @@
+--- CMakeLists.txt.orig 2017-12-18 15:44:24 UTC
++++ CMakeLists.txt
+@@ -106,7 +106,7 @@ TARGET_LINK_LIBRARIES(osm2pgrouting
+ )
+
+ INSTALL(TARGETS osm2pgrouting
+- RUNTIME DESTINATION "/usr/bin"
++ RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
+ )
+
+ if(WIN32)
+@@ -114,13 +114,15 @@ if(WIN32)
+ endif()
+
+ INSTALL(FILES
+- "${CMAKE_SOURCE_DIR}/COPYING"
+ "${CMAKE_SOURCE_DIR}/Readme.md"
++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/osm2pgrouting")
++
++INSTALL(FILES
+ "${CMAKE_SOURCE_DIR}/mapconfig.xml"
+ "${CMAKE_SOURCE_DIR}/mapconfig_for_cars.xml"
+ "${CMAKE_SOURCE_DIR}/mapconfig_for_bicycles.xml"
+ "${CMAKE_SOURCE_DIR}/mapconfig_for_pedestrian.xml"
+- DESTINATION "${SHARE_DIR}")
++ DESTINATION "${CMAKE_INSTALL_PREFIX}/etc")
+
+
+ #INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
diff --git a/converters/osm2pgrouting/files/patch-include_parser_ConfigurationParserCallback.h b/converters/osm2pgrouting/files/patch-include_parser_ConfigurationParserCallback.h
new file mode 100644
index 000000000000..4c6598c30254
--- /dev/null
+++ b/converters/osm2pgrouting/files/patch-include_parser_ConfigurationParserCallback.h
@@ -0,0 +1,17 @@
+--- include/parser/ConfigurationParserCallback.h.orig 2017-12-18 15:44:24 UTC
++++ include/parser/ConfigurationParserCallback.h
+@@ -22,12 +22,13 @@
+ #ifndef SRC_CONFIGURATIONPARSERCALLBACK_H_
+ #define SRC_CONFIGURATIONPARSERCALLBACK_H_
+ #pragma once
+-
++/*
+ #if __GNUC__ > 4 || \
+ (__GNUC__ == 4 && (__GNUC_MINOR__ >= 6))
+ #else
+ #define nullptr NULL
+ #endif
++*/
+
+ #include <string.h>
+ #include "XMLParser.h"
diff --git a/converters/osm2pgrouting/files/patch-include_parser_OSMDocumentParserCallback.h b/converters/osm2pgrouting/files/patch-include_parser_OSMDocumentParserCallback.h
new file mode 100644
index 000000000000..c94a324e8865
--- /dev/null
+++ b/converters/osm2pgrouting/files/patch-include_parser_OSMDocumentParserCallback.h
@@ -0,0 +1,18 @@
+--- include/parser/OSMDocumentParserCallback.h.orig 2017-12-18 15:44:24 UTC
++++ include/parser/OSMDocumentParserCallback.h
+@@ -22,13 +22,13 @@
+ #ifndef SRC_OSMDOCUMENTPARSERCALLBACK_H_
+ #define SRC_OSMDOCUMENTPARSERCALLBACK_H_
+ #pragma once
+-
++/*
+ #if __GNUC__ > 4 || \
+ (__GNUC__ == 4 && (__GNUC_MINOR__ >= 6))
+ #else
+ #define nullptr NULL
+ #endif
+-
++*/
+
+ #include <string.h>
+ #include "./XMLParser.h"
diff --git a/converters/osm2pgrouting/pkg-descr b/converters/osm2pgrouting/pkg-descr
new file mode 100644
index 000000000000..2c05fd2f6a07
--- /dev/null
+++ b/converters/osm2pgrouting/pkg-descr
@@ -0,0 +1,10 @@
+osm2pgrouting tool makes it easy to import OpenStreetMap data and
+use it with pgRouting. It creates topology automatically and creates
+tables for feature types and road classes.
+
+Features:
+* Uses XML configuration file to select road types and classes to import.
+* Creates types and classes tables, which can help to create sophisticated
+ cost functions.
+
+WWW: http://pgrouting.org/docs/tools/osm2pgrouting.html
diff --git a/converters/osm2pgrouting/pkg-plist b/converters/osm2pgrouting/pkg-plist
new file mode 100644
index 000000000000..0743a42c3eb6
--- /dev/null
+++ b/converters/osm2pgrouting/pkg-plist
@@ -0,0 +1,5 @@
+bin/osm2pgrouting
+@sample etc/mapconfig.xml.sample
+@sample etc/mapconfig_for_bicycles.xml.sample
+@sample etc/mapconfig_for_cars.xml.sample
+@sample etc/mapconfig_for_pedestrian.xml.sample