216 Commits

Author SHA1 Message Date
Bob W. Hogg
0a4bc8494d switch to using extend pattern 2016-09-22 08:31:50 -04:00
Mike McQuaid
3f9cce0a03 Use new "macOS" naming where appropriate.
Not quite a mass replacement as I've used OS X and Mac OS X where
describing specific older versions and added compatibility methods
for things in the DSL.
2016-09-18 19:57:19 +01:00
Mike McQuaid
59b7f16bfd Merge pull request #989 from MikeMcQuaid/rubocop-final
Rubocop: apply auto-corrections and don't use hash-rockets
2016-09-18 13:28:15 +01:00
ilovezfs
390bcf413b no_weak_imports: always check for support
ENV.no_weak_imports should be a no-op when Xcode doesn't support the
feature to avoid breaking builds with <= Xcode 7.
2016-09-17 08:29:47 -07:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Misty De Meo
67cb634e20 Merge pull request #965 from mistydemeo/warn_xcode_8_without_clt
Warn when using Xcode 8 without CLT on 10.11
2016-09-16 16:22:45 +10:00
Misty De Meo
8a0861feab Warn when using Xcode 8 without CLT on 10.11 2016-09-16 13:46:59 +10:00
ilovezfs
1d7aa1fe0b superenv: help Autotools with 10.12 SDK on 10.11
The GNU Autotools tests for whether a given symbol is defined are
reliably coming to incorrect conclusions on 10.11 with the 10.12 SDK
in Xcode 8. This overrides its decisions by forcing the right answer
in superenv using ac_cv_func_* environment variables and setting them to
"no" on 10.11. The list of problematic symbols is from

  grep 'weak$os10.11' MacOSX.sdk/usr/lib/system/libsystem_c.tbd
2016-09-15 03:34:43 -07:00
Mike McQuaid
6a81782753 extend/os/mac/development_tools: fix Rubocop warnings. 2016-09-13 07:57:09 +01:00
Dominyk Tiller
aa3ce859a7
diagnostic: tweak check_xcode_up_to_date messaging 2016-09-10 16:30:22 +01:00
Mike McQuaid
d1ba4f44c0 Merge pull request #833 from DomT4/death_by_xcode
xcode: die unless Xcode/CLT up-to-date on prerelease macOS
2016-09-07 09:51:06 +01:00
Mike McQuaid
f1cc1265af Refactor MacOS check_development_tools usage.
Better use the abstraction layer so e.g. Linux could have similarly
fatal checks for these things.
2016-09-07 09:11:06 +01:00
Tim D. Smith
7303a55cc0 Merge pull request #866 from tdsmith/audit-libressl
Catch system libressl in openssl audit as well
2016-09-05 14:25:51 -07:00
Tim D. Smith
a4b4b9cd90 Catch LibreSSL libtls as well
Update the description to reflect that we may be talking about either crypto library and neither is okay. :)
2016-09-04 16:28:51 -07:00
Mike McQuaid
dfcbefff73 Merge pull request #201 from gregory-nisbet/feature-env-shells
--env: support more shells, allow explicit shell selection
2016-09-04 21:23:33 +01:00
Tim D. Smith
bf18808930 Catch system libressl in openssl audit as well
The regex didn't match libcrypto.35.dylib, and it should have.
2016-09-03 22:13:09 -07:00
Dominyk Tiller
1408b5ffd4
diagnostic: add strict_development_tools_checks 2016-08-30 03:54:24 +01:00
Misty De Meo
e93771ae07 no_weak_imports: call ENV.append, not .add 2016-08-24 16:20:13 +10: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
Mike McQuaid
27fc2abaca shared: handle missing Xcode/CLT version.
Fixes https://github.com/Homebrew/homebrew-core/issues/3973.
2016-08-17 13:23:13 +01:00
Mike McQuaid
5609183567 superenv: add LDFLAGS if disabling weak imports. 2016-08-16 15:26:28 +01:00
Mike McQuaid
53d1000739 ENV/std: add LDFLAGS if disabling weak imports. 2016-08-16 15:26:28 +01:00
Mike McQuaid
b33fe79478 mac/ENV/shared: add check for disabling weak imports. 2016-08-16 15:26:28 +01:00
Mike McQuaid
74d4479246 Add OS X-specific SharedEnvExtension. 2016-08-16 15:26:28 +01:00
Greg Nisbet
9a29a306cf resolve conflict in diagnostic.rb 2016-08-10 23:19:09 -07:00
Mike McQuaid
5566757f60 linux/hardware/cpu: import family from Linuxbrew. 2016-07-29 21:21:02 -06:00
Mike McQuaid
3469f177f0 audit: don't check formula linkage.
This partly reverts commit 0ed673abdb59e2f75f9b8539cce318607924e87f.
2016-07-28 16:53:41 -06:00
Mike McQuaid
9f74ca80af diagnostic: port to generic layer. 2016-07-27 15:05:42 -06:00
Mike McQuaid
012fc4709a development_tools: add install instruction helpers. 2016-07-27 15:05:42 -06:00
Mike McQuaid
c86c600bfd blacklist: port to generic layer. 2016-07-27 15:05:42 -06:00
Xu Cheng
cd2288a561 audit: only check undeclared deps for standard installations. (#576)
In fact, we don't really care about undeclared dependencies for optional
installations. Because, this is mainly used to help us to detect breakage
for bottles so we can do a revision bump.
2016-07-24 20:18:59 +08:00
Dominyk Tiller
a3a6a8381d
mac/diagnostic: add check_for_prerelease_xcode
Closes #524.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-07-17 23:39:16 +01: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
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
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
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