613 Commits

Author SHA1 Message Date
Rylan Polster
da624601bb
os/mac/pkgconfig/15: update expat version 2025-06-04 15:46:41 -04:00
Michael Cho
5722d3dc8f
os/mac/pkgconfig/15: update expat version for 15.2 2024-12-19 12:08:02 -05:00
Michael Cho
252678692f
os/mac/pkgconfig: add bzip2.pc for rust formulae 2024-10-11 14:55:37 -04:00
Douglas Eichelberger
d3d25beb35 Use requires_ancestor consistently 2024-10-06 09:25:57 -07:00
Douglas Eichelberger
eed660e784 Move remaining OS extensions to prepend 2024-10-05 12:18:29 -07:00
Mike McQuaid
94416e82f0
Add new odeprecated, odisabled, remove disabled code.
Prepare the usual deprecation cycle for Homebrew 4.4.0.
2024-09-24 10:15:34 +01:00
Mike McQuaid
d8fd19dde5
Merge pull request #18298 from Homebrew/curl-14.5
os/mac/pkgconfig/14: update libcurl for 14.5 SDK
2024-09-20 12:55:02 +01:00
Bo Anderson
40c6f05a76
os/mac/pkgconfig/14: update libcurl for 14.5 SDK 2024-09-10 00:22:32 +01:00
Bo Anderson
fe1577dabf
os/mac/pkgconfig/15: drop NTLM_WB reference in libcurl 2024-09-10 00:16:15 +01:00
Mike McQuaid
dc9618457d
Improve brew doctor output on prerelease macOS
- Avoid near duplicate messages
- Provide correct CLT download instructions

Before:
```
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Your Command Line Tools are too outdated.
Update them from Software Update in System Settings.

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 16.0.

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Settings.

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 16.0.

Warning: Your Xcode (15.4) at /Applications/Xcode.app is too outdated.
Please update to Xcode 16.0 (or delete it).
Xcode can be updated from:
  https://developer.apple.com/download/all/

Warning: Your Xcode (15.4) is outdated.
Please update to Xcode 16.0 (or delete it).
Xcode can be updated from:
  https://developer.apple.com/download/all/

If 16.0 is installed, you may need to:
  sudo xcode-select --switch /Applications/Xcode.app
Current developer directory is:
  /Applications/Xcode.app/Contents/Developer

```

After:
```console
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Your Command Line Tools are too outdated.
Install the Command Line Tools for Xcode 16 from:
  https://developer.apple.com/download/all/

Warning: Your Xcode (15.4) at /Applications/Xcode.app is too outdated.
Please update to Xcode 16.0 (or delete it).
Xcode can be updated from:
  https://developer.apple.com/download/all/

```
2024-09-06 17:38:25 +01:00
Bo Anderson
3627cca066
Remove some unnecessary include Kernel 2024-08-20 04:16:18 +01:00
Issy Long
45978435e7
rubocop: Use Sorbet/StrictSigil as it's better than comments
- Previously I thought that comments were fine to discourage people from
  wasting their time trying to bump things that used `undef` that Sorbet
  didn't support. But RuboCop is better at this since it'll complain if
  the comments are unnecessary.

- Suggested in https://github.com/Homebrew/brew/pull/18018#issuecomment-2283369501.

- I've gone for a mixture of `rubocop:disable` for the files that can't
  be `typed: strict` (use of undef, required before everything else, etc)
  and `rubocop:todo` for everything else that should be tried to make
  strictly typed. There's no functional difference between the two as
  `rubocop:todo` is `rubocop:disable` with a different name.

- And I entirely disabled the cop for the docs/ directory since
  `typed: strict` isn't going to gain us anything for some Markdown
  linting config files.

- This means that now it's easier to track what needs to be done rather
  than relying on checklists of files in our big Sorbet issue:

```shell
$ git grep 'typed: true # rubocop:todo Sorbet/StrictSigil' | wc -l
    268
```

- And this is confirmed working for new files:

