16336 Commits

Author SHA1 Message Date
Adam Vandenberg
88ad4c061d Support env :std, :userpaths
Closes Homebrew/homebrew#14654.
2012-09-14 09:14:48 -07:00
Max Howell
523f50862b Install plists in FormulaInstaller, not build.rb
Build rb should only build!
2012-09-13 17:00:02 -04:00
Max Howell
fe295faffe ghc requires std-env
Because it builds a tool (cabal) that uses the same env that built it to build stuff.
2012-09-13 16:49:53 -04:00
Max Howell
d1f1d736e8 Don't add GL paths to superenv if depends_on X
Fixes Homebrew/homebrew#14780.
2012-09-13 12:13:36 -04:00
Misty De Meo
93502785c4 --prefix: don't use opt prefix if it doesn't exist 2012-09-13 10:19:11 -05:00
Misty De Meo
0329307770 doctor: Add check for stray pre-4.3 Xcode files
/Developer/Library shouldn't exist if all the remnants of old
Xcode versions have been uninstalled, and tends to cause problems if
it's kept alongside modern Xcode.

"uninstall-developer-folder" should only remove /Developer/Library.
2012-09-13 10:18:21 -05:00
Misty De Meo
5ce864176a edit: create project view with subl, too
Sublime Text's subl tool supports lovely project views just the same
as TextMate. Since I use Sublime, I want good support from `brew
edit` too. :P
2012-09-13 09:39:33 -05:00
Adam Vandenberg
e4d6de0abc Add skip_clean :all to audit 2012-09-13 07:14:45 -07:00
Max Howell
daf8caccd4 Auctex needs user path; Fixes Homebrew/homebrew#14699 2012-09-13 09:15:24 -04:00
Max Howell
d40bbe5af4 Apply userpaths after superenv-setup
Fixes Homebrew/homebrew#14701. Stupid mistake.
2012-09-13 09:06:37 -04:00
Max Howell
dd917bc105 Use opt prefix for --prefix
Rationale: everyone thinks it points to the currently installed prefix, not the prefix of the formula that is newest and maybe not installed.

The previous behavior was unintentional and evidence proves it is not intuitive either.

I anticipate no regressions. And hope I am right!
2012-09-12 22:09:46 -04:00
Charlie Sharpsteen
ea593cf61c patches.rb: Generalize File recognition
Extend patch case statements for files to objects inheriting from `IO`, which
includes `File`, or `StringIO` which is used by the external command
`brew-unpack` to store `DATA` sections loaded from Formula files.
2012-09-11 22:37:07 -07:00
Jack Nagel
3d6552f8e3 Remove dead code
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 14:56:25 -05:00
Jack Nagel
86b2307791 test: be less eager to set up the build environment
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 14:47:06 -05:00
Jack Nagel
1c22f03850 cleanup: skip rm_DS_Store during a dry run
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 14:41:01 -05:00
Jack Nagel
d5299f4946 cleanup: allow --force to remove keg-only brews again
Fixes Homebrew/homebrew#14840.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 14:29:33 -05:00
Jack Nagel
e909b54c96 Tighten post-install checks
- Avoid ENOTDIR by ensuring that the directories we are checking are
   actually directories.
 - DRY up the check_PATH method; paths are already available via the
   global ORIGINAL_PATHS.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 00:45:45 -05:00
Charlie Sharpsteen
5229bbf304 Clarify that brew does not provide XQuartz
Reword the `X11Dependency` error message so that it is clear that an installer
must be downloaded.

Ref Homebrew/homebrew#14851.
2012-09-10 21:49:08 -07:00
Jack Nagel
95acaeb98f Audit check for old MacOS version methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-10 16:40:13 -05:00
Jack Nagel
d4cfa1c0c5 Add deprecation warning to non-DSL fails_with_llvm
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-10 16:16:58 -05:00
Jack Nagel
59d5a246e7 Clean up MacOS version method usage
The MacOS.version? family of methods (other than "leopard?") are poorly
defined and lead to confusing code. Replace them in formulae with more
explicit comparisons.

"MacOS.version" is a special version object that can be compared to
numerics, symbols, and strings using the standard Ruby comparison
methods.

