187 Commits

Author SHA1 Message Date
Max Howell
61a8bd9ca0 Don't hang if xcode-select -print-path is "/"
Introducing MacOS.xctools_fucked?.

Refs Homebrew/homebrew#10293.
2012-02-21 10:33:03 +00:00
Jack Nagel
a7ade739dc Remove -Qunused-arguments in ENV.enable_warnings
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21 00:41:47 -06:00
Jack Nagel
f295661ca6 Remove unused :force switches
The :force behavior for ENV.gcc has been the default for some time, and
was used to force vanilla gcc in case the gcc symlink pointed at
llvm-gcc; for ENV.clang, this doesn't mattera as clang is just clang.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21 00:22:27 -06:00
Jack Nagel
f8e3e806f9 Silence unused argument warnings from clang
The clang frontend ignores a number of options that are accepted by gcc
and llvm-gcc. However, it produces a warning for each unused argument at
each invocation, which can result in many lines of noise, e.g.

   clang: warning: argument unused during compilation: '-rdynamic'

Since these arguments do not affect compilation, let's just silence the
warnings by passing '-Qunused-arguments' to clang by default.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21 00:22:17 -06:00
Jack Nagel
78d4fda6d6 ENV: clean up set_cpu_cflags a bit
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-21 00:20:29 -06:00
Camillo Lugaresi
5ef84730d0 add ENV.O1
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-02-19 11:45:15 -08:00
Adam Vandenberg
847a2732ee Update return values of install and install_symlink
These now return an Array of all the target destinations.
Previously, if a single argument was passed a single non-
Array was returned.

This behavior has been changed so that an Array is always returned
even for a single argument.

Updated the test.

Hopefully this won't break any custom code out there.
2012-02-17 23:07:16 -08:00
Adam Vandenberg
f2002c4558 This should be a regex 2012-02-17 19:43:44 -08:00
Max Howell
e1461b9d20 OTT handling for various Xcode-4.3/CLI-Tools edge cases
Also xcrun can only exist at /usr/bin/xcrun.

Most of these edges are non-buildable environments, but I didn't know that when writing it, so it may as well stay, since it still does make brew --env more correct.
2012-02-18 01:53:55 +00:00
Max Howell
607c13c32b Find xcrun if user doesn't ever install Xcode 4.3 helper tools 2012-02-17 13:34:06 +00:00
Max Howell
ba61d3013a Work with Xcode 4.3 if user didn't install helper tools
We ask Spotlight to find Xcode and use that path, neat right?
2012-02-17 13:08:55 +00:00
Max Howell
4504662033 Use xcrun; Ensure clang is the default compiler with Xcode 4.3
Using xcrun as a proxy to execute the compiler tools is per its design. This means you can't treat ENV['CC'] as a path anymore, but I think I found the cases this was being expected and corrected them. It was not proper anyway to assume the variable was a path, it can be anything. Like a proxy. Like xcrun.

Also more thoroughly clear ENV.
2012-02-16 23:43:43 +00:00
Jack Nagel
59bd97bb89 Unset CLICOLOR_FORCE in the build environment
If we're going to unset GREP_OPTIONS we may as well unset this one too,
as it causes similar issues. Recent autoconf unset both of these.

Fixes Homebrew/homebrew#8165.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-16 16:55:28 -06:00
Max Howell
66f942aa66 Find the dev tools, even with Xcode 4.3
Fixes Homebrew/homebrew#9179.
2012-02-16 18:19:01 +00:00
Max Howell
82ed6aceb8 Pre-refactor Tidy 2012-02-16 18:19:01 +00:00
Max Howell
be953bbb85 Use -Os rather than -O3
This was probably a stupid decision in the first place. Who wants lengthy compile times for debatable gain? Apple use Os in all Xcode projects, so I'm guessing its the best choice.

