236 Commits

Author SHA1 Message Date
Dominyk Tiller
cdcbe61acb
pkg-config: update for macOS 10.12 beta 2 2016-07-06 01:28:04 +01:00
Martin Afanasjew
a8165b6dbd scm/git: allow introspecting path lookup
Print path of first detected Git instead of executing it. This is hidden
behind a `--homebrew=print-path` argument that is unlikely to conflict
with any existing or future Git flags.
2016-06-19 22:12:34 +02:00
Dominyk Tiller
cc10c632a8
macOS Sierra: add pkg-config files 2016-06-14 22:02:40 +01:00
Izaak Beekman
b0d906f0f8 compilers: support gcc 6 2016-04-29 11:19:35 -05:00
Andrew Janke
36b2af2e0f superenv: fix formula prefix path to consider revisions
Old logic doesn't include revision. This fixes that, and passes the
whole formula prefix path to avoid duplicating the path-construction
logic.

Closes #80.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-13 10:41:01 -04:00
Andrew Janke
a8ed06ba74 superenv: allow paths under self's keg
Fixes build error in Homebrew/homebrew-core#100.

Closes #63.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-13 02:20:17 -04:00
Martin Afanasjew
d7aa0c0335 scm/git: prevent exec bomb with 'env :userpaths'
Using `git` from `Formula#install` can cause an exec bomb if used in a
formula with `env :userpaths` because that causes both `Library/ENV/4.3`
and `Library/ENV/scm` to be in PATH, both of which contain a `git`
binary that is the same SCM wrapper. Those will mutually exec each other
indefinitely as they fail to detect that they are the same wrapper.

Extend the exec-bomb protection to check the paths after all symbolic
links have been expanded to prevent this situation.

Fixes #43.
Fixes Homebrew/homebrew-core#133.
Fixed Homebrew/homebrew-core#143.

Closes #46.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-08 00:04:15 +02:00
Misty De Meo
f016a21470 superenv: comment sources of ignored paths
Closes #32.

Signed-off-by: Misty De Meo <mistydemeo@github.com>
2016-04-06 16:16:14 -07:00
Misty De Meo
ef4cad0c77 superenv: don't filter out all /opt paths
This was intended to filter out MacPorts and X11 paths, but the user
may have valid reasons to have other things here that might get linked
against.
2016-04-06 16:16:14 -07:00
Misty De Meo
f8cdab7d8a Make new keep? superenv logic opt-in
Closes #50425.

Signed-off-by: Misty De Meo <mistydemeo@github.com>
2016-04-04 15:30:22 -07:00
Misty De Meo
4fd5c5c159 superenv: filter -I/-L paths on dependencies
Previously, superenv did not try to filter -I or -L flags
based on the list of requested dependencies; as a result, buildsystems
which opportunistically discover Homebrew-installed libraries were able
to link against them even under superenv.

This adds a list of all requested dependencies to the superenv environment,
and compares all -I and -L flags against those; any Cellar and opt paths
found which resolve to unrequested dependencies are filtered out.
2016-04-04 15:30:22 -07:00
ilovezfs
ebfd096826 superenv: refurbish --fast-math for :clang
"--fast-math" caused build failure with clang for
homebrew/science/delly-0.7.2

Apparently, clang only likes this option when it's referred to as
"-ffast-math"

Closes Homebrew/homebrew#50507.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-03-31 17:10:22 +08:00
Xu Cheng
8ca79a6df5 scm/git: handle no Xcode/CLT configuration
`/usr/bin/<tool>` will be a popup stub under such configuration.

