5723 Commits

Author SHA1 Message Date
Jack Nagel
59515ea126 Remove executable bit from build.rb
- the executed script is the formula file, build.rb is a library
 - ruby is invoked directly, so it wouldn't need to be executable anyway
2014-05-03 10:01:30 -05:00
Jack Nagel
253140c92d Quote argument to readlink 2014-05-02 21:55:44 -05:00
Jack Nagel
bb750e1439 Use parameter expansion to avoid forking 2014-05-02 21:55:44 -05:00
Baptiste Fontaine
74e4fdfce2 Fix for String#undent
Without it, String#undent would fail on unindented strings, e.g.:

    "foo".undent

NoMethodError: undefined method `length' for nil:NilClass`

Closes Homebrew/homebrew#28873.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2014-05-02 19:50:27 -07:00
Jack Nagel
348d0eb05c doctor: use Xcode.bundle_path 2014-05-02 16:50:25 -05:00
Jack Nagel
f6d5d812dc Simpler Xcode prefix detection code 2014-05-02 16:48:59 -05:00
Jack Nagel
2c6d4973b9 Remove obsolete fallback for broken Xcode 4.3+
After recent cleanups the code in this branch should be unreachable, so
there is little point in keeping it around.
2014-05-02 16:48:59 -05:00
Jack Nagel
6577f93f71 Simplify HOMEBREW_LIBRARY_PATH usage 2014-05-02 12:59:38 -05:00
Jack Nagel
2b46af5136 No need to put vendor on the load path 2014-05-02 12:59:38 -05:00
Jack Nagel
f6d81cf762 require accepts Pathnames 2014-05-02 12:59:38 -05:00
Jack Nagel
1ff182ae68 Set ENV variables to strings, not pathnames 2014-05-02 12:59:38 -05:00
Jack Nagel
2d156f06c8 Use File::PATH_SEPARATOR 2014-05-02 12:59:37 -05:00
Jack Nagel
273d580550 Apparently quiet_system isn't always quiet
cf. Homebrew/homebrew#28918.
2014-05-02 11:00:29 -05:00
Jack Nagel
cf5ecfc06d doctor: suppress warnings from git wrapper script
Fixes Homebrew/homebrew#28901.
2014-05-02 09:52:14 -05:00
Adam Vandenberg
37760ce3f8 add comment 2014-05-02 07:39:23 -07:00
Jack Nagel
86daf90700 Remove bad doctor check 2014-05-01 19:43:42 -05:00
Jack Nagel
a8f0872cc0 Remove MacOS.dev_tools_path and MacOS.dev_tools_prefix
These methods are no longer required.
2014-05-01 18:36:46 -05:00
Jack Nagel
aa5a5a526f Rename Xcode.folder to MacOS.active_developer_dir
This reflects what Apple calls it in more recent versions of Xcode/OS X.
2014-05-01 18:36:46 -05:00
Jack Nagel
4b335eb2df Xcode-only path adjustments should be the same in both environments 2014-05-01 18:36:46 -05:00
Jack Nagel
71055aa073 Move xctoolchain_path to Xcode module, where it belongs 2014-05-01 18:36:46 -05:00
Jack Nagel
564b5df261 Trust xcrun now that we error out early for bad xcode-select paths
Since ae177adb2bd55ee5ad6367e7639c4cf0c774b63a, we can safely assume
that xcrun works, and a functioning xcrun will search dev_tools_path and
xctoolchain_path, so we can stop doing extra work here.

On CLT-only 10.7 and 10.8, xcrun will not work, but all the tools will
be in /usr/bin, which we check before invoking xcrun. Further, in this
case, dev_tools_path will be /usr/bin, and xctoolchain_path will not
exist, so the fallbacks here are unnecessary.
2014-05-01 18:36:46 -05:00
Jack Nagel
89ed0c544b Remove unnecessary nil check 2014-05-01 18:22:39 -05:00
Jack Nagel
7052fe89b1 Fix caching of gcc_42_build_version 2014-05-01 16:57:14 -05:00
Jack Nagel
3040bd3aae Remove outdated comment 2014-05-01 16:47:28 -05:00
Jack Nagel
762b8d1f16 Restore bash completion for --config 2014-05-01 16:40:55 -05:00
Xu Cheng
2c9868ddd2 zsh_completion: fix brew config.
Signed-off-by: Xu Cheng <xucheng@me.com>

