summaryrefslogtreecommitdiff
path: root/dev-libs/kosmindoormap/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-08-21 21:44:48 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-08-21 21:44:48 +0100
commitd51fe7680c5270ddf8d324bbe11caab6d1e27ade (patch)
treea895b5889d79dbbb9aa52995fcac4816acfa07c1 /dev-libs/kosmindoormap/files
parent7d52991b5dce3a07be15d3cbbf06abb3fc08cb9c (diff)
gentoo auto-resync : 21:08:2023 - 21:44:47
Diffstat (limited to 'dev-libs/kosmindoormap/files')
-rw-r--r--dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-1.patch31
-rw-r--r--dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-2.patch35
2 files changed, 66 insertions, 0 deletions
diff --git a/dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-1.patch b/dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-1.patch
new file mode 100644
index 000000000000..427abde08a81
--- /dev/null
+++ b/dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-1.patch
@@ -0,0 +1,31 @@
+From eac8c57528b5ef8e694df4072ed7a60be799c270 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Wed, 5 Jul 2023 16:16:02 +0200
+Subject: [PATCH] Use protobuf's cmake config if available
+
+---
+ CMakeLists.txt | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 466c9add..da9881cd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -73,7 +73,13 @@ find_package(BISON REQUIRED)
+ set_package_properties(BISON PROPERTIES PURPOSE "MapCSS parser for indoor map rendering.")
+
+ if (NOT WIN32)
+- find_package(Protobuf)
++ # try upstream cmake config first
++ set(protobuf_MODULE_COMPATIBLE ON)
++ find_package(Protobuf CONFIG)
++ if(NOT Protobuf_FOUND)
++ # fall back to cmake's protobuf module
++ find_package(Protobuf)
++ endif()
+ set_package_properties(Protobuf PROPERTIES TYPE OPTIONAL PURPOSE "Parsing of OSM PBF files.")
+ endif()
+
+--
+GitLab
+
diff --git a/dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-2.patch b/dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-2.patch
new file mode 100644
index 000000000000..965a8a9d82de
--- /dev/null
+++ b/dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-2.patch
@@ -0,0 +1,35 @@
+From 6dfceab2bacef67ea27b4d1045100b6e0d2be430 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Wed, 5 Jul 2023 14:00:29 +0200
+Subject: [PATCH] Use protobuf cmake targets instead of variables
+
+Makes it compatible with protobuf's upstream cmake config, which is required for protobuf>=22 as the cmake provided module is broken with it.
+---
+ src/osm/io/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/osm/io/CMakeLists.txt b/src/osm/io/CMakeLists.txt
+index bf1d02c9..ec95f7e5 100644
+--- a/src/osm/io/CMakeLists.txt
++++ b/src/osm/io/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ # SPDX-FileCopyrightText: 2020-2022 Volker Krause <vkrause@kde.org>
+ # SPDX-License-Identifier: BSD-2-Clause
+
+-if (Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE)
++if (Protobuf_FOUND AND TARGET protobuf::protoc)
+ PROTOBUF_GENERATE_CPP(pbf_srcs pbf_hdrs
+ ../pbf/fileformat.proto
+ ../pbf/osmformat.proto
+@@ -19,7 +19,7 @@ if (Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE)
+ set_target_properties(KOSM_pbfioplugin PROPERTIES POSITION_INDEPENDENT_CODE ON)
+ target_link_libraries(KOSM_pbfioplugin
+ PUBLIC KOSM
+- PRIVATE ${Protobuf_LIBRARIES} ZLIB::ZLIB
++ PRIVATE protobuf::libprotobuf ZLIB::ZLIB
+ )
+ endif()
+
+--
+GitLab
+