This is an automated email from the ASF dual-hosted git repository. szaszm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 72d729c1b73606c82628a40bd7de2a3889e35ddb Author: Gabor Gyimesi <[email protected]> AuthorDate: Thu Oct 26 16:17:50 2023 +0200 MINIFICPP-2249 Remove unnecessary build options and upgrade curl Closes #1684 Signed-off-by: Marton Szasz <[email protected]> --- cmake/BundledLibcURL.cmake | 17 +++-------------- thirdparty/curl/strerror.patch | 31 ------------------------------- 2 files changed, 3 insertions(+), 45 deletions(-) diff --git a/cmake/BundledLibcURL.cmake b/cmake/BundledLibcURL.cmake index 095c2d58d..f17e55bc1 100644 --- a/cmake/BundledLibcURL.cmake +++ b/cmake/BundledLibcURL.cmake @@ -18,10 +18,8 @@ function(use_bundled_curl SOURCE_DIR BINARY_DIR) # Define patch step set(PATCH_FILE_1 "${SOURCE_DIR}/thirdparty/curl/module-path.patch") - set(PATCH_FILE_2 "${SOURCE_DIR}/thirdparty/curl/strerror.patch") set(PC ${Bash_EXECUTABLE} -c "set -x && \ - (\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE_1}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE_1}\") && \ - (\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE_2}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE_2}\")") + (\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE_1}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE_1}\")") # Define byproducts if (WIN32) set(BYPRODUCT "lib/libcurl.lib") @@ -39,19 +37,10 @@ function(use_bundled_curl SOURCE_DIR BINARY_DIR) -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DHTTP_ONLY=ON - -DCURL_DISABLE_CRYPTO_AUTH=ON -DCURL_CA_PATH=none -DCURL_USE_LIBSSH2=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF - -DCMAKE_DEBUG_POSTFIX= - -DHAVE_GLIBC_STRERROR_R=1 - -DHAVE_GLIBC_STRERROR_R__TRYRUN_OUTPUT="" - -DHAVE_POSIX_STRERROR_R=0 - -DHAVE_POSIX_STRERROR_R__TRYRUN_OUTPUT="" - -DHAVE_POLL_FINE_EXITCODE=0 - -DHAVE_FSETXATTR_5=0 - -DHAVE_FSETXATTR_5__TRYRUN_OUTPUT="" ) if (OPENSSL_OFF) list(APPEND CURL_CMAKE_ARGS -DCURL_USE_OPENSSL=OFF) @@ -64,8 +53,8 @@ function(use_bundled_curl SOURCE_DIR BINARY_DIR) # Build project ExternalProject_Add( curl-external - URL "https://github.com/curl/curl/releases/download/curl-8_1_0/curl-8.1.0.tar.gz" - URL_HASH "SHA256=15c00ae8d1b535ac7a7629224d36e564ce9c296698b9297bf854dd38abf226aa" + URL "https://github.com/curl/curl/releases/download/curl-8_4_0/curl-8.4.0.tar.gz" + URL_HASH "SHA256=816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427" SOURCE_DIR "${BINARY_DIR}/thirdparty/curl-src" LIST_SEPARATOR % # This is needed for passing semicolon-separated lists CMAKE_ARGS ${CURL_CMAKE_ARGS} diff --git a/thirdparty/curl/strerror.patch b/thirdparty/curl/strerror.patch deleted file mode 100644 index 6527dd450..000000000 --- a/thirdparty/curl/strerror.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/lib/strerror.c b/lib/strerror.c -index bd9cc535c..0da7b09e4 100644 ---- a/lib/strerror.c -+++ b/lib/strerror.c -@@ -861,7 +861,8 @@ const char *Curl_strerror(int err, char *buf, size_t buflen) - } - #else /* not Windows coming up */ - --#if defined(HAVE_STRERROR_R) && defined(HAVE_POSIX_STRERROR_R) -+#if defined(HAVE_STRERROR_R) -+#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE - /* - * The POSIX-style strerror_r() may set errno to ERANGE if insufficient - * storage is supplied via 'strerrbuf' and 'buflen' to hold the generated -@@ -871,7 +872,7 @@ const char *Curl_strerror(int err, char *buf, size_t buflen) - if('\0' == buf[0]) - msnprintf(buf, max, "Unknown error %d", err); - } --#elif defined(HAVE_STRERROR_R) && defined(HAVE_GLIBC_STRERROR_R) -+#else - /* - * The glibc-style strerror_r() only *might* use the buffer we pass to - * the function, but it always returns the error message as a pointer, -@@ -885,6 +886,7 @@ const char *Curl_strerror(int err, char *buf, size_t buflen) - else - msnprintf(buf, max, "Unknown error %d", err); - } -+#endif - #else - { - /* !checksrc! disable STRERROR 1 */