The old methods were moved to compat when the version comparison code
was merged, and they must remain there "forever", but they should not be
used in new code.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-10 16:16:54 -05:00
Adam Vandenberg
95b9083744 Fix code that chmods metafiles 2012-09-09 13:23:03 -07:00
Adam Vandenberg
22685cb89d Install plists by default 2012-09-09 13:02:48 -07:00
Adam Vandenberg
f4d967e96e allow skip_clean :la 2012-09-09 13:01:56 -07:00
Jack Nagel
192e6e052c audit: allow some forms of gist patches
The problem is not the raw URLs, but URLs that do not contain the commit
hash corresponding to a particular version of the gist.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-06 20:47:05 -05:00
Jack Nagel
f5d0fbcce6 Remove dead code
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-06 17:34:11 -05:00
Jack Nagel
c227792bc1 Don't raise when expanding ORIGINAL_PATHS
File.expand_path raises ArgumentError when it is passed a path with a
nonexistent username, e.g.:

  $ PATH=~foo/bin:$PATH brew
  /usr/local/Library/Homebrew/global.rb:97:in `expand_path': user foo
  doesn't exist (ArgumentError)

However, `brew doctor` does its own expansion of PATH entries and
outputs warnings if this happens, so let's just ignore it here and
continue on our way.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-06 10:40:55 -05:00
Jack Nagel
b20c35cf0e doctor: ignore case when checking PATH for config scripts
Fixes Homebrew/homebrew#14752.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-06 10:05:49 -05:00
Adam Vandenberg
6a131ced3f Remove fink/macports from verbose --config if they are not present. 2012-09-05 22:07:35 -07:00
Adam Vandenberg
fabc7eb992 audit: swig is a build time dep 2012-09-05 21:12:08 -07: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
aeab8e8d19 Improve brew --config responsiveness
Rather than build the whole output in a string, print each item as we
go. This gives the illusion of improved responsiveness by delaying the
expensive method calls until after the faster output.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-05 16:41:35 -05:00
Jack Nagel
35a99c240a Audit check for MACOS_VERSION
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-04 18:18:14 -05:00
Jack Nagel
186a76c741 Fix bad install names in executables
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-04 13:02:43 -05:00
Adam Vandenberg
f589644aa4 Exempt automake from some audits 2012-09-04 10:43:48 -07: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
Jack Nagel
8094b00b55 ENV: update comment
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 22:38:05 -05:00
Adam Vandenberg
26f887d4ab add audit for ENV.x11 2012-09-03 19:49:33 -07:00
Jack Nagel
33233f5039 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
Jack Nagel
ffd6e7f340 Fix typo in MacOS.sdk_path
/cc @adamv

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 18:14:30 -05:00
Max Howell
896ccc45f4 Actually cache Xcode.version if nil 2012-09-03 16:35:16 -04:00
Jack Nagel
eb3c0cd273 Don't error out with Xcode 4.5
c.f. Homebrew/homebrew#14603.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 15:15:39 -05:00
Max Howell
4febf938ae Put X11 last in the libpath and cpath
It was after HOMEBREW_PREFIX but not after everything else too.
2012-09-03 15:12:31 -04:00
Max Howell
c35f6cb9d5 Set CC and CXX with superenv (again)
It was dumb to have make call different compilers to configure depending on the `servile?` flag. This is not a route to reliability.

Instead now we set CC (formula that break if CC is set like Jack be damned, their build-systems are just plain broken and should not be supported). When cc is called we examine HOMEBREW_CC, otherwise we instantiate the tool that was called, just like the formula's build-system will expect.

Fixes Homebrew/homebrew#14659 (though the build fails later for me, with the same error for stdenv and superenv).
2012-09-03 15:12:31 -04:00
Max Howell
af06c75d72 Add NCLT SDK apache include directory to superenv
Fixes subversion compile issues for NCLT configurations with superenv, stdenv still broken (tough).
2012-09-03 15:12:30 -04:00
Max Howell
adc158412c Undent doesn't like paragraphing 2012-09-03 15:12:30 -04:00
Max Howell
feb77b2085 Prevent possible bug in build's optlink 2012-09-03 15:12:29 -04:00
Mike McQuaid
0b3327b862 brew-audit: recommend SHA1 over MD5. 2012-09-03 11:20:07 -07:00
Mike McQuaid
a22e60ee8c brew-fetch: Return error code on unmatched hash. 2012-09-03 11:20:07 -07:00
Jack Nagel
b97c0919f8 Process requirements before keg-only deps under stdenv
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-02 14:41:19 -05:00