diff --git a/PrusaSlicer-2.9.0-pr14010-fix-curl.patch b/PrusaSlicer-2.9.0-pr14010-fix-curl.patch new file mode 100644 index 0000000..54340c9 --- /dev/null +++ b/PrusaSlicer-2.9.0-pr14010-fix-curl.patch @@ -0,0 +1,40 @@ +From cdc3db58f9002778a0ca74517865527f50ade4c3 Mon Sep 17 00:00:00 2001 +From: Adam Dinwoodie +Date: Sat, 18 Jan 2025 15:28:30 +0000 +Subject: [PATCH] Handle libcurl v8+ + +The tests for curl versions in Http.cpp are intended to check if libcurl +is at least a given version, but they don't account for the fact that +the minor version will reset when the major version increments. + +Fix this by testing LIBCURL_VERSION_NUM, which encodes the full version +as a single three-byte number, with bytes corresponding to the major, +minor and patch numbers. + +Fixes #14009 +--- + src/slic3r/Utils/Http.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/slic3r/Utils/Http.cpp b/src/slic3r/Utils/Http.cpp +index 5b1ddfc7ec..de2785bc78 100644 +--- a/src/slic3r/Utils/Http.cpp ++++ b/src/slic3r/Utils/Http.cpp +@@ -200,7 +200,7 @@ bool Http::priv::ca_file_supported(::CURL *curl) + + if (curl == nullptr) { return res; } + +-#if LIBCURL_VERSION_MAJOR >= 7 && LIBCURL_VERSION_MINOR >= 48 ++#if LIBCURL_VERSION_NUM >= 0x073000 // equivalent to v7.48 or greater + ::curl_tlssessioninfo *tls; + if (::curl_easy_getinfo(curl, CURLINFO_TLS_SSL_PTR, &tls) == CURLE_OK) { + if (tls->backend == CURLSSLBACKEND_SCHANNEL || tls->backend == CURLSSLBACKEND_DARWINSSL) { +@@ -364,7 +364,7 @@ void Http::priv::http_perform(const HttpRetryOpt& retry_opts) + ::curl_easy_setopt(curl, CURLOPT_READFUNCTION, form_file_read_cb); + + ::curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L); +-#if LIBCURL_VERSION_MAJOR >= 7 && LIBCURL_VERSION_MINOR >= 32 ++#if LIBCURL_VERSION_NUM >= 0x072000 // equivalent to v7.32 or higher + ::curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, xfercb); + ::curl_easy_setopt(curl, CURLOPT_XFERINFODATA, static_cast(this)); + #ifndef _WIN32 diff --git a/PrusaSlicer.changes b/PrusaSlicer.changes index 7873825..f3a77c2 100644 --- a/PrusaSlicer.changes +++ b/PrusaSlicer.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 21 11:00:03 UTC 2025 - Andreas Schneider + +- Fixed printables.com integration +- Added PrusaSlicer-2.9.0-pr14010-fix-curl.patch + gh#prusa3d/PrusaSlicer#14010 + ------------------------------------------------------------------- Wed Jan 8 08:18:03 UTC 2025 - Andreas Schneider diff --git a/PrusaSlicer.spec b/PrusaSlicer.spec index 10edc73..c1756c4 100644 --- a/PrusaSlicer.spec +++ b/PrusaSlicer.spec @@ -35,6 +35,8 @@ Patch11: PrusaSlicer-2.6.0-octoprint-name-fix.patch Patch12: PrusaSlicer-2.9.0-pr13896-static-libs.patch # PATCH-FIX-OPENSUSE PrusaSlicer-2.9.0-pr13885-printconfig-segfault.patch gh#prusa3d/PrusaSlicer#13885 Patch13: PrusaSlicer-2.9.0-pr13885-printconfig-segfault.patch +# PATCH-FIX-OPENSUSE PrusaSlicer-2.9.0-pr14010-fix-curl.patch gh#prusa3d/PrusaSlicer#14010 +Patch14: PrusaSlicer-2.9.0-pr14010-fix-curl.patch BuildRequires: blosc-devel BuildRequires: cereal-devel BuildRequires: cgal-devel >= 5.6