1319 Commits

Author SHA1 Message Date
Jack Nagel
7df7bd6a48 --env: dump a few more environment variables
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-16 19:47:37 -06:00
Adam Vandenberg
62e1dd8bd5 Enable 'brew edit' for non-Textmate editors. 2011-12-16 14:27:58 -08:00
Jack Nagel
df8edc94d6 utils: fix clang build regex
This has to be able to match things like "211.10.1" so let's stop using
fixed lengths.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-16 03:03:10 -06:00
Jack Nagel
e4bd231680 audit: hard wrap dep warning
The warning is lengthy, and usually wraps on 80-column terminals.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-15 16:59:02 -06:00
Oleg Oshmyan
f05e267c3f Remove Clang-specific cflags when switching compilers
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-12-14 20:12:07 -08:00
Oleg Oshmyan
d2492073b2 ENV: update and clean up optimization flags
- Fix ENV.libxml2 to update CPPFLAGS rather than CFLAGS
 - Methods ENV.{gcc*,llvm,clang} now reset CPU-specific optimization
   flags on every call.

Closes Homebrew/homebrew#8105.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-13 20:38:45 -06:00
Jack Nagel
14cd6667b4 'CHANGES' is also a meta file
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-11 21:59:30 -06:00
Jack Nagel
ffd5b7d7ab Add support for xz-compressed tarballs
Rationale: some software (e.g. GNU Coreutils, GnuTLS 3.x), have started
distributing _only_ xz-compressed tarballs. There is no system XZ
utility provided by OS X, but it is necessary so that we can continue to
provide formulae for this software.

