325 Commits

Author SHA1 Message Date
Jack Nagel
f5eaef0aee Deprecate ancient formula syntax
Closes Homebrew/homebrew#13444.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-09 23:56:54 -05:00
Adam Vandenberg
d1d52b3467 Add option to the DSL
Closes Homebrew/homebrew#9982
2012-08-08 22:01:27 -07:00
Jack Nagel
4f809d0311 Simplify printing conflicts in brew info
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-07 14:24:54 -05:00
Jack Nagel
82d3890495 Fix typo in conflicts_with DSL method
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-07 14:24:34 -05:00
Adam Vandenberg
8c8701f268 Allow multiple unsatisfied fatal requirements
Closes Homebrew/homebrew#13335.
2012-08-07 10:49:45 -07:00
Misty De Meo
0c237a8679 Add conflicts_with DSL method
conflicts_with is a thin wrapper around Requirement which simplifies
marking conflicts between formulae.

Closes Homebrew/homebrew#13687.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-30 13:47:12 -03:00
Jack Nagel
c71002a4a3 Formula: mirrors are always non-nil
Since 3ee9b7bd88a2d9017cdf005b10567a1d6d8ec211 ("SoftwareSpec:
initialize @mirrors"), @active_spec.mirrors will always be non-nil.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-17 03:23:59 -05:00
Jack Nagel
56fe164e95 Teach download strategies to take a SoftwareSpec
Now that a URL, version, and the (for lack of a better term) "specs"
associated with said URL (e.g. the VCS revision, or a download strategy
hint) are neatly bundled up in a SoftwareSpec object, it doesn't make
sense to pass them individually to download strategy constructors. These
constructors now take only the formula name and a SoftwareSpec as
parameters.

This allows us to move mirror handling out out of Formula#fetch and into
the download strategies themselves. While doing so, we adjust the mirror
implementation a bit; mirrors now assume the same "specs" as their
owner's URL. They are still only useable by the CurlDownloadStrategy,
but this provides a basis for extending mirror support to other
strategies.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:35 -05:00
Jack Nagel
76b2eee777 Refactor checksumming
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:33 -05:00
Jack Nagel
98a11b8e57 Introduce new formula specs 2012-07-04 22:47:32 -05:00
Charlie Sharpsteen
d1a4806390 std_cmake_args: Search for Frameworks last
Most Homebrew builds produce libraries, so CMake should give priority to
libraries when resolving dependencies.

Closes Homebrew/homebrew#12497.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-06-03 10:03:56 -07:00
Jack Nagel
a13857b150 Introduce std_cmake_args method
This differs from the current std_cmake_parameters in that it returns an
array instead of a string. Doing so makes dealing with it in formulae
much more pleasant, and for new formula hackers, less surprising.

std_cmake_parameters is retained in compat to maintain compatibility
with external formulae.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-22 16:32:12 -05:00
Max Howell
4a48a5f7a3 Don't fall into the no-extension OK trap
`require` is OK without an .rb extension, but the rest of our code will be confused and generate weird errors.

Fixes Homebrew/homebrew#11558.
2012-05-15 02:27:11 -04:00
Adam Vandenberg
e8c0b01f24 patches - support detection of compression types 2012-05-02 19:57:33 -07:00
Mike McQuaid
995186a72c Fix Ruby warnings.
Fixes Homebrew/homebrew#11966.
2012-05-01 20:45:17 +08:00
Mike McQuaid
0eb97d5c32 Generate the bottle download URL correctly.
Fixes Homebrew/homebrew#11561.
Fixes Homebrew/homebrew#11614.
2012-04-24 18:53:45 +10:00
Mike McQuaid
47b2eedddc Revert "Generate the bottle download URL correctly."
This reverts commit 092004e7820791030f568af0e3b03389ea4f7ee3.
2012-04-24 18:10:06 +10:00
Mike McQuaid
2c46c4e0c2 Generate the bottle download URL correctly.
Fixes Homebrew/homebrew#11561.
Fixes Homebrew/homebrew#11614.
2012-04-24 18:08:14 +10:00
Jack Nagel
9614301be4 Fix protection against overriding Formula#brew
The test for this previously passed, but only because the constructor
for SoftwareSpecification was raising an exception. method_added needs
to be a class method because methods are being defined on the class, not
the object, and to test it properly we have to eval the class in the
test itself.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06 17:32:43 -05:00
Mike McQuaid
62a98753ec Populate empty mirror_list for bottles.
Fixes Homebrew/homebrew#11434.
2012-04-04 20:50:22 +10:00
Mike McQuaid
a947064994 Version bottles. 2012-04-03 11:43:41 +10:00
Jack Nagel
de444ead0b New fails_with infrastructure
- Formulae can now declare failures on any compiler.
 - FailsWithLLVM and associated formula elements have been moved to
   compat.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-01 12:39:59 -05:00
Mike McQuaid
49b16f3462 Fix broken default bottle URL. 2012-03-23 05:58:14 +13:00
Adam Vandenberg
7c50020822 Use Patches 2012-03-19 18:50:17 -07:00
Mike McQuaid
85452c5e91 Fix bottles on non-Lion. 2012-03-18 20:48:11 +13:00
Mike McQuaid
64457b2315 Remove reliance of bottle DSL on EOCLASS. 2012-03-18 20:38:18 +13:00
Misty De Meo
aa91bd27d2 Implement new bottle syntax in formula.rb
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-03-18 20:38:18 +13:00
Mike McQuaid
d47cf55f68 Use fetch for downloading bottles.
Fixes Homebrew/homebrew#10958.
2012-03-18 15:16:57 +13:00
Max Howell
3bfea440cb Downcase tap parameters in Formula.canonical_name
See previous commit's explanation.
2012-03-18 01:51:10 +00:00
Max Howell
598f7b69d9 Record tap-origin in the install-receipt 2012-03-16 21:06:17 +00:00
Max Howell
3f25dd60fa canonical_name can resolve taps 2012-03-16 21:06:15 +00:00
Max Howell
544b3c38c8 ohai'ing this is ugly IMO
I wanted to make it possible to not do the additional newline (in brew) if this code path is hit. But I didn't see a way to do it without overriding the Interrupt exception and throwing a new one.

“Never add more code than necessary for aesthetics in error handling.” — mxcl
2012-03-15 13:04:17 +00:00
Adam Vandenberg
715f808421 roll back stricter version check 2012-03-10 10:02:05 -08:00
Adam Vandenberg
cef5429f93 Use new Requirements code in Homebrew 2012-03-10 09:24:10 -08:00
Mike McQuaid
552dcdc703 Move most bottle stuff to a bottles.rb file. 2012-03-10 18:10:40 +13:00
Mike McQuaid
4a306f32f4 Support bottles for non-Lion OSX versions. 2012-03-10 18:09:35 +13:00
Adam Vandenberg
aef580261b Tell the user when build logs are copied 2012-03-09 18:48:23 -08:00
Adam Vandenberg
04088ba96d Do a stricter version check
A version should always be set when going through the constructor
so tighten this check. Also do some style clean ups here.
2012-03-09 18:44:48 -08:00
Adam Vandenberg
c7ec737f86 Remove silly path method 2012-03-07 06:57:23 -08:00
Jack Nagel
67c3f1b2b4 Extend FileUtils rather than include it
Fixes Homebrew/homebrew#10729.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-06 19:23:51 -06:00
Jack Nagel
ed5f7dfbaa Require specialties at the end of formula.rb
classes in formula_specialties.rb need Formula, so it has to be last.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-06 00:28:50 -06:00
Adam Vandenberg
962f4fa9ef Move llvm method to FailsWithLLVM 2012-03-05 21:14:48 -08:00
Adam Vandenberg
fca0a66649 shrink 2012-03-05 21:14:39 -08:00
Adam Vandenberg
ee5193e3e8 invert condition 2012-03-05 21:14:39 -08:00
Adam Vandenberg
6af1aae50b Move specialized formulae base classes into a new file 2012-03-05 21:14:39 -08:00
Adam Vandenberg
1b372d7840 Move path utils out of formula.rb
Make a new module for our FileUtils extensions and use that instead.
2012-03-05 21:14:39 -08:00
Adam Vandenberg
e6f8f16183 Formula.rb: update a comment 2012-02-29 21:45:47 -08:00
Adam Vandenberg
d22eed3f16 Add support for Luarocks dependencies. 2012-02-29 20:52:20 -08:00
Adam Vandenberg
93b4a131d0 Only call patches once 2012-02-25 17:24:45 -08:00
Adam Vandenberg
ed57279256 Add "require hardware" to formula.rb
Now individual formulae don't need to require this if they want to use
Hardware methods outside of `def install`.
2012-02-25 15:22:32 -08:00