diff options
Diffstat (limited to 'meta-oe/recipes-extended/minifi-cpp/files/0001-Do-not-use-bundled-packages.patch')
-rw-r--r-- | meta-oe/recipes-extended/minifi-cpp/files/0001-Do-not-use-bundled-packages.patch | 238 |
1 files changed, 170 insertions, 68 deletions
diff --git a/meta-oe/recipes-extended/minifi-cpp/files/0001-Do-not-use-bundled-packages.patch b/meta-oe/recipes-extended/minifi-cpp/files/0001-Do-not-use-bundled-packages.patch index b997d6ce7d..68fd1ee3e0 100644 --- a/meta-oe/recipes-extended/minifi-cpp/files/0001-Do-not-use-bundled-packages.patch +++ b/meta-oe/recipes-extended/minifi-cpp/files/0001-Do-not-use-bundled-packages.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 65923a872e44cb461ef1a03374057351f0bc5efe Mon Sep 17 00:00:00 2001 | 1 | From 4952f03d150770ff06f9a12ff42d8de680407649 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Tue, 19 Mar 2024 19:39:04 +0800 | 3 | Date: Tue, 19 Mar 2024 19:39:04 +0800 |
4 | Subject: [PATCH] Do not use bundled packages | 4 | Subject: [PATCH] Do not use bundled packages |
@@ -10,60 +10,27 @@ Upstream-Status: Inappropriate [embedded specific] | |||
10 | 10 | ||
11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | 11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
12 | --- | 12 | --- |
13 | CMakeLists.txt | 23 ++++++----------------- | 13 | CMakeLists.txt | 3 +-- |
14 | extensions/libarchive/CMakeLists.txt | 7 ++----- | 14 | cmake/GetBZip2.cmake | 3 +++ |
15 | 2 files changed, 8 insertions(+), 22 deletions(-) | 15 | cmake/GetCatch2.cmake | 4 ++++ |
16 | cmake/GetCivetWeb.cmake | 3 +++ | ||
17 | cmake/GetFmt.cmake | 3 +++ | ||
18 | cmake/GetLibCURL.cmake | 3 +++ | ||
19 | cmake/GetLibXml2.cmake | 3 +++ | ||
20 | cmake/GetOpenSSL.cmake | 3 +++ | ||
21 | cmake/GetRocksDB.cmake | 4 ++++ | ||
22 | cmake/GetSpdlog.cmake | 4 ++++ | ||
23 | cmake/GetZLIB.cmake | 3 +++ | ||
24 | cmake/GetZstd.cmake | 4 ++++ | ||
25 | extensions/libarchive/CMakeLists.txt | 6 ++---- | ||
26 | 13 files changed, 40 insertions(+), 6 deletions(-) | ||
16 | 27 | ||
17 | diff --git a/CMakeLists.txt b/CMakeLists.txt | 28 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
18 | index 13a2b992..8a1dd6d9 100644 | 29 | index 50e31d871..fc1718dfd 100644 |
19 | --- a/CMakeLists.txt | 30 | --- a/CMakeLists.txt |
20 | +++ b/CMakeLists.txt | 31 | +++ b/CMakeLists.txt |
21 | @@ -222,9 +222,7 @@ else() | 32 | @@ -265,8 +265,7 @@ include(GetSpdlog) |
22 | endif() | 33 | get_spdlog() |
23 | |||
24 | if (NOT DISABLE_BZIP2 AND (NOT DISABLE_LIBARCHIVE OR (NOT DISABLE_ROCKSDB AND NOT WIN32))) | ||
25 | - include(BundledBZip2) | ||
26 | - use_bundled_bzip2(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) | ||
27 | - list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/bzip2/dummy") | ||
28 | + find_package(BZip2 REQUIRED) | ||
29 | endif() | ||
30 | |||
31 | if(NOT WIN32) | ||
32 | @@ -247,9 +245,7 @@ endif() | ||
33 | |||
34 | # OpenSSL | ||
35 | if (NOT OPENSSL_OFF) | ||
36 | - include(BundledOpenSSL) | ||
37 | - use_openssl("${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}") | ||
38 | - list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/ssl") | ||
39 | + find_package(OpenSSL REQUIRED) | ||
40 | |||
41 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENSSL_SUPPORT") | ||
42 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL_SUPPORT") | ||
43 | @@ -262,9 +258,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSODIUM_STATIC=1") | ||
44 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSODIUM_STATIC=1") | ||
45 | |||
46 | # zlib | ||
47 | -include(BundledZLIB) | ||
48 | -use_bundled_zlib(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) | ||
49 | -list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/zlib/dummy") | ||
50 | +find_package(ZLIB REQUIRED) | ||
51 | |||
52 | # uthash | ||
53 | add_library(ut INTERFACE) | ||
54 | @@ -272,9 +266,7 @@ target_include_directories(ut SYSTEM INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/thir | ||
55 | |||
56 | # cURL | ||
57 | if(NOT DISABLE_CURL) | ||
58 | - include(BundledLibcURL) | ||
59 | - use_bundled_curl(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) | ||
60 | - list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/curl/dummy") | ||
61 | + find_package(CURL REQUIRED) | ||
62 | else() | ||
63 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDISABLE_CURL") | ||
64 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDISABLE_CURL") | ||
65 | @@ -285,8 +277,7 @@ include(BundledSpdlog) | ||
66 | use_bundled_spdlog(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) | ||
67 | 34 | ||
68 | # yaml-cpp | 35 | # yaml-cpp |
69 | -include(BundledYamlCpp) | 36 | -include(BundledYamlCpp) |
@@ -72,27 +39,162 @@ index 13a2b992..8a1dd6d9 100644 | |||
72 | 39 | ||
73 | # concurrentqueue | 40 | # concurrentqueue |
74 | add_library(concurrentqueue INTERFACE) | 41 | add_library(concurrentqueue INTERFACE) |
75 | @@ -357,9 +348,7 @@ include(Extensions) | 42 | diff --git a/cmake/GetBZip2.cmake b/cmake/GetBZip2.cmake |
76 | add_subdirectory(libminifi) | 43 | index 2a7d47e9e..754122895 100644 |
77 | 44 | --- a/cmake/GetBZip2.cmake | |
78 | if ((ENABLE_OPENWSMAN AND NOT DISABLE_CIVET AND NOT DISABLE_CURL) OR ENABLE_ALL OR ENABLE_AZURE) | 45 | +++ b/cmake/GetBZip2.cmake |
79 | - include(BundledLibXml2) | 46 | @@ -23,5 +23,8 @@ function(get_bzip2 SOURCE_DIR BINARY_DIR) |
80 | - use_bundled_libxml2(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) | 47 | message("Using CMake to build bzip2 from source") |
81 | - list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/libxml2/dummy") | 48 | include(BundledBZip2) |
82 | + find_package(LibXml2 REQUIRED) | 49 | use_bundled_bzip2(${SOURCE_DIR} ${BINARY_DIR}) |
83 | endif() | 50 | + elseif(MINIFI_BZIP2_SOURCE STREQUAL "SYSTEM") |
84 | 51 | + message("Using bzip2 provided by system") | |
85 | if (ENABLE_ALL OR ENABLE_PROMETHEUS OR NOT DISABLE_CIVET) | 52 | + find_package(BZip2 REQUIRED) |
53 | endif() | ||
54 | endfunction(get_bzip2) | ||
55 | diff --git a/cmake/GetCatch2.cmake b/cmake/GetCatch2.cmake | ||
56 | index d6c1d6acc..ec11b0a77 100644 | ||
57 | --- a/cmake/GetCatch2.cmake | ||
58 | +++ b/cmake/GetCatch2.cmake | ||
59 | @@ -23,5 +23,9 @@ function(get_catch2) | ||
60 | elseif(MINIFI_CATCH2_SOURCE STREQUAL "BUILD") | ||
61 | message("Using CMake to build Catch2 from source") | ||
62 | include(Catch2) | ||
63 | + elseif(MINIFI_CATCH2_SOURCE STREQUAL "SYSTEM") | ||
64 | + message("Using Catch2 provided by system") | ||
65 | + find_package(Catch2 REQUIRED) | ||
66 | + add_library(Catch2WithMain ALIAS Catch2::Catch2WithMain) | ||
67 | endif() | ||
68 | endfunction(get_catch2) | ||
69 | diff --git a/cmake/GetCivetWeb.cmake b/cmake/GetCivetWeb.cmake | ||
70 | index f30d22289..8fc39a0e2 100644 | ||
71 | --- a/cmake/GetCivetWeb.cmake | ||
72 | +++ b/cmake/GetCivetWeb.cmake | ||
73 | @@ -22,5 +22,8 @@ function(get_civetweb) | ||
74 | elseif(MINIFI_CIVETWEB_SOURCE STREQUAL "BUILD") | ||
75 | message("Using CMake to build CivetWeb from source") | ||
76 | include(CivetWeb) | ||
77 | + elseif(MINIFI_CIVETWEB_SOURCE STREQUAL "SYSTEM") | ||
78 | + message("Using CivetWeb provided by system") | ||
79 | + find_package(civetweb REQUIRED) | ||
80 | endif() | ||
81 | endfunction(get_civetweb) | ||
82 | diff --git a/cmake/GetFmt.cmake b/cmake/GetFmt.cmake | ||
83 | index f4f28458d..579a63897 100644 | ||
84 | --- a/cmake/GetFmt.cmake | ||
85 | +++ b/cmake/GetFmt.cmake | ||
86 | @@ -22,5 +22,8 @@ function(get_fmt) | ||
87 | elseif(MINIFI_FMT_SOURCE STREQUAL "BUILD") | ||
88 | message("Using CMake to build Fmt from source") | ||
89 | include(fmt) | ||
90 | + elseif(MINIFI_FMT_SOURCE STREQUAL "SYSTEM") | ||
91 | + message("Using Fmt provided by system") | ||
92 | + find_package(fmt REQUIRED) | ||
93 | endif() | ||
94 | endfunction(get_fmt) | ||
95 | diff --git a/cmake/GetLibCURL.cmake b/cmake/GetLibCURL.cmake | ||
96 | index afd38f3c9..0eac59ec4 100644 | ||
97 | --- a/cmake/GetLibCURL.cmake | ||
98 | +++ b/cmake/GetLibCURL.cmake | ||
99 | @@ -23,5 +23,8 @@ function(get_curl SOURCE_DIR BINARY_DIR) | ||
100 | message("Using CMake to build libcurl from source") | ||
101 | include(BundledLibcURL) | ||
102 | use_bundled_curl(${SOURCE_DIR} ${BINARY_DIR}) | ||
103 | + elseif(MINIFI_LIBCURL_SOURCE STREQUAL "SYSTEM") | ||
104 | + message("Using libcurl provided by system") | ||
105 | + find_package(CURL REQUIRED) | ||
106 | endif() | ||
107 | endfunction(get_curl SOURCE_DIR BINARY_DIR) | ||
108 | diff --git a/cmake/GetLibXml2.cmake b/cmake/GetLibXml2.cmake | ||
109 | index 5915b117d..18048715d 100644 | ||
110 | --- a/cmake/GetLibXml2.cmake | ||
111 | +++ b/cmake/GetLibXml2.cmake | ||
112 | @@ -23,5 +23,8 @@ function(get_libxml2 SOURCE_DIR BINARY_DIR) | ||
113 | message("Using CMake to build libxml2 from source") | ||
114 | include(BundledLibXml2) | ||
115 | use_bundled_libxml2(${SOURCE_DIR} ${BINARY_DIR}) | ||
116 | + elseif(MINIFI_LIBXML2_SOURCE STREQUAL "SYSTEM") | ||
117 | + message("Using libxml2 provided by system") | ||
118 | + find_package(libxml2 REQUIRED) | ||
119 | endif() | ||
120 | endfunction(get_libxml2) | ||
121 | diff --git a/cmake/GetOpenSSL.cmake b/cmake/GetOpenSSL.cmake | ||
122 | index 58132c6bf..2b142f94e 100644 | ||
123 | --- a/cmake/GetOpenSSL.cmake | ||
124 | +++ b/cmake/GetOpenSSL.cmake | ||
125 | @@ -23,5 +23,8 @@ function(get_openssl SOURCE_DIR BINARY_DIR) | ||
126 | message("Using CMake to build OpenSSL from source") | ||
127 | include(BundledOpenSSL) | ||
128 | use_openssl(${SOURCE_DIR} ${BINARY_DIR}) | ||
129 | + elseif(MINIFI_OPENSSL_SOURCE STREQUAL "SYSTEM") | ||
130 | + message("Using OpenSSL provided by system") | ||
131 | + find_package(OpenSSL REQUIRED) | ||
132 | endif() | ||
133 | endfunction(get_openssl) | ||
134 | diff --git a/cmake/GetRocksDB.cmake b/cmake/GetRocksDB.cmake | ||
135 | index 0968afc38..3ca1fe565 100644 | ||
136 | --- a/cmake/GetRocksDB.cmake | ||
137 | +++ b/cmake/GetRocksDB.cmake | ||
138 | @@ -30,5 +30,9 @@ function(get_rocksdb SOURCE_DIR BINARY_DIR) | ||
139 | list(APPEND CMAKE_MODULE_PATH "${SOURCE_DIR}/cmake/rocksdb/sys") | ||
140 | find_package(RocksDB REQUIRED) | ||
141 | endif() | ||
142 | + elseif(MINIFI_ROCKSDB_SOURCE STREQUAL "SYSTEM") | ||
143 | + message("Using RocksDB provided by system") | ||
144 | + list(APPEND CMAKE_MODULE_PATH "${SOURCE_DIR}/cmake/rocksdb/sys") | ||
145 | + find_package(RocksDB REQUIRED) | ||
146 | endif() | ||
147 | endfunction(get_rocksdb SOURCE_DIR BINARY_DIR) | ||
148 | diff --git a/cmake/GetSpdlog.cmake b/cmake/GetSpdlog.cmake | ||
149 | index 747894984..6255e31bf 100644 | ||
150 | --- a/cmake/GetSpdlog.cmake | ||
151 | +++ b/cmake/GetSpdlog.cmake | ||
152 | @@ -27,5 +27,9 @@ function(get_spdlog) | ||
153 | elseif(MINIFI_SPDLOG_SOURCE STREQUAL "BUILD") | ||
154 | message("Using CMake to build spdlog from source") | ||
155 | include(Spdlog) | ||
156 | + elseif(MINIFI_SPDLOG_SOURCE STREQUAL "SYSTEM") | ||
157 | + message("Using spdlog provided by system") | ||
158 | + find_package(spdlog REQUIRED) | ||
159 | + add_library(spdlog ALIAS spdlog::spdlog) | ||
160 | endif() | ||
161 | endfunction(get_spdlog) | ||
162 | diff --git a/cmake/GetZLIB.cmake b/cmake/GetZLIB.cmake | ||
163 | index 6e7bea1e3..c15e2246a 100644 | ||
164 | --- a/cmake/GetZLIB.cmake | ||
165 | +++ b/cmake/GetZLIB.cmake | ||
166 | @@ -23,5 +23,8 @@ function(get_zlib SOURCE_DIR BINARY_DIR) | ||
167 | message("Using CMake to build zlib from source") | ||
168 | include(BundledZLIB) | ||
169 | use_bundled_zlib(${SOURCE_DIR} ${BINARY_DIR}) | ||
170 | + elseif(MINIFI_ZLIB_SOURCE STREQUAL "SYSTEM") | ||
171 | + message("Using zlib provided by system") | ||
172 | + find_package(ZLIB REQUIRED) | ||
173 | endif() | ||
174 | endfunction(get_zlib) | ||
175 | diff --git a/cmake/GetZstd.cmake b/cmake/GetZstd.cmake | ||
176 | index a0334b02d..0e7600c22 100644 | ||
177 | --- a/cmake/GetZstd.cmake | ||
178 | +++ b/cmake/GetZstd.cmake | ||
179 | @@ -23,5 +23,9 @@ function(get_zstd) | ||
180 | elseif(MINIFI_ZSTD_SOURCE STREQUAL "BUILD") | ||
181 | message("Using CMake to build zstd from source") | ||
182 | include(Zstd) | ||
183 | + elseif(MINIFI_ZSTD_SOURCE STREQUAL "SYSTEM") | ||
184 | + message("Using zstd provided by system") | ||
185 | + find_package(zstd REQUIRED) | ||
186 | + add_library(zstd::zstd ALIAS zstd::libzstd_static) | ||
187 | endif() | ||
188 | endfunction(get_zstd) | ||
86 | diff --git a/extensions/libarchive/CMakeLists.txt b/extensions/libarchive/CMakeLists.txt | 189 | diff --git a/extensions/libarchive/CMakeLists.txt b/extensions/libarchive/CMakeLists.txt |
87 | index 2b89d3ea..49e13e21 100644 | 190 | index bf7b2a7f5..eb6b71091 100644 |
88 | --- a/extensions/libarchive/CMakeLists.txt | 191 | --- a/extensions/libarchive/CMakeLists.txt |
89 | +++ b/extensions/libarchive/CMakeLists.txt | 192 | +++ b/extensions/libarchive/CMakeLists.txt |
90 | @@ -22,13 +22,10 @@ if (DISABLE_LIBARCHIVE) | 193 | @@ -22,12 +22,10 @@ if (NOT ENABLE_LIBARCHIVE) |
91 | endif() | 194 | endif() |
92 | 195 | ||
93 | if (NOT DISABLE_LZMA) | 196 | if (ENABLE_LZMA) |
94 | - include(BundledLibLZMA) | 197 | - include(LibLZMA) |
95 | - use_bundled_liblzma(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) | ||
96 | - list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/liblzma/dummy") | 198 | - list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/liblzma/dummy") |
97 | + find_package(LibLZMA REQUIRED) | 199 | + find_package(LibLZMA REQUIRED) |
98 | endif() | 200 | endif() |
@@ -104,5 +206,5 @@ index 2b89d3ea..49e13e21 100644 | |||
104 | include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt) | 206 | include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt) |
105 | 207 | ||
106 | -- | 208 | -- |
107 | 2.25.1 | 209 | 2.34.1 |
108 | 210 | ||