Skip to content

Commit 70abe43

Browse files
authored
Merge pull request #233303 from Homebrew/povray-cpprestsdk-test
povray cpprestsdk: apply FreeBSD patches for Xcode 16.3
2 parents dd2a0a4 + a767b12 commit 70abe43

File tree

2 files changed

+61
-4
lines changed

2 files changed

+61
-4
lines changed

Formula/c/cpprestsdk.rb

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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
6990
end

Formula/p/povray.rb

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
11
class Povray < Formula
22
desc "Persistence Of Vision RAYtracer (POVRAY)"
33
homepage "https://www.povray.org/"
4-
url "https://github.com/POV-Ray/povray/archive/refs/tags/v3.7.0.10.tar.gz"
5-
sha256 "7bee83d9296b98b7956eb94210cf30aa5c1bbeada8ef6b93bb52228bbc83abff"
64
license "AGPL-3.0-or-later"
75
revision 13
86
head "https://github.com/POV-Ray/povray.git", branch: "master"
97

8+
stable do
9+
url "https://github.com/POV-Ray/povray/archive/refs/tags/v3.7.0.10.tar.gz"
10+
sha256 "7bee83d9296b98b7956eb94210cf30aa5c1bbeada8ef6b93bb52228bbc83abff"
11+
12+
on_sequoia :or_newer do
13+
# Apply FreeBSD patches for libc++ >= 19 needed in Xcode 16.3
14+
patch :p0 do
15+
url "https://raw.githubusercontent.com/freebsd/freebsd-ports/6133473e4227abbfcf023bea6ab5eeed9c17e55b/graphics/povray37/files/patch-vfe_vfe.cpp"
16+
sha256 "81e6ad64dadce1581cbab3be9774d5a5c22307e8738ee1452eb7e4d3e5a7e234"
17+
end
18+
patch :p0 do
19+
url "https://raw.githubusercontent.com/freebsd/freebsd-ports/6133473e4227abbfcf023bea6ab5eeed9c17e55b/graphics/povray37/files/patch-vfe_vfeconf.h"
20+
sha256 "8e2246c5ded770b0fe835ae062aca44e98fc220314e39ba6c068ed7f270b71b2"
21+
end
22+
23+
# Workaround for Xcode 16.3+, issue ref: https://github.com/POV-Ray/povray/issues/479
24+
patch :DATA
25+
end
26+
end
27+
1028
livecheck do
1129
url :stable
1230
regex(/^v?(\d+(?:\.\d+)+\.\d{1,4})$/i)
@@ -37,6 +55,10 @@ class Povray < Formula
3755

3856
def install
3957
ENV.cxx11
58+
# See https://github.com/freebsd/freebsd-ports/commit/6133473e4227abbfcf023bea6ab5eeed9c17e55b
59+
if OS.mac? && MacOS.version >= :sequoia
60+
ENV.append "CPPFLAGS", "-DPOVMSUCS2=char16_t -DUCS2=char16_t -DUCS4=char32_t"
61+
end
4062

4163
args = %W[
4264
COMPILED_BY=homebrew
@@ -74,3 +96,17 @@ def install
7496
end
7597
end
7698
end
99+
100+
__END__
101+
diff --git a/source/backend/shape/truetype.cpp b/source/backend/shape/truetype.cpp
102+
index 7e27ccc3..80ab047c 100644
103+
--- a/source/backend/shape/truetype.cpp
104+
+++ b/source/backend/shape/truetype.cpp
105+
@@ -117,7 +117,7 @@ typedef unsigned int ULONG;
106+
typedef short FWord;
107+
typedef unsigned short uFWord;
108+
109+
-#if !defined(TARGET_OS_MAC)
110+
+#if !defined(__MACTYPES__)
111+
typedef int Fixed;
112+
#endif

0 commit comments

Comments
 (0)