Merge pull request #6246 from SMillerDev/patch-4

Docs: add caveat info to cookbook
This commit is contained in:
Mike McQuaid 2019-06-20 14:41:06 +01:00 committed by GitHub
commit 9a1936cd4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 4 deletions

View File

@ -1014,13 +1014,13 @@ class Formula
@prefix_returns_versioned_prefix = false @prefix_returns_versioned_prefix = false
end end
# Tell the user about any Homebrew-specific caveats or locations regarding # Warn the user about any Homebrew-specific issues or quirks for this package
# this package. These should not contain setup instructions that would apply # These should not contain setup instructions that would apply to installation
# to installation through a different package manager on a different OS. # through a different package manager on a different OS.
# @return [String] # @return [String]
# <pre>def caveats # <pre>def caveats
# <<~EOS # <<~EOS
# Are optional. Something the user should know? # Are optional. Something the user must be warned about?
# EOS # EOS
# end</pre> # end</pre>
# #

View File

@ -283,6 +283,18 @@ Homebrew expects to find manual pages in `#{prefix}/share/man/...`, and not in `
Some software installs to `man` instead of `share/man`, so check the output and add a `"--mandir=#{man}"` to the `./configure` line if needed. Some software installs to `man` instead of `share/man`, so check the output and add a `"--mandir=#{man}"` to the `./configure` line if needed.
### Caveats
In case there are specific issues with the Homebrew packaging (compared to how the software is installed from other sources) a `caveats` block can be added to the formula to warn users. This can indicate non-standard install paths, an example from the `ruby` formula:
```
==> Caveats
By default, binaries installed by gem will be placed into:
/usr/local/lib/ruby/gems/bin
You may want to add this to your PATH.
```
### A quick word on naming ### A quick word on naming
Name the formula like the project markets the product. So its `pkg-config`, not `pkgconfig`; `sdl_mixer`, not `sdl-mixer` or `sdlmixer`. Name the formula like the project markets the product. So its `pkg-config`, not `pkgconfig`; `sdl_mixer`, not `sdl-mixer` or `sdlmixer`.