168 Commits

Author SHA1 Message Date
Carlo Cabrera
22db7aa516
superenv: set M4 on Linux when bison is a dependency
Bison no longer remembers the path to `m4` as of
Homebrew/homebrew-core#84931. Since superenv does not put runtime
dependencies of build dependences in `PATH`, we now need to help Bison
find `m4` by setting `M4` in the environment.

See also Homebrew/homebrew-core#85260.
2021-09-16 21:11:12 +08:00
Bo Anderson
861dea9ada
Bump various type strictnesses 2021-09-11 01:00:23 +01:00
Mike McQuaid
2b6e580636
ENV/super: add shims_path helper method.
This allows us to stop repeatedly hardcoding this on macOS/Linux in
formulae.
2021-09-08 12:35:36 +01:00
Michka Popoff
4ef058412c
brew.sh: set HOMEBREW_FORCE_HOMEBREW_CORE_REPO_ON_LINUX when core repo is homebrew-core
See https://github.com/Homebrew/install/pull/571

When the install script sets as https://github.com/Homebrew/homebrew-core,
we need to use the homebrew-core bottle domain, and correctly set
the HOMEBREW_CORE_DEFAULT_GIT_REMOTE below.

This also fixes the brew doctor issue for new homebrew-core Linux installations

Warning: Suspicious https://github.com/Homebrew/linuxbrew-core git origin remote found.
The current git origin is:
  https://github.com/Homebrew/homebrew-core

With a non-standard origin, Homebrew won't update properly.
You can solve this by setting the origin remote:
  git -C "/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/linuxbrew-core
2021-08-31 21:48:38 +02:00
Carlo Cabrera
0ae032ad2f
Merge pull request #11756 from carlocab/deuniversalize-machos
formula: add `deuniversalize_machos` method
2021-08-18 02:28:34 +08:00
Rylan Polster
f84265f9a2
Remove extra type signatures 2021-08-06 04:40:22 -04:00
Rylan Polster
737dd1654b
Refactor API methods 2021-08-06 04:31:27 -04:00
Carlo Cabrera
5e0b786da2
formula: add deuniversalize_machos method
This method takes an optional array of `Pathnames`s or `Strings`s and
extracts the native slice from the specified universal binary. If no
parameter is supplied, this is done on all compatible universal binaries
in a formula's keg.

`deuniversalize_machos` is a no-op on Linux.

I still need to look into a) error handling, and b) whether using this
method requires codesigning on ARM.

