如何修改 Homebrew 公式? [英] How do I modify a Homebrew formula?

查看:23
本文介绍了如何修改 Homebrew 公式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过 ImageMagick/homebrew" rel="noreferrer">自制软件.

I installed ImageMagick via Homebrew.

但是,由于我当前的配置存在错误,我需要调整公式的编译标志并重新安装.

However, due to a bug I have with my current configuration, I need to adjust the compile flags for the formula and reinstall it.

我怎样才能做到这一点?

How can I accomplish this?

推荐答案

删除现有版本.

$ brew rm imagemagick

编辑公式.

$ brew edit imagemagick

这将在编辑器中显示;确保您的 $EDITOR 变量设置为您的偏好(对我来说:TextMate)

This will bring it up in an editor; make sure your $EDITOR variable is set to your preference (for me: TextMate)

因为大多数安装使用浇注/瓶子来安装预编译的二进制文件,除非您从源代码构建",否则您可能不会看到任何变化:

Because most installs use pouring/bottles to install a precompiled binary, you will likely see no change unless you "build from source":

$ brew reinstall --build-from-source

如果您对 git 感到满意,您可能想先创建一个分支,然后在一个分支中进行编辑.

If you're comfortable with git, you may want to make a branch first, and do your edits in a branch.

这篇关于如何修改 Homebrew 公式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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