aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_support.rb
AgeCommit message (Collapse)Author
2012-08-23Fix keg-only on pre-Mountain Lion formulae.Mike McQuaid
2012-08-20Simplify build options APIJack Nagel
Simplify access to the different forms of a formula's build options by making options into real objects rather than strings, and expose both the 'name' and 'flag' form.
2012-08-18Add support for custom version schemesJack Nagel
A version scheme is a class that inherits from Version and reimplements Version#<=>. This will allow formulae to specify a custom comparison method that will be used instead of the default, for cases where the default is insufficient.
2012-08-18SoftwareSpec: simplify conditionalJack Nagel
2012-08-18Add Version#detected_from_url?Jack Nagel
2012-08-18Replace version strings with Version objectsJack Nagel
2012-08-12Add :when_xquartz_installed as a keg-only reasonJack Nagel
Using :when_xquartz_installed will tell the keg-only machinery to activate if XQuartz is installed. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-12Fix writing build options to install receiptJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-12BuildOptions: store option tuples in a SetJack Nagel
As options are stored in an object owned by the eigenclass of a formula, options defined in the Formula#options method can be added multiple times if the formula is instantiated multiple times. Store them in a set to prevent duplicates. Fixes Homebrew/homebrew#14133. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-09New style is for option descriptions to not end with periodsAdam Vandenberg
2012-08-09options: remove duplicate functionAdam Vandenberg
2012-08-08Add `option` to the DSLAdam Vandenberg
Closes Homebrew/homebrew#9982
2012-07-05SoftwareSpec: initialize @mirrorsMisty De Meo
Since methods were being called on it without verifying its type.
2012-07-04Give SoftwareSpec an initializerJack Nagel
Tools like `brew create` need to create and manipulate SoftwareSpec objects. It is useful to be able to do this directly, rather than by proxy through the special methods that serve the main formula DSL. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Teach download strategies to take a SoftwareSpecJack Nagel
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-04Refactor download strategy detectionJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Refactor checksummingJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Introduce new formula specsJack Nagel
2012-05-01Fix Ruby warnings.Mike McQuaid
Fixes Homebrew/homebrew#11966.
2012-04-01New fails_with infrastructureJack Nagel
- 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-03-05Move llvm method to FailsWithLLVMAdam Vandenberg
2012-02-04Split some classes to formula_supportAdam Vandenberg
formula.rb is getting big, let's start splitting things out.