2373 Commits

Author SHA1 Message Date
Max Howell
b51fe22413 Warn user not to edit before first update
Because, if you do, your changes will be lost.
2012-08-01 15:59:30 -04:00
Jack Nagel
148617bc11 Move X11 machinery into MacOS::XQuartz namespace
In order to better support Xcode-only systems, where X11 libs and
executables live under /usr/X11 but headers live in the SDK, move the
x11_* helper methods into a new module.

This allows us to keep some of the CLT/Xcode-only and Apple X11/XQuartz
logic hidden from outside code, like ENV.x11.

Since Apple's X11 is actually XQuartz, name the module "MacOS::XQuartz".
2012-08-01 00:31:38 -05:00
Misty De Meo
1a48dbc967 xquartz_version: escape spaces for mdls 2012-07-31 10:54:25 -03:00
Misty De Meo
fcbee28447 mdfind: Check if path is nil as well as empty 2012-07-31 00:14:52 -03:00
Misty De Meo
9af7e25e03 mdfind: don't strip
Since we're splitting on newlines, stripping shouldn't be necessary.
2012-07-30 23:36:00 -03:00
Misty De Meo
2056e24a12 mdfind: Handle multiple results
Turns out mdfind can return multiple results on the commandline, if
more than one app bundle matches.

Fixes Homebrew/homebrew#13789.
2012-07-30 23:20:05 -03:00
Max Howell
d5f2cdd31c Deprecate adamv/alt from brew search
Add brew/science.
2012-07-30 13:24:53 -04:00
Dean Smith
fe32e6343d Invoke non interactive shell from brew edit
Fixes Homebrew/homebrew#12779. Closes Homebrew/homebrew#12784.

utils.rb invokes bash as a non interactive shell to run the editor
when you run brew edit.

Non-interactive shells are not intended to capture user input and for running scripts. Whilst the invocation of the editor is a script the actual editor is intended for accept user input so this is an issue with brew and not emacs.

This causes issues with emacs which has different behaviors when not running under an interactive shell.

Signed-off-by: Max Howell <mxcl@me.com>
2012-07-30 13:23:19 -04:00
Misty De Meo
0c237a8679 Add conflicts_with DSL method
conflicts_with is a thin wrapper around Requirement which simplifies
marking conflicts between formulae.

Closes Homebrew/homebrew#13687.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-30 13:47:12 -03:00
Misty De Meo
6a8c4843f7 Provide missing .pc files for 10.8
10.8 no longer ships four .pc files which were included in previous
versions, though it does still include the libraries which they pointed
to. This commit provides copies of the .pc files for all of these, and
prepends Library/Homebrew/pkgconfig to PKG_CONFIG_PATH on 10.8.

The .pc files in question are: lib curl, lubexslt, libxml-2.0, libxslt

Fixes Homebrew/homebrew#13673.
Fixes Homebrew/homebrew#13627.
Fixes Homebrew/homebrew#13652.
Fixes Homebrew/homebrew#13482.
Closes Homebrew/homebrew#13572.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-29 10:28:41 -03:00
Misty De Meo
3822267d2c Synchronize Keg#link and #unlink counts
Keg#link would sometimes count a linked file when doing mkpath, even if
the target directory already exists; #unlink would never count it. This
meant that "brew ln" and "brew unlink" counts for the same keg could be
out of sync with each other.
2012-07-29 10:28:41 -03:00
Jack Nagel
d701a59a68 Update libpng blacklist message
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-29 00:09:15 -05:00
Charlie Sharpsteen
524190f109 brew-audit: Warn against depending on MPI
Depending on `open-mpi` or `mpich2` will cause problems since both formulae
install components with the same names. `brew audit` now recommends using
MPIDependency.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-07-28 09:12:44 -07:00
Charlie Sharpsteen
0d3578b28d dependencies.rb: Add MPI compiler Requirement
All versions of OS X prior to Lion shipped with some version of Open-MPI, but
without working compiler wrappers for Fortran. Homebrew currently has two
formulae that can supply this software: open-mpi and mpich2.