Also I have long suspected the Image Magick performance issues Homebrew is supposedly susceptible to were because of O3.
2012-02-16 18:19:00 +00:00
Max Howell
ec66d1f956 Delete ENV[GREP_OPTIONS] and the related doctor check
Can break CMAKE builds.
2012-02-16 18:19:00 +00:00
Jack Nagel
150cf9b88c ENV: fix typo 2012-02-12 22:52:12 -06:00
Adam Vandenberg
9ee5e14e6d Pathname.install_symlink 2012-02-12 20:08:56 -08:00
Jack Nagel
10ddeaef8b Add ENV.cxxflags
Useful when CXXFLAGS has diverged fom CFLAGS, e.g. via ENV.append, and
also it is nice for CXX to have symmetry with CC.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-12 17:29:02 -06:00
Adam Vandenberg
252605b2ae Recognize dist suffix 2012-02-11 15:33:30 -08:00
Jack Nagel
c5592b83b2 Pathname: silence install-info output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10 13:02:47 -06:00
Adam Vandenberg
6cfe4b3208 Allow multiple arguments to install 2012-02-09 19:16:49 -08:00
Adam Vandenberg
469ad7bee5 this was out of balance 2012-02-08 21:58:46 -08:00
Adam Vandenberg
c42a6b6802 Pathname: support .tar.Z extension 2012-02-08 21:08:18 -08:00
Adam Vandenberg
95f1d330b2 don't complain if args are empty 2012-02-03 21:40:14 -08:00
Jack Nagel
709674cb95 Move old ENV.use_foo? compiler methods to compat
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-03 23:01:28 -06:00
Nicolas Despres
d0be4d692b keg: handle the info directory file properly
If HOMEBREW_KEEP_INFO environment variable is set:
 - Do not symlink the info directory file (aka 'share/info/dir')
   otherwise it gets overwritten by next installed brew.
 - Install an entry in the directory for each linked info file when the
   brew is linked.
 - Uninstall the entry when the brew is unlinked.

Closes Homebrew/homebrew#9700.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01 22:52:14 -06:00
Nicolas Despres
212927ee54 Pathname: remove trailing spaces
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01 22:16:47 -06:00
Jack Nagel
0f499ac7be Don't append an empty value to CFLAGS
Appending an empty string results in an extraneous space character.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-19 22:54:28 -06:00
Mike McQuaid
c71f883fa8 Use more generic cflags when building bottles.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-16 21:05:00 +00:00
Mike McQuaid
a3db9a42e8 Add option for building bottles.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-16 21:05:00 +00:00
Mike McQuaid
555e7ff893 Don't try and use GCC on Xcode 4.2: it's gone Jim.
Closes Homebrew/homebrew#9622.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-16 21:00:24 +00:00
Max Howell
9a774ac0a6 Fix libinet version detection 2012-01-14 03:48:03 +00:00
Jack Nagel
ae4ea06e22 pathname: recognize ".cpio.*" double extensions
Just a cosmetic nicety.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-12 20:31:47 -06:00
Misty De Meo
1ed22ff1c3 ENV.gcc: search HOMEBREW_PREFIX/bin for gcc-4.2
Allow the use of a Homebrewed gcc-4.2 in order to support homebrew-alt's
apple-gcc42 formula.

This also removes the :force filtering for the gcc-4.2 check error.

Closes Homebrew/homebrew#9384.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-01-11 21:16:13 -06:00
Adam Vandenberg
28a00a2c09 Standardize 32 bit build switch 2012-01-02 14:53:36 -08:00
Jack Nagel
f437c9040b Resolve multi-level gcc symlinks
In later XCodes, gcc is a symlink to gcc-4.2 which is itself a symlink
to llvm-gcc, so it is necessary to resolve multiple symlinks.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-26 12:03:55 -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
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
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
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
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
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
Dustin Koupal
bcea01ca0a pathname.rb: Fix spelling for permssions
Closes Homebrew/homebrew#7970.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-10-04 15:19:06 -07:00
Jack Nagel
27d2a95e8f Correctly parse ImageMagick bottle version
Commit 2695821e98 ("Only use the bottle if its version is up-to-date")
essentially broke the ImageMagick bottle, because the version parsing
logic returns "1" as the bottle version.

Fixing this requires only a slight modification to the bottle URL regex;
includes a test.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-21 17:29:14 -05:00