Closes Homebrew/homebrew#28878.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-05-01 09:43:55 +01:00
Adam Vandenberg
579c0e898f outdated: allow forcing verbose output
Closes Homebrew/homebrew#27813.
2014-04-30 21:10:47 -07:00
Adam Vandenberg
d4b0599a86 --config -> config 2014-04-30 19:09:29 -07:00
Misty De Meo
48cd833a15 Superenv: determine_optflags should return a string
This is saved in HOMEBREW_OPTFLAGS and later mutated by
ENV.universal_binary, so if this returns nil the sub will fail.
2014-04-30 08:21:54 -07:00
Mike McQuaid
ec852045b1 brew-test-bot: handle failing devel requirements. 2014-04-30 13:07:06 +01:00
Mike McQuaid
116c2b06a8 ENV/shared: handle untapped e.g. gcc48 formula.
In this case we need to handle the throwing on an exception when
attempting to initialize the gcc48 Formula object.

This initialization should be unnecessary if the core GCC is already
installed and rescued if not.
2014-04-30 12:38:22 +01:00
Jack Nagel
cf23fd2e14 xcrun wrapper: rephrase comments 2014-04-29 21:51:18 -05:00
Jack Nagel
4cff03b730 xcrun wrapper: reorganize so we only access ARGV once 2014-04-29 21:51:17 -05:00
Jack Nagel
2a81f8c305 xcrun wrapper: inline try method 2014-04-29 21:51:17 -05:00
Jack Nagel
c6c9aa546f xcrun wrapper: skip superenv bin when walking PATH 2014-04-29 21:51:17 -05:00
Jack Nagel
259bbdf76c Drop obsolete compiler fallback in stdenv
This code originated in a slightly different form in 8e88b22fd1ec65a344ce6e4facd6dad4b415b2ad:

8e88b22fd1/Library/Homebrew/extend/ENV.rb (L30-L32)

Back then, MacOS.default_compiler could return nil, which meant
ENV.compiler could do the same. This code was carried forward as the
surrounding code changed. At this point it should be unreachable.
2014-04-29 21:11:03 -05:00
Jack Nagel
32b7c9ff15 unpack: use correct constant scope for DATA
Formula::DATA only worked by accident of implementation; DATA during the
build is actually Object::DATA, so we should mirror that here.

This reverts commit b12444ba6e1ac1d596a70ff4c777d9386d0791ac.
2014-04-29 15:41:23 -05:00
Charlie Sharpsteen
69573ba7a2 brew-unpack: Handle new style :DATA patches
Instances of `IOPatch` created by `patch :DATA` are not affected by re-setting
the `DATA` constant of the `Formula` instance. For these patches, we iterate
through the `patchlist` and use `instance_variable_set` to attach data.

A bit hacky, but `patchlist` has no write accessors so there isn't a clean way
to modify patch contents.
2014-04-29 10:46:02 -07:00
Jack Nagel
953f6c1ead Remove test that doesn't add value 2014-04-29 09:22:17 -05:00
Mike McQuaid
2c3b04fb26 ENV/shared: use homebrew/versions GCC if installed
Closes Homebrew/homebrew#28820.
2014-04-29 08:51:56 +01:00
Jack Nagel
b6a0b95380 Use MacOS.locate and delete wrong comment 2014-04-29 01:31:22 -05:00
Jack Nagel
0de7f98b58 Remove comment that no longer reflects adjacent code 2014-04-29 01:31:22 -05:00
Jack Nagel
bfde04ee17 We don't use -Qunused-arguments anymore 2014-04-29 00:11:54 -05:00
Jack Nagel
90c03ffc17 ENV.{cc,cxx} setters already set OBJC and OBJCXX 2014-04-29 00:09:07 -05:00
Jack Nagel
6a2fa253cd Make ENV.O4 a no-op
On older Apple compilers "-O4" is known to cause build errors. On recent
clang, it's the same as "-O3" and you have to pass "-O3 -flto" to get
the old behavior.
2014-04-29 00:09:07 -05:00
Jack Nagel
a31393f2cd Fix brew-readall for updated tap structure 2014-04-27 19:45:36 -05:00
Adam Vandenberg
5012a45cf3 brew list --versions --multiple
With --multiple, only list formulae with multiple versions installed.
2014-04-27 17:05:24 -07:00
Andrew Potter
45922f1903 run macports check after failed build instead of before every build
Closes Homebrew/homebrew#28717.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2014-04-27 16:10:28 -07:00
Jack Nagel
0291a579fb Respect tap directory layout when searching
This matches the logic in find_formula.
2014-04-27 17:28:19 -05:00
Jack Nagel
ccc62a0cad Use canonical_name to canonicalize aliases 2014-04-27 16:03:32 -05:00