This commit adds a `MPIDependency` Requirement that can be passed one of four
values when constructed:

    :cc, :cxx, :f90, :f77

This will ensure the `mpi<value>` compiler is available and working. For
example, if `depends_on MPIDependency.new(:cc, :f90)` is used, the Requirement
will search for working `mpicc` and `mpif90` wrappers.

If the required wrappers cannot be found, an error message will be displayed
that prompts the user to install one of the Homebrew formulae that provides
MPI.

For each language passed to a MPIDependency Requirement, environment variables
be will set that point to the compilers.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-07-28 09:12:44 -07:00
Jack Nagel
96ee0e90cc Deduplicate requirements
Because of some quirks in how formulae are loaded, DSL methods invoked
in the class definition are called multiple times. This results in, for
example, duplicate dependencies and requirements.

Code that iterates over requirements and takes some action for each can
thus repeat things that shouldn't be repeated, like appending to
environment variables.

Make DependencyCollector's external_deps a Set, and define eql? and hash
on Requirement to prevent these duplicates.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-27 02:50:29 -05:00
Jack Nagel
5a62582b39 Requirement: add modify_build_environment method
Rather than doing type introspection in build.rb, just define a method
to perform the necessary environment setup for Requirements.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-27 02:42:22 -05:00
Jack Nagel
4dde88b6d3 Un-break MacOS.sdk_path
MacOS.sdk_path is meant to return the SDK path that matches the version
argument, so store the result in a hash.

Fixes Homebrew/homebrew#13623.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-27 02:40:44 -05:00
Mike McQuaid
8d949520ec Further improve brew doctor issue wiki text.
Following feedback from @mxcl on bcda0d.
2012-07-26 07:53:27 +01:00
Misty De Meo
86b1b2878d Revamp fish completion
The fish completion hadn't been updated since 2009; this brings it up
to date. Changes include:

* Create the list of commands the same way as in bash completion
* Add every option for every current command, with descriptions
* Fixes a bug in fish_complete_brew_command
* Allow fish_complete_brew_command to take multiple commands
* Expand functionality of fish_complete_homebrew_formula to support
  other commands and taps, and change name to reflect new functionality

Tested on fishfish, but should be compatible with fish.
2012-07-25 21:38:45 -05:00
Mike McQuaid
450dcf75dc Fix brew doctor warnings and spurious newline.
Fixes the problems discussed in 34c970 to ensure that `brew doctor`
does not look like it is broken on user setup problems but still
returns a sensible exit code for e.g. BrewBot.
2012-07-25 22:54:44 +01:00
Jack Nagel
74839417ea Rename xctools_fucked?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 12:04:42 -05:00
Jack Nagel
a772fb97ab Add MacOS::Xcode.provides_gcc?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 12:04:42 -05:00
Jack Nagel
4eeb0e6441 Use new Xcode module
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 12:04:41 -05:00
Jack Nagel
11cfca0e12 Add MacOS::Xcode.provides_autotools?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 12:04:41 -05:00
Jack Nagel
a784d2e045 Move Xcode and CLT modules to a new file
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 12:04:41 -05:00
Jack Nagel
62482504a9 Split Xcode and CLT methods into separate modules
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 11:58:01 -05:00
Jack Nagel
02f48dd7d8 MacOS: avoid checking clt_version in clt_installed?
Checking "not clt_version.empty?" is unnecessary if we are also checking
that dev_tools_path is /usr/bin.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 11:58:01 -05:00
Jack Nagel
0b1d759c2c MacOS module cleanups
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 11:58:01 -05:00
Adam Vandenberg
fd7cf8f293 doctor: be consistent in path advice 2012-07-24 12:28:02 -07:00
Misty De Meo
70d7c0c122 Revert 66a4ea1c80fa36fe348b3d5ad6d2f6c61cf21c05
Refusing to unlink files from another keg introduced issues when
files changed between formula versions; for instance, this
introduced issues when upgrading from gtk+ 2.24.10 to 2.24.11.

