Remove "safe" keyword for xcode 16.4 compatibility

This commit is contained in:
Karan Mohindroo
2026-04-05 16:24:57 -07:00
committed by Renee Otten
parent 500395ea46
commit 79c64d52a7
+3 -2
View File
@@ -56,9 +56,10 @@ xcode.build.settings-append \
CODE_SIGNING_REQUIRED=NO
post-patch {
# Remove Swift 6.2 strict memory safety keywords (unsafe/@ unsafe) for Xcode 16.x compatibility
# The 'unsafe' keyword requires Swift 6.2 (Xcode 26+) per SE-0458
# Remove Swift 6.2 strict memory safety keywords (unsafe/@ unsafe, etc.) for Xcode 16.x compatibility
# The 'unsafe' and 'safe' keywords requires Swift 6.2 (Xcode 26+) per SE-0458
system -W ${worksrcpath} "find MiddleDrag -name '*.swift' -exec sed -i '' -e 's/@unsafe //g' -e 's/unsafe //g' {} \\;"
system -W ${worksrcpath} "find MiddleDrag -name '*.swift' -exec sed -i '' -e 's/@safe //g' -e 's/safe //g' {} \\;"
# Disable Sparkle auto-update for MacPorts-managed installation
system -W ${worksrcpath} "/usr/libexec/PlistBuddy -c \"Delete :SUFeedURL\" Info.plist || true"