Sunday, October 28, 2018

[update] osm2pgsql 0.96.0

Index: Makefile
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- Makefile 16 Nov 2017 23:20:38 -0000 1.11
+++ Makefile 28 Oct 2018 09:01:49 -0000
@@ -1,13 +1,10 @@
# $OpenBSD: Makefile,v 1.11 2017/11/16 23:20:38 naddy Exp $

COMMENT = OSM data to PostgreSQL converter
-#https://github.com/openstreetmap/osm2pgsql/issues/634
-BROKEN
= doesnt build with geos 3.6 API

-GH_TAGNAME = 0.90.1
+GH_TAGNAME = 0.96.0
GH_PROJECT = osm2pgsql
GH_ACCOUNT = openstreetmap
-REVISION = 0

CATEGORIES = geo databases

@@ -19,7 +16,7 @@
USE_GMAKE = Yes

WANTLIB += boost_system-mt boost_filesystem-mt bz2 c expat
-WANTLIB += geos m pthread pq proj z ${MODLUA_WANTLIB} ${COMPILER_LIBCXX}
+WANTLIB += m pthread pq proj z ${MODLUA_WANTLIB} ${COMPILER_LIBCXX}

# postgresql needs to be first otherwise tests are done by cmake module
MODULES = databases/postgresql \
@@ -29,7 +26,6 @@

LIB_DEPENDS = databases/postgresql \
devel/proj \
- geo/geos \
devel/boost \

BUILD_DEPENDS = devel/libtool
Index: distinfo
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo 30 Aug 2016 15:22:06 -0000 1.3
+++ distinfo 28 Oct 2018 09:01:49 -0000
@@ -1,2 +1,2 @@
-SHA256 (osm2pgsql-0.90.1.tar.gz) = +boJcUYD2yUeSjV8GWhkDDULDKXJlxIAja3HHAw+iYs=
-SIZE (osm2pgsql-0.90.1.tar.gz) = 1326807
+SHA256 (osm2pgsql-0.96.0.tar.gz) = tgIOd9iHcpiSeaaa5GeOl4KYm2MGE3VOSDtRks05xyM=
+SIZE (osm2pgsql-0.96.0.tar.gz) = 1219163
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/patches/patch-CMakeLists_txt,v
retrieving revision 1.1
diff -u -r1.1 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 27 Apr 2016 17:02:34 -0000 1.1
+++ patches/patch-CMakeLists_txt 28 Oct 2018 09:01:49 -0000
@@ -1,19 +1,20 @@
$OpenBSD: patch-CMakeLists_txt,v 1.1 2016/04/27 17:02:34 danj Exp $
---- CMakeLists.txt.orig Wed Mar 2 15:06:44 2016
-+++ CMakeLists.txt Wed Apr 27 17:27:26 2016
-@@ -98,7 +98,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAK
- find_package(Osmium REQUIRED COMPONENTS io geos proj)
- include_directories(SYSTEM ${OSMIUM_INCLUDE_DIRS})
-
--find_package(Lua)
-+find_package(Lua ${MODLUA_VERSION})
- if (LUA_FOUND)
- include_directories(${LUA_INCLUDE_DIR})
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -100,7 +100,7 @@ if (WITH_LUA)
+ include_directories(${LUAJIT_INCLUDE_DIR})
+ set(HAVE_LUAJIT 1)
+ else()
+- find_package(Lua REQUIRED)
++ find_package(Lua ${MODLUA_VERSION} REQUIRED)
+ include_directories(${LUA_INCLUDE_DIR})
+ endif()
set(HAVE_LUA 1)
-@@ -257,5 +257,5 @@ endif()
+@@ -260,5 +260,5 @@ endif()
#############################################################