I've also added signatures to the methods in `extend/os/linux/formula`.
2021-07-22 01:24:56 +08:00
Dawid Dziurla
8d5dc50b68
keg_relocate: swap env var 2021-07-04 15:02:39 +02:00
danielnachun
dc8568f541 linkage_checker: add libatomic 2021-05-31 00:40:19 -07:00
Bo Anderson
ae49b06600
keg_relocate: replace Perl shebangs 2021-05-10 06:13:54 +01:00
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
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
Shaun Jackman
31aa0375ca
build_info: Add oldest_cpu_family for Linux only 2021-04-02 18:42:53 -07: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
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
Bo Anderson
65c03573c6
ENV: fix missing arg for generic OS and correct type sigs 2021-02-26 18:23:48 +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
d6957a3acb
Homebrew 3.0.0 deprecations/disables 2021-01-29 19:50:24 +00:00
EricFromCanada
99ad3350ee use single quotes around stanza and parameter names 2021-01-26 16:19:47 -05:00
Seeker
0aa4259654 formula: include versioned *.so.* libs for shared_library("*") 2020-12-24 08:51:01 -08:00
Rylan Polster
af6be13e7c test: don't try to use Xcode SDK for build requirement 2020-12-21 09:25:29 -05:00
Mike McQuaid
87dd13aea6
Deprecate cask requirements.
This probably has to wait until 2.7.0 now and will require a bunch of
formula changes/deprecations but we should probably start moving in this
direction given we're not installing any of these on our CI any more.
2020-12-15 14:19:45 +00:00
Seeker
a2af19360b extend: add on_os (for on_macos/on_linux) 2020-12-07 10:36:51 -08:00
Mike McQuaid
1d5e354cc2
Merge pull request #9347 from maxim-belkin/amd_cpus
Identify AMD CPUs on Linux
2020-12-01 12:47:26 +00:00
Maxim Belkin
6eb49907f0 cpu.rb: apply Mike's suggestions
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-11-30 16:18:19 -06:00
Maxim Belkin
97c9a952d3 Recognize AMD CPUs on Linux 2020-11-30 16:18:19 -06:00
Maxim Belkin
8738ad324e cpu.rb: clean up the list of CPU instructions
Co-authored-by: Shaun Jackman <sjackman@gmail.com>
Co-authored-by: Markus Reiter <me@reitermark.us>
2020-11-30 16:17:00 -06:00
Markus Reiter
6e20d27582 Remove some unneeded requires. 2020-11-30 00:49:14 +01:00
Markus Reiter
5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +01:00
Markus Reiter
0184e271d8 Fix RuboCop offenses. 2020-11-17 11:09:55 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
Michka Popoff
084f2e75eb
Merge pull request #8907 from iMichka/onlinux
formula: add on_linux and on_macos blocks
2020-11-03 23:30:37 +01:00
Michka Popoff
8b85ef2e88 formula: add on_linux and on_macos blocks
for install and others
2020-11-03 22:54:07 +01:00
EricFromCanada
212367c1c0 requirements: reword error messages for consistency
also add formatting to download URLs
2020-11-01 15:20:02 -05:00
Jonathan Chang
55dc8bbada Fix strict typecheck errors. 2020-10-29 20:39:49 +11:00
Michka Popoff
3aec8a0398 xcode_requirement: support linux
2020-10-12T21:29:03.7866574Z [31mError:[0m undefined method `latest_version' for OS::Mac::Xcode:Module
2020-10-12T21:29:03.7867686Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/requirements/xcode_requirement.rb:33:in `message'
2020-10-12T21:29:03.7868902Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/tests/formulae.rb:199:in `map'
2020-10-12T21:29:03.7870227Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/tests/formulae.rb:199:in `satisfied_requirements?'
2020-10-12T21:29:03.7871547Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/tests/formulae.rb:593:in `formula!'
2020-10-12T21:29:03.7873156Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/tests/formulae.rb:20:in `block in run!'
2020-10-12T21:29:03.7875029Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/tests/formulae.rb:19:in `each'
2020-10-12T21:29:03.7876299Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/tests/formulae.rb:19:in `run!'
2020-10-12T21:29:03.7877495Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/test_runner.rb:119:in `run_tests'
2020-10-12T21:29:03.7878705Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/test_runner.rb:36:in `block in run!'
2020-10-12T21:29:03.7879908Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/delegate.rb:83:in `each'
2020-10-12T21:29:03.7881136Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/delegate.rb:83:in `method_missing'
2020-10-12T21:29:03.7882519Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/test_runner.rb:25:in `run!'
2020-10-12T21:29:03.7883735Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/test_bot.rb:126:in `run!'
2020-10-12T21:29:03.7884875Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-test-bot/cmd/test-bot.rb:75:in `test_bot'
2020-10-12T21:29:03.7885882Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'
2020-10-26 22:22:16 +01:00
Markus Reiter
61b79318ed Move include Kernel into .rbi files again and split up existing .rbi files. 2020-10-10 19:10:58 +02:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Maxim Belkin
40f1994eec system_config.rb: rename SYSTEM_RUBY_PATH to HOST_RUBY_PATH
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-09-04 13:46:53 +00:00
Maxim Belkin
de736ffb7d system_config.rb: show system Ruby info on Linux 2020-09-03 19:25:58 +00:00
rmnull
649e02ba3d
patchelf.rb writing in ELFShim 2020-08-27 22:50:34 +05:30
Markus Reiter
e024b12d47 Remove os/linux/diagnostic. 2020-08-24 00:22:17 +02:00
Markus Reiter
39cc754a8f
Merge pull request #8451 from reitermarkus/document-hardware
Refactor and document `Hardware`.
2020-08-23 04:40:20 +02:00
Markus Reiter
fbf3d807d7
Merge pull request #8449 from reitermarkus/document-system-config
Refactor and document `SystemConfig`.
2020-08-23 04:39:05 +02:00
Markus Reiter
33c138751e Refactor and document Hardware. 2020-08-23 04:19:46 +02:00