119 Commits

Author SHA1 Message Date
Jack Nagel
894a6c9776 TypeError is appropriate here 2013-05-06 16:08:49 -05:00
Jack Nagel
666b48e391 Check Requirement before Dependency
It's much more likely that an instance of Requirement is passed.
2013-05-06 16:08:49 -05:00
Jack Nagel
f47e43aa2b Extract string and class logic from parse_spec 2013-05-06 16:08:49 -05:00
Jack Nagel
368ba306d7 Don't accept Formula objects as dep specs
It was pointed out that this isn't used at all.
2013-04-18 01:17:15 -05:00
Jack Nagel
7ea15918bb Reorder dep spec types by frequency 2013-04-17 14:12:41 -05:00
Adam Vandenberg
a7714a804b Add :hg build requirement.
Closes Homebrew/homebrew#19074.
2013-04-17 10:01:38 -07:00
Jack Nagel
0fb4f9c426 Reduce repeated array inclusion check
Currently we check if "tag" is present in LANGUAGE_MODULES for every
String dep, even if tag is nil. Stop doing this, and make the
LANGUAGE_MODULES array into a Set instead to improve lookup performance.
2013-04-16 09:53:02 -05:00
Jack Nagel
9db0e68eb6 Unify indentation of access modifiers
These are class method calls, not some special keyword, and should be
indented as such (also all standard Ruby indenters do this).
2013-04-07 20:59:49 -05:00
Jack Nagel
ee7178562f Move x86_64 Requirement into core
Closes Homebrew/homebrew#18886.
2013-04-02 13:17:24 -05:00
Jack Nagel
71f85300b4 Establish a convention for Requirement names
The name attribute of requirements is used when generating options for
the :optional and :recommended dependency tags.

Unless otherwise specified, the name attribute of a Requirement will be
populated by stripping any module prefixes from the beginning and
"Dependency" or "Requirement" from end of the class name and downcasing
the result.

Closes Homebrew/homebrew#17759.
2013-02-12 16:26:10 -06:00
Jack Nagel
3e9241312d Add :libltdl dep for libtool's libltdl
The :libtool dep is implicitly a build-time dep; :libltdl can be used
for software that uses the ltdl library at runtime.
2013-02-10 19:28:14 -06:00
Jack Nagel
803649bf04 Shrink DependencyCollector#parse_symbol_spec and add tests 2013-02-10 19:27:33 -06:00
Jack Nagel
2fed17f4d1 Ensure :cairo and :pixman resolve to standard formula deps
We do not use X11 to satisfy these deps for consistency reasons,
but we should continue to support the symbols for compatibility.
2013-02-02 00:09:28 -06:00
Jack Nagel
ade998696d Mark symbol-style autotools deps as build deps by default 2013-02-01 23:49:52 -06:00
Jack Nagel
f4b126cc14 Create proxy classes for "partial" X11 dependencies
When a formula's dependency tree contains more than one X11 dependency,
they are de-duplicated by comparing the min_version attribute. However,
this can result in broken dependency trees if one of the X11Dependency
objects was actually specified as e.g. `:libpng`.

In practice, this only matters when one or more of the dependencies has
additional metadata that makes it distinct from the rest, i.e. an
:optional or :recommended tag.

To combat this, make these special, "partial" X11 dependencies instances
of different classes so that they are not de-duped.

It will still be necessary, at the time when requirements are expanded
by the installer, to de-duplicate any remaining X11 dependencies after
applying the optional/recommended filters in order to avoid duplicated
modifications to the environment (as ENV.x11 is not idempotent).

c.f. Homebrew/homebrew#17369.
2013-01-31 15:39:26 -06:00
Jack Nagel
351cd89a71 Pass tag to class name style requirement declarations 2013-01-30 14:18:34 -06:00
Jack Nagel
26c0524f1a DependencyCollector: return created dep from #add 2013-01-28 10:35:14 -06:00
Jack Nagel
210401654b Allow specifying a name attribute for X11Dependency 2013-01-28 10:35:14 -06:00
Jack Nagel
adf90691f1 Split dependency classes into separate files 2013-01-26 20:30:05 -06:00