Hi, here's an update to libosmium 2.16.0, which doesnt need proj anymore.
all tests but the one involving gzip pass, i dunno what do to about this crap. (an update to osm2pgsql will also require a recent libosmium) Landry
Index: Makefile =================================================================== RCS file: /cvs/ports/geo/libosmium/Makefile,v retrieving revision 1.4 diff -u -r1.4 Makefile --- Makefile 12 Jul 2019 20:46:29 -0000 1.4 +++ Makefile 2 Mar 2021 16:23:44 -0000 @@ -4,8 +4,7 @@ GH_ACCOUNT = osmcode GH_PROJECT = libosmium -GH_TAGNAME = v2.14.0 -REVISION = 0 +GH_TAGNAME = v2.16.0 CATEGORIES = geo @@ -19,14 +18,10 @@ MODULES = devel/cmake BUILD_DEPENDS = devel/boost \ devel/cppcheck \ - devel/proj \ devel/protozero \ devel/sparsehash \ geo/gdal \ geo/geos - -# https://github.com/osmcode/libosmium/issues/277 -CXXFLAGS+=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1 # include/osmium/io/detail/opl_parser_functions.hpp # #include <utf8.h> Index: distinfo =================================================================== RCS file: /cvs/ports/geo/libosmium/distinfo,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 distinfo --- distinfo 5 Jul 2018 05:17:52 -0000 1.1.1.1 +++ distinfo 2 Mar 2021 16:23:44 -0000 @@ -1,2 +1,2 @@ -SHA256 (libosmium-2.14.0.tar.gz) = rDhcE7GYnPYPny4DlanY9z6lV/voo1yrsOXwt0z0O0k= -SIZE (libosmium-2.14.0.tar.gz) = 489137 +SHA256 (libosmium-2.16.0.tar.gz) = QrvvlyJtfbfOPutHRgPlsfLw+GzshUmIaOlBbnzfW9U= +SIZE (libosmium-2.16.0.tar.gz) = 508536 Index: patches/patch-include_osmium_io_bzip2_compression_hpp =================================================================== RCS file: patches/patch-include_osmium_io_bzip2_compression_hpp diff -N patches/patch-include_osmium_io_bzip2_compression_hpp --- patches/patch-include_osmium_io_bzip2_compression_hpp 5 Jul 2018 05:17:52 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-include_osmium_io_bzip2_compression_hpp,v 1.1.1.1 2018/07/05 05:17:52 bentley Exp $ -From upstream 07985a68e49dec0c541b799656dbde77f4c05ab5. -Index: include/osmium/io/bzip2_compression.hpp ---- include/osmium/io/bzip2_compression.hpp.orig -+++ include/osmium/io/bzip2_compression.hpp -@@ -148,7 +148,7 @@ namespace osmium { - m_bzfile = nullptr; - if (m_file) { - if (do_fsync()) { -- osmium::io::detail::reliable_fsync(::fileno(m_file)); -+ osmium::io::detail::reliable_fsync(fileno(m_file)); - } - if (fclose(m_file) != 0) { - throw std::system_error{errno, std::system_category(), "Close failed"}; Index: patches/patch-include_osmium_io_gzip_compression_hpp =================================================================== RCS file: patches/patch-include_osmium_io_gzip_compression_hpp diff -N patches/patch-include_osmium_io_gzip_compression_hpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-include_osmium_io_gzip_compression_hpp 2 Mar 2021 16:23:44 -0000 @@ -0,0 +1,23 @@ +$OpenBSD$ + +Index: include/osmium/io/gzip_compression.hpp +--- include/osmium/io/gzip_compression.hpp.orig ++++ include/osmium/io/gzip_compression.hpp +@@ -155,7 +155,7 @@ namespace osmium { + #ifdef _MSC_VER + osmium::detail::disable_invalid_parameter_handler diph; + #endif +- const int result = ::gzclose_w(m_gzfile); ++ const int result = ::gzclose(m_gzfile); + m_gzfile = nullptr; + if (result != Z_OK) { + throw gzip_error{"gzip error: write close failed", result}; +@@ -238,7 +238,7 @@ namespace osmium { + #ifdef _MSC_VER + osmium::detail::disable_invalid_parameter_handler diph; + #endif +- const int result = ::gzclose_r(m_gzfile); ++ const int result = ::gzclose(m_gzfile); + m_gzfile = nullptr; + if (result != Z_OK) { + throw gzip_error{"gzip error: read close failed", result}; Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/geo/libosmium/pkg/PLIST,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 PLIST --- pkg/PLIST 5 Jul 2018 05:17:52 -0000 1.1.1.1 +++ pkg/PLIST 2 Mar 2021 16:23:44 -0000 @@ -101,6 +101,7 @@ include/osmium/io/detail/ include/osmium/io/detail/debug_output_format.hpp include/osmium/io/detail/input_format.hpp +include/osmium/io/detail/lz4.hpp include/osmium/io/detail/o5m_input_format.hpp include/osmium/io/detail/opl_input_format.hpp include/osmium/io/detail/opl_output_format.hpp @@ -132,6 +133,7 @@ include/osmium/io/opl_output.hpp include/osmium/io/output_iterator.hpp include/osmium/io/overwrite.hpp +include/osmium/io/pbf.hpp include/osmium/io/pbf_input.hpp include/osmium/io/pbf_output.hpp include/osmium/io/reader.hpp @@ -155,6 +157,7 @@ include/osmium/osm/box.hpp include/osmium/osm/changeset.hpp include/osmium/osm/crc.hpp +include/osmium/osm/crc_zlib.hpp include/osmium/osm/diff_object.hpp include/osmium/osm/entity.hpp include/osmium/osm/entity_bits.hpp