3230 Commits

Author SHA1 Message Date
Jack Nagel
e0574b854e More robust implementation of ENV.with_build_environment 2013-08-19 12:32:59 -05:00
Jack Nagel
dd9c269c69 Rename HomebrewEnvExtension to Stdenv 2013-08-19 12:32:59 -05:00
Jack Nagel
9a5b15bb61 Move common ENV methods to a shared module 2013-08-19 12:32:59 -05:00
Jack Nagel
cc18f5e0c4 Move superenv.rb to extend/ENV/super.rb 2013-08-19 12:32:59 -05:00
Jack Nagel
061f8cb35f Fix superenv ENV[] hack
We override ENV[] to always return strings under superenv, because
legacy formulae assume that CFLAGS, etc. are non-nil.

However, the current implementation has a bug. If I simply concatenate
ENV['CFLAGS'] with another string, it mutates ENV['CFLAGS']:

  irb> ENV['CFLAGS']
  => ""
  irb> ENV['CFLAGS'] + 'a'
  => "a"
  irb> ENV['CFLAGS']
  => "a"

Instead, let's simply return an empty string if the key doesn't exist.
This is sufficient because the following are equivalent:

  1. ENV['CFLAGS'] += "string"
  2. ENV['CFLAGS'] = ENV['CFLAGS'] + "string"
2013-08-19 12:32:58 -05:00
Jack Nagel
9699c0764e Re-enable superenv ENV[] hack 2013-08-19 12:32:58 -05:00
Jack Nagel
ce31c16a14 Reference self, not ENV, in ENV.fortran 2013-08-19 12:32:58 -05:00
Jack Nagel
06b1668340 Reference self rather than ENV in Superenv module
We want to be able to extend this module onto an arbitrary hash and use
it without mutating ENV, for testing purposes.
2013-08-19 12:32:57 -05:00
Jack Nagel
d09e23c8b1 Move extra stdenv setup to extended callback 2013-08-19 12:32:57 -05:00
Jack Nagel
eebc04ec9b Move common stuff to extend/ENV.rb 2013-08-19 12:32:57 -05:00
Jack Nagel
bf0e329010 Make Superenv activation explicit 2013-08-19 12:32:56 -05:00
Jack Nagel
a04f1ac3d3 Move superbin into Superenv module 2013-08-19 12:32:56 -05:00
Jack Nagel
ab5c6218b1 Move setup into an extended callback 2013-08-19 12:32:56 -05:00
Jack Nagel
21d3402f8e Extend Superenv onto ENV instead of defining it on the singleton class 2013-08-19 12:32:55 -05:00
Jason Whittle
2c23e71be3 let inreplace take a symbol
As discussed in https://github.com/mxcl/homebrew/pull/21936

Closes Homebrew/homebrew#21942.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-08-17 07:40:27 -07:00
Chris Allen
ecb78d54c0 clojure: remove, blacklist in favour of leiningen.
Closes Homebrew/homebrew#21733.
Closes Homebrew/homebrew#21782.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-08-17 12:29:53 +01:00
Jack Nagel
e998132406 This is a backreference, not an embedded NUL 2013-08-16 20:50:20 -05:00
Misty De Meo
1333b8d666 ENV.universal_binary: use as_arch_flags 2013-08-15 23:04:26 -07:00
Misty De Meo
e6d5e813d4 LinuxCPUs: provide stub methods 2013-08-15 22:46:57 -07:00
Misty De Meo
1586a69879 superenv: use Hardware::CPU.universal_archs
This defines the new HOMEBREW_ARCHS environment variable, which is
currently only set during universal builds, so that the tool wrappers
no longer need to hardcode i386/x86_64.
2013-08-15 22:46:57 -07:00
Misty De Meo
a892e52bfc Add Hardware::CPU.universal_archs 2013-08-15 22:46:56 -07:00
Misty De Meo
0f580953b4 Mach: improve tests 2013-08-15 22:46:56 -07:00
Misty De Meo
b0d45b29bd Mach: add as_cmake_arch_flags helper 2013-08-15 22:46:56 -07:00
Misty De Meo
ab633864d5 Mach: improve PPC arch detection
Also adds some reusable constants into the global Hardware::CPU
namespace, available on both OS X and Linux.
2013-08-15 22:46:56 -07:00
Misty De Meo
fa03fd91b4 Add MacOS.preferred_arch
Replaced the plethora of ternaries we've used all over the place to
determine whether x86_64 or i386 is called for.
2013-08-15 22:46:56 -07:00
Misty De Meo
ef1f2b4a79 Add Hardware::CPU.arch_(32|64)_bit
This replaces hardcoding of i386/x86_64 all over the code.
2013-08-15 22:46:55 -07:00
Jack Nagel
8bb26ee2d9 SubversionDownloadStrategy: fix reference to removed method 2013-08-15 15:46:03 -05:00
Adam Vandenberg
31348c34ae add ubuntu package search 2013-08-14 22:14:35 -07:00
Adam Vandenberg
124ddce262 audit: show real name for aliases 2013-08-14 21:35:46 -07:00
Samuel John
a7a35efff4 Unlinked brewed python -> use system python
Up to now a brewed Python, even if not linked, was preferred over
and external Python, so that you had to completely `brew rm python`
to have a formula link against external (mostly system) Python.

