Skip to content

Commit cadfba2

Browse files
committed
povray: apply FreeBSD patches for Xcode 16.3
1 parent 3e828c0 commit cadfba2

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

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)