Generate `all: $SHA256` bottles if:
- all generated bottles have the same cellar
- all generated bottles have the same checksum
In this case, on `brew bottle --merge --write`: delete all the non-`all`
bottles (and their JSON) and upload only the single one that's
necessary.
- prioritise the first `pod2man` in the `PATH` if possible. This shim
was created to handle the case where there isn't one but, if there is,
we want to allow e.g. using a `pod2man` dependency to override the use
of the system version
- make `/usr/bin/pod2man` lower priority but still prioritise it over
a Homebrew-installed `pod2man` that's not in the `PATH` unless it
doesn't exist.
This shim was originally added in
5c973bad7422cf7f335e952a91ddfa2273aa2e4f to workaround a missing
`/usr/bin/pod2man`. It's now unfortunately resulting in using an older
`pod2man` on newer macOS versions.
Instead, let's use `/usr/bin/pod2man` if it's available and, if not,
work backwards to find the newest available version that is available.
Only `.diff` URLs return output comparable to the diffs from
`git diff --full-index`. While the extra metadata from `.patch` is
nice, the instability of the patch contents is undesirable.
Co-Authored-By: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
About 40 formulae set `CMAKE_INSTALL_RPATH` to `lib` or `opt_lib`, but
this breaks bottle relocatability.
The correct solution is to use `@loader_path/../lib`, but this is macOS
specific, so it requires some OS-specific logic. Rather than replicating
this logic over many formulae, we may as well define a helper method for
it.
See https://github.com/Homebrew/homebrew-core/issues/75458.
- The autocorrections here before were leading to changes like:
```
➜ brew style --fix brewsci/science/beetl
Formula/beetl.rb:15:11: C: [Corrected] GitHub patches should use the full_index parameter: https://github.com/BEETL/BEETL/commit/ba47b6f9.patch?full_index=1
url "https://github.com/BEETL/BEETL/commit/ba47b6f9.patch"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
➜ git diff
diff --git a/Formula/beetl.rb b/Formula/beetl.rb
index bbd049aa..7ec6d7bc 100644
--- a/Formula/beetl.rb
+++ b/Formula/beetl.rb
@@ -12,7 +12,7 @@ class Beetl < Formula
# Fixes "error: 'accumulate' is not a member of 'std'"
# Upstream commit "Little fix for compilation on mac"
patch do
- url "https://github.com/BEETL/BEETL/commit/ba47b6f9.patch"
+ url https://github.com/BEETL/BEETL/commit/ba47b6f9.patch?full_index=1
sha256 "63b67f3282893d1f74c66aa98f3bf2684aaba2fa9ce77858427b519f1f02807d"
end
end
```
- This fixes the URLs generated to have quotes:
```
➜ git diff
diff --git a/Formula/beetl.rb b/Formula/beetl.rb
index bbd049aa..7ec6d7bc 100644
--- a/Formula/beetl.rb
+++ b/Formula/beetl.rb
@@ -12,7 +12,7 @@ class Beetl < Formula
# Fixes "error: 'accumulate' is not a member of 'std'"
# Upstream commit "Little fix for compilation on mac"
patch do
- url "https://github.com/BEETL/BEETL/commit/ba47b6f9.patch"
+ url "https://github.com/BEETL/BEETL/commit/ba47b6f9.patch?full_index=1"
sha256 "63b67f3282893d1f74c66aa98f3bf2684aaba2fa9ce77858427b519f1f02807d"
end
end
```