Homebrew recompile from edited source code

狂风中的少年 提交于 2019-12-05 13:57:06

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

Another approach is to add a patch to the homebrew formula (you can edit the formula using brew edit <formula-name>): https://github.com/Homebrew/brew/blob/master/docs/Formula-Cookbook.md#patches

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!