See Homebrew/homebrew#12778.
2012-07-24 09:52:12 -05:00
Adam Vandenberg
5de94e48bd doctor: check for DYLD_FALLBACK_LIBRARY_PATH 2012-07-23 16:08:05 -07:00
Adam Vandenberg
7a7e3b5f7c Make --version/--verbose slightly less confusing. 2012-07-23 14:27:50 -07:00
Sean Lee
ad32b663e8 corrected the macruby download link
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-07-22 12:54:24 -07:00
Misty De Meo
a8a16928e4 doctor: Skip outdated check when offline
Fixes Homebrew/homebrew#13535.
2012-07-22 12:57:03 -05:00
Misty De Meo
17953f2b83 Keg#unlink: check destination before unlinking
Rather than skip unlinking if there's no linked keg record, check to
see whether the destination's realpath is the same as the source file
in the keg being unlinked.
2012-07-22 10:58:19 -05:00
Mike McQuaid
d2a8df71ce Fix bottling keg-only brews. 2012-07-22 16:09:58 +01:00
Misty De Meo
ba2d17b8d1 Keg#unlink: Don't try to unlink if keg is unlinked 2012-07-20 12:03:31 -05:00
Misty De Meo
4c38d15110 brew unlink: don't unlink an unlinked formula
This caused weird issues in the case that multiple formulae provide
the same file.
2012-07-20 11:00:48 -05:00
Jack Nagel
a45bfc8786 MercurialDownloadStrategy: remove redundant chdir
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-19 17:45:38 -05:00
Felipe Navarro V
9ec231bcb7 MercurialDownloadStrategy: check out subrepos
Closes Homebrew/homebrew#13495.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-19 17:44:37 -05:00
Misty De Meo
6542b22677 brew-test-bot: move html and css into subdirectory
Also updates the bash-completion to ignore subdirectories, rather than
specific filename patterns.
2012-07-18 08:25:07 -05:00
Misty De Meo
615c15937e bash-completion: hide brew-bot support files
Hides files with the extensions ".css" and ".erb" to ensure that the
brew-bot's support files don't show up in tab-completion.
2012-07-17 23:29:28 -05:00
Jack Nagel
2488998a0f Fix typo in comment
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-17 11:31:53 -05:00
Jack Nagel
9f6a16eccd Coerce advice to a string in ChecksumMismatchError
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-17 11:30:28 -05:00
Jack Nagel
c71002a4a3 Formula: mirrors are always non-nil
Since 3ee9b7bd88a2d9017cdf005b10567a1d6d8ec211 ("SoftwareSpec:
initialize @mirrors"), @active_spec.mirrors will always be non-nil.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-17 03:23:59 -05:00
Misty De Meo
cf9e25cfa5 Add Ivy Bridge CPU family
Fixes Homebrew/homebrew#13434.
2012-07-16 16:26:47 -05:00
Misty De Meo
3696180fd7 Update Xcode checks for 10.8 2012-07-12 14:34:00 -05:00
Jack Nagel
bb2e67f37e doctor: fix incorrect usage of 'or'
Eventually I will stop making this mistake.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-12 03:01:28 -05:00
Jack Nagel
d4a37c673e Restore completion for "link" and "ln"
Commit 3b5d7939d9a660a83e29a86e6bab234f3e9f2dcb added completion for
`brew link` options, but disabled completion of the actual command
itself.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-12 02:41:12 -05:00
Misty De Meo
14c8c7c9ce Fix brew link --dry-run
The last make_relative_symlink was missing the mode argument, which
caused spurious linking under certain circumstances.
2012-07-11 22:32:15 -05:00