The idea is to let `scm/git` to handle all of git location resolution
throughout Homebrew codebase.
2016-03-21 19:07:38 +08:00
Martin Afanasjew
5f049637d9 ENV: protect against environment being reset
We cannot really recover from this, but at least we'll provide a clearer
error message than trying to call `exec` with an empty string.
2016-02-05 22:07:07 +01:00
Martin Afanasjew
f9efa18be1 ENV: protect against RUBYLIB/RUBYOPT
Some things can break in hard to debug ways if users or build scripts
set these variables, causing our otherwise quite robust Ruby wrappers
to fail. In theory, we could also use `--disable-rubyopt`, but this is
not supported in Ruby 1.8 (and we still care about it).
2016-02-05 22:07:07 +01:00
Martin Afanasjew
49990ee93f ENV: use HOMEBREW_RUBY_PATH in compiler/SCM shims
Use the same interpreter for the shims that is also used to run the main
Homebrew process (the one invoked via `brew`). The magic basically lies
in executing `ruby` with the `-x` option (supported since at least 1.8)
and in the following shebang line.
2016-02-05 22:07:07 +01:00
Misty De Meo
0fa731b020 superenv: properly filter gcc-4.2 flags
These weren't being filtered correctly if the compiler was being called
as g++ instead of gcc.

Fixes mistydemeo/tigerbrew#371.
2016-01-15 22:58:50 -04:00
Misty De Meo
256aea180a superenv: filter flags for older GCCs
Fixes mistydemeo/tigerbrew#371.
Fixes Homebrew/homebrew#47949.
2016-01-11 22:23:53 -04:00
Xu Cheng
5d39a9df10 pod2man wrapper: restore missing echo
`echo` is missing since f3f6552c.
2015-12-30 22:33:56 +08:00
Mike McQuaid
cfd4c3a181 superenv/cc: don't filter out gdwarf-2.
It's needed by `cgo` which is used by a lot of Go software.
2015-12-29 14:58:56 +00:00
Misty De Meo
b2ca0e2331 pod2man wrapper: allow non-/usr/bin pod2men 2015-12-27 20:59:08 -04:00
Mohammad AlSaleh
0873eb6df2 Update libcurl pkgconfig file for 10.10
This matches the version shipped with 10.10.5.

 The list of supported features/protocols was obtained
 using `curl-config`:

```
 features="`curl-config --features`"; echo "${features//$'\n'/ }"
 protocols="`curl-config --protocols`"; echo "${protocols//$'\n'/ }"
```

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>

Closes Homebrew/homebrew#46073.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-11-17 20:37:39 +00:00
Dominyk Tiller
0abe554420 Update 10.11 pkgconfig files
Closes Homebrew/homebrew#45970.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-11-15 03:26:22 +00:00
Mike McQuaid
52ee5aa836 Revert "cc: disable RUBYOPT variable."
This reverts commit 03268031f1b371fc573c736a03f87f3a15284a0c.
2015-11-11 14:45:23 +00:00
Mike McQuaid
a814f119c0 cc: disable RUBYOPT variable.
If this was set at build-time (i.e. by the Ruby 1.8.7 buildsystem) then
`cc` could be passed arguments and fail to run.

Closes Homebrew/homebrew#45890.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-11-11 14:35:34 +00:00
Alex Wang
d877fc0b3e superenv: only strip sysroot flags for OS X SDKs.
Removing all sysroot flags is ok until a non-OS X SDK is needed. In
that case, builds can fail due to the non-OS X SDK being overwritten or
overridden by the OS X SDK.

Sysroot flags are now only stripped if they are an OS X SDK. This is
reliant on only OS X SDKs containing the string "macosx", so this will
break if if the wrong SDK shows up. However, the chances of that
happening seem low, as Apple probably doesn't want to introduce
something OS X that doesn't work with OS X, so it should be robust for
the near future.

This could break in an environment without the command line tools. The
fix for that is a bit more involved, though, so that will have to go
later.

Closes Homebrew/homebrew#44312.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-13 13:09:05 +01:00
Tim D. Smith
6606c7b53b Revert "work around missing __debug header in Xcode CLT 6.3"
Ding, dong, the witch is dead...

This reverts commit fd5ca9ba16f5afc181364369210cb94e997a5a5e.

Ref Homebrew/homebrew#38514, Homebrew/homebrew#38735.

