The MacPorts project has existed for 7 years longer than Homebrew, and is a much more sane experience similar to FreeBSD ports. In fact, Jordan Hubbard, the co-founder of FreeBSD and the original author of FreeBSD ports, was involved in the MacPorts project (along with other Apple employees).
I’m always baffled that Homebrew is seen as the standard macOS package manager. MacPorts has existed for many more years. It behaves more similarly to package managers on other operating systems without weird symlink tricks. It doesn’t send analytics to Google. It has over 25,000 active ports (Homebrew doesn’t seem to publish its formulae count but SO threads seem to indicate something in the region of 4,000). To each their own, but I highly recommend anyone reading this to give MacPorts a try.