1720 Commits

Author SHA1 Message Date
Carlo Cabrera
309504a32c
formula: add rpath helper method
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.
2021-04-19 09:23:33 +01:00
Mike McQuaid
1d34f7f2fa
Merge pull request #11077 from MikeMcQuaid/any_bottles
Support `all: SHA256` bottles.
2021-04-09 10:18:19 +01:00
Mike McQuaid
6b5213286c
Rename "exact" tag match to "no_older_versions"
This is more specific about the behaviour we want to have in future.
2021-04-09 09:36:18 +01:00
Mike McQuaid
d73351251c
Deprecate, disable, delete code for next major/minor version.
Do the usual dance for bumping our major/minor version.
2021-04-09 09:30:36 +01:00
Bo Anderson
20d86c0185
Refactor some tag handling into a Utils::Bottles::Tag class 2021-04-08 17:23:57 +01:00
Mike McQuaid
a654730acc
Merge pull request #11004 from MikeMcQuaid/cleanup_cxxstdlib
Cleanup use of CxxStdlib
2021-04-05 14:22:49 +01:00
Markus Reiter
b6ed8915e5
Add compatibility layer for AbstractDownloadStrategy#fetch. 2021-04-03 20:10:33 +02:00
Markus Reiter
24c9b599a6
Revert "Revert "Merge pull request #10864 from reitermarkus/command-timeout""
This reverts commit 57b2660cae8cf43efd2b88d84a7174706328c001.
2021-04-03 20:10:32 +02:00
Shaun Jackman
31aa0375ca
build_info: Add oldest_cpu_family for Linux only 2021-04-02 18:42:53 -07:00
Mike McQuaid
04abc51d1f
Cleanup use of CxxStdlib
- remove usage on macOS as we don't care about it there
- don't error out on incompatibility but still store stdlib on Linux
- remove (now) unused methods
2021-04-02 13:55:29 +01:00
Shaun Jackman
95e7e010ee Add OS::Linux::Glibc.version 2021-04-01 22:16:33 -07:00
Shaun Jackman
0db0db9516
build_system_info: Use the host glibc version only
Use the host glibc version only to avoid errors with
brew tests --no-compat
2021-04-01 15:04:40 -07:00
Shaun Jackman
11bfba1762
build_info: Add glibc_version for Linux 2021-04-01 13:04:32 -07:00
Mike McQuaid
d8a2cf9efc
Write tabs to bottle JSON, optionally not bottle
- Write a subset of the tab required for bottles as an annotation.
- Add option on new bottle creation to skip writing tab into bottle
  and instead add it (and other useful metadata) to bottle JSON.
- Read formula information and tab from bottle JSON.
- Write prettier JSON to disk.
- Don't write `HEAD` to tab; this duplicates `HOMEBREW_VERSION`.
- Allow `brew bottle` to use `--json` to generate JSON files from a
  local bottle file.
2021-03-31 09:43:37 +01:00
Carlo Cabrera
bfb9134884
Merge pull request #10944 from carlocab/libtool-m4
extend/ENV/super: set `M4` for `libtool`
2021-03-29 16:02:54 +01:00
nandahkrishna
09febbf031
extend/ENV: make 'passphrase' sensitive
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-03-29 16:58:07 +05:30
Mike McQuaid
9d70b48e93
Merge pull request #10851 from kthchew/audit-empty-files
audit: check for installed empty files
2021-03-29 11:55:56 +01:00
Kenneth Chew
9d6bfa5965
pathname: do not install empty metafiles 2021-03-27 13:34:50 -04:00
Carlo Cabrera
e8452de418
extend/ENV/super: set M4 for libtool
[g]libtoolize looks for m4 using the environment variable M4. When
that isn't set, it looks for m4 in PATH.

However, when libtool is a build dependency but m4 is not, m4 will
not be found in PATH. Since it is currently not set in the
environment by superenv, this causes some builds to fail.

Closes https://github.com/Homebrew/homebrew-core/pull/73932.
2021-03-26 14:32:09 +00:00
Carlo Cabrera
9308a2515b
Merge pull request #10921 from carlocab/brewed-m4
extend/ENV/super: remove M4
2021-03-25 06:04:43 +00:00
Carlo Cabrera
f6eba3c1ea
extend/ENV/super: remove M4
Building automake fails with autoconf 2.70+, when autoconf is used with
macOS m4. It therefore makes sense for autoconf to depend on brewed m4.

However, without the change proposed here, the setting of the M4
environment variable in superenv breaks the automake build.

Related: https://github.com/Homebrew/homebrew-core/pull/73797
2021-03-24 13:14:58 +00:00
Rylan Polster
57b2660cae
Revert "Merge pull request #10864 from reitermarkus/command-timeout"
This reverts commit d55bdd3ddbe7ff2b1f106a41bd994dc117ca5142, reversing
changes made to 3c3bf1c74d1d7ef1d2c792719574623b6c3c4d25.
2021-03-24 01:22:18 -04:00
Markus Reiter
712a95fdd0 Allow specifying timeouts for commands and downloads. 2021-03-16 18:15:21 +01:00
Liyang HU
adac92b326 Library/Homebrew/extend/os/mac/extend/ENV/super.rb: obsolete HOMEBREW_CCCFG flag s
@Bo98's comment https://github.com/Homebrew/brew/pull/10802#issuecomment-792072121
2021-03-06 23:15:55 +00:00
Bo Anderson
344ab02f18
Merge pull request #10767 from Bo98/audit_deps-force_homebrew_on_linux
Allow deps auditing to run on Linux via HOMEBREW_SIMULATE_MACOS_ON_LINUX
2021-03-05 23:46:31 +00:00
Bo Anderson
abb2b26a93
Add HOMEBREW_SIMULATE_MACOS_ON_LINUX 2021-03-05 12:21:45 +00:00
Bo Anderson
7448a6be58
Revert "Revert "uses_from_macos: fix force_homebrew_on_linux behaviour.""
This reverts commit 9ad37ddc36c8438db97fdb3e4484d724e06eaffe.
2021-03-05 12:21:45 +00:00
Mike McQuaid
49642e4267
linux/keg_relocate: patchelf dependency is conditional.
This is only needed if we're not using `patchelf.rb`.

