1630 Commits

Author SHA1 Message Date
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
Jack Nagel
762c355b30 ComparableSet#merge returns self
Set#merge is supposed to return self, and Formula#recursive_requirements
depended on this being true.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25 15:54:55 -05:00
Jack Nagel
96844850b4 Return the block value in ARGV.filter_for_dependencies
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-24 17:54:16 -05:00
Misty De Meo
447f78c0d2 brew ln --force is now brew ln --overwrite
* Renames --force to --overwrite, freeing up brew ln --force for Homebrew/homebrew#13349
* Changes --dry-run to preview linking by default, rather than
  overwriting. An overwrite dry-run can be simulated via both
  --dry-run --overwrite
* Adds some basic Keg tests
2012-10-20 21:00:46 -05:00
Misty De Meo
bbfb6400c7 Manage Requirements using ComparableSet
ComparableSet only allows a single object of a given class,
choosing the object with the greatest value. This was mainly created
for Requirements, so that, e.g., two X11Dependencies of differing
strictness don't both end up in the same requirement set.

Fixes Homebrew/homebrew#15240.
2012-10-15 09:46:29 -05:00
Misty De Meo
dbdf2c78c3 Don't count mkpath in ObserverPathnameExtension
mkpathed directories aren't really "linked" or "unlinked" per se,
and link/unlink handle directories differently. It's easier just to
ignore them, which finally synchronizes link/unlink counts.
2012-10-04 21:37:37 -05:00
Mike McQuaid
b30454d3be Don't use bottles for HEAD, devel or universal. 2012-09-30 22:26:33 +01:00
Max Howell
f3b7b933fa Fix ENV.fortran info texts
They were being truncated.
2012-09-28 17:14:56 -04:00
Jack Nagel
dd4302ae9b Improve text_executable heuristic
Previously we detected this by reading the first line of the file.
However, "first line" is meaningless when dealing with binary files, but
IO#readline will happily keep reading until it finds a newline
character, which can result in some unnecessarily large buffers.

Aside from the performance issue, this causes an additional problem
under Ruby 1.9: trying to match the binary string against a pattern will
raise ArgumentError (unless the binary string just happens to also be
valid UTF-8, heh).

Fix both issues: only read the first 1024 bytes, as no sane shebang will
ever be that long, and use a plain read(), which returns an ASCII
encoded string even on 1.9.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 17:26:26 -05:00
Misty De Meo
38283eafb2 FileUtils: backport #copy_metadata fix
Entry_#copy_metadata has a nasty bug that makes copying symlinks
across filesystems fail. This lasted all the way through 1.9.3p194
before *finally* being fixed. This backports the official fix.

Fixes Homebrew/homebrew#14710.
2012-09-27 09:52:06 -05:00
Misty De Meo
3633995fc9 stdenv: stop setting LD
superenv stopped setting LD in
8e4c0a141171666270529da4be026d529d474467, seems sensible to follow
suit in stdenv too.

See Homebrew/homebrew#14943.

Fixes Homebrew/homebrew#15090.
2012-09-26 13:22:30 -05:00
Max Howell
b94e220bc3 ENV.fortran adds back superenv removed PATHs
Fixes Homebrew/homebrew#15103.
2012-09-25 12:04:42 -04:00
Max Howell
a217b03952 Clean up and improve build-error output and logs
All logs are now stored from each command executed in Formula.install.

Error output is truncated to five lines in an attempt to not overwhelm the user and to encourage users to read the error output and report the bug properly. Maybe we can get that figure up from 70% to 90%.
2012-09-25 11:31:56 -04:00
Mike McQuaid
55dc5466fb Fix building bottles from source. 2012-09-18 20:05:03 +01:00
Misty De Meo
ee4c696380 ARGV: add .json
Used by brew info; may be used by other commands in the future.
2012-09-17 19:06:40 -05:00
Jack Nagel
55a95ee0ab ENV: put X11 aclocal dir in ACLOCAL_PATH when appropriate
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-05 19:49:50 -05:00
Jack Nagel
2d1a941976 Sort out remaining XQuartz/stdenv issues
We use PKG_CONFIG_LIBDIR to reset the default search path, overriding
whatever is baked into the pkg-config executable. This way, we can later
append XQuartz paths here while still allowing any brewed libs to take
precedence, keg-only or not.

Hopefully this will resolve any remaining issues, and let us get rid of
some per-formula hacks.

c.f. Homebrew/homebrew#14474.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 22:39:38 -05:00