Closes Homebrew/homebrew#41843.
2015-08-15 20:24:20 -07:00
Xu Cheng
b121e5fd7b more core file style updated by rubocop 2015-08-06 17:23:56 +08:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Jack Nagel
7b733b4087 Add pkgconfig files for 10.11
Fixes Homebrew/homebrew#40656.
2015-06-15 20:43:24 -04:00
Ryan Hendrickson
a744da3b4c superenv cc: accept single-digit g++ version
Closes Homebrew/homebrew#40117.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2015-05-26 20:13:25 -04:00
なつき
6181a786c0 compilers: support gcc 5
Closes Homebrew/homebrew#39470.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2015-05-08 22:23:30 -04:00
Tim D. Smith
af57cffeb0 work around missing __debug header in Xcode CLT 6.3
uses the LLVM 3.6 debug header from:
http://reviews.llvm.org/diffusion/L/browse/libcxx/tags/RELEASE_360/final/include/__debug

Workaround for Homebrew/homebrew#38514.

Closes Homebrew/homebrew#38735.
2015-04-19 13:41:26 -07:00
Jack Nagel
7004d3de0d Extract logging from the command class 2015-02-12 20:20:10 -05:00
Jack Nagel
384c444be8 Drop unnecessary call to compact 2015-02-12 20:09:31 -05:00
Jack Nagel
28b926686b Get the basename and dirname once 2015-02-12 19:13:03 -05:00
Jack Nagel
4b91017894 Make compiler shim robust against missing environment variables
Fixes Homebrew/homebrew#36217.
2015-02-08 20:04:07 -05:00
Jack Nagel
d4e24dce0a Get rid of cccfg? method 2015-02-08 20:04:06 -05:00
Jack Nagel
fd031f256a Add predicate methods for compiler shim configuration 2015-02-08 20:04:06 -05:00
Jack Nagel
357d0f2796 Use start_with? to simplify path sanity check 2015-02-07 13:54:33 -05:00
Jack Nagel
f438af9915 Don't prune cellar paths when cellar is in /opt
Fixes Homebrew/homebrew#35382.
2015-02-07 13:54:33 -05:00
Misty De Meo
53d848e364 cc: filter out -Wno-unused-but-set-variable
Fixes Homebrew/homebrew#35750.
2015-01-14 10:18:00 -08:00
Jack Nagel
ba8926ea11 Don't rely on PATH when invoking xcrun shim 2015-01-07 23:12:24 -05:00
Dominyk Tiller
42b35b8957 zlib & sqlite3: pkgconfig support
native pkg-config support for zlib and sqlite to elimate the need
to pass flags to configure or make stages in formulae.

Closes Homebrew/homebrew#34765.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-12-11 14:44:46 -05:00
Jack Nagel
72c21fe991 Simplify bsdmake wrapper, take 2 2014-12-05 16:54:53 -05:00
Jack Nagel
d85d5fba22 Revert "Simplify bsdmake wrapper"
Fixes Homebrew/homebrew#34713.

This reverts commit e4461afd36f04b1cd3cf56ec0636202150ce0570.
2014-12-05 16:54:33 -05:00
Jack Nagel
fed9c9a9be Simplify bsdmake wrapper
Since bsdmake is always specified as a dependency, our xcrun wrapper
will always be able to find it, so we can get rid of this wrapper.
2014-12-05 11:01:11 -05:00
Jack Nagel
cb09660516 Always set sysroot for Xcode-only systems
Fixes Homebrew/homebrew#33431.
2014-10-29 11:03:54 -05:00
Manpreet Singh
dcc8309d1b ENV/pod2man: fix for machines upgraded to Yosemite
Yosemite is having the same issues as Homebrew/homebrew#24590 in the past on upgraded machine. Bump to pod2man5.18.

Closes Homebrew/homebrew#33436.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-10-21 19:45:07 +01:00
Jack Nagel
21c329e0eb Simplify dispatch in git wrapper 2014-10-05 20:33:33 -05:00