Commit Graph
2937 Commits
Author SHA1 Message Date
Samuel John be34141f16 Linking Frameworks correctly if multiple.
For example python and python3 both provide a
`Python.framework` and OS X Frameworks are made to
deal with this by putting them into `Versions` and
linking the default one as `Current`. However, brew
did not respect this and cleaned out stuff making
neither of the two versions work because `Current`
is replaced by an empty directory.

This commit fixes that. However, still one of the
two `Python.frameworks` has to remove it's
`Current` and `Headers` links, because brew cannot
decide alone which one is the "default" and allowed
to set the `Current` link.

A similar situation might apply to Qt 4 vs. 5..
2013-06-18 20:49:13 +02:00
Samuel John 2c8c8d07f6 Python module deps, ext. python fix and 10.6 fix
* Fixes #20572 by tweaking the logic that decides
  which python is used by the `python` object
  inside a formula. There was a bug when on 10.6
  there is no Python 2.7 but a :recommended
  Python was still treated as being available.

* Use the user's PATH when looking for an external
  Python. Until now only brewed or OS X system's
  python have been found by `depends_on :python`.

  But now we support any Python in PATH (e.g.
  pyenv's python).

* Further, instead of handling python modules
  and import tests in LanguageModuleDependency,
  these are now handled by:

        depends_on :python => 'numpy'  # for example

  The old style

        depends_on 'numpy' => :python

  is still supported and is only an alias
  for the newer style (only for :python, the
  other languages are not altered by this commit).

  The reasoning is that if a formula requires
  a python module, it basically also needs
  python itself - and further that specific
  version of python has to provide the module.
  So the `PythonInstalled` is the natural place
  to check for the availability of a python
  module.

  Using a python module and other tags like
  :optional or :recommended is done like so:

        depends_on :python => [:optional, 'numpy']

  Specifying another PyPi (Python Package index)
  name than the module import name is seldom used
  but supported, too:

         depends_on :python => ['enchant'=>'pyenchant']

  A last note: For clarity, you can define
  multiple depends_on statements with different
  modules to be importable.`
2013-06-18 10:30:17 +02:00
Clemens Gruber 07b7810a04 Fix Xcode builds on 10.9.
CLT-only builds are still broken and need to be fixed at some point.

Closes #20524.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-06-17 09:14:17 +01:00
Adam Vandenberg 9a813c2b38 Add minimum OS X version requirement
Closes #19998.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-06-16 20:36:50 -07:00
Jack Nagel d9247b373e Simplify regexp match 2013-06-15 19:51:49 -05:00
Jack Nagel aa64a3aae5 These also get coerced to strings 2013-06-15 19:51:35 -05:00
Jack Nagel cc111906cc Push MacOS.cat logic down into MacOS::Version 2013-06-15 19:40:42 -05:00
Jack Nagel 1d29326558 Add MacOS::Version.from_symbol 2013-06-15 19:39:27 -05:00
Jack Nagel faa35b4fcd Avoid unnecessary float to string conversion 2013-06-15 10:13:20 -05:00
Jack Nagel 55a122ea0c Run tests under actual OS version 2013-06-14 19:19:26 -05:00
Jack Nagel 73ad554060 Simplify setting MACOS_VERSION 2013-06-14 19:19:25 -05:00
Jack Nagel 2b61e51dd8 Pass these as strings, they get converted anyway 2013-06-14 19:10:14 -05:00
Jack Nagel c947c674ab Remove Version#to_a alias
Exposing this as "to_a" was a mistake, versions are not arrays and it
causes incorrect behavior when splatted or using Kernel#Array(). Use the
more correct name "tokens" instead.
2013-06-14 18:37:27 -05:00
Adam Vandenberg cadbcf33e3 Fix pretty names 2013-06-14 14:47:16 -07:00
Adam Vandenberg fd3c09705b Move pretty_name into MacOS::Version
Closes #20507.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-06-14 13:36:20 -07:00
Jack Nagel 73a949b769 Fix another constant reference 2013-06-14 11:49:00 -05:00
Jack Nagel 0cc9b4d416 Fix constant reference 2013-06-14 11:09:53 -05:00
Jack Nagel 53fbb54af7 Favor compound if over compound unless 2013-06-14 10:34:20 -05:00
Jack Nagel e955cf55ca Use ||= instead of unless 2013-06-14 10:34:20 -05:00
Jack Nagel 47d07b24b0 Remove outdated comment 2013-06-14 10:34:20 -05:00
Jack Nagel c3b163fab8 Assign this inline 2013-06-14 10:34:19 -05:00
Jack Nagel e539faabff Delete rather than assign nil 2013-06-14 10:34:19 -05:00
Jack Nagel f9d73212ac Simplify nested conditional 2013-06-14 10:34:19 -05:00
Jack Nagel 343ad0cbb3 Use has_key? rather than accessing the value 2013-06-14 10:34:18 -05:00
Jack Nagel aaec242d11 Rename single-letter variable 2013-06-14 10:34:18 -05:00
Jack Nagel f9c0275797 Make flag lists into constants 2013-06-14 10:34:18 -05:00
Jack Nagel b5105dc693 ENV: clean up set_cpu_flags and set_cpu_cflags usage 2013-06-14 10:34:18 -05:00
Jack Nagel e17d2a24fc Use Hardware::CPU module 2013-06-14 10:34:17 -05:00
Jack Nagel dd774b604f Freeze optimization flags hash rather than duping it 2013-06-14 10:34:17 -05:00
Jack Nagel bab2ac4d10 Xcode 4.6.3 2013-06-13 18:22:28 -05:00
Adam Vandenberg d5ce864d9a ScriptFileFormula: remove override warning
Closes #20445.
2013-06-13 09:34:43 -07:00
Clemens Gruber 3baaa6b5c8 superenv: apply apr-1-config fix to 10.8+
Fixes #20417.
Closes #20474.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-06-13 11:33:16 -05:00
Simon Sigurdhsson ccbbed2ca8 Fix bug in brew list --pinned
Pinned formulae which were pinned at a previous version but then upgraded
would not be listed by `brew list --pinned`. This is due to the good old
"File.exist? thinks broken symlinks don't exist" gotcha, so the test in
the select block in list_pinned has been changed to check if the pin file
exists _or_ is a symlink.

Closes #20423.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-06-13 10:22:03 -05:00
Jack Nagel 5f032942ed Remove unused variable 2013-06-12 17:25:29 -05:00
Jack Nagel 387a7002ed Rename variables for clarity 2013-06-12 14:48:17 -05:00
Jack Nagel a2971aeb70 Extract search_taps method 2013-06-12 14:48:17 -05:00
Jack Nagel e3f12e1219 Pull tap list into a constant 2013-06-12 14:48:17 -05:00
Jack Nagel d6d112f227 Remove use of global variable 2013-06-12 14:48:17 -05:00
Jack Nagel cf37904f84 Rename method 2013-06-12 14:48:16 -05:00
Jack Nagel bceae883c7 Extract query construction 2013-06-12 14:48:16 -05:00
Jack Nagel c77e9d5cdf Use inspect instead of escaping quotes 2013-06-12 14:48:16 -05:00
Jack Nagel eb287869ef Move require out of method 2013-06-12 12:23:45 -05:00
Jack Nagel 453a581150 install: remove overcautious array manipulation 2013-06-12 09:02:20 -05:00
Jack Nagel d5fc6f1459 Fix version misdetection from fa582cb9ac 2013-06-11 17:34:21 -05:00
Jack Nagel 2bba5c3f07 Check method existence rather than Ruby version 2013-06-11 17:05:44 -05:00
Jack Nagel ef862627cf FormulaInstaller: ensure locks are always released 2013-06-11 15:35:30 -05:00
Clemens Gruber d5ca203097 Recognize OS X 10.9 and Xcode 5.0
Closes #20410.
Closes #20401.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-06-11 10:20:23 -05:00
Jack Nagel 94736a8b1d Add doctor check for OS X > 10.8 2013-06-11 10:18:24 -05:00
Misty De Meo 691fcf0377 doctor: add check for osx-gcc-installer
This might not detect all cases, but should detect the two most
common ones.
2013-06-11 08:13:24 -05:00
Jack Nagel d6ff5fb1bf Cast deps to formula before passing them to superenv
Dependency names retain the "tap prefix", e.g. the "homebrew/dupes"
part of "homebrew/dupes/zlib". However formula objects do not, and this
is desired because we do not record the tap name as part of the
installation prefix.

So we need to ensure the correct dep names are passed to superenv,
otherwise it will not add the correct directories to various environment
variables.
2013-06-10 17:38:52 -05:00