If XZUtils isn't installed, we abort and prompt the user to `brew
install xz`.

The `xz` command itself doesn't do any untarring, so we write the
decompressed archive to stdout and pipe it to tar.
2011-12-09 16:16:46 -06:00
Adam Vandenberg
db02ad1acc Idioms 2011-12-08 21:32:58 -08:00
Jack Nagel
18bdd72827 audit: check for hard-coded compilers
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-08 23:08:42 -06:00
Jack Nagel
f501e7f00b Ignore $HOME/.curlrc when invoking curl
Several issues have been caused by conflicts between the options
Homebrew passes to curl and those read from $HOME/.curlrc. Passing '-q'
will force curl to ignore settings in that file.

Suggested in Homebrew/homebrew#9027.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-08 21:05:19 -06:00
Jack Nagel
901406e3a0 Introduce HOMEBREW_CURL_VERBOSE
When investigating issues, one might want to see exactly what curl is
doing behind the scenes. Setting HOMEBREW_CURL_VERBOSE will cause the
'--verbose' flag to be passed to all invocations of curl.

Prompted by Homebrew/homebrew#8992.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-08 21:04:28 -06:00
Charlie Sharpsteen
94f84544c6 formula.rb: Fix use of xcode_version in LLVM check
Should be `MacOS.xcode_version`.

Fixes Homebrew/homebrew#8966.
2011-12-04 10:12:40 -08:00
Charlie Sharpsteen
ec71780612 formula.rb: Change fails_with_llvm for XCode 4.2
Suggest trying `--use-clang` instead of `--use-gcc` (which does nothing).

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-12-03 12:33:02 -08:00
Misty De Meo
ea4d1f6b7b Restore --force behaviour in brew-install
Fixes Homebrew/homebrew#8933.
Closes Homebrew/homebrew#8936.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-12-02 09:36:38 -08:00
Misty De Meo
6c86d358a3 ENV: fix llvm-gcc regexp
Fixes: Homebrew/homebrew#8890.
Closes Homebrew/homebrew#8893.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-12-01 13:16:00 -08:00
Jack Nagel
6f83e20f49 audit: only perform GNU URL check on primary URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-30 13:14:24 -06:00
Jack Nagel
1657bb1fcf audit: disable GNU url check
It needs to be reworked to only check the primary URLs, as we are now
using ftp.gnu.org as a mirror.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-30 12:57:29 -06:00
Adam Vandenberg
f059e9624c audit: smake is also a build tool 2011-11-29 18:55:55 -08:00
Adam Vandenberg
7278eaec51 audit: check for DB deps too 2011-11-29 18:50:44 -08:00
Jack Nagel
45a87ab8d9 audit: warn about more "forbidden" dependencies
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-29 19:57:26 -06:00
Jack Nagel
7f7391243a audit: check for build-time dependencies
This can be made more robust in the future when we stop throwing away
the ':build' type flag in Formula#depends_on.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-29 19:40:14 -06:00
Charlie Sharpsteen
d0b904a6e4 brew doctor: Ignore config files in /usr/X11R6/bin
`/usr/X11R6` is an Apple-provided symlink to `/usr/X11`.

Fixes Homebrew/homebrew#8881.
2011-11-29 14:42:29 -08:00
Charlie Sharpsteen
75bc163f49 brew doctor: Note there is no GCC in XCode 4.2+
Should help advert confusion surrounding the "could not find gcc 4.2.x" message
recieved by Lion users running the latest version of XCode.

Fixes Homebrew/homebrew#8876.
2011-11-29 14:31:53 -08:00
Misty De Meo
af457fb200 Correct cmake syntax in formula template
Closes Homebrew/homebrew#8879.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-11-29 14:20:38 -08:00
Colin Hebert
3b8c98040c download_strategy.ry: Improve Bazaar efficiency
Bazaar download strategy tried to re-download everything on "export" as a
checkout is used. See:

 https://answers.launchpad.net/bzr/+question/180269
 https://bugs.launchpad.net/bzr/+bug/897511

Related to issue Homebrew/homebrew#8774.

Closes Homebrew/homebrew#8863.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-11-29 10:06:58 -08:00
Misty De Meo
d9c3f19e6a Fix installation error from ARGV --HEAD filter
The ARGV filtering would strip `--HEAD` from dependency installations,
then proceed with trying to install the dependency from the latest
version in the formula. This causes an error if the latest version is
already installed, so check to see if formula is installed before
performing the installation.

Closes Homebrew/homebrew#8869.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-11-29 09:32:05 -08:00
Charlie Sharpsteen
9898956047 uses.rb: Pass a block to map instead of a Proc
Passing a `Proc` doesn't work in Ruby 1.8.6 which causes `brew uses` to fail on
Leopard.
2011-11-28 23:29:29 -08:00
Jack Nagel
8b88ea3eae Move brew-depstree into brew deps --tree
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-27 23:29:41 -06:00
Charlie Sharpsteen
0d08a5af00 formula.rb: Initialize path to nil or a Pathname
For consistency, ensure that the `path` member of formula objects is always a
`Pathname`.
2011-11-27 16:44:42 -08:00
Charlie Sharpsteen
3cd9b6db6a Fix array concatenation in ARGV.filter_for_dependencies
Gah. This was supposed to be in the last commit, but I forgot to `--amend` it.
2011-11-27 14:44:39 -08:00
Charlie Sharpsteen
00659f0f39 Don't suppress --verbose while installing deps
Unless the `--quieter` flag is passed.

Closes Homebrew/homebrew#8723.
2011-11-27 14:37:31 -08:00
Charlie Sharpsteen
edde8d75c7 Suppress --devel while installing dependencies
Unless the dependency is explicitly passed to `brew install --devel`.
2011-11-27 14:37:31 -08:00
Charlie Sharpsteen
b5f942764a Re-work ARGV filtering to properly handle --HEAD
Previously, stripping arguments like `--HEAD` for dependencies failed because
that flag affects the installation prefix encoded into formula objects. The
previous implementation of `ARGV` filtering tried to contain all changes to a
single method call before the `FormulaInstaller` forks. This update spreads
things out a bit:

  - The Homebrew `ARGV` extension adds a new method, `filter_for_dependencies`
    which strips flags like `--HEAD`, yields to a block, then restores the
    original contents of ARGV.

  - The `explicitly_requested?` test, which returns true or false depending on
    if a formula object is a member of `ARGV.formulae`, is now a method of
    `Formula` objects.

  - `FormulaInstaller` objects now execute the installation of dependencies
    inside an `ARGV.filter_for_dependencies` block if the dependency was
    `explicitly_requested?`.

Fixes Homebrew/homebrew#8668.
Closes Homebrew/homebrew#7724.
2011-11-27 14:37:31 -08:00
Adam Vandenberg
a494f9a3e0 audit: remove --strict 2011-11-27 08:39:44 -08:00
Jack Nagel
0851a95a01 doctor: remove terminal width check for curl
This ended up being noise for some users. We need a better set of steps
to trigger the bug in order to create a good doctor check; patches
welcome from users who are encountering this issue.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-26 12:10:10 -06:00
Jack Nagel
b712a4ff47 doctor: use newer gcc version methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-26 12:01:52 -06:00
Jack Nagel
e0441fc26a Reset to remote HEAD when updating git clones
Git checkouts that do not specify a branch should always reset to the
remote's HEAD, as some remotes have HEAD set to 'unstable' or some other
non-master branch.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-26 11:44:55 -06:00
Misty De Meo
f017f2d2f5 Utils: update gcc version detection logic
Homebrew was attempting to check the version of gcc-4.0 and gcc-4.2 even
if they don't exist, causing `doctor` and `--config` to throw nasty
errors.

Also fixes the broken missing gcc-4.2 detection, which was confusing
Xcode 4.2 users.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-11-25 17:50:14 -08:00
Adam Vandenberg
0fd47f2014 brew-config: remove recommended compiler versions
The recommended compiler versions printed from `brew-config` are out
of date and misleading. The recommendation is always "Run the latest
version of Xcode available for your platform".
2011-11-25 17:34:47 -08:00
Misty De Meo
6612e49a3c Detect 2-digit clang build versions
Xcode 3.2.6's build of clang is 77, which wasn't being matched by the
clang_build_version regexp.

Closes Homebrew/homebrew#8796.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 17:54:21 -06:00
Jack Nagel
265ea4d1fb Display clang version in --config output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:15:47 -06:00
Jack Nagel
6fce434857 Add utility methods to determine clang version
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:14:46 -06:00
Jack Nagel
a1df77f3b7 doctor: remove outdated XCode version reference
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:02:54 -06:00
Jack Nagel
a99b745935 Parse compiler --version instead of -v
For GCC and LLVM-GCC, '-v' is not a synonym for --version. When run
without any other options or arguments, it gives similar output, but it
is better to just parse the (terser) --version output.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:00:59 -06:00
Charlie Sharpsteen
e04e23492c formula_installer.rb: Improve receipt check
Using `f.installed?` instead of `f.prefix.exist?` ensures something was created
by the installation step before the install receipt is written.
2011-11-23 12:25:00 -08:00
Jack Nagel
17d83b735a audit: check for MacPorts patches from trunk
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-23 13:38:38 -06:00
Charlie Sharpsteen
399d73e100 ENV.rb: Fix typo in Fortran environment variables
`FFFLAGS` should be `FFLAGS`.
2011-11-23 09:25:22 -08:00
Jack Nagel
75a7c33e6a options: treat outdated brews as installed
`brew options --installed` will now "do the right thing".

There is getting to be a small but noticeable amount of code duplication
among commands that take options like "--installed" or "--all"; it may
be worth factoring this out into a method that will return a collection
of formula objects based on the options that are passed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-22 19:29:10 -06:00
Jack Nagel
b62bd90a1d Define and use ARGV.build_devel?
Often it is useful to provide a development build in addition to the
stable release or HEAD download.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-11-21 20:04:33 -08:00