Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
474 views
in Technique[技术] by (71.8m points)

compilation - How do I modify a Homebrew formula?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Remove the existing version.

$ brew rm imagemagick

Edit the formula.

$ brew edit imagemagick

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

Change it, save it, try re-installing it.

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...