You’ll probably need to build form source in either environment if you want to be sure of the deployment target. Both Homebrew and Macports are focused on running OS software for the current system, much less so for building baked libraries to run on other systems.
I'm also just assuming that binaries built for the older targets will work on all the newer systems. -Jonathan