@@ -27,6 +27,27 @@ class Cpprestsdk < Formula
2727
2828 uses_from_macos "zlib"
2929
30+ # Apply FreeBSD patches for libc++ >= 19 needed in Xcode 16.3
31+ # https://github.com/microsoft/cpprestsdk/pull/1829
32+ on_sequoia :or_newer do
33+ patch do
34+ url "https://github.com/microsoft/cpprestsdk/commit/d17f091b5a753b33fb455e92b590fc9f4e921119.patch?full_index=1"
35+ sha256 "bc68dd08310ba22dc5ceb7506c86a6d4c8bfefa46581eea8cd917354a8b8ae34"
36+ end
37+ patch do
38+ url "https://github.com/microsoft/cpprestsdk/commit/6df13a8c0417ef700c0f164bcd0686ad46f66fd9.patch?full_index=1"
39+ sha256 "4205e818f5636958589d2c1e5841a31acfe512eda949d63038e23d8c089a9636"
40+ end
41+ patch do
42+ url "https://github.com/microsoft/cpprestsdk/commit/4188ad89b2cf2e8de3cc3513adcf400fbfdc5ce7.patch?full_index=1"
43+ sha256 "3bc72590cbaf6d04e3e5230558647e5b38e7f494cd0e5d3ea5c866ac25f9130a"
44+ end
45+ patch do
46+ url "https://github.com/microsoft/cpprestsdk/commit/32b322b564e5e540ff02393ffe3bd3bade8d299c.patch?full_index=1"
47+ sha256 "737567e533405f7f6ef0a83bafef7fdeea95c96947f66be0973e5f362e1b82f5"
48+ end
49+ end
50+
3051 # Apply vcpkg patch to support Boost 1.87.0+
3152 # Issue ref: https://github.com/microsoft/cpprestsdk/issues/1815
3253 # Issue ref: https://github.com/microsoft/cpprestsdk/issues/1323
@@ -53,7 +74,7 @@ def install
5374 #include <iostream>
5475 #include <cpprest/http_client.h>
5576 int main() {
56- web::http::client::http_client client(U("https://example.com /"));
77+ web::http::client::http_client client(U("https://brew.sh /"));
5778 std::cout << client.request(web::http::methods::GET).get().extract_string().get() << std::endl;
5879 }
5980 CPP
@@ -64,6 +85,6 @@ def install
6485 "-lssl" , "-lcrypto" , "-lboost_random" , "-lboost_chrono" , "-lboost_thread" ,
6586 "-lboost_system" , "-lboost_filesystem" , "-lcpprest" ,
6687 "-o" , "test_cpprest"
67- assert_match "<title>Example Domain</title> " , shell_output ( "./test_cpprest" )
88+ assert_match "The Missing Package Manager for macOS (or Linux) " , shell_output ( "./test_cpprest" )
6889 end
6990end
0 commit comments