```shell
$ git status
On branch use-rubocop-for-sorbet-strict-sigils
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        Library/Homebrew/bad.rb
        Library/Homebrew/good.rb

nothing added to commit but untracked files present (use "git add" to track)

$ brew style
Offenses:

bad.rb:1:1: C: Sorbet/StrictSigil: Sorbet sigil should be at least strict got true.
^^^^^^^^^^^^^

1340 files inspected, 1 offense detected
```
2024-08-12 15:24:27 +01:00
Bo Anderson
7da94a8f01
Preliminary macOS 15 (Sequoia) support 2024-06-11 02:59:31 +01:00
Mike McQuaid
222fe8ef0b
Homebrew 4.3.0 deprecation/disable/removals.
The usual pass of deprecating/disabling/removing code for the next
minor Homebrew release.
2024-05-07 12:18:04 +01:00
Markus Reiter
480e264d9a
Lint Ruby docs. 2024-05-01 11:35:21 +02:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Markus Reiter
4b432c7ea4
Explicitly mark non-private APIs. 2024-04-22 21:16:49 +02:00
Douglas Eichelberger
c59d9fa833 Prefer numbered block params over proc conversion, cont'd 2024-04-08 09:47:27 -07:00
Bo Anderson
5582849ae7
Reproducible builds for native compiled binaries 2024-03-11 16:06:55 +00:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Douglas Eichelberger
fe439e8320 Apply 'chmod -x' to executables without shebangs 2024-03-06 22:22:49 -08:00
Bo Anderson
58874de60b
Generalise internal cross-image handling 2024-02-22 17:25:20 +00:00
Douglas Eichelberger
eb7c3e52a0 Require SystemInclude only where needed 2024-01-31 11:42:01 -08:00
Issy Long
f682147598
Fix RuboCop Style/RedundantFreeze offenses 2024-01-18 22:20:01 +00:00
Bo Anderson
c51838fa1f os/mac/pkgconfig/14: update for 14.2 2024-01-01 16:33:25 +00:00
Bo Anderson
afe453da28
Merge pull request #16389 from Bo98/xcode-15.1
os/mac/xcode: support Xcode 15.1
2023-12-23 16:46:18 +00:00
Bo Anderson
61a73014d3 os/mac/xcode: support Xcode 15.1 2023-12-23 00:55:50 +00:00
Bo Anderson
04ad24efe8 os/mac/xcode: add fast path for Xcode version detection 2023-12-23 00:49:36 +00:00
Bo Anderson
5692c8ecbf
Fix style violations under newer RuboCop 2023-12-14 05:47:12 +00:00
Bo Anderson
b42256d286
Deprecate, disable & delete code for Homebrew 4.2.0 2023-12-07 23:42:13 +00:00
Rylan Polster
b7532a86e1
Add commented out deprecations for MacOS when simulating Linux 2023-11-22 21:22:00 -05:00
Bo Anderson
cf08039712
os/mac/xcode: remove unnecessary type assertion 2023-09-13 14:26:27 +01:00
Bo Anderson
6d0c424b41
os/mac/pkgconfig: update for macOS 14 RC SDK 2023-09-13 01:47:03 +01:00
Mike McQuaid
9d44d278e4
os/mac/keg: fix change_rpath type signature.
Fixes #15990
2023-09-11 14:57:22 +01:00
Steve Peters
94ef9a4b7a codesign in keg_relocate instead of keg methods
Currently the codesign_patched_binary method may be called many
times for the same file when installing a keg.

This removes the calls to codesign_patched_binary from os/mac/keg
and adds a single call to the relocate_dynamic_linkage and
fix_dynamic_linkage methods in extend/os/mac/keg_relocate
to speed up keg installation.
2023-09-09 18:14:28 -07:00
Carlo Cabrera
93b43ad7a9
os/mac/mach: fix rpath deletion of fat machos
Fixes #15859.
2023-08-14 14:29:05 +08:00
Carlo Cabrera
b5334b818c
os/mac/mach: avoid recursively resolving rpaths
This is just a recipe for infinite loops. Plus, recursive references are
likely to be invalid, so we don't really gain much by attempting to
resolve them.[^1] (But we could if we made the logic here much more
complicated.)

