I’m trying to write a Portfile for the Zig language[0] where the base-provided
port is outdated. (And if possible, upstream it.)
This is my first try on writing a Portfile (sheepishly thinking updating the
outdated port would be easy).
The build process requires LLVM, clang, and lld ==11.x[1], and indeed I have
built the compiler with the llvm-11 and clang-11 port.
Unfortunately MacPorts doesn’t provide the lld-11 port[2], so I’m guessing I
should write a Portfile for lld first I guess?
But then I’m not sure how I should write an lld port.
I’m guessing it should be added as a subport of llvm with `if {${subport} eq
"lld-${llvm_version}”}` checks,
but the amount of patches and other code that I don’t understand makes me worry
about writing the lld port.
Does anyone have any pointers or explanation on what I should consider when
writing these kinds of complex ports?
[0]: https://ziglang.org
[1]: https://github.com/ziglang/zig/blob/0.7.1/README.md#posix
[2]: https://trac.macports.org/ticket/58042