278 Commits

Author SHA1 Message Date
Shaun Jackman
9f8f8ffb89 superenv: Move Linux-specific bits to extend/os/ 2018-05-30 14:00:26 -07:00
Shaun Jackman
76bfd0cecb Add superenv for Linux 2018-05-18 16:58:21 -07:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Mike McQuaid
9b1bd5f45a system_config: don’t output std/superenv vars. 2018-04-02 09:40:39 +01:00
Mike McQuaid
740e89d2f3
super: tweak LLVM refactoring. 2018-03-07 15:00:08 +00:00
Mike McQuaid
7cb6ebf3fb
super: refactor LLVM path addition. 2018-03-06 08:44:47 +00:00
Alex Wang
7b94842610 Split ternary for PATH building into if/else cases 2018-02-28 09:26:15 -05:00
Alex Wang
bfa474857a Add macOS libs ahead of brewed llvm libs in lib search path
This ensures that libraries that are built with brewed LLVM but not
included in the Command Line Tools/Xcode (e.g. libomp) can be found
during a build, while still using system libraries for the essential
stuff (e.g. libc++)
2018-02-26 18:35:34 -05:00
Mike McQuaid
f72aba548d ENV/std: fully extend from HOMEBREW_PATH.
Rather than just re-adding HOMEBREW_PREFIX/bin if it's missing re-add
everything from HOMEBREW_PATH. This works well with or without
environment filtering being enabled but with environment filtering it
ensures that ENV/std just builds on the original user environment.
2017-10-29 13:41:51 +00:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Markus Reiter
175ca909ee Clean up code style and remove .rubocop_todo.yml. 2017-10-08 16:10:37 +02:00
Mike McQuaid
cf5fdeef1d Rubocop: manual rule fixes. 2017-09-24 21:23:59 +01:00
Dominyk Tiller
0cb6307f2d
ENV: move java_cache to compat for future hard deprecation 2017-08-31 21:04:42 +01:00
Andrew Yates
980db9d3fb Remove errant pkg-config libdir
We found an issue in Linuxbrew/homebrew-core#3366 where the addition of "/usr/lib/pkg-config" causes compilation issues if system pkg-config files are in that directory on Linux. Removing the line from here and adding it into the mac superenv.
2017-08-03 10:44:56 +01:00
Mike McQuaid
7a0aff1080 Autocorrect Rubocop Style/PerlBackrefs. 2017-06-10 20:23:20 +03:00
Markus Reiter
2d6ae61314 Re-revert "Fix operator spacing." 2017-06-02 19:22:05 +02:00
ilovezfs
197392b56d Revert "Fix operator spacing." 2017-06-01 04:06:40 -07:00
Markus Reiter
d34ba7395b Fix operator spacing. 2017-05-31 19:53:41 +02:00
Bob W. Hogg
e2c707d8b1 Stdenv: Add ENV.libxml2 and ENV.x11 for Linux
Add ENV.libxml2 primarily for the use of test do blocks.
Add a dummy ENV.x11 function.

See Linuxbrew/brew#356 and Linuxbrew/brew#382
2017-05-30 10:37:26 -07:00
Markus Reiter
24f48ae7d9 Use PATH#select. 2017-04-30 21:11:28 +02:00
Markus Reiter
4d5d6a65e3 Rename PATH#validate to PATH#existing. 2017-04-30 21:11:28 +02:00
Markus Reiter
f8ad9d7efd Use PATH where possible. 2017-04-30 21:11:27 +02:00
Markus Reiter
314483f75c Remove Array#to_path_s. 2017-04-30 21:11:27 +02:00
Markus Reiter
3e4fe279b0 Use to_path_s for determine_pkg_config_libdir. 2017-04-30 21:11:27 +02:00
Mike McQuaid
45a7730f61 Fix and remove various TODOs.
Fix those that can be done so without tearing Homebrew to pieces and
remove the comments for those that can never be done.
2017-04-23 15:10:18 +01:00
Mike McQuaid
64e2e6e862 super: re-add set_cpu_flags.
It's used by ENV.fortran.

