Commit Graph
299 Commits
Author SHA1 Message Date
Jack Nagel fdab0f48fd Inject framework paths into stdenv compiler flags 2012-11-06 12:32:10 -06:00
Sijawusz Pur Rahnama 38f121bd68 Add support for 7zip archives
Closes #15723.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-29 14:57:23 -05:00
Adam Vandenberg b40e5323ca Pathname: add exec and jar helpers
Closes #13318.
2012-10-27 19:28:42 -07:00
Jack Nagel 6ec361aa12 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 b95bcd65cd 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 f52ebe5fc7 brew ln --force is now brew ln --overwrite
* Renames --force to --overwrite, freeing up brew ln --force for #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 71ef411c22 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 #15240.
2012-10-15 09:46:29 -05:00
Misty De Meo f899878220 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 a32ecf4cb3 Don't use bottles for HEAD, devel or universal. 2012-09-30 22:26:33 +01:00
Max Howell c29311a23c Fix ENV.fortran info texts
They were being truncated.
2012-09-28 17:14:56 -04:00
Jack Nagel 71dbaaae1b 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 f94f56239a 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 #14710.
2012-09-27 09:52:06 -05:00
Misty De Meo 7d15eda4a4 stdenv: stop setting LD
superenv stopped setting LD in
8e4c0a1411, seems sensible to follow
suit in stdenv too.

See #14943.

Fixes #15090.
2012-09-26 13:22:30 -05:00
Max Howell 4a554dd5b2 ENV.fortran adds back superenv removed PATHs
Fixes #15103.
2012-09-25 12:04:42 -04:00
Max Howell 1fc68c62d8 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 e87e8a1d9a Fix building bottles from source. 2012-09-18 20:05:03 +01:00
Misty De Meo b29d1fdd5f 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 9783ce476c 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 93a4c48e36 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. #14474.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 22:39:38 -05:00
Jack Nagel fb93fb2b2e ENV: update comment
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 22:38:05 -05:00
Jack Nagel c985c6c057 Stop warning in ENV.x11
It has been long enough since `depends_on :x11` was introduced that we
can make it the caller's responsibility to ensure X11 is present before
invoking ENV.x11, so stop outputting a warning.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 21:04:49 -05:00
Max Howell 28d795032a Don't catch build errors 2012-08-29 22:25:29 -04:00
Max Howell 744031b4af Block form of chdir can only be used once
If you nest them, the library complains. So let's not do that.

/cc @jacknagel
2012-08-29 19:49:11 -04:00
Max Howell 6c21f8dc16 Use fortran from std-env in superenv
Fixes #14524.
2012-08-29 14:45:04 -04:00
Max Howell 1392cd40f8 Ensure mktemp cleans up after itself
Ignore interrupts.
2012-08-29 12:41:36 -04:00
Max Howell 59736fb537 superenv: build-environments that just work
1. A minimal build environment, we don't set CFLAGS, CPPFLAGS, LDFLAGS, etc. the rationale being, the less that is set, the less variables we are introducing that can break builds.
2. A set of scripts that replace cc, ld, etc. and inject the -I, -L, etc. flags we need into the args passed to the build-tools.

Because we now have complete control over compiler instantiations we do a variety of clean-up tasks, like removing bad flags, enforcing universal builds and ensuring makefiles don't try to change the order of library and include paths from ones that work to ones that don't.

The previous ENV-system is still available when --env=std is specified.