install(TARGETS osm2pgsql DESTINATION bin)
-install(FILES docs/osm2pgsql.1 DESTINATION share/man/man1)
+install(FILES docs/osm2pgsql.1 DESTINATION man/man1)
- install(FILES default.style empty.style 900913.sql DESTINATION share/osm2pgsql)
+ install(FILES default.style empty.style DESTINATION share/osm2pgsql)
Index: patches/patch-contrib_libosmium_osmium_io_bzip2_compression_hpp
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/patches/patch-contrib_libosmium_osmium_io_bzip2_compression_hpp,v
retrieving revision 1.1
diff -u -r1.1 patch-contrib_libosmium_osmium_io_bzip2_compression_hpp
--- patches/patch-contrib_libosmium_osmium_io_bzip2_compression_hpp 27 Apr 2016 17:02:34 -0000 1.1
+++ patches/patch-contrib_libosmium_osmium_io_bzip2_compression_hpp 28 Oct 2018 09:01:49 -0000
@@ -1,7 +1,8 @@
$OpenBSD: patch-contrib_libosmium_osmium_io_bzip2_compression_hpp,v 1.1 2016/04/27 17:02:34 danj Exp $
---- contrib/libosmium/osmium/io/bzip2_compression.hpp.orig Wed Apr 27 11:16:52 2016
-+++ contrib/libosmium/osmium/io/bzip2_compression.hpp Wed Apr 27 12:44:28 2016
-@@ -140,7 +140,7 @@ namespace osmium {
+Index: contrib/libosmium/osmium/io/bzip2_compression.hpp
+--- contrib/libosmium/osmium/io/bzip2_compression.hpp.orig
++++ contrib/libosmium/osmium/io/bzip2_compression.hpp
+@@ -148,7 +148,7 @@ namespace osmium {
m_bzfile = nullptr;
if (m_file) {
if (do_fsync()) {
@@ -9,4 +10,4 @@
+ osmium::io::detail::reliable_fsync(fileno(m_file));
}
if (fclose(m_file) != 0) {
- throw std::system_error(errno, std::system_category(), "Close failed");
+ throw std::system_error{errno, std::system_category(), "Close failed"};
Index: patches/patch-docs_osm2pgsql_1
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/patches/patch-docs_osm2pgsql_1,v
retrieving revision 1.2
diff -u -r1.2 patch-docs_osm2pgsql_1
--- patches/patch-docs_osm2pgsql_1 27 Apr 2016 17:02:34 -0000 1.2
+++ patches/patch-docs_osm2pgsql_1 28 Oct 2018 09:01:49 -0000
@@ -1,7 +1,8 @@
$OpenBSD: patch-docs_osm2pgsql_1,v 1.2 2016/04/27 17:02:34 danj Exp $
---- docs/osm2pgsql.1.orig Wed Mar 2 15:06:44 2016
-+++ docs/osm2pgsql.1 Wed Apr 27 15:05:35 2016
-@@ -108,14 +108,14 @@ to be able to update your database, as these tables ar
+Index: docs/osm2pgsql.1
+--- docs/osm2pgsql.1.orig
++++ docs/osm2pgsql.1
+@@ -107,14 +107,14 @@ to be able to update your database, as these tables ar
.TP
\fB\-S\fR|\-\-style /path/to/style
Location of the osm2pgsql style file. This specifies which tags from the data get
Index: patches/patch-options_cpp
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/patches/patch-options_cpp,v
retrieving revision 1.2
diff -u -r1.2 patch-options_cpp
--- patches/patch-options_cpp 27 Apr 2016 17:02:34 -0000 1.2
+++ patches/patch-options_cpp 28 Oct 2018 09:01:49 -0000
@@ -2,23 +2,24 @@

Set the default cache size to 100M

---- options.cpp.orig Wed Mar 2 15:06:44 2016
-+++ options.cpp Wed Apr 27 14:53:15 2016
+Index: options.cpp
+--- options.cpp.orig
++++ options.cpp
@@ -98,7 +98,7 @@ namespace
printf("\
- %s/default.style.\n", OSM2PGSQL_DATADIR);
+ %s.\n", DEFAULT_STYLE);
printf("%s", "\
- -C|--cache Use up to this many MB for caching nodes (default: 800)\n\
+ -C|--cache Use up to this many MB for caching nodes (default: 100)\n\
- \n\
- Database options:\n\
- -d|--database The name of the PostgreSQL database to connect\n\
-@@ -261,7 +261,7 @@ std::string database_options_t::conninfo() const
-
- options_t::options_t():
- prefix("planet_osm"), scale(DEFAULT_SCALE), projection(reprojection::create_projection(PROJ_SPHERE_MERC)), append(false), slim(false),
-- cache(800), tblsmain_index(boost::none), tblsslim_index(boost::none), tblsmain_data(boost::none), tblsslim_data(boost::none), style(OSM2PGSQL_DATADIR "/default.style"),
-+ cache(100), tblsmain_index(boost::none), tblsslim_index(boost::none), tblsmain_data(boost::none), tblsslim_data(boost::none), style(OSM2PGSQL_DATADIR "/default.style"),
- expire_tiles_zoom(-1), expire_tiles_zoom_min(-1), expire_tiles_filename("dirty_tiles"), hstore_mode(HSTORE_NONE), enable_hstore_index(false),
- enable_multi(false), hstore_columns(), keep_coastlines(false), parallel_indexing(true),
- #ifdef __amd64__
+ -F|--flat-nodes Specifies the flat file to use to persistently store node \n\
+ information in slim mode instead of in PostgreSQL.\n\
+ This file is a single > 40Gb large file. Only recommended\n\
+@@ -267,7 +267,7 @@ std::string database_options_t::conninfo() const
+ options_t::options_t()
+ : prefix("planet_osm"),
+ projection(reprojection::create_projection(PROJ_SPHERE_MERC)), append(false),
+- slim(false), cache(800), tblsmain_index(boost::none),
++ slim(false), cache(100), tblsmain_index(boost::none),
+ tblsslim_index(boost::none), tblsmain_data(boost::none),
+ tblsslim_data(boost::none), style(DEFAULT_STYLE),
+ expire_tiles_zoom(0), expire_tiles_zoom_min(0),
Index: patches/patch-tests_regression-test_py
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/patches/patch-tests_regression-test_py,v
retrieving revision 1.1
diff -u -r1.1 patch-tests_regression-test_py
--- patches/patch-tests_regression-test_py 1 May 2016 20:23:54 -0000 1.1
+++ patches/patch-tests_regression-test_py 28 Oct 2018 09:01:49 -0000
@@ -1,7 +1,8 @@
$OpenBSD: patch-tests_regression-test_py,v 1.1 2016/05/01 20:23:54 danj Exp $
---- tests/regression-test.py.orig Wed Mar 2 15:06:44 2016
-+++ tests/regression-test.py Sun May 1 19:58:24 2016
-@@ -490,7 +490,7 @@ def findContribSql(filename):
+Index: tests/regression-test.py
+--- tests/regression-test.py.orig
++++ tests/regression-test.py
+@@ -494,7 +494,7 @@ def findContribSql(filename):

# Try to get base dir for postgres contrib
try:
@@ -10,7 +11,7 @@
except:
postgis_base_dir = '/usr'

-@@ -550,6 +550,9 @@ def setupDB():
+@@ -554,6 +554,9 @@ def setupDB():
global created_tablespace
created_tablespace = 0

@@ -20,7 +21,7 @@
test_cur.execute("""SELECT spcname FROM pg_tablespace WHERE spcname = 'tablespacetest'""")
if test_cur.fetchone():
print "We already have a tablespace, can use that"
-@@ -609,7 +612,7 @@ def tearDownDB():
+@@ -613,7 +616,7 @@ def tearDownDB():
gen_cur.close()
gen_conn.close()
if (created_tablespace == 1):
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/pkg/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- pkg/PLIST 27 Apr 2016 17:02:34 -0000 1.2
+++ pkg/PLIST 28 Oct 2018 09:01:49 -0000
@@ -2,6 +2,5 @@
@bin bin/osm2pgsql
@man man/man1/osm2pgsql.1
share/osm2pgsql/
-share/osm2pgsql/900913.sql
share/osm2pgsql/default.style
share/osm2pgsql/empty.style
Hi,

update & unbreak now that it doesnt depend anymore on an ancient GEOS.
Tests seem to pass on i386 (the ones which fail are b/c the psql server
started for tests gets too many connections), also builds fine on amd64.
Will do some testing loading real datasetts.

Landry

No comments:

Post a Comment