从已编辑的源代码重新编译自制程序 [英] Homebrew recompile from edited source code

查看:218
本文介绍了从已编辑的源代码重新编译自制程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以通过自制程序从已编辑的源代码进行重新编译?

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

这篇关于从已编辑的源代码重新编译自制程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