hi, here's an update to osm2pgsql 1.6.0, which ships with a new python script 'osm2pgsql-replication' (cf https://osm2pgsql.org/news/2022/01/24/release-1.6.0.html) that depends on https://osmcode.org/pyosmium/ - which i've also ported.
the latteer has a test suite that either runs an infinite loop or blows python interpreter, as i've reported upstream: https://github.com/osmcode/pyosmium/issues/199 that port runs a mix of setuptools and cmake, i havent used cmake module otherwise it'd take over configure/etc. oks welcome to import the dependency, also feedback on the update :) Landry
? build_fmt_installed.log
Index: Makefile
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- Makefile 13 Apr 2022 07:20:22 -0000 1.21
+++ Makefile 14 Apr 2022 06:55:21 -0000
@@ -1,9 +1,8 @@
COMMENT = OSM data to PostgreSQL converter
-GH_TAGNAME = 1.4.2
+GH_TAGNAME = 1.6.0
GH_PROJECT = osm2pgsql
GH_ACCOUNT = openstreetmap
-REVISION = 1
CATEGORIES = geo databases
@@ -31,6 +30,9 @@
devel/fmt \
devel/protozero \
geo/libosmium>=2.15.6
+
+RUN_DEPENDS += geo/py-osmium${MODPY_FLAVOR} \
+ databases/py-psycopg2${MODPY_FLAVOR}
# postgresql,-contrib is needed for hstore extension
TEST_DEPENDS = databases/py-psycopg2 \
Index: distinfo
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- distinfo 29 Apr 2021 08:51:34 -0000 1.6
+++ distinfo 14 Apr 2022 06:55:21 -0000
@@ -1,2 +1,2 @@
-SHA256 (osm2pgsql-1.4.2.tar.gz) = /GgoOTDM1GjtmyhoUVB0GxYIP+yGgApLARiEriLrBhw=
-SIZE (osm2pgsql-1.4.2.tar.gz) = 2469766
+SHA256 (osm2pgsql-1.6.0.tar.gz) = Dsi1irlyrINWGFr0FhJwwbYlp3KZ8J5ft/ReYW7xqaU=
+SIZE (osm2pgsql-1.6.0.tar.gz) = 2592649
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/patches/patch-CMakeLists_txt,v
retrieving revision 1.5
diff -u -r1.5 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 11 Mar 2022 19:06:15 -0000 1.5
+++ patches/patch-CMakeLists_txt 14 Apr 2022 06:55:21 -0000
@@ -10,3 +10,11 @@
include_directories(SYSTEM ${LUA_INCLUDE_DIR})
endif()
set(HAVE_LUA 1)
+@@ -336,6 +336,6 @@ add_subdirectory(docs)
+ if (ENABLE_INSTALL)
+ install(TARGETS osm2pgsql DESTINATION bin)
+ install(PROGRAMS scripts/osm2pgsql-replication DESTINATION bin)
+- install(FILES docs/osm2pgsql-replication.1 DESTINATION share/man/man1)
++ install(FILES docs/osm2pgsql-replication.1 DESTINATION man/man1)
+ install(FILES default.style empty.style DESTINATION share/osm2pgsql)
+ endif()
Index: patches/patch-docs_osm2pgsql_1
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/patches/patch-docs_osm2pgsql_1,v
retrieving revision 1.5
diff -u -r1.5 patch-docs_osm2pgsql_1
--- patches/patch-docs_osm2pgsql_1 11 Mar 2022 19:06:15 -0000 1.5
+++ patches/patch-docs_osm2pgsql_1 14 Apr 2022 06:55:21 -0000
@@ -1,21 +1,21 @@
Index: docs/osm2pgsql.1
--- docs/osm2pgsql.1.orig
+++ docs/osm2pgsql.1
-@@ -197,7 +197,7 @@ If the RAM is not big enough, use about 75% of memory.
+@@ -153,7 +153,7 @@ If the RAM is not big enough, use about 75% of memory.
Make sure to leave enough RAM for PostgreSQL.
- It needs at least the amount of \f[C]shared_buffers\f[] given in its
+ It needs at least the amount of \f[C]shared_buffers\f[R] given in its
configuration.
-Defaults to 800.
+Defaults to 100.
- .RS
- .RE
.TP
-@@ -290,7 +290,7 @@ The style file.
+ --cache-strategy=STRATEGY
+ This deprecated option will be ignored.
+@@ -212,7 +212,7 @@ The style file.
This specifies how the data is imported into the database, its format
depends on the output.
- (For the \f[B]pgsql\f[] output, the default is
--\f[C]/usr/share/osm2pgsql/default.style\f[], for other outputs there is
-+\f[C]${TRUEPREFIX}/usr/share/osm2pgsql/default.style\f[], for other outputs
there is
+ (For the \f[B]pgsql\f[R] output, the default is
+-\f[C]/usr/share/osm2pgsql/default.style\f[R], for other outputs there is
++\f[C]${TRUEPREFIX}/share/osm2pgsql/default.style\f[R], for other outputs
there is
no default.)
- .RS
- .RE
+ .SH PGSQL OUTPUT OPTIONS
+ .TP
Index: patches/patch-src_options_cpp
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/patches/patch-src_options_cpp,v
retrieving revision 1.2
diff -u -r1.2 patch-src_options_cpp
--- patches/patch-src_options_cpp 11 Mar 2022 19:06:15 -0000 1.2
+++ patches/patch-src_options_cpp 14 Apr 2022 06:55:21 -0000
@@ -1,7 +1,7 @@
Index: src/options.cpp
--- src/options.cpp.orig
+++ src/options.cpp
-@@ -136,7 +136,7 @@ Common options:\n\
+@@ -138,7 +138,7 @@ Common options:\n\
required if you want to update with --append later.\n\
--drop Only with --slim: drop temporary tables after import\n\
(no updates are possible).\n\
Index: patches/patch-src_options_hpp
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/patches/patch-src_options_hpp,v
retrieving revision 1.2
diff -u -r1.2 patch-src_options_hpp
--- patches/patch-src_options_hpp 11 Mar 2022 19:06:15 -0000 1.2
+++ patches/patch-src_options_hpp 14 Apr 2022 06:55:21 -0000
@@ -1,7 +1,7 @@
Index: src/options.hpp
--- src/options.hpp.orig
+++ src/options.hpp
-@@ -72,7 +72,7 @@ class options_t (public)
+@@ -97,7 +97,7 @@ class options_t (public)
std::shared_ptr<reprojection> projection; ///< SRS of projection
bool append = false; ///< Append to existing data
bool slim = false; ///< In slim mode
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/pkg/PLIST,v
retrieving revision 1.4
diff -u -r1.4 PLIST
--- pkg/PLIST 11 Mar 2022 19:06:15 -0000 1.4
+++ pkg/PLIST 14 Apr 2022 06:55:21 -0000
@@ -1,5 +1,7 @@
@bin bin/osm2pgsql
+bin/osm2pgsql-replication
@man man/man1/osm2pgsql.1
+@man man/man1/osm2pgsql-replication.1
share/osm2pgsql/
share/osm2pgsql/default.style
share/osm2pgsql/empty.style
py-osmium-3.3.0.tgz
Description: application/tar-gz
