-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xclogparser: staticly link Swift stdlib on Linux
- Loading branch information
Showing
1 changed file
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ class Xclogparser < Formula | |
url "https://github.com/MobileNativeFoundation/XCLogParser/archive/refs/tags/v0.2.39.tar.gz" | ||
sha256 "b225891b94bbdb549ddbc9ffe838ad87f73ef7cc79934e3e23969bb1220eafd9" | ||
license "Apache-2.0" | ||
revision 1 | ||
|
||
bottle do | ||
sha256 cellar: :any_skip_relocation, arm64_sonoma: "2af489ea40d0e2ea3d490c151137cc74992e17d9e5d4ea842efe37bb5c3c83f3" | ||
|
@@ -18,9 +19,20 @@ class Xclogparser < Formula | |
depends_on xcode: "13.0" | ||
|
||
uses_from_macos "swift" | ||
uses_from_macos "zlib" | ||
|
||
def install | ||
Check warning on line 24 in Formula/x/xclogparser.rb GitHub Actions / macOS 15-arm64`brew install --verbose --formula --build-bottle xclogparser` failed on macOS Sequoia (15) on Apple Silicon!
Check failure on line 24 in Formula/x/xclogparser.rb GitHub Actions / macOS 14-arm64`brew install --verbose --formula --build-bottle xclogparser` failed on macOS Sonoma (14) on Apple Silicon!
Check failure on line 24 in Formula/x/xclogparser.rb GitHub Actions / macOS 13-arm64`brew install --verbose --formula --build-bottle xclogparser` failed on macOS Ventura (13) on Apple Silicon!
|
||
system "swift", "build", "-c", "release", "--disable-sandbox" | ||
# Fix hardcoded path to system zlib. | ||
system "swift", "package", "fetch" | ||
inreplace ".build/checkouts/GzipSwift/Sources/system-zlib/include/module.modulemap", | ||
"/usr/include", Formula["zlib"].opt_include | ||
|
||
args = if OS.mac? | ||
["--disable-sandbox"] | ||
else | ||
["--static-swift-stdlib"] | ||
end | ||
system "swift", "build", "-c", "release", *args | ||
bin.install ".build/release/xclogparser" | ||
end | ||
|
||
|