1185 Commits

Author SHA1 Message Date
Xu Cheng
7e14ec0ba6
ARGV#kegs: using installed_prefix to locate keg 2016-07-17 02:23:37 +08:00
Xu Cheng
f811a45fe4
ARGV#resolved_formulae: check whether input is a formula file 2016-07-17 02:23:37 +08:00
ilovezfs
356018501b ENV: fix homebrew_extra_pkg_config_paths
Switch to HOMEBREW_LIBRARY since HOMEBREW_LIBRARY_PATH already includes
"/Homebrew" and HOMEBREW_LIBRARY is less confusing.

Closes #530.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-07-16 08:09:43 -07:00
Vlad Shablinsky
3fb5d70a72
Unify Version.create usage
Substitue each Version.new and HeadVersion.new with Version.create
to unify Version and HeadVersion instantiation among core code.

Note that this does not relate to Mac::OS::Version class.
2016-07-16 20:39:13 +08:00
Mike McQuaid
a02be9eea2 ENV: move to new paths. (#507)
Move some stuff formerly in `Library/ENV` around:
- Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are
  all superenv wrappers and all symlinks to the same version. We never needed
  the "separate shims for separate versions" functionality and it just adds
  confusion.
- Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more
  things under `Library/Homebrew`
- Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually
  used by or related to superenv (or stdenv) in any way.
2016-07-15 19:03:45 +01:00
Xu Cheng
7452dcf508
ARGV#resolved_formulae: also load build options 2016-07-15 19:57:23 +08:00
Mike McQuaid
2e747aa910 super: remove effective_sysroot.
No longer needed in `super.rb` after it was moved to `os/mac`.
2016-07-15 08:10:25 +01:00
Dominyk Tiller
91af4aa0fe
super: migrate xml2 cmake to mac/super
Looks like it was accidentally left behind (?)
2016-07-15 05:23:28 +01:00
Dominyk Tiller
706e7e71a0
mac/super: restore definition of effective_sysroot
In 0d189fae57
we completely removed `effective_sysroot`, which consequently left all the
`effective_sysroot`/usr/include calls pointing at `/usr/include`. This is wildly
problematic on systems where the Command Line Tools aren't installed because
`/usr/include` is not a default-created folder prior to CLT installation.

I'm unsure if `effective_sysroot` should still be mentioned in Library/Homebrew/extend/ENV/super.rb
at all. If it can be deleted, feel free to do that without waiting for me to review.

This seems to fix:
* https://github.com/Homebrew/homebrew-core/issues/2991
* https://github.com/Homebrew/homebrew-core/issues/2986
* https://github.com/Homebrew/homebrew-core/issues/2962
2016-07-15 05:14:51 +01:00
Xu Cheng
0ed673abdb
formula_cellar_checks: add check_linkage
This means linkage checks will be invoked during `brew install` and `brew audit`

Closes #470.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-07-14 15:23:34 +08:00
Xu Cheng
de1049f1f1
various: proper escape dot in regex 2016-07-13 19:11:46 +08:00
Xu Cheng
b586a04204
describe_homebrew_ruby: fix regex
`.` need to be escaped, otherwise it will match any character.

Also improve code style for handling string s.
2016-07-13 15:34:49 +08:00
Xu Cheng
99e9a22b85
describe_homebrew_ruby: s may be a frozen string 2016-07-13 15:18:44 +08:00
Dominyk Tiller
bd4e24ae8f
superenv: restore HOMEBREW_PREFIX/lib 2016-07-13 01:18:42 +01:00
Mike McQuaid
0d189fae57 superenv: port to generic OS. (#457) 2016-07-12 12:01:20 +01:00
Mike McQuaid
498e81c9fc stdenv: port to generic OS. (#456) 2016-07-12 11:39:39 +01:00
Xu Cheng
fe3915237e config: show homebrew ruby for all system (#492) 2016-07-11 22:32:46 +08:00
Martin Afanasjew
832a08abcd extend/os/mac/keg_relocate: fix weird omission 2016-07-09 17:06:29 +02:00
Mike McQuaid
f1c4141885 keg_relocate: port to generic OS. (#453) 2016-07-09 13:52:05 +01:00
Mike McQuaid
df7e36b86c formula_cellar_checks: port to generic OS. (#452) 2016-07-09 13:51:53 +01:00
Mike McQuaid
a5ec0aa259 emoji: extract logic into generic OS classes. (#450) 2016-07-09 13:51:43 +01:00
Martin Afanasjew
6cdc6b1460 Add GitRepositoryExtension
Add an extension for accessing Git-related meta data that can be mixed
in into a Pathname object (e.g. `HOMBREW_REPOSITORY` or the path of a
`Tap` instance). The goal here is to eliminate code duplication.
2016-07-07 01:46:58 +02:00
Martin Afanasjew
ec75ca7e42 extend/os/mac/diagnostic: remove redundant method
Remove an exact duplicate from further up in the same file. (It was
accidentally added in 8a582f2bd976ce7044c3b2dc6eef701f94b9ace5.)
2016-07-06 16:26:27 +02:00
Martin Afanasjew
2842910609 extend/os/mac/diagnostic: fix indentation 2016-07-06 16:22:15 +02:00
Mike McQuaid
3a127e405e development_tools: add installed? method. (#455) 2016-07-06 11:07:24 +01:00
Mike McQuaid
11624b9a7d hardware: move generic logic from linux. (#454) 2016-07-06 10:43:54 +01:00
Mike McQuaid
416e51bca9 ENV: only check Superenv if necessary. (#451) 2016-07-06 10:43:42 +01:00
Xu Cheng
cc01d3f59a
doctor: fix undefined method `include?' for nil:NilClass
Closes https://github.com/Homebrew/homebrew-core/issues/2758
2016-07-06 16:18:24 +08:00
Misty De Meo
ca005cb824 doctor: check for beta XQuartz releases
Beta versions of XQuartz have address sanitization enabled, which
breaks some software at runtime, including wine.

Closes Homebrew/homebrew-core#2481.

Closes #459.

Signed-off-by: Misty De Meo <mistydemeo@github.com>
2016-07-06 17:21:05 +10:00
Mike McQuaid
59074e91d6 diagnostic: more porting to generic OS. (#449) 2016-07-04 18:35:03 +01:00
Mike McQuaid
fe29cc2920 cleaner: port to generic OS. (#447) 2016-07-04 16:10:24 +01:00
msbit
01e8e180a8 ENV: mark gcc-6 as supporting C++11 (#349)
Add SharedEnvExtension#gcc_with_cxx11_support? to centralise the
logic for checking whether a compiler is known to support C++11.

Update logic to accept GCC 4.8 and above (including 6). Thereby also
address oversight in #163 where support for GCC 6 was added without
updating the C++11 compiler whitelist.

Add tests for Superenv#cxx11.

Closes #346.
2016-06-16 14:15:28 +02:00
Mike McQuaid
fd0a81399b diagnostic: prod unsupported OS users to file PRs. (#365)
They may not but it's nice to be a bit more explicit.
2016-06-14 21:23:56 +01:00
Martin Afanasjew
aa747b915a development_tools: fix broken 'Xcode' reference
Affects only legacy systems that don't have a `/usr/bin/cc` binary.
2016-05-26 19:02:25 +02:00
Mike McQuaid
375efe0945 Remove LLVM-GCC support. (#252)
At this point it's never a good compiler to use so let's just remove it.
2016-05-22 09:40:08 +01:00
Paolo G. Giarrusso
2f20a42292 Synchronize counts for link and unlink (#242)
Closes #239.
2016-05-15 12:07:58 +01:00
Martin Afanasjew
1087df1016 ARGV: fix 'value' method, make it more predictable
The fix changes behavior in same cases, but those cases were all either
broken or showed unexpected behavior. The new behavior is very simple:

- If an argument starts with `--<option-name>=`, return whatever comes
  after the equals sign.

Prior to this change, `ARGV.value` showed some unexpected behavior:

- `ARGV.value("foo")` returned `nil` for `--foo=` because at least one
  character needed to be present after the equals sign. (All other
  option parser implementations I'm aware of allow for empty values.)

- `ARGV.value("bar")` returned `"baz"` for `--foo=--bar=baz` because the
  regular expression was not anchored to the start of the argument.

- `ARGV.value("++")` raised an exception because the string wasn't
  escaped for use in the regular expression. (An unlikely corner case.)

Closes #231.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-05-12 08:09:19 +02:00
Sebastian Staudt
57bf33302a extend/os/linux/hardware/cpu: fix typo.
CPU was transformed into a class in 8d995e961f549e555f405d2567235dab53f6baad.
2016-05-09 08:41:30 +01:00
Mike McQuaid
9e7b8c61a9 Make config command cross-platform.
Closes #168.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-05-08 16:51:22 +01:00
Mike McQuaid
e316cc9296 Make development tools code cross-platform. 2016-05-08 16:51:22 +01:00
Mike McQuaid
8d995e961f Make hardware code cross-platform. 2016-05-08 16:51:22 +01:00
Mike McQuaid
8a582f2bd9 Make diagnostic code cross-platform. 2016-05-08 16:51:22 +01:00
Mike McQuaid
931e292bf1 Make bottle code cross-platform. 2016-05-08 16:51:22 +01:00
Andrew Janke
d887dd39ec brew install: make -s apply only to given formula, not deps (#205) 2016-05-06 12:02:13 -07:00
Toru Tanaka
967988c444 Fix a variable name in error message (#190) 2016-05-03 02:24:32 -04:00
Misty De Meo
da643d942e Explicitly list -arch in LDFLAGS on Leopard 2016-04-22 22:37:21 -07:00
Misty De Meo
967fa41e41 Set -faltivec in CFLAGS on Tiger
Setting -mcpu and -mtune on Tiger with gcc-4.2 exposes a bug in one of the
system headers, causing certain builds to fail. This can be fixed by
adding -faltivec to CFLAGS.

See: http://trac.macports.org/ticket/34213
2016-04-22 22:37:21 -07:00
Misty De Meo
2008c880dd Add a helper to determine make path on Tiger 2016-04-22 22:37:21 -07:00
Andrew Janke
258a764f67 stage: fix block signature back-compatibility under Ruby 1.8.7
The new stage() signature introduced by #66 breaks back-compatibility
under Ruby 1.8.7. This fixes it by switching back to a one-argument
block signature and using a new class to wrap both the Resource and
Mktemp info for the staging context, in a signature-back-compatible
way.

Addresses homebrew/homebrew-core#529.

Closes #135.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-22 21:49:00 -04:00
Misty De Meo
35385e8c59 stdenv: stop setting ACLOCAL_PATH 2016-04-21 09:36:30 -07:00