superenv applies to Xcode >= 4.3 only currently.
2012-08-29 12:41:34 -04:00
Max Howell 8c87b475a9 Record HEAD SHA and date of installs in receipt 2012-08-29 12:41:33 -04:00
Max Howell 0ed5daf86d Produce good error messages for bad tarballs 2012-08-29 12:41:33 -04:00
Mike McQuaid 18fb888ff3 Miscellaneous bottle code cleanup. 2012-08-25 13:08:46 -07:00
Mike McQuaid 0d1c1491c4 Fix ARGV and bottles circular dependency. 2012-08-25 11:52:37 -07:00
Mike McQuaid 1b7056346b Move used_options and unused_options to ARGV. 2012-08-25 11:52:37 -07:00
Mike McQuaid 7dc7c38324 Fix tests and NoMethodError with no X11 installed. 2012-08-25 10:21:48 -07:00
Jack Nagel 84a084a083 Compact whitespace when removing flags
This prevents multiple calls to flag-modifying ENV methods from
resulting in large amounts of consecutive spaces.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-23 22:29:56 -05:00
samueljohn 17469d7ad6 Xcode-only: Clean up compiler flags. Use CPATH.
- When using CPATH, we only need -isysroot and not the other -I spam.
- LDFLAGS use -isysroot instead of -L
  Turns out that the linker also understands the
  -isysroot flag which behaves more natural (in the
  sense: "like the internal defaults `/usr/lib` etc.)
  than adding `-L$(SDKROOT).
  Especially for duplicates, the linker first searches
  through all `-L` dirs and then looks at the sysroot
  or internal defaults. This is what we want.
- Pkg-config needs CC with CFLAGS passed to configure.

Closes #14351.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-23 16:26:28 -05:00
Max Howell d4f034d552 Support ENV[VERBOSE] 2012-08-21 12:09:07 -04:00
Jack Nagel ec5770b590 Add ARGV.ignore_deps?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 19:33:39 -05:00
Jack Nagel ce604c642d Deprecate MacOS.version? style methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 11:25:59 -05:00
Jack Nagel 4affbabfb7 Replace version strings with Version objects 2012-08-18 11:12:08 -05:00
Jack Nagel acd2866bbc Move version detection to Version class
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 11:12:07 -05:00
Max Howell e51c59144c Improve libiconv diagnostic and suggestion
This is coming up a lot at the moment, so here is an attempt to be more helpful.
2012-08-14 11:46:18 -04:00
Max Howell b96bd9ac3b Don't fail if ENOENT 2012-08-13 10:14:59 -04:00
Max Howell 8bccae69c2 Don't require the WHOLE of Homebrew from ARGV.rb
This was slowing down every instantiation of brew significantly.

Hopefully doesn't break anything that had become accustomed to not having to require 'formula' or 'keg'.

/cc @mikemcquaid
2012-08-12 11:40:55 -04:00
Brandon Black 8aa4f9dd3b Fix issues with writable? detection in brew doctor
Closes #13689.

Signed-off-by: Max Howell <mxcl@me.com>

There are subtle distinctions between writable? and writable_real? we don't
understand precisely why we need this, but it fixes the bugs :/
2012-08-06 22:02:38 -04:00
Jack Nagel 524e42a7e1 Adjust XQuartz/X11 module naming scheme
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-06 00:39:06 -05:00
Mike McQuaid 53d5bfb44e Use LC_CTYPE rather than LANG for most specific ML sed fix.
Fix #11728, fix #12890, fix #13653, fix #13734, fix #13787, fix #13818,
fix #13939.
2012-08-04 10:48:23 +01:00
Mike McQuaid 00ba4dfd1e Fix Mountain Lion sed by setting LANG.
It's also necessary to delete LC_ALL or it overrides the new LANG.
LC_COLLATE is the problem variable but is affected by LANG and LC_ALL
so just use them instead. Extends the fix made to geoip in dc955c.

Fix #11728, fix #12890, fix #13653, fix #13734, fix #13787, fix #13818.
2012-08-02 20:26:01 +01:00
Jack Nagel 68b5fe1ca5 Move X11 machinery into MacOS::XQuartz namespace
In order to better support Xcode-only systems, where X11 libs and
executables live under /usr/X11 but headers live in the SDK, move the
x11_* helper methods into a new module.

This allows us to keep some of the CLT/Xcode-only and Apple X11/XQuartz
logic hidden from outside code, like ENV.x11.

Since Apple's X11 is actually XQuartz, name the module "MacOS::XQuartz".
2012-08-01 00:31:38 -05:00
Misty De Meo c669c6b67d Provide missing .pc files for 10.8
10.8 no longer ships four .pc files which were included in previous
versions, though it does still include the libraries which they pointed
to. This commit provides copies of the .pc files for all of these, and
prepends Library/Homebrew/pkgconfig to PKG_CONFIG_PATH on 10.8.

The .pc files in question are: lib curl, lubexslt, libxml-2.0, libxslt

Fixes #13673.
Fixes #13627.
Fixes #13652.
Fixes #13482.
Closes #13572.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-29 10:28:41 -03:00
Misty De Meo 305495f70a Synchronize Keg#link and #unlink counts
Keg#link would sometimes count a linked file when doing mkpath, even if
the target directory already exists; #unlink would never count it. This
meant that "brew ln" and "brew unlink" counts for the same keg could be
out of sync with each other.
2012-07-29 10:28:41 -03:00
Jack Nagel 6a79970355 Use new Xcode module
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 12:04:41 -05:00