我用 homebrew (qt) 安装了一个包。我想修改源代码并重建包。我似乎找不到源代码,虽然。brew --cache
返回一个不存在的目录,并且 qt 的代码不在 / usr / local / Cellar 中。我缺少什么吗?homebrew 会在应用程序构建后删除源代码吗?
Homebrew 仅保留二进制文件。如果您的 Homebrew 缓存目录(通常位于/Library/Caches/Homebrew
,但可以使用brew --cache
找到,如您所述)已被移动或删除,则必须再次获取源代码。您可以使用brew fetch qt
获取源代码。
如果您只获得源包,则可能缺少公式中包含的补丁,而不是当前正在运行的二进制文件的源。
brew unpack --patch <formula>
从手册页:
unpack [--git|--patch] [--destdir=path] formulae
Unpack the source files for formulae into subdirectories of the
current working directory. If --destdir=path is given, the sub-
directories will be created in the directory named by <path>
instead.
If --patch is passed, patches for formulae will be applied to
the unpacked source.
If --git is passed, a Git repository will be initalized in the
unpacked source. This is useful for creating patches for the
software.
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(14条)