mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-17 04:37:19 +00:00
c0e52930a9
Below changes are done for upgrading minifi-cpp from 0.99.1 to 0.99.2. Updated below patches: 0001-Do-not-use-bundled-packages.patch 0003-Fix-libsodium-build.patch Removed below patch for it is available in new version: 0008-MINIFICPP-2553-CMP0065-OLD-removed-in-cmake-4.0-remo.patch Updated third-party components' versions to be aligned with new version's release note: expected-lite 0.6.3->0.9.0 asio 1.29.0->1.34.2 fmt 11.1.4->11.2.0 Added new third-party component: jsoncons 1.3.2. Added DEPENDS on pugixml 1.15 (use the version provided by system). Added new configs to disable unnecessary third-party components. Aligned file names and installation paths with new version 0.99.2. Correct LICENSE. ChangeLog: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=65145325 License-Update: Added BSL-1.0 (jsoncons) and fixed typo in concurrentqueue description. [1] Removed TinyXml2 (Zlib license) from LICENSE and Zlib license is needed by other bundled components. [2] No new license type. Changed protobuf from "within gRPC" to standalone bundling. [3] Added MIT license (llama.cpp). [4] Added benchmark (ALv2) to LICENSE/NOTICE. No new license since Apache-2.0 already present. [5] [1] https://github.com/apache/nifi-minifi-cpp/commit/e25a247a4 [2] https://github.com/apache/nifi-minifi-cpp/commit/f28961cfb [3] https://github.com/apache/nifi-minifi-cpp/commit/97087b22e [4] https://github.com/apache/nifi-minifi-cpp/commit/8602b76d2 [5] https://github.com/apache/nifi-minifi-cpp/commit/54a643c72 Signed-off-by: Li Zhou <li.zhou@windriver.com> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
245 lines
9.1 KiB
Diff
245 lines
9.1 KiB
Diff
From ff886f41c471a4b7d97a5a4473727a8b1d8ba2bb Mon Sep 17 00:00:00 2001
|
|
From: Yi Zhao <yi.zhao@windriver.com>
|
|
Date: Tue, 19 Mar 2024 19:39:04 +0800
|
|
Subject: [PATCH] Do not use bundled packages
|
|
|
|
Use external dependencies for openssl, curl, bzip2, zlib, libarchive,
|
|
xz, yaml-cpp and libxml2.
|
|
|
|
Upstream-Status: Inappropriate [embedded specific]
|
|
|
|
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
|
|
[lz: When upgrading from 0.99.1 to 0.99.2:
|
|
adapted the patch for context changes;
|
|
added using external dependencies for pugixml.]
|
|
Signed-off-by: Li Zhou <li.zhou@windriver.com>
|
|
---
|
|
CMakeLists.txt | 3 +--
|
|
cmake/GetBZip2.cmake | 3 +++
|
|
cmake/GetCatch2.cmake | 4 ++++
|
|
cmake/GetCivetWeb.cmake | 3 +++
|
|
cmake/GetFmt.cmake | 3 +++
|
|
cmake/GetLibCURL.cmake | 3 +++
|
|
cmake/GetLibXml2.cmake | 3 +++
|
|
cmake/GetOpenSSL.cmake | 3 +++
|
|
cmake/GetRocksDB.cmake | 4 ++++
|
|
cmake/GetSpdlog.cmake | 4 ++++
|
|
cmake/GetZLIB.cmake | 3 +++
|
|
cmake/GetZstd.cmake | 4 ++++
|
|
cmake/PugiXml.cmake | 20 ++++++++++++--------
|
|
extensions/libarchive/CMakeLists.txt | 6 ++----
|
|
14 files changed, 52 insertions(+), 14 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 5cf1c4e5f..36aee1508 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -285,8 +285,7 @@ include(GetSpdlog)
|
|
get_spdlog()
|
|
|
|
# yaml-cpp
|
|
-include(BundledYamlCpp)
|
|
-use_bundled_yamlcpp(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
|
+find_package(yaml-cpp REQUIRED)
|
|
|
|
# concurrentqueue
|
|
add_library(concurrentqueue INTERFACE)
|
|
diff --git a/cmake/GetBZip2.cmake b/cmake/GetBZip2.cmake
|
|
index 2a7d47e9e..754122895 100644
|
|
--- a/cmake/GetBZip2.cmake
|
|
+++ b/cmake/GetBZip2.cmake
|
|
@@ -23,5 +23,8 @@ function(get_bzip2 SOURCE_DIR BINARY_DIR)
|
|
message("Using CMake to build bzip2 from source")
|
|
include(BundledBZip2)
|
|
use_bundled_bzip2(${SOURCE_DIR} ${BINARY_DIR})
|
|
+ elseif(MINIFI_BZIP2_SOURCE STREQUAL "SYSTEM")
|
|
+ message("Using bzip2 provided by system")
|
|
+ find_package(BZip2 REQUIRED)
|
|
endif()
|
|
endfunction(get_bzip2)
|
|
diff --git a/cmake/GetCatch2.cmake b/cmake/GetCatch2.cmake
|
|
index d6c1d6acc..ec11b0a77 100644
|
|
--- a/cmake/GetCatch2.cmake
|
|
+++ b/cmake/GetCatch2.cmake
|
|
@@ -23,5 +23,9 @@ function(get_catch2)
|
|
elseif(MINIFI_CATCH2_SOURCE STREQUAL "BUILD")
|
|
message("Using CMake to build Catch2 from source")
|
|
include(Catch2)
|
|
+ elseif(MINIFI_CATCH2_SOURCE STREQUAL "SYSTEM")
|
|
+ message("Using Catch2 provided by system")
|
|
+ find_package(Catch2 REQUIRED)
|
|
+ add_library(Catch2WithMain ALIAS Catch2::Catch2WithMain)
|
|
endif()
|
|
endfunction(get_catch2)
|
|
diff --git a/cmake/GetCivetWeb.cmake b/cmake/GetCivetWeb.cmake
|
|
index f30d22289..8fc39a0e2 100644
|
|
--- a/cmake/GetCivetWeb.cmake
|
|
+++ b/cmake/GetCivetWeb.cmake
|
|
@@ -22,5 +22,8 @@ function(get_civetweb)
|
|
elseif(MINIFI_CIVETWEB_SOURCE STREQUAL "BUILD")
|
|
message("Using CMake to build CivetWeb from source")
|
|
include(CivetWeb)
|
|
+ elseif(MINIFI_CIVETWEB_SOURCE STREQUAL "SYSTEM")
|
|
+ message("Using CivetWeb provided by system")
|
|
+ find_package(civetweb REQUIRED)
|
|
endif()
|
|
endfunction(get_civetweb)
|
|
diff --git a/cmake/GetFmt.cmake b/cmake/GetFmt.cmake
|
|
index f4f28458d..579a63897 100644
|
|
--- a/cmake/GetFmt.cmake
|
|
+++ b/cmake/GetFmt.cmake
|
|
@@ -22,5 +22,8 @@ function(get_fmt)
|
|
elseif(MINIFI_FMT_SOURCE STREQUAL "BUILD")
|
|
message("Using CMake to build Fmt from source")
|
|
include(fmt)
|
|
+ elseif(MINIFI_FMT_SOURCE STREQUAL "SYSTEM")
|
|
+ message("Using Fmt provided by system")
|
|
+ find_package(fmt REQUIRED)
|
|
endif()
|
|
endfunction(get_fmt)
|
|
diff --git a/cmake/GetLibCURL.cmake b/cmake/GetLibCURL.cmake
|
|
index afd38f3c9..0eac59ec4 100644
|
|
--- a/cmake/GetLibCURL.cmake
|
|
+++ b/cmake/GetLibCURL.cmake
|
|
@@ -23,5 +23,8 @@ function(get_curl SOURCE_DIR BINARY_DIR)
|
|
message("Using CMake to build libcurl from source")
|
|
include(BundledLibcURL)
|
|
use_bundled_curl(${SOURCE_DIR} ${BINARY_DIR})
|
|
+ elseif(MINIFI_LIBCURL_SOURCE STREQUAL "SYSTEM")
|
|
+ message("Using libcurl provided by system")
|
|
+ find_package(CURL REQUIRED)
|
|
endif()
|
|
endfunction(get_curl SOURCE_DIR BINARY_DIR)
|
|
diff --git a/cmake/GetLibXml2.cmake b/cmake/GetLibXml2.cmake
|
|
index 2a6c618f6..093b57a4b 100644
|
|
--- a/cmake/GetLibXml2.cmake
|
|
+++ b/cmake/GetLibXml2.cmake
|
|
@@ -22,5 +22,8 @@ function(get_libxml2 SOURCE_DIR BINARY_DIR)
|
|
elseif(MINIFI_LIBXML2_SOURCE STREQUAL "BUILD")
|
|
message("Using CMake to build libxml2 from source")
|
|
include(LibXml2)
|
|
+ elseif(MINIFI_LIBXML2_SOURCE STREQUAL "SYSTEM")
|
|
+ message("Using libxml2 provided by system")
|
|
+ find_package(libxml2 REQUIRED)
|
|
endif()
|
|
endfunction(get_libxml2)
|
|
diff --git a/cmake/GetOpenSSL.cmake b/cmake/GetOpenSSL.cmake
|
|
index 58132c6bf..2b142f94e 100644
|
|
--- a/cmake/GetOpenSSL.cmake
|
|
+++ b/cmake/GetOpenSSL.cmake
|
|
@@ -23,5 +23,8 @@ function(get_openssl SOURCE_DIR BINARY_DIR)
|
|
message("Using CMake to build OpenSSL from source")
|
|
include(BundledOpenSSL)
|
|
use_openssl(${SOURCE_DIR} ${BINARY_DIR})
|
|
+ elseif(MINIFI_OPENSSL_SOURCE STREQUAL "SYSTEM")
|
|
+ message("Using OpenSSL provided by system")
|
|
+ find_package(OpenSSL REQUIRED)
|
|
endif()
|
|
endfunction(get_openssl)
|
|
diff --git a/cmake/GetRocksDB.cmake b/cmake/GetRocksDB.cmake
|
|
index 0968afc38..3ca1fe565 100644
|
|
--- a/cmake/GetRocksDB.cmake
|
|
+++ b/cmake/GetRocksDB.cmake
|
|
@@ -30,5 +30,9 @@ function(get_rocksdb SOURCE_DIR BINARY_DIR)
|
|
list(APPEND CMAKE_MODULE_PATH "${SOURCE_DIR}/cmake/rocksdb/sys")
|
|
find_package(RocksDB REQUIRED)
|
|
endif()
|
|
+ elseif(MINIFI_ROCKSDB_SOURCE STREQUAL "SYSTEM")
|
|
+ message("Using RocksDB provided by system")
|
|
+ list(APPEND CMAKE_MODULE_PATH "${SOURCE_DIR}/cmake/rocksdb/sys")
|
|
+ find_package(RocksDB REQUIRED)
|
|
endif()
|
|
endfunction(get_rocksdb SOURCE_DIR BINARY_DIR)
|
|
diff --git a/cmake/GetSpdlog.cmake b/cmake/GetSpdlog.cmake
|
|
index 9fe3b9c46..60f5c01d7 100644
|
|
--- a/cmake/GetSpdlog.cmake
|
|
+++ b/cmake/GetSpdlog.cmake
|
|
@@ -32,5 +32,9 @@ function(get_spdlog)
|
|
elseif(MINIFI_SPDLOG_SOURCE STREQUAL "BUILD")
|
|
message("Using CMake to build spdlog from source")
|
|
include(Spdlog)
|
|
+ elseif(MINIFI_SPDLOG_SOURCE STREQUAL "SYSTEM")
|
|
+ message("Using spdlog provided by system")
|
|
+ find_package(spdlog REQUIRED)
|
|
+ add_library(spdlog ALIAS spdlog::spdlog)
|
|
endif()
|
|
endfunction(get_spdlog)
|
|
diff --git a/cmake/GetZLIB.cmake b/cmake/GetZLIB.cmake
|
|
index 6e7bea1e3..c15e2246a 100644
|
|
--- a/cmake/GetZLIB.cmake
|
|
+++ b/cmake/GetZLIB.cmake
|
|
@@ -23,5 +23,8 @@ function(get_zlib SOURCE_DIR BINARY_DIR)
|
|
message("Using CMake to build zlib from source")
|
|
include(BundledZLIB)
|
|
use_bundled_zlib(${SOURCE_DIR} ${BINARY_DIR})
|
|
+ elseif(MINIFI_ZLIB_SOURCE STREQUAL "SYSTEM")
|
|
+ message("Using zlib provided by system")
|
|
+ find_package(ZLIB REQUIRED)
|
|
endif()
|
|
endfunction(get_zlib)
|
|
diff --git a/cmake/GetZstd.cmake b/cmake/GetZstd.cmake
|
|
index a0334b02d..0e7600c22 100644
|
|
--- a/cmake/GetZstd.cmake
|
|
+++ b/cmake/GetZstd.cmake
|
|
@@ -23,5 +23,9 @@ function(get_zstd)
|
|
elseif(MINIFI_ZSTD_SOURCE STREQUAL "BUILD")
|
|
message("Using CMake to build zstd from source")
|
|
include(Zstd)
|
|
+ elseif(MINIFI_ZSTD_SOURCE STREQUAL "SYSTEM")
|
|
+ message("Using zstd provided by system")
|
|
+ find_package(zstd REQUIRED)
|
|
+ add_library(zstd::zstd ALIAS zstd::libzstd_static)
|
|
endif()
|
|
endfunction(get_zstd)
|
|
diff --git a/cmake/PugiXml.cmake b/cmake/PugiXml.cmake
|
|
index ba5a4df38..7a1a72b9b 100644
|
|
--- a/cmake/PugiXml.cmake
|
|
+++ b/cmake/PugiXml.cmake
|
|
@@ -15,12 +15,16 @@
|
|
# specific language governing permissions and limitations
|
|
# under the License.
|
|
include(FetchContent)
|
|
+if(MINIFI_PUGIXML_SOURCE STREQUAL "SYSTEM")
|
|
+ message("Using pugixml provided by system")
|
|
+ find_package(PUGIXML REQUIRED)
|
|
+else()
|
|
+ set(PUGIXML_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
|
|
|
-set(PUGIXML_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
|
-
|
|
-FetchContent_Declare(
|
|
- pugixml
|
|
- URL https://github.com/zeux/pugixml/archive/refs/tags/v1.15.tar.gz
|
|
- URL_HASH SHA256=b39647064d9e28297a34278bfb897092bf33b7c487906ddfc094c9e8868bddcb
|
|
-)
|
|
-FetchContent_MakeAvailable(pugixml)
|
|
+ FetchContent_Declare(
|
|
+ pugixml
|
|
+ URL https://github.com/zeux/pugixml/archive/refs/tags/v1.15.tar.gz
|
|
+ URL_HASH SHA256=b39647064d9e28297a34278bfb897092bf33b7c487906ddfc094c9e8868bddcb
|
|
+ )
|
|
+ FetchContent_MakeAvailable(pugixml)
|
|
+endif()
|
|
diff --git a/extensions/libarchive/CMakeLists.txt b/extensions/libarchive/CMakeLists.txt
|
|
index 14b75dcc2..ad2b13c25 100644
|
|
--- a/extensions/libarchive/CMakeLists.txt
|
|
+++ b/extensions/libarchive/CMakeLists.txt
|
|
@@ -22,12 +22,10 @@ if (NOT ENABLE_LIBARCHIVE)
|
|
endif()
|
|
|
|
if (ENABLE_LZMA)
|
|
- include(LibLZMA)
|
|
- list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/liblzma/dummy")
|
|
+ find_package(LibLZMA REQUIRED)
|
|
endif()
|
|
|
|
-include(BundledLibArchive)
|
|
-use_bundled_libarchive(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
|
|
+find_package(LibArchive REQUIRED)
|
|
|
|
include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt)
|
|
|
|
--
|
|
2.34.1
|
|
|