git: 6d99ee848957 - main - converters/osm2pgsql: fix build after libfmt update
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 23 Dec 2022 18:43:36 UTC
The branch main has been updated by amdmi3:
URL: https://cgit.FreeBSD.org/ports/commit/?id=6d99ee8489575c90f0711189410eb21aa0cc5e76
commit 6d99ee8489575c90f0711189410eb21aa0cc5e76
Author: Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-12-23 18:43:22 +0000
Commit: Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-12-23 18:43:22 +0000
converters/osm2pgsql: fix build after libfmt update
---
converters/osm2pgsql/Makefile | 5 ++---
converters/osm2pgsql/files/patch-CMakeLists.txt | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/converters/osm2pgsql/Makefile b/converters/osm2pgsql/Makefile
index c237fcb0270f..ecb6cf1314c7 100644
--- a/converters/osm2pgsql/Makefile
+++ b/converters/osm2pgsql/Makefile
@@ -17,8 +17,7 @@ LIB_DEPENDS= libproj.so:graphics/proj \
libexpat.so:textproc/expat2
BUILD_DEPENDS= ${LOCALBASE}/include/osmium/version.hpp:astro/libosmium \
${LOCALBASE}/include/protozero/version.hpp:devel/protozero \
- ${LOCALBASE}/include/rapidjson/stringbuffer.h:devel/rapidjson \
- ${LOCALBASE}/include/fmt/core.h:devel/libfmt
+ ${LOCALBASE}/include/rapidjson/stringbuffer.h:devel/rapidjson
USE_GITHUB= yes
GH_ACCOUNT= openstreetmap
@@ -28,8 +27,8 @@ SHEBANG_FILES= scripts/osm2pgsql-replication
CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_Git \
EXTERNAL_LIBOSMIUM \
EXTERNAL_PROTOZERO \
- EXTERNAL_FMT \
EXTERNAL_RAPIDJSON
+# EXTERNAL_FMT # XXX: does not build with libfmt 9.x from ports, so use bundled version until upstream fixes
CMAKE_ARGS= -DLUA_EXE="${LOCALBASE}/bin/${LUA_CMD}"
PORTDOCS= AUTHORS CONTRIBUTING.md README.md
diff --git a/converters/osm2pgsql/files/patch-CMakeLists.txt b/converters/osm2pgsql/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..d94e7ed7a4b7
--- /dev/null
+++ b/converters/osm2pgsql/files/patch-CMakeLists.txt
@@ -0,0 +1,20 @@
+--- CMakeLists.txt.orig 2022-11-10 19:15:49 UTC
++++ CMakeLists.txt
+@@ -173,7 +173,7 @@ if (NOT EXTERNAL_PROTOZERO)
+ endif()
+
+ if (NOT EXTERNAL_FMT)
+- set(FMT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/contrib/fmt/include")
++ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/contrib/fmt/include")
+ endif()
+
+ if (NOT EXTERNAL_RAPIDJSON)
+@@ -183,7 +183,7 @@ endif()
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR})
+
+ find_package(Osmium 2.17.3 REQUIRED COMPONENTS io)
+-include_directories(SYSTEM ${OSMIUM_INCLUDE_DIRS} ${PROTOZERO_INCLUDE_DIR} ${FMT_INCLUDE_DIR} ${RAPIDJSON_INCLUDE_DIR})
++include_directories(SYSTEM ${OSMIUM_INCLUDE_DIRS} ${PROTOZERO_INCLUDE_DIR} ${RAPIDJSON_INCLUDE_DIR})
+
+ if (WITH_LUA)
+ if (WITH_LUAJIT)