38364 Commits

Author SHA1 Message Date
Adam Vandenberg
50b2a32f9a Add some comments 2012-07-09 08:39:36 -07:00
Jack Nagel
a8c05c9772 Restore some things to failed install config dump
Closes Homebrew/homebrew#11091.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 12:27:19 -05:00
Jack Nagel
1478615429 Display compiler build numbers in config dump
But only display them if they are out of sync with the corresponding
Xcode version.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 12:26:10 -05:00
Jack Nagel
63d77ac6de Always output X11 version and path in config dump
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 12:16:53 -05:00
Jack Nagel
75a60e5104 fetch: remove dead code
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 10:47:57 -05:00
Jeff Clites
c2f05cfb71 Prevent error pipe object from being finalized
When the first error pipe object is finalized, the underlying file
descriptor is closed, breaking the pipe between the build script and the
main Homebrew process. Keep a reference to this object so it isn't
closed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 02:35:26 -05:00
Adam Vandenberg
ec39148c04 Remove brew install foo --help
This command was undocumented, only for autotools, and it is enough to do
`brew install foo -i` and then `./configure --help` in two steps.
2012-07-07 16:53:30 -07:00
Adam Vandenberg
126b1c77e3 doctor: update xcode chceck
* 4.3.3 is the latest on 10.7
* Give up if we don't know what the latest is (10.8 and beyond)
2012-07-07 11:59:01 -07:00
Misty De Meo
f39d8eb88c DownloadStrategy: Detect classes 2012-07-06 12:02:08 -05:00
Misty De Meo
44ccd122c2 Keg#unlink: skip find for non-extant files
In 1.8, Pathname.find would work (and do nothing) if the
source path didn't exist. In 1.9 this throws an exception
instead, so check whether the file exists before trying.
2012-07-06 10:32:56 -05:00
Adam Vandenberg
54618074a1 Stop stripping binary files 2012-07-05 21:54:31 -07:00
Jack Nagel
4ffc06f988 tests: expect that mirror lists are empty, not nil
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-05 20:33:28 -05:00
Jack Nagel
9a72fecf84 Decouple pathname from bottles
Pathname is one of the basic building block classes in Homebrew, and as
such it is preferrable that `require`ing it does not drag in other
Homebrew code; thus avoiding circular dependency situations. Its
dependency on bottles.rb gave it an implicit dependency on formula.rb,
among other things.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-05 20:32:55 -05:00
Jack Nagel
bb78df7356 Remove compat's implicit dependency on formula
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-05 20:32:49 -05:00
Jack Nagel
577fe6d72b Fix 'or' precedence errors
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-05 15:42:28 -05:00
Misty De Meo
90b2f1f4ba SoftwareSpec: initialize @mirrors
Since methods were being called on it without verifying its type.
2012-07-05 13:11:44 -05:00
Jack Nagel
a38e2284ea bottles: protect against a nil bottle
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 23:15:45 -05:00
Jack Nagel
1050261316 Homebrew 0.9.2
0.9.2 includes the formula specs refactoring.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
0.9.2
2012-07-04 22:55:25 -05:00
Jack Nagel
c235395fd7 Give SoftwareSpec an initializer
Tools like `brew create` need to create and manipulate SoftwareSpec
objects. It is useful to be able to do this directly, rather than by
proxy through the special methods that serve the main formula DSL.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:35 -05:00
Jack Nagel
56fe164e95 Teach download strategies to take a SoftwareSpec
Now that a URL, version, and the (for lack of a better term) "specs"
associated with said URL (e.g. the VCS revision, or a download strategy
hint) are neatly bundled up in a SoftwareSpec object, it doesn't make
sense to pass them individually to download strategy constructors. These
constructors now take only the formula name and a SoftwareSpec as
parameters.