Fixes a CI failure seen at Homebrew/homebrew-core#138323.

[^1]: See, for example, embree/embree#455.
2023-08-05 23:40:22 +08:00
Carlo Cabrera
b80940e1d8
os/mac/mach: simplify
We can avoid having to define a local variable and then reference it
inside these blocks by passing a proc instead.
2023-07-27 12:02:20 +08:00
Carlo Cabrera
acae97e70f
os/mac/mach: resolve rpaths too
We can add a small amount of logic to `#resolve_variable_name` that will
allow us to perform (limited) resolution of rpath references. This is
for informational purposes only: failing to resolve an `@rpath`
reference will not (and should not) result in `brew linkage` failures.

`dyld` will typically have more information than we do to resolve these
references, so not failing `brew linkage` when we fail to resolve an
`@rpath` reference is the right behaviour here.

As an example, before:

    ❯ brew linkage jpeg-turbo
    System libraries:
      /usr/lib/libSystem.B.dylib
    @rpath-referenced libraries:
      @rpath/libjpeg.8.dylib
      @rpath/libturbojpeg.0.dylib

After:

    ❯ brew linkage jpeg-turbo
    System libraries:
      /usr/lib/libSystem.B.dylib
    Homebrew libraries:
      /usr/local/Cellar/jpeg-turbo/3.0.0/lib/libjpeg.8.dylib (jpeg-turbo)
      /usr/local/Cellar/jpeg-turbo/3.0.0/lib/libturbojpeg.0.dylib (jpeg-turbo)
2023-07-27 12:02:20 +08:00
Carlo Cabrera
6b728bf3bd
Implement ruby-macho TODOs
We now have the new release of ruby-macho (#15758), so we can now
finish off the remaining work from #15731.
2023-07-26 11:15:19 +08:00
Carlo Cabrera
4c73942fae
extend/os/mac/keg_relocate: improve rpath handling
This implements the TODO that I left as a comment from #15722.

In order to simplify the handling of deleting an absolute rpath that has
a relative duplicate (or vice-versa, i.e., a relative rpath with an
absolute duplicate), we relocate all rpaths first in one pass and then
delete the duplicates in a separate pass.

We currently rely on some lower-level (but still public) methods from
ruby-macho since the standard `#delete_rpath` method changes the order
in which rpaths are resolved. We can switch back to using
`#delete_rpath` when Homebrew/ruby-macho#555 is merged and released.
2023-07-23 00:22:05 +08:00
Carlo Cabrera
13f2dc325e
os/mac/mach: report duplicate rpaths
We don't want to call `uniq` on this because this breaks our handling of
duplicate rpaths.
2023-07-17 13:11:12 +08:00
Carlo Cabrera
38c00934d6
os/mac/mach: better typechecking fix
Co-authored-by: Douglas Eichelberger <dduugg@users.noreply.github.com>
2023-07-12 01:24:19 +08:00
Carlo Cabrera
88a14c644c
os/mac/mach: fix type-checking error 2023-07-11 22:49:06 +08:00
Gabriel Gerlero
15a0c7fd7d linkage_checker: resolve some variable install names on macOS 2023-07-06 14:15:14 -03:00
Bo Anderson
f504b92c45
Preliminary macOS 14 (Sonoma) support 2023-06-05 23:21:11 +01:00
Markus Reiter
8274920217
Rename OS::Mac::Version to MacOSVersion. 2023-05-09 05:08:38 +02:00
Markus Reiter
4bbf120630
Add note about Version constructor. 2023-05-09 01:13:55 +02:00
Markus Reiter
a1efaf1864
Merge HeadVersion and NullVersion into Version. 2023-05-09 01:13:54 +02:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00