By default, packages are installed in the way you describe... "Bottles" are precompiled binaries downloaded as compressed tape archives, the contents of which are then "poured" into the appropriate paths.
If you specify options, or use custom compile flags, then naturally brew will build from source. But if you for example, brew install nmap htop bmon
, it will download the bottle for your system version and pour it along with any missing dependencies.
That being said, there are definitely situations where brew compiles from source, so to try to answer your question, how often is it that you find this a problem?
There's no way to set it up so that brew compiles on a different machine "automagically" (that is, unless you implement this as a feature and implement it into your installation of brew). You can imagine how this could be difficult; architecture differences aside, conflicts/dependencies needing to be resolved, the differences in environment, etc. would make this a nightmare.
If this is more of an occasional annoyance than a regular problem, what you might want to try is install whatever formula you want on the faster machine with --build-bottle
. Then you can "bottle" the package yourself by running brew bottle
to install on the slower machine.
I can't recommend this with any level of confidence though, since I don't know how well it would work for all formulae. You would need to be on the same OS/architecture, and the binaries will be compiled for the lowest common denominator CPU (unless you specify which one) so the build might perform worse, depending on which features it was designed to use.
If the difference in compilation time is so large that this seems like a viable route, the two machines might not even be compatible (I don't remember what the 2008 MacBook was, core 2?), and cross-compiling within brew would be a whole separate headache all on its own, you might be better off just not using a package manager at all and compiling/configuring the software yourself.