Partial fix for https://github.com/Homebrew/brew/issues/10784
2021-03-05 11:36:23 +00:00
Mike McQuaid
dc1fdc9f8d
Speedup brew --version.
Port `brew --version` to Bash to speed it up.

While we're here:
- remove (now) unused `Tap` Git methods
- use `--quiet` instead of `-q` to be more verbose

Benchmarks:
```
$ hyperfine --min-runs=3 --warmup=2 "git checkout origin/master; brew --version" "git checkout speedup_brew_version; brew --version"
Benchmark #1: git checkout origin/master; brew --version
  Time (mean ± σ):      2.083 s ±  0.004 s    [User: 396.8 ms, System: 597.2 ms]
  Range (min … max):    2.080 s …  2.088 s    3 runs

Benchmark #2: git checkout speedup_brew_version; brew --version
  Time (mean ± σ):     847.9 ms ±  35.2 ms    [User: 100.0 ms, System: 247.9 ms]
  Range (min … max):   824.1 ms … 888.3 ms    3 runs

Summary
  'git checkout speedup_brew_version; brew --version' ran
    2.46 ± 0.10 times faster than 'git checkout origin/master; brew --version'
```
2021-03-04 12:59:42 +00:00
Bo Anderson
65c03573c6
ENV: fix missing arg for generic OS and correct type sigs 2021-02-26 18:23:48 +00:00
Bo Anderson
fb8b247db3
dev-cmd/unbottled: various improvements
* Ignore bottles for older macOS versions
* Ignore disabled formulae
* Ignore formulae which can't build on the chosen macOS
* Improve/fix sort description
2021-02-23 16:27:58 +00:00
Mike McQuaid
c13d7e6723
Fix brew style 2021-02-16 09:25:34 +00:00
Bo Anderson
0f4ccd7625
Merge pull request #10552 from Bo98/sdk-checks
os/mac/diagnostic: check SDK version in SDKSettings matches the path
2021-02-11 12:53:05 +00:00
Bo Anderson
fe52b3a402 os/mac/diagnostic: check SDK version matches the path 2021-02-11 01:19:59 +00:00
Michka Popoff
0a292c7041
linux: use preferred_gcc instead of gcc 2021-02-09 21:48:48 +01:00
Michka Popoff
221983dbcf
compilers: prefer gcc 5 on linux
Fixes #10170 by preferring gcc@5 on linux
This makes sure ENV.cc and ENV.cxx is correctly set:

If a formula does not explicitely depend on a brewed gcc,
ENV.cc is set to gcc-5 (system gcc-5 or brewed gcc-5) with this change,
even if other gcc versions are installed on the system.
2021-02-08 13:26:50 +01:00
Mike McQuaid
39b3bcdce4
Undeprecate ENV.O1/ENV.O0
These are still used in Homebrew/homebrew-core. The others are either
- default (Os on macOS, O2 on Linux)
- less reliable than the default (O3)

While we're here, also remove an outdated `ncurses_define` comment.
2021-02-08 11:11:21 +00:00
Bo Anderson
ec3e078bcb os/mac/diagnostic: always require dev tools on Apple Silicon 2021-02-05 12:26:28 +00:00
Carlo Cabrera
5ce6537169
extend/os/mac/language/java: improve readability 2021-02-02 14:42:47 +00:00
Jonathan Chang
d6bba1c493 java: fix java_home on macOS 2021-02-02 18:49:29 +11:00
Mike McQuaid
b8d55e5a77
Merge pull request #10397 from MikeMcQuaid/deprecations-disables
Homebrew 3.0.0 deprecations/disables
2021-02-01 08:37:22 +00:00
Mike McQuaid
e65e310fd0
Fix brew style 2021-01-29 20:56:59 +00:00
Mike McQuaid
d6957a3acb
Homebrew 3.0.0 deprecations/disables 2021-01-29 19:50:24 +00:00
Rylan Polster
4bdc11ddc9
tap: fix renamed branches with brew tap --repair 2021-01-28 09:10:13 -05:00
Mike McQuaid
6c68e4bcb9
Merge pull request #10432 from iMichka/shared2
ENV.shared: deprecate ncurses_define
2021-01-27 08:55:10 +00:00
Michka Popoff
acb77e71f9 ENV.shared: deprecate ncurses_define
This was only used by 2 formuale in homebrew-core.
One formula did not need the flag anymore and the flag was removed
The other formula (rogue) still needs it, the flag was directly
added to the formula.

There is no reason for us to keep this method.
2021-01-26 23:09:57 +01:00
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05:00
EricFromCanada
99ad3350ee use single quotes around stanza and parameter names 2021-01-26 16:19:47 -05:00
EricFromCanada
a427de5bee capitalization fixes
"curl" is the binary, while "cURL" is the umbrella project.
2021-01-26 15:36:44 -05:00
EricFromCanada
571179ff0e pass second argument to ohai when applicable 2021-01-26 15:36:43 -05:00