From now on it is okay to `brew unlink python`.
2013-08-15 02:03:55 +02:00
Samuel John
cae03e3363 brew reinstall: Reuse options from last time
Now, we can finally stop stuggesting to
    `brew rm <foo>` and then `brew install <foo> <with-your-preferred options>

So `brew reinstall` will honor all options that have been recorded
into the INSTALL_RECEIPT.json plus if `--build-bottle` was used.
2013-08-14 22:25:03 +02:00
Samuel John
ad80b10de4 Keg should link symlinks directly.
If the `src` in the Cellar of a formula is a symlink to another dir
in the same Cellar (for example `Frameworks/QtGui.framework` is a
symlink to `lib/QtGui.framework`), then we should make a symlink
directly instead of possibly creating an empty dir.

This is needed because Ruby's `find` does not follow symlinks (newer
versions can, but we have to support 10.8 for a long time).

Currently this probably only occurs for Qt, where we put symlinks
into the Cellar/Frameworks and the frameworks linking code is a bit
special to create a directory to "merge" together different versions
of the same framework from different formulae. See `python` and
`python3`; both install `Python.framework` and only one can be the
`Current` but the other should still be put into
`Python.framework/Versions`. Therefore `Python.framework` has to
be a dir and no symlink.
2013-08-14 21:46:42 +02:00
Jack Nagel
fb187e2132 Correct comment 2013-08-14 14:20:25 -05:00
Jack Nagel
c9a4e1e1c9 Use each instead of while loop 2013-08-14 14:13:03 -05:00
Jack Nagel
7ddc432c9e Replace long conditional with guard clauses 2013-08-14 14:13:03 -05:00
Jack Nagel
d77240a98c Iterate over these directly rather than mapping first 2013-08-14 13:02:50 -05:00
Jack Nagel
603d8f9d4d Return value of modify_build_environment is unimportant 2013-08-14 13:01:35 -05:00
Jack Nagel
f8c34b5dc1 Reverse conditional 2013-08-14 12:46:37 -05:00
Jack Nagel
3857f83e9c Collapse to one-liner 2013-08-14 12:46:12 -05:00
Jack Nagel
3d39a57118 No need to map, all? takes a block 2013-08-14 12:45:54 -05:00
Jack Nagel
4d2188cc90 Add missing false 2013-08-14 12:41:52 -05:00
Jack Nagel
5561d3d09c Remove stray space 2013-08-14 12:41:15 -05:00
Adam Vandenberg
7c1671667f pathname: remove unused return values
Return value was used only by one test, rewrote test to know expected value.
2013-08-13 20:41:08 -07:00
Jack Nagel
b730a85e3a Remove outdated comment 2013-08-13 17:09:25 -05:00
Jack Nagel
d08508f7c7 Avoid reading whole files into memory during decompression 2013-08-13 16:43:51 -05:00
Jack Nagel
22365f2f6d Improve checksum perf by providing an output buffer 2013-08-13 15:40:48 -05:00
Misty De Meo
f960cf94d1 Doctor: missed CLT URL replacement 2013-08-10 22:30:15 -07:00
Misty De Meo
49cd13406b Update URL for CLT download
http://connect.apple.com is still down, but
https://developer.apple.com/downloads has all of the Apple developer
downloads available.

Fixes Homebrew/homebrew#21812.
2013-08-10 22:05:18 -07:00
Jack Nagel
14dd61fc87 Check that the cellar exists in Formula.installed
Fixes Homebrew/homebrew#21741.
2013-08-10 19:56:29 -05:00
Jack Nagel
966e82663f Make usage of ObserverPathnameExtension more obvious
Remove use of globals.

Closes Homebrew/homebrew#21795.
2013-08-10 19:02:00 -05:00