If you want/need the same packages on Linux, macOS, other, then you can use the same code on all of those platforms. No needs to worry about using {Homebrew, Macports} on your Mac and {Deb, RPM} on your Linux infrastructure.
A long time ago I maintained my own Linux from Scratch [1] installation using pkgsrc rather than BLFS or something ad hoc. It worked surprisingly well. It was a bit like Gentoo (whih is what I had migrated from.) Fun times!
That's multi-platform as well.
If you want/need the same packages on Linux, macOS, other, then you can use the same code on all of those platforms. No needs to worry about using {Homebrew, Macports} on your Mac and {Deb, RPM} on your Linux infrastructure.