This allows us to move mirror handling out out of Formula#fetch and into
the download strategies themselves. While doing so, we adjust the mirror
implementation a bit; mirrors now assume the same "specs" as their
owner's URL. They are still only useable by the CurlDownloadStrategy,
but this provides a basis for extending mirror support to other
strategies.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:35 -05:00
Jack Nagel
af53f54b24 fetch: use new checksum verification
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel
b2ff74372e Refactor download strategy detection
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel
93f8c71e21 tests: clean up whitespace
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel
40b531deb1 Demonstrate that bottles are selected correctly
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel
90dbb8a141 Prune some requires from test files
testing_env already requires utils; set up the ARGV and ENV extensions
there as well.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel
76b2eee777 Refactor checksumming
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:33 -05:00
Jack Nagel
2c6e93cf8a audit: handle new formula specs 2012-07-04 22:47:33 -05:00
Jack Nagel
6420943552 info: display available formula specs 2012-07-04 22:47:33 -05:00
Jack Nagel
b6d44dd38a fetch: make use of new formula specs 2012-07-04 22:47:33 -05:00
Jack Nagel
98a11b8e57 Introduce new formula specs 2012-07-04 22:47:32 -05:00
Jack Nagel
ca71c038a1 Cache Hardware.is_64_bit?
IO#popen is called for each call to Hardware.is_64_bit?; this becomes
costly when it is repeatedly invoked. Luckily it is an invariant, so we
can store it in a class variable.

False is a valid value for this method, so the usual ||= idiom is not
applicable.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-02 01:10:21 -05:00
Jack Nagel
168ccb2821 Update formula template for new X11 dependency
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-01 14:32:28 -05:00
Jack Nagel
1d2a72eecc Dump Cmake environment variables in brew --env
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-01 13:51:23 -05:00
Jack Nagel
e65c3a71eb Update doctor checks for XQuartz
- pkg-config no longer defaults to checking /usr/X11/lib/pkgconfig;
   instead this path is added via ENV.x11 or depends_on :x11. Formulae
   that expect X11 libs should be explicitly marked as depends_on :x11.
 - Remove warning about /usr/X11 as a symlink.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-01 12:23:19 -05:00
Camillo Lugaresi
89f86dc283 Better describe X11 in brew --config 2012-07-01 12:20:47 -05:00
Camillo Lugaresi
4488c3546d Better error message for unknown dep symbol 2012-07-01 12:19:37 -05:00
Camillo Lugaresi
4416955495 ENV.x11 automatically if depends_on :x11 2012-07-01 12:19:01 -05:00
Camillo Lugaresi
4c10eaf332 Add depends_on :libpng as an alias to :x11
Some formulae ask for the x11 environment with ENV.libpng; mirror this
in the new dependency form.
2012-07-01 12:17:49 -05:00
Camillo Lugaresi
1847595168 Simplify DependencyCollector#add 2012-07-01 12:15:09 -05:00
Camillo Lugaresi
243b14a090 depends_on :x11 syntax support 2012-07-01 12:14:06 -05:00
Camillo Lugaresi
65567eb55f add method to find XQuartz version 2012-07-01 12:12:44 -05:00
Camillo Lugaresi
a07085df2d use XQuartz when present 2012-07-01 12:10:32 -05:00
Jack Nagel
17e7b7eaa4 Clarify comment
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-30 14:10:03 -05:00
Jack Nagel
cfe58531ee Address some style issues in MacOS module
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-30 14:01:07 -05:00
samueljohn
4aed55cccb doctor: suggest the correct xcode-select path to the user
Shortened the part about the CLT-only systems, because this message is
never shown to them.

Closes Homebrew/homebrew#13061.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-29 12:40:26 -05:00
Jack Nagel
8f6ee31004 Add mdfind method to MacOS module
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-29 12:40:26 -05:00
Jack Nagel
60b518278b Refactor PATH setup
- Make ORIGINAL_PATHS an array of Pathnames instead of strings
 - Append the dev tools path once in global.rb instead of build.rb

Closes Homebrew/homebrew#13075.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-29 00:55:01 -05:00
Jack Nagel
f2e076e5cc Organize compiler methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-28 14:12:50 -05:00
Adam Vandenberg
0bb95960e6 Extract MacOS module to separate file 2012-06-27 12:09:57 -07:00
Adam Vandenberg
b37c5bed61 Refactor MacOS.
* call `xcode-select` once and cache the result
* reuse functions where appropriate
2012-06-27 12:08:14 -07:00