|
| 1 | +classSwiftXctoolchain52 <Formula |
| 2 | + |
| 3 | +desc"A macOS Swift 5.2 toolchain for cross compilation purposes" |
| 4 | +homepage"https://swift.org" |
| 5 | +url"https://swift.org/builds/swift-5.2.4-release/xcode/swift-5.2.4-RELEASE/swift-5.2.4-RELEASE-osx.pkg" |
| 6 | +sha256"ba409649620129375e014c4753a6f802fb94e46ee833dbf917111e593342ddfc" |
| 7 | + |
| 8 | +definstall |
| 9 | +system"xar -xf *.pkg" |
| 10 | +system"mkdir","swift.xctoolchain" |
| 11 | +system"cd swift.xctoolchain && cat ../*.pkg/Payload | gunzip -dc | cpio -i" |
| 12 | +system"mkdir","-p","#{prefix}/lib/swift/xctoolchains/x86_64-apple-darwin/5.2.4" |
| 13 | +system"cp -ac swift.xctoolchain#{prefix}/lib/swift/xctoolchains/x86_64-apple-darwin/5.2.4/swift.xctoolchain" |
| 14 | +system"ln","-sf","#{prefix}/lib/swift/xctoolchains/x86_64-apple-darwin/5.2.4","#{prefix}/lib/swift/xctoolchains/x86_64-apple-darwin/current" |
| 15 | +end |
| 16 | +end |