#import "util/get_source.script" get_source; str targetName #option; str toolchainPrefix #option; int processorCount #option; void Start() { str rootDirectory = PathGetDefaultPrefix() + "/root"; str version = "2.15.05"; if processorCount == 0 processorCount = SystemGetProcessorCount(); get_source.Get("https://www.nasm.us/pub/nasm/releasebuilds/%version%/nasm-%version%.tar.xz", "nasm-%version%", "3caf6729c1073bf96629b57cee31eeb54f4f8129b01902c73428836550b30a3f"); assert SystemShellExecuteWithWorkingDirectory("bin/source", "./configure --host=%toolchainPrefix% CC=%toolchainPrefix%-gcc CXX=%toolchainPrefix%-g++ --prefix=/Applications/POSIX"); assert SystemShellExecuteWithWorkingDirectory("bin/source", "make -j %processorCount%"); assert SystemShellExecuteWithWorkingDirectory("bin/source", "make install DESTDIR=%rootDirectory%"); assert FileCopy("bin/source/LICENSE", "bin/Nasm License.txt"); PathDeleteRecursively("bin/source"); }