2246 Commits

Author SHA1 Message Date
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
Jack Nagel
0949d952dc Define Symbol#to_proc for Ruby 1.8.6
Ruby 1.8.6 doesn't have Symbol#to_proc, which allows things like
map(&:to_s) rather than map { |o| o.to_s }. 1.8.7 does, though, and
since it is used in a bunch of the superenv code we should attempt to
keep it compatible with 1.8.6.

Closes Homebrew/homebrew#16046.
2013-01-09 17:36:17 -06:00
Adam Vandenberg
2a40ff08a2 Only add -F if the frameworks folder exists
Closes Homebrew/homebrew#16901.
2013-01-04 21:30:10 -08:00
Mike McQuaid
f25e7de43b Add --homebrew-developer flag 2013-01-01 16:39:06 +00:00
Jack Nagel
9c8a73cf41 Allow requirements to specify env options 2012-12-26 14:37:03 -06:00
Shaun Jackman
9a4567c2f9 pathname.rb: Pass -s to du instead of -d0
The option `du -s` is equivalent to `du -d0`. The former is a POSIX standard
(IEEE Std 1003.1-2008), whereas the latter is a BSD extension.

From the BSD man page:
`-s Display an entry for each specified file. (Equivalent to -d 0)`

From SUSv4:
`-s Instead of the default output, report only the total sum for each of the specified files.`
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/du.html

Closes Homebrew/homebrew#16516.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-12-11 09:32:16 -08:00
Mike McQuaid
4b0e663c2c Improve bottle error messages.
On installation or creation of a bottle error out of the current
machine does not support bottles.

References Homebrew/homebrew#16291.
2012-12-04 12:06:02 +00:00
Jack Nagel
340769443c Rewrite plists when installing from a bottle 2012-11-25 15:11:57 -06:00
Mike McQuaid
427bc9d01c Overwrite plists. 2012-11-25 20:53:04 +00:00
Camillo Lugaresi
5e39ce44fe separate ENV/pkgconfig dirs by OS version
Closes Homebrew/homebrew#16063.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-11-19 22:04:04 -06:00
Camillo Lugaresi
cf7f0f250f add necessary .pc files for Leopard
add missing libcrypto.pc
override broken system libcurl.pc

Closes Homebrew/homebrew#16063.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-11-19 22:03:00 -06:00
Adam Vandenberg
aecd342a2b Try to remove a single .DS_Store when uninstalling
Closes Homebrew/homebrew#12976.
Closes Homebrew/homebrew#15975.
2012-11-14 15:10:08 -08:00
Charlie Sharpsteen
14cb8c8fce ENV.rb: Configure Objective-C++ compiler
Ensures the `OBJCXX` environment variable is correctly set. Also adds `OBJC`
and `OBJCXX` to `ENV.remove_cc_etc`.
2012-11-13 20:54:33 -08:00
Adam Vandenberg
0172672756 Don't error out if metafiles are linked
Closes Homebrew/homebrew#16008.
2012-11-12 20:56:05 -08:00
Adam Vandenberg
489ebd78d6 Teach Pathname how to scan for metafiles 2012-11-11 10:45:58 -08:00
Adam Vandenberg
ff55e7d82e Move vendored .pc files to ENV
Closes Homebrew/homebrew#15961.
2012-11-11 09:55:12 -08:00
Jack Nagel
5de12d7182 Inject framework paths into stdenv compiler flags 2012-11-06 12:32:10 -06:00
Sijawusz Pur Rahnama
32b1d46c96 Add support for 7zip archives
Closes Homebrew/homebrew#15723.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-29 14:57:23 -05:00
Adam Vandenberg
73b3977ab4 Pathname: add exec and jar helpers
Closes Homebrew/homebrew#13318.
2012-10-27 19:28:42 -07:00