162 Commits

Author SHA1 Message Date
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
Max Howell
bf3433bde7 With xcodebuild don't set CC, CXX, etc.
The compiler setting in the xcodeproj is overridden by the CC setting in the environment. This is a bit insane IMO since the xcodeproj itself has detailed decisions about what tools to use.

Fixes Homebrew/homebrew#6406.
2011-09-10 11:30:00 +01:00
Max Howell
0a0187feed Tune optimisations for sandybridge 2011-09-09 09:26:59 +01:00
Max Howell
06795b8953 Allow :force for ENV.gcc
This is used with fails_with_llvm so that if GCC cannot be found (and we suspect this is the case with Xcode 4.2) the build will fail.

Quite possibly it should be the default.
2011-09-06 11:22:22 +01:00
Max Howell
65d4b2378a Remember compiler setting when it is changed via eg. ENV.gcc
Thus it will be correct after the setting is changed.
2011-09-06 11:22:22 +01:00
Justin Hileman
8f3a74993b Allow 'brew link' to work with URL-based formulae
Closes Homebrew/homebrew#7373.

Signed-off-by: Max Howell <max@methylblue.com>

I added some comments.
2011-09-02 12:12:30 +01:00
Max Howell
a0763dfc2c Remove Xcode dependence from ENV.rb
Fixes Homebrew/homebrew#7329.
Fixes Homebrew/homebrew#7269.
Fixes Homebrew/homebrew#7236.

Also quite a lot of tidy. This should all work fine.

I think we only started referring into xcode_prefix because LLVM used to not
be linked into /usr/bin. But for sure this is no longer true. If someone out
there doesn't link cc etc. into /usr/bin then I guess we can revise this patch
but it's not something we officially supported before, it was just an
accident.

I added a test step in the init code so that a working compiler will always be
selected. This is mainly a fallback for old Xcodes. Though a comment in
another area of the code suggested Xcode 3 on 10.5 doesn't have LLVM so…
2011-09-02 12:12:20 +01:00
Max Howell
d5e3c40ca1 Actually obey --use-gcc flag
Schoolboy error.
2011-09-01 14:17:29 +01:00
Max Howell
a32e738f7c Default to LLVM for Xcodes that default to LLVM 2011-08-31 17:36:41 +01:00
Eugene Ray
b6fa7ebcca Fix Xcode 4.2 cc compiles
It seems like latest build of Xcode 4.2 doesn't create "-4.2" links in /usr/bin. Because of this recipes fail with "configure: error: C compiler cannot create executables" error.

Closes Homebrew/homebrew#7254.
Closes Homebrew/homebrew#7276.

Signed-off-by: Max Howell <max@methylblue.com>

Amended to work as intended, since /usr/bin/cc is actually since Xcode 4.

Amended commit message. First line must be less than 72 characters! :P
2011-08-31 11:16:56 +01:00
Jan Lehnardt
27fd2d7a70 fix version parser for upcoming erlang bottle
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2011-08-31 08:57:30 +01:00
Max Howell
0822907d6d Some more sanity with ENV.compiler
Deprecated use_clang? etc. since the logic was such that multiple states could be set, when in reality only one compiler can be set.

Changed fails_with_llvm handling so if HOMEBREW_USE_LLVM is set then it tries to build even if the formula has fails_with_llvm set. Rationale: mostly they will no longer fail and we need to catch these cases.
2011-08-26 14:21:37 +01:00
Max Howell
c659829f29 Add ENV.clang; Fixes Homebrew/homebrew#6580
Also tidied it up a little, reducing duplication as per original patch.
2011-08-26 13:53:36 +01:00
Max Howell
ac60ff2b14 -march=native doesn't work at all. Gee.
Fixes Homebrew/homebrew#7185.
2011-08-25 00:36:37 +01:00
Chip Turner
3299ffe590 add arrandale to list of core2 CPUs 2011-08-25 00:36:37 +01:00
Jack Nagel
d5f7594748 ENV: allow a user-configurable number of make jobs
Let an environment variable, HOMEBREW_MAKE_JOBS, override the default
'-j<cores>' make flag.

Now we can more easily debug formula that normally build in parallel, or
(potentially) speed up lengthy builds.
2011-08-24 17:14:23 -05:00
Max Howell
b025fb1397 Use -march=native when we don't otherwise know
I believe this works nowadays. When I created Homebrew originally, it did nothing. Hence all the other logic.
2011-08-24 22:30:44 +01:00
Max Howell
3a0cf31ed0 Tidy ENV.rb 2011-08-24 22:30:43 +01:00
CharlieRoot
c76ae1a94f Fix Xcode 4 compiler paths for --use-gcc
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-08-04 10:07:08 -07:00
Mike McQuaid
9289c06299 Don't install bottles in non-default HOMEBREW_PREFIX. 2011-07-31 11:47:14 +01:00
Mike McQuaid
81c7ec9933 Build from source (for now) unless on Lion.
Longer-term we'll try and use install_name_tool to fix Lion
bottles so they run fine on 10.5 and/or 10.6.

Closes Homebrew/homebrew#6699.
2011-07-29 18:36:47 +01:00
Trevor Wennblom
55791d4c10 Coerce flags to an array in remove_make_var!
This is needed for Ruby 1.9.x compatibility, but we still don't support
running Homebrew with anything other than a system provided 1.8.[67].

Fixes Homebrew/homebrew#6546

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-07-27 17:38:26 -07:00
Mike McQuaid
2495cdc544 Build from source when we've options or 10.5. 2011-06-22 17:48:20 +01:00
Mike McQuaid
b7dd6f1f7e Remove redeclared method. 2011-06-21 19:25:39 +01:00
Mike McQuaid
b549ca837f Fix bad pathname indentation. 2011-06-21 19:24:45 +01:00
Mike McQuaid
23769d62ad Fix brew bottle versioning. 2011-06-21 19:04:17 +01:00