Is there a way to to recompile from an edited source code via homebrew?
I did a change on the source user.hpp of Boost which I now want to recompile Boost with. I tried --build-from-source
and --enable-bar
but neither works, saying that it is already installed. The only way I can recompile is by reinstall but that simply overwrites the source code I changed.
Any idea?
First option Download the archive, edit the files, and zip the archive as homebrew does (same name and format).
If you kept the original folder structure created by Homebrew, you can put the modified archive in ~/Library/Caches/Homebrew
and then try brew install -f
. (the -f is maybe not strictly necessary but it may be need for the SHA-1 mismatch.)
More info on this blog.
Second option
Pulled out from the Homebrew wiki, install the package without homebrew and then link it with brew
.
./configure --prefix=/usr/local/Cellar/foo/1.2 && make && make install && brew link foo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With