14765 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
4bf72a3e62 Puts build-tool args first
build-tool provided args must be considered first by cc, etc. Generally this already occurred for -I flags, because most of our -I flags were -isystem. However it didn't occur for keg-only flags and -L paths.

This was an error.

I amended the refurbishment code to ensure any paths we want to control the order of are thoroughly scrubbed out of the build-tool provided args. This ensures reliability for our builds.

However this path-scrubbing should always occur, even during configure (I am fairly sure of this). So more work is required.

Fixes Homebrew/homebrew#14781.
2012-09-14 11:55:59 -04:00
Max Howell
da1905f216 Make xcrun wrapper search /usr/bin too
The usual xcrun would, and this wrapper exists to also work around broken xcode-select paths.
2012-09-13 17:00:02 -04: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
Max Howell
514b1b54cd Support c99/c89 compiles properly
We can't really execute c89/99 explicitly as these POSIX compliant tools support very few args. Best to execute clang or gcc with the --std=cx9 argument appended.

Fixes Homebrew/homebrew#14724.
2012-09-13 11:30:11 -04:00
Max Howell
ffc6423d73 Look harder for bsdmake
bsdmake used to be keg-only, so some users still have it unlinked (presumably they never run brew-doctor). Even though there is code to abort if dependencies are unlinked, it appears broken for this case. So let's just be thorough anyway.

Closes Homebrew/homebrew#14751.
2012-09-13 11:28:31 -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
ef8a720caa Fixes universal builds; Fixes Homebrew/homebrew#14845 2012-09-13 08:53:35 -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
Ori Peleg
fae4cbd9e8 linkapp: create Finder aliases
Symlinks to apps don't play well with Spotlight, but Finder alises do,
so let's create them instead.

Closes Homebrew/homebrew#14821.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-09-09 13:00:21 -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
c60a9ef314 brew-aspell-dictionaries: handle mirrors
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 23:13:43 -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
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
Alexis Hildebrandt
1deb3c0214 brew-aspell-dictionaries - generate aspell formulae
This script fetches the current list of aspell dictionaries from
the gnu server and generates formulae that can then be
included into the aspell formula.
This makes updating current dictionaries and adding new ones easier.

Tweaked by Mike to generate SHA1s instead of MD5s.

Closes Homebrew/homebrew#12180.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-09-03 19:02:30 -07: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