Commit graph

12 commits

Author SHA1 Message Date
Adam Vandenberg
7c5720e36f Put source path last in cmake args 2012-02-24 21:35:51 -08:00
Misty De Meo
2f03f781da Add devel to the DSL, + stable and bottle blocks
This commit adds a `devel` entry to the DSL, allowing formulae to
specify an unstable branch.

`devel` takes a block, which should contain standard `url` and `md5`
fields (and `version`, if necessary). This must come after the standard
DSL fields.

This commit also migrates over all formulae currently using `devel` to
the new syntax, as well as formulae which used `head` for non-VCS urls.

The new syntax is also available for `stable` and `bottle`. `stable` is
an option alongside the old syntax. `bottle` replaces the old syntax.

Note that the @stable ivar in Formula has been renamed to @standard,
and the @bottle ivar has been renamed to @bottle_url.

Closes Homebrew/homebrew#9735.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-01-25 21:45:19 -06:00
Jack Nagel
491ef46cea Define and use ARGV.build_devel?
Often it is useful to provide a development build in addition to the
stable release or HEAD download.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-11-21 20:04:33 -08:00
Jack Nagel
4d941c28be Use ARGV.include? instead of ARGV.flag? in formula
ARGV.flag? will notice short options, and so ARGV.flag? '--devel' will
be triggered by '-d', which is obviously undesired.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-18 15:25:14 -06:00
Daniel Berjón
bfbb9daa60 libmusicbrainz: added 4.0b1 as --devel branch
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-07-21 08:38:02 -07:00
Adam Vandenberg
4147b05c57 Use ruby style for inheritance. 2011-03-12 11:55:09 -08:00
Matthew L Daniel
ec3b46ef98 libmusicbrainz 3.0.3
Updated to latest version and included cmake

The previous formula did not list 'cmake' as a build dependency,
which is weird given that the first `system` line is an invocation of cmake.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-11-19 06:22:52 -08:00
Adam Vandenberg
91d9e3f546 Fix libmusicbrainz
* Remove optional dep on missing formula.
* Fix neon detection.
2010-06-11 13:41:51 -07:00
Max Howell
61b2307139 s/require 'brewkit'/require 'formula'/g
brewkit.rb changes ENV destructively, so lets not do that everytime a formula
is required. Now it's possible for other tools to require a formula
description without worrying about side-effects.
2009-10-15 16:48:03 +01:00
Max Howell
c665eac117 Dependency resolution with fancy syntax
Is it a DSL? No. But people call it that apparently.

To add a dependency:

class Doe <Formula
  depends_on 'ray'
  depends_on 'mee' => :optional
  depends_on 'far' => :recommended
  depends_on Sew.new
end

Sew would be a formula you have defined in this Formula file. This is useful,
eg. see Python's formula. Formula specified in this fashion cannot be linked
into the HOMEBREW_PREFIX, they are considered private libraries. This allows
you to create custom installations that are very specific to your formula.

More features to come, like specifying versions
2009-09-21 18:27:48 +01:00
Max Howell
bf7a82e66d Dependency resolution
Specify dependencies in your formula's deps function. You can return an Array,
String or Hash, eg:

    def deps
      { :optional => 'libogg', :required => %w[flac sdl], :recommended => 'cmake' }
    end

Note currently the Hash is flattened and qualifications are ignored. If you
only return an Array or String, the qualification is assumed to be :required.

Other packaging systems have problems when it comes to packages requiring a
specific version of a package, or some patches that may not work well with
other software. With Homebrew we have some options:

1.  If the formula is vanilla but an older version we can cherry-pick the old
    version and install it in the Cellar in parallel, but just not symlink it
    into /usr/local while forcing the formula that depends on it to link to
    that one and not any other versions of it.
2.  If the dependency requires patches then we shouldn't install this for use
    by any other tools, (I guess this needs to be decided on a per-situation
    basis). It can be installed into the parent formula's prefix, and not
    symlinked into /usr/local. In this case the dependency's Formula
    derivation should be saved in the parent formula's file (check git or
    flac for an example of this).

Both the above can be done currently with hacks, so I'll flesh out a proper
way sometime this week.
2009-09-10 19:23:03 +01:00
Max Howell
dcff7e0064 Neon and libmusicbrainz formulae 2009-08-10 18:12:16 +01:00