Fixes https://github.com/Homebrew/brew/issues/2530
Fixes https://github.com/Homebrew/homebrew-science/issues/5485
2017-04-22 21:56:32 +01:00
Mike McQuaid
ba3c46d24f More deprecations.
Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
2017-04-22 16:28:07 +01:00
Mike McQuaid
a9cd74de59 Merge pull request #2279 from sjackman/determine_path
determine_path: Fix tests FormulaUnavailableError
2017-03-17 15:57:30 +02:00
ilovezfs
76db07e1b5 env: make prepend_path ignore system paths
`ENV.prepend_path "PATH", which("emacs").dirname` in the emacs
requirement was causing us to end up invoking /usr/bin/clang instead
of /usr/local/Homebrew/Library/Homebrew/shims/super/clang.
2017-03-11 01:59:50 -08:00
Shaun Jackman
31e5ed28d1 determine_path: Fix tests FormulaUnavailableError
Fix the brew tests error:
InstallTests#test_a_basic_install:
FormulaUnavailableError: No available formula with the name "gcc"
Library/Homebrew/formulary.rb:231:in `get_formula'
Library/Homebrew/formulary.rb:259:in `factory'
Library/Homebrew/extend/ENV/shared.rb:287:in `gcc_version_formula'
Library/Homebrew/extend/ENV/super.rb:124:in `determine_path'
Library/Homebrew/extend/ENV/super.rb:44:in `setup_build_environment'
Library/Homebrew/build.rb:87:in `install'
Library/Homebrew/build.rb:201:in `<main>'
2017-03-07 09:03:33 -08:00
Mike McQuaid
ed7290abb4 Merge pull request #1948 from sjackman/gnu-gcc
gcc_version_formula: Use gcc@4.x rather than gcc4x
2017-02-21 18:06:54 +00:00
Alyssa Ross
9e97eadccb rubocop: trailing comma in multiline method calls
Discussed in
https://github.com/Homebrew/brew/pull/1987/files#r100693581.

This was originally ommitted because it wasn't compatible with Ruby 1.8.
(See https://github.com/Homebrew/legacy-homebrew/pull/48144#r49928971).
2017-02-12 15:11:38 +00:00
Shaun Jackman
fd343a11fb gcc_version_formula: Use gcc@4.x rather than gcc4x 2017-02-11 22:37:01 -08:00
Mike McQuaid
6040456ea9 Unset GREP_OPTIONS.
Users may have this set, breaking grep's output.

Fixes #1430.
2017-01-16 20:35:56 +00:00
Mike McQuaid
f0fbcf5022 ENV/super: fix set_cpu_flags stub.
It should accept arguments.

Fixes https://github.com/Homebrew/homebrew-core/issues/8362
2016-12-31 22:44:05 +00:00
Mike McQuaid
e50102d91e ENV: deprecate old methods.
These should have been deprecated long ago but we didn’t really have
the necessary framework to do so.
2016-12-30 20:20:13 +00:00
Markus Reiter
59e2d67721 No if/unless-modifier on multiline blocks. 2016-11-13 23:37:40 +01:00
Markus Reiter
84b2276fd8 Use guard clauses. 2016-11-13 23:00:47 +01:00
Mike McQuaid
1f963267b6 Update Rubocop style.
Another look at the current Rubocop rules and how they fit with our
existing and desired future style. Almost all of these changes were
automatic. Split some rules between formulae/brew where brew doesn't
have millions of cases that need fixed.
2016-10-22 13:32:46 +01:00
Markus Reiter
6c6a4c9fa7 RuboCop: Style/AccessorMethodName 2016-09-24 19:28:26 +02:00
Markus Reiter
58e36c7319 Fix Style/GuardClause. 2016-09-24 12:24:35 +02:00
Markus Reiter
e851c9bf6c Style/Alias: Prefer alias. 2016-09-23 18:19:53 +02:00
Markus Reiter
fe2d51e0b9 Fix Style/IfUnlessModifier. 2016-09-23 15:30:07 +02:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Mike McQuaid
fb3bec8d70 extend/ENV/super: fix Rubocop warnings. 2016-09-13 07:57:06 +01:00
Mike McQuaid
c3dab72e37 extend/ENV/std: fix Rubocop warnings. 2016-09-13 07:57:04 +01:00
Mike McQuaid
fe661a809c extend/ENV/shared: fix Rubocop warnings. 2016-09-13 07:57:02 +01:00
Mike McQuaid
602fb0e575 Make -no_weak_imports opt-in.
The experiment to add `-no_weak_imports` unconditionally has been a bit
of a failure. It's broken more than it's fixed and I don't think we can
have this as a default for Xcode 8.

Add `ENV.no_weak_imports` to be used by formulae authors and make
`ENV.no_weak_imports a no-op (for now).

We may reconsider this behaviour in future.
2016-08-22 10:39:38 +01:00
Tim D. Smith
9c7f24b84a Add permit_weak_imports directive
Issue Homebrew/homebrew-core#3727 suggested we set -no_weak_imports for
new versions of Xcode to ensure that e.g. building on 10.11 against the
10.12 SDK doesn't result in a situation where autotools thinks symbols
exist that don't actually exist on the current platform.

Further discussion in golang/go#16770 revealed that some packages
require weak imports to build normally.
2016-08-17 23:02:44 -07:00
Tim D. Smith
764390aadd Document 'w' CCCFG flag 2016-08-17 23:02:38 -07:00