664 Commits

Author SHA1 Message Date
Jack Nagel
e73f869d84 Remove outdated comment 2013-06-14 10:34:20 -05:00
Jack Nagel
381255adec Assign this inline 2013-06-14 10:34:19 -05:00
Jack Nagel
3252f9a2c9 Delete rather than assign nil 2013-06-14 10:34:19 -05:00
Jack Nagel
723f7ed111 Simplify nested conditional 2013-06-14 10:34:19 -05:00
Jack Nagel
4e4a5af731 Use has_key? rather than accessing the value 2013-06-14 10:34:18 -05:00
Jack Nagel
020a505970 Rename single-letter variable 2013-06-14 10:34:18 -05:00
Jack Nagel
a458555ccb Make flag lists into constants 2013-06-14 10:34:18 -05:00
Jack Nagel
7d6371cd19 ENV: clean up set_cpu_flags and set_cpu_cflags usage 2013-06-14 10:34:18 -05:00
Jack Nagel
50db35e5d3 Use Hardware::CPU module 2013-06-14 10:34:17 -05:00
Adam Vandenberg
a60eed48bc Remove adamv-alt references.
Closes Homebrew/homebrew#20364.
2013-06-09 07:32:06 -07:00
Misty De Meo
c9c5e56363 Add :ld64 dependency
This allows formulae which won't build with Tiger's ld to conditionally
request a dependency on the ld64 formula. This modifies the build
environment appropriately, and will only be active on Tiger.
2013-06-08 19:10:38 -05:00
Adam Vandenberg
aff66c3b86 Sniff for non-tarred gzips
Don't try to untar non-tarred gzips.
2013-06-08 15:37:32 -07:00
Jack Nagel
80745a97e2 Add Enumerable#group_by 2013-06-08 12:23:14 -05:00
Jack Nagel
159b9d8e2d Move oldest_cpu to Hardware 2013-06-06 16:02:27 -05:00
Samuel John
4dac954cdb ENV.userpaths! Hotfix to prefer brewed stuff
The depends_on 'nose' => :python

tests fails even if people did `pip install nose`
with their brewed pythons because during
the tests the PATH is set up such that
/usr/bin comes before HOMEBRE_PREFIX/bin.

This is a hot fix. Proper fix need resorting
the PATH.
2013-06-04 22:33:24 +02:00
Jack Nagel
b97b013fce Extract attr_rw from Formula for reuse
Closes Homebrew/homebrew#20239.
2013-06-04 11:06:18 -05:00
Jack Nagel
41af459205 Require hardware where it is needed 2013-06-01 19:38:48 -05:00
Jack Nagel
c9ce32d0f1 Simplify implementation of ARGV.flag? and .switch? 2013-05-20 22:34:54 -05:00
Jack Nagel
4276d03fe4 Fix set_cpu_flags invocations in ENV.fortran
Fixes Homebrew/homebrew#19013.
Fixes Homebrew/homebrew#19862.
Fixes Homebrew/homebrew#19921.
2013-05-19 11:18:53 -05:00
Mike McQuaid
ad5c1b81cd Fix --build-bottle CFLAGS.
The CFLAGS were previously not generic enough.

References Homebrew/homebrew#18944.
References Homebrew/homebrew#19179.
2013-05-11 12:18:25 +01:00
Desmond Brand
ba93e6d363 Overwrite broken symlinks with --overwrite
Closes Homebrew/homebrew#19480.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2013-05-09 09:21:34 -05:00
Jack Nagel
16723afaa8 Only remove DS_Store on ENOTEMPTY 2013-04-27 15:21:05 -05:00
Jack Nagel
51bfd4fc1e Avoid calling to_s on the same Pathname multiple times 2013-04-20 13:50:42 -05:00
Jack Nagel
a78ae63153 Performance fix for Pathname#prepend_prefix
See 05a456c231dc6da7cb0f7c70cb21feaf9a0d803c; same story.
2013-04-14 22:38:18 -05:00
Jack Nagel
5e9cfec8b8 Performance fix for Pathname#chop_basename
This is an internal method, but is called a bunch of times in
performance-critical codepaths, and is ultra slow because the constant
is interpoplated into the Regexp each time the method is called.

Alas, this has been fixed in Ruby 1.9+.
2013-04-14 21:56:04 -05:00
Jack Nagel
df29049222 Recognize 7z files by magic bytes, not filename 2013-04-03 23:30:32 -05:00
Jack Nagel
1b0f0824fe Requirement: env DSL is evaluated in context of self, not ENV
This was meant to support:

  env do |req|
    append_path 'PATH', req.some_method
    ...
  end

i.e., the block was evaluated in the context of ENV. But it turned out
to be not so useful after all, so I'm ripping it out before something
actually depends on it.
2013-04-01 16:17:35 -05:00
Jack Nagel
f0db242591 extend/fileutils: suppress discarded method definition warnings 2013-03-28 17:37:29 -05:00
Misty De Meo
2476801613 Hardware: separate out CPU values into CPU module
* CPU functions now exist in Hardware::CPU
* Added compatibility functions in compat/hardware_compat.rb
* Names are less specific to Mac hardware, e.g. CPU.family instead of
  Hardware.intel_family
* Hardware::CPU.family works for both Intel and PowerPC
* New helper methods on CPU, like .sse4? and .altivec?

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2013-03-23 13:40:18 -05:00
Misty De Meo
29af53d451 Replace remaining shelled-out whiches 2013-03-21 08:37:51 -05:00
Jack Nagel
e463016428 ENV: clear influential include path vars 2013-03-16 13:51:30 -05:00
Mike McQuaid
98352b3b41 Don't run certain functions on non-MACOS. 2013-03-11 18:26:25 +00:00
Mike McQuaid
9837bbda55 Add with_system_path to run using system PATHs.
Needed for Linux compatibility.
2013-03-11 18:26:25 +00:00
Mike McQuaid
d39280bdf7 Add current Ruby globals.
Allows access to the Ruby path. Needed for Linux
porting.
2013-03-11 18:26:25 +00:00
Jack Nagel
ed0a737a39 Adjust BOTTLE_EXTNAME_RX for :snow_leopard_32 2013-03-09 17:38:49 -06:00
Jack Nagel
878747d458 Index pkgconfig directories by MacOS.version 2013-03-09 14:46:01 -06:00
Mike McQuaid
af7f7d7353 Add environment variable to build bottles. 2013-03-01 17:49:09 +00:00
Mike McQuaid
8f35793020 Support 32-bit 10.6 bottles.
Closes Homebrew/homebrew#17735.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-01 17:49:09 +00:00
Jack Nagel
f037be5148 Don't shadow outer local variables 2013-02-18 12:13:36 -06:00
Jack Nagel
b8b014036e Remove redundant return 2013-02-15 00:36:03 -06:00
Jack Nagel
9fd5953ed9 Make this more idiomatic 2013-02-15 00:35:52 -06:00
Jack Nagel
b38d555030 Fix Regexp encoding under 1.9/2.0 2013-02-10 15:26:07 -06:00
Jack Nagel
ea15442b9a Move ruby methods to FileUtils extension 2013-02-02 11:24:55 -06:00
Mike McQuaid
9ba9e749b8 Remove MD5 support.
Closes Homebrew/homebrew#17317.
2013-01-30 22:36:12 -08:00
Mike McQuaid
b58077b3e8 Don't use underscores in (new) bottle filenames.
Closes Homebrew/homebrew#14270
2013-01-29 17:14:09 -08:00
Mike McQuaid
1107171f83 Cleanup old bottle syntax. 2013-01-29 17:14:00 -08:00
Jack Nagel
f3d3bc4368 Move option comparison into BuildOptions 2013-01-26 11:37:00 -06:00
Jack Nagel
2503cedf2c Object#instance_exec for Ruby 1.8.6
Not thread safe! But I don't think we care.

We want to evaluate the env DSL block in the context of ENV for asthetic
reasons, but we also want access to methods on the requirement instance.
We can use #instance_exec to pass the requirement itself into the block:

  class Foo < Requirement
    env do |req|
      append 'PATH', req.some_path
    end

    def some_path
      which 'something'
    end
  end

Also add a simplified version of Object#instance_exec for Ruby 1.8.6.
2013-01-21 17:24:11 -06:00
Jack Nagel
d06824c357 ENV.with_build_environment 2013-01-21 17:24:10 -06:00
Jack Nagel
951620f146 Restore ARGV even if an exception is raised 2013-01-10 15:57:21 -06:00