是否有一种方法可以通过自制程序从已编辑的源代码进行重新编译?
Is there a way to to recompile from an edited source code via homebrew?
我对Boost的源user.hpp进行了更改,现在我想使用它重新编译Boost.我尝试了--build-from-source和--enable-bar,但是都没有用,说它已经安装了.我可以重新编译的唯一方法是通过重新安装,但这只会覆盖我更改的源代码.
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.
有什么主意吗?
推荐答案第一个选项 下载压缩文件,编辑文件,然后压缩压缩文件,就像自制软件一样(名称和格式相同).
First option Download the archive, edit the files, and zip the archive as homebrew does (same name and format).
如果保留由Homebrew创建的原始文件夹结构,则可以将修改后的存档放在~/Library/Caches/Homebrew中,然后尝试brew install -f. (-f可能不是严格必需的,但SHA-1不匹配可能是必需的.)
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.)
有关此博客的详细信息.
第二个选项
从Homebrew Wiki中抽出,安装没有Homebrew的软件包,然后将其与brew链接.
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更多推荐
从已编辑的源代码重新编译自制程序
发布评论