Hi, ports@:

    Here is a patch for geo/osm2pgsql:
    i) Update to 1.10.0
    ii) 3 patches removed and 2 new patches
    iii) add missing BUILD_DEPEND

   It build well and run well on amd64-current system, 
97% tests passed , same as previous version.


Regards,
wen
Index: Makefile
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/Makefile,v
retrieving revision 1.27
diff -u -p -r1.27 Makefile
--- Makefile    2 Apr 2023 10:08:25 -0000       1.27
+++ Makefile    24 Nov 2023 02:15:53 -0000
@@ -1,8 +1,8 @@
 COMMENT =              OSM data to PostgreSQL converter
 
-GH_TAGNAME =           1.8.1
+GH_TAGNAME =           1.10.0
 GH_PROJECT =           osm2pgsql
-GH_ACCOUNT =           openstreetmap
+GH_ACCOUNT =           osm2pgsql-dev
 
 CATEGORIES =           geo databases
 
@@ -29,7 +29,8 @@ LIB_DEPENDS =         databases/postgresql    \
 BUILD_DEPENDS =                devel/libtool \
                        devel/fmt \
                        devel/protozero \
-                       geo/libosmium>=2.17.0
+                       geo/libosmium>=2.17.0 \
+                       textproc/nlohmann-json
 
 RUN_DEPENDS +=         geo/py-osmium${MODPY_FLAVOR} \
                        databases/py-psycopg2${MODPY_FLAVOR}
@@ -63,6 +64,6 @@ pre-configure:
        rm -f ${WRKSRC}/cmake/FindLua.cmake
 
 post-patch:
-       @${SUBST_CMD} ${WRKSRC}/docs/osm2pgsql.1
+       @${SUBST_CMD} ${WRKSRC}/man/osm2pgsql.1
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/distinfo,v
retrieving revision 1.9
diff -u -p -r1.9 distinfo
--- distinfo    2 Apr 2023 10:08:25 -0000       1.9
+++ distinfo    24 Nov 2023 02:15:53 -0000
@@ -1,2 +1,2 @@
-SHA256 (osm2pgsql-1.8.1.tar.gz) = njzZ4TiT/XoVPHtCCJvSMziGcZDJGxV8vbT/cXbsumI=
-SIZE (osm2pgsql-1.8.1.tar.gz) = 2545767
+SHA256 (osm2pgsql-1.10.0.tar.gz) = M4SdjtrLylq1SS/tMqyVTeFPkqtrMCjAPviLt6tZbSA=
+SIZE (osm2pgsql-1.10.0.tar.gz) = 2599615
Index: patches/patch-docs_CMakeLists_txt
===================================================================
RCS file: patches/patch-docs_CMakeLists_txt
diff -N patches/patch-docs_CMakeLists_txt
--- patches/patch-docs_CMakeLists_txt   11 Sep 2022 10:31:12 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-Index: docs/CMakeLists.txt
---- docs/CMakeLists.txt.orig
-+++ docs/CMakeLists.txt
-@@ -50,7 +50,5 @@ if(MANPAGE_TARGETS)
-     add_custom_target(man DEPENDS ${MANPAGE_TARGETS} VERBATIM)
- endif()
- 
--if(ENABLE_INSTALL)
--    install(FILES osm2pgsql.1 DESTINATION share/man/man1)
--    install(FILES osm2pgsql-replication.1 DESTINATION share/man/man1)
--endif()
-+install(FILES osm2pgsql.1 DESTINATION man/man1)
-+install(FILES osm2pgsql-replication.1 DESTINATION man/man1)
Index: patches/patch-docs_osm2pgsql_1
===================================================================
RCS file: patches/patch-docs_osm2pgsql_1
diff -N patches/patch-docs_osm2pgsql_1
--- patches/patch-docs_osm2pgsql_1      2 Apr 2023 10:08:25 -0000       1.7
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-Index: docs/osm2pgsql.1
---- docs/osm2pgsql.1.orig
-+++ docs/osm2pgsql.1
-@@ -154,7 +154,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[V]shared_buffers\f[R] given in its
- configuration.
--Defaults to 800.
-+Defaults to 100.
- .TP
- --cache-strategy=STRATEGY
- This deprecated option will be ignored.
-@@ -213,7 +213,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[R] output, the default is
--\f[V]/usr/share/osm2pgsql/default.style\f[R], for other outputs there is
-+\f[V]${TRUEPREFIX}/share/osm2pgsql/default.style\f[R], for other outputs 
there is
- no default.)
- .SH PGSQL OUTPUT OPTIONS
- .TP
Index: patches/patch-man_CMakeLists_txt
===================================================================
RCS file: patches/patch-man_CMakeLists_txt
diff -N patches/patch-man_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-man_CMakeLists_txt    24 Nov 2023 02:15:53 -0000
@@ -0,0 +1,16 @@
+Index: man/CMakeLists.txt
+--- man/CMakeLists.txt.orig
++++ man/CMakeLists.txt
+@@ -62,9 +62,9 @@ if(MANPAGE_TARGETS)
+ endif()
+ 
+ if(ENABLE_INSTALL)
+-    install(FILES osm2pgsql.1 DESTINATION share/man/man1)
+-    install(FILES osm2pgsql-replication.1 DESTINATION share/man/man1)
++    install(FILES osm2pgsql.1 DESTINATION man/man1)
++    install(FILES osm2pgsql-replication.1 DESTINATION man/man1)
+     if (BUILD_GEN)
+-        install(FILES osm2pgsql-gen.1 COMPONENT gen EXCLUDE_FROM_ALL 
DESTINATION share/man/man1)
++        install(FILES osm2pgsql-gen.1 COMPONENT gen EXCLUDE_FROM_ALL 
DESTINATION man/man1)
+     endif()
+ endif()
Index: patches/patch-man_osm2pgsql_1
===================================================================
RCS file: patches/patch-man_osm2pgsql_1
diff -N patches/patch-man_osm2pgsql_1
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-man_osm2pgsql_1       24 Nov 2023 02:15:53 -0000
@@ -0,0 +1,21 @@
+Index: man/osm2pgsql.1
+--- man/osm2pgsql.1.orig
++++ man/osm2pgsql.1
+@@ -160,7 +160,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[V]shared_buffers\f[R] given in its
+ configuration.
+-Defaults to 800.
++Defaults to 100.
+ .TP
+ --cache-strategy=STRATEGY
+ This deprecated option will be ignored.
+@@ -239,7 +239,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[R] output, the default is
+-\f[V]/usr/share/osm2pgsql/default.style\f[R], for other outputs there is
++\f[V]${TRUEPREFIX}/share/osm2pgsql/default.style\f[R], for other outputs 
there is
+ no default.)
+ .SH PGSQL OUTPUT OPTIONS
+ .TP
Index: patches/patch-src_options_cpp
===================================================================
RCS file: patches/patch-src_options_cpp
diff -N patches/patch-src_options_cpp
--- patches/patch-src_options_cpp       11 Sep 2022 10:31:12 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-Index: src/options.cpp
---- src/options.cpp.orig
-+++ src/options.cpp
-@@ -137,7 +137,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\
--    -C|--cache=SIZE  Use up to SIZE MB for caching nodes (default: 800).\n\
-+    -C|--cache=SIZE  Use up to SIZE MB for caching nodes (default: 100).\n\
-     -F|--flat-nodes=FILE  Specifies the file to use to persistently store 
node\n\
-                     information in slim mode instead of in PostgreSQL.\n\
-                     This is a single large file (> 50GB). Only recommended\n\
Index: patches/patch-src_options_hpp
===================================================================
RCS file: /cvs/ports/geo/osm2pgsql/patches/patch-src_options_hpp,v
retrieving revision 1.5
diff -u -p -r1.5 patch-src_options_hpp
--- patches/patch-src_options_hpp       2 Apr 2023 10:08:25 -0000       1.5
+++ patches/patch-src_options_hpp       24 Nov 2023 02:15:53 -0000
@@ -1,12 +1,12 @@
 Index: src/options.hpp
 --- src/options.hpp.orig
 +++ src/options.hpp
-@@ -144,7 +144,7 @@ class options_t (public)
+@@ -112,7 +112,7 @@ struct options_t
      /// Minimum zoom level for tile expiry list
      uint32_t expire_tiles_zoom_min = 0;
  
 -    int cache = 800; ///< Memory usable for cache in MB
 +    int cache = 100; ///< Memory usable for cache in MB
  
-     unsigned int num_procs;
+     unsigned int num_procs = 1;
  

Reply via email to