583 Commits

Author SHA1 Message Date
Misty De Meo
4743fc1662 Add Go language module, resources
This introduces a new GoResource category of resource. GoResources
have a specialized stage method which allows a resource to stage
itself into a gopath.

The new Go language module provides a one-liner to stage all
GoResources present in the formula.
2014-09-01 19:56:43 -07:00
Jack Nagel
d18c016a27 Use cp because install warns on empty arrays 2014-08-29 22:51:10 -05:00
Jack Nagel
1ec1d36301 Copy config.log even if the build succeeds 2014-08-29 22:35:41 -05:00
Jack Nagel
023f02b90a Make fails_with available in spec blocks
Closes Homebrew/homebrew#31706.
2014-08-19 17:14:02 -05:00
Jack Nagel
92eb96aca0 Use the build accessor rather than metaprogramming 2014-08-16 23:04:48 -05:00
Jack Nagel
281646b089 Define the test_defined? method dynamically 2014-08-16 17:44:22 -05:00
Jack Nagel
c0ef3d1541 Use the keg_only_reason instance method in keg_only? 2014-08-16 15:41:14 -05:00
Jack Nagel
95aef55110 Simplify cxxstdlib_check implementation
The cxxstdlib_check method currently only supports one value, so we can
just define the accompanying instance method when necessary. If we ever
add more options we can back it with a data structure.
2014-08-16 02:16:05 -05:00
Jack Nagel
e6498f4dfc Remove the universal accessor from BuildOptions
BuildOptions is now immutable (finally).
2014-08-16 01:39:33 -05:00
Jack Nagel
c7444d34f7 Use the as_flags method instead of map 2014-08-14 01:00:23 -05:00
Jack Nagel
0b468c528c Allow build to be set externally 2014-08-11 17:48:30 -05:00
Jack Nagel
045a02aa74 Use public api when adding legacy options 2014-08-10 23:17:53 -05:00
Jack Nagel
2f1d40a764 Disconnect defined options from the build object 2014-08-10 21:45:24 -05:00
Jack Nagel
8fc4bba03a Remove user-defined options method after evaluation
Now we can use the superclass options method for our own purposes.
2014-08-10 21:45:23 -05:00
Jack Nagel
d122ae8eea Handle legacy options in the method_added hook
We only need to process the legacy options at load time, not each time
the class is instantiated, and only when there is an options method
defined.
2014-08-10 21:45:23 -05:00
Jack Nagel
dfe1de7acd Delegate homepage to the class instead of storing it on the instance 2014-08-08 10:53:00 -05:00
Jack Nagel
392407c5f1 Default description to the empty string in top-level option DSL 2014-08-08 01:34:45 -05:00
Jack Nagel
af804f7475 Remove another unnecessary default argument 2014-08-08 01:34:45 -05:00
Jack Nagel
efd63447d8 Move management of options collection to the spec object 2014-08-07 10:45:32 -05:00
Jack Nagel
8e8b9acc01 Move compiler failure matching logic into failure object 2014-08-03 10:47:47 -05:00
Jack Nagel
e5d6247ae7 Rename compiler attribute to name 2014-08-03 10:47:47 -05:00
Jack Nagel
fded4d0385 Remove an is_a check 2014-08-03 10:47:47 -05:00
Jack Nagel
525e5f791f Remove knowledge of DSL implementation from initialize 2014-08-01 20:15:57 -05:00
Jack Nagel
f4ae1c9e1b Hide the options data structure better 2014-07-31 19:59:09 -05:00
Jack Nagel
5a94cfc4a3 Use a module since the @build ivar is going away soon 2014-07-30 22:24:24 -05:00
Jack Nagel
5ccce044ca Use the tab in place of build during tests 2014-07-30 21:04:17 -05:00
Jack Nagel
bc937f56e7 Rename resource? to resource_defined? 2014-07-30 18:56:37 -05:00
Jack Nagel
a55e196f5f Simplify internal representation of patches
- remove support for IO objects, since we no longer access ::DATA
   directly
 - since we don't need to support IO objects, use a separate class for
   string patches and stop wrapping strings in StringIO ojects
2014-07-29 16:22:06 -05:00
Jack Nagel
3f12ddbccd Decouple DATA patches from the executing script 2014-07-29 16:22:06 -05:00
Jack Nagel
9c5149b85a Stop exposing mirrors array 2014-07-23 13:09:28 -05:00
Jack Nagel
74ad97ce7f Remove intermediate method 2014-07-19 22:55:49 -05:00
Jack Nagel
dff74d9c67 Don't set @env on instances 2014-07-07 21:32:35 -05:00
Jack Nagel
a5a2141a15 Hide the cxxstdlib data structure better 2014-07-06 15:51:43 -05:00
Jack Nagel
b78308d2d5 Fix Formula#<=> on trunk Ruby
Arguably this method shouldn't exist and sort_by(&:name) used instead.
2014-07-03 15:00:41 -05:00
Jack Nagel
5375f2397e Better Formula#inspect string 2014-07-01 18:39:15 -05:00
Jack Nagel
4d9d01893e Move deprecated Formula class methods to compat
These have all been moved to Formulary.
2014-06-22 15:03:17 -05:00
Jack Nagel
90183877ff Simplify extending Formula with Enumerable 2014-06-22 15:03:17 -05:00
Jack Nagel
4b0255f7aa Keep DSL related code in one place 2014-06-22 15:03:17 -05:00
Jack Nagel
10fda9e9b9 Decouple spec selection from ARGV 2014-06-20 21:32:36 -05:00
Jack Nagel
5beaa512e6 Pass the requested spec into the formula instance 2014-06-20 21:32:36 -05:00
Jack Nagel
db9f16e2cd Formula equality reflects the active spec 2014-06-20 21:32:36 -05:00
Jack Nagel
2122620d71 Fix brew test when conflicting minitest gems are installed 2014-06-18 23:20:56 -05:00
Jack Nagel
801cdd9045 Remove default values from formula constructor parameters
Closes Homebrew/homebrew#30017.
2014-06-10 15:41:45 -05:00
Jack Nagel
375c073cec Remove unused attribute 2014-05-28 19:02:30 -05:00
Jack Nagel
28fa5b0261 Remove some evals from formula DSL
The default arguments were removed from these methods long ago, so
nothing is standing in the way of using define_method here.
2014-05-27 21:03:47 -05:00
Adam Vandenberg
d9ed121c46 add --installed to json info
Closes Homebrew/homebrew#29315.
2014-05-16 09:03:12 -07:00
Adam Vandenberg
d4b0599a86 --config -> config 2014-04-30 19:09:29 -07:00
Mike McQuaid
249aae177f formula: move cxxstdlib methods to the class.
This allows disabling this checks when e.g. pouring bottles.
2014-04-23 08:10:48 +01:00
Finn Smith
eed3368039 Fix keg version in Formula#to_hash
Closes Homebrew/homebrew#28550.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-04-21 09:29:53 -05:00
Misty De Meo
9af3917ebf Formula: provide compiler failure collections
`needs` allows formulae to specify dependencies on cross-compiler
dependencies, allowing multiple failures to be specified in a single
statement. For instance, `needs :cxx11` adds seven compiler failures.

Closes Homebrew/homebrew#22912.
2014-04-12 10:36:00 -07:00