aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
AgeCommit message (Collapse)Author
2009-11-09Don't ignore interupts during Formula.systemMax Howell
As I understand it (I tested too), signal propogation is handled by the parent Ruby process. However this was working mostly anyway. So I don't fully understand what is going on. However this seems to not hang in Process.wait where it was before for one test case.
2009-11-08Reap the process or make zombiesMax Howell
2009-11-08Use our own popen implementation in Formula.systemMax Howell
The rationale here is that the --verbose mode had a bug where it didn't escape its parameters properly. Which caused ocassionally cryptic issues.
2009-11-07Propagate exit status in ExecutioError exceptionMax Howell
2009-11-07Move BuildError and ExceutionError to global.hMax Howell
More sensible, and fixes brew
2009-10-24Better md5 mismatch exceptionMax Howell
2009-10-19Camelcase class names around the . from filenamesMax Howell
Eg. shell.fm -> ShellFm
2009-10-19Allow svn+http:// urlsMax Howell
2009-10-19Fix Homebrew/homebrew#52: Add ability to checkout a branch or tag.Jannis Leidel
GitDownloadStrategy and MercurialDownloadStrategy now can be used like this: head 'git://server/repo.git', :branch => 'stable' head 'hg://server/repo/', :tag => '1.0.4'
2009-10-19Allow formula names with '+' in themMax Howell
HFS+ handles the + fine. However the Ruby class name needs a s/+/x/g. I acknowledge that supporting + will make it harder to port to certain other filesystems. However that's your challenge! :D
2009-10-15s/require 'brewkit'/require 'formula'/gMax Howell
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-03Modernise the GRC formula somewhatMax Howell
This was one of the first ones I wrote, so it lacks some of our more recent touches.
2009-10-02HttpDownloadStrategy renamed CurlDownloadStrategyMax Howell
Because people didn't realise it was actually curl and thus supports eg. ftp too.
2009-10-02Formula.etc is now HOMEBREW_PREFIX/etcMax Howell
You generally don't want to have to copy the configuration to a new directory when you upgrade.
2009-10-01Add SourceForge pattern to SubversionDownloadStrategyAdam Vandenberg
2009-10-01Formula.var is now HOMEBREW_PREFIX/varMax Howell
2009-09-30Adding CVS and Mercurial download strategies.Austin Ziegler
2009-09-30Var goes back in the keg. Fixes Homebrew/homebrew#67Max Howell
I'm not sure about this still, as if you uninstall mysql do you want to lose all the var stuff it created? Maybe. Probably not. But there were issues unresolved having it in the unversioned-keg. So I'd rather look at this again later, and fix the bugs without hacks for now.
2009-09-29Don't fail when cleaning if skip_clean_paths is emptyMax Howell
2009-09-29Allow skip_clean as a class methodAndre Arko
Pass in a list of any files that you don't want cleaned with a path relative to the cellar. e.g. `strip_paths ['bin/znc']` It's backwards compatible with def strip_clean?, at least for now. The znc formula is updated as an example.
2009-09-29eval badAndre Arko
2009-09-26Oops. Don't raise for homepages. Silly.Max Howell
2009-09-25Throw if no homepage setMax Howell
That'll teach you!
2009-09-25Add better error message for misnamed formula class.Adam Vandenberg
2009-09-24Use full paths to all system utilitiesMax Howell
Otherwise you run the risk of not running the exact version / make of the utility you planned. Fixes Homebrew/homebrew#48 Really we need to do this formula too, so I guess a make and cmake function are on the way…
2009-09-24DRYed up "@foo=self.class.foo unless @foo" statementsClinton R. Nixon
Using the example from the existing code: CHECKSUM_TYPES.each do |type| if !instance_variable_defined?("@#{type}") class_value = self.class.send(type) instance_variable_set("@#{type}", class_value) if class_value end end I extracted that block into a method 'set_instance_variable' which I then used in all places where this behavior was being used.
2009-09-23Added small DSL for formulasClinton R. Nixon
You can now use "url", "version", "homepage", and any checksums as class methods, like so: class Dos2unix <Formula url 'http://www.sfr-fresh.com/linux/misc/old/dos2unix-3.1.tar.gz' md5 '25ff56bab202de63ea6f6c211c416e96' homepage 'http://www.sfr-fresh.com/linux/misc/' end The previous usage ("@url = 'http://example.com/tarball.tgz'") still works, maintaining compatibility with previous formulas. "dos2unix.rb" is translated into the new format as an example.
2009-09-21Don't always say "Patching"Max Howell
2009-09-21Merge branch 'deps'Max Howell
Conflicts: Library/Formula/imagemagick.rb Library/Formula/taglib.rb Library/Homebrew/brew.h.rb Library/Homebrew/formula.rb bin/brew
2009-09-21Dependency resolution with fancy syntaxMax Howell
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-17Solving the GNU GetText issuesMax Howell
GNU GetText breaks eg. Ruby 1.9 builds, and some other formula I have been building too. But it is required by eg. glib. So to solve this we are going to by default not symlink gettext into the Homebrew prefix. Formula that depend on GetText will have the gettext paths added to the brewing environment automatically. Neat.
2009-09-16Default to patch level 1Max Howell
Having gone through our patches it's clear that p1 is more standard. Also fixed a bug where returning DATA outside of an array would fail to patch.
2009-09-16Allow formulae to use __END__Max Howell
For this to work the "running script" must be the formulae file. Making this so wasn't so hard, there is now an install.rb script which is included with the -r flag to the ruby executable. An at_exit handler calls the install function. Having the install logic in its own file made it feel like there was so much space that I added extra error handling. So there is something to be said for separating functionality out into its own files. Still the error handling sucks, we'll need to marshall the exception back to the bin/brew command. Which is another PITA. Still overall I think this will prove worthwhile. But if it doesn't we'll revert. As a first usage, you can put a diff after __END__ and return DATA from Formula::patches to make Homebrew aware of it.
2009-09-16Support patching using diffs on local filesystemMax Howell
2009-09-16Teach patch to uncompress patches if necessary.Brian Smyth
This change also eliminates the somewhat duplicate codepath if patches returns and Array rather than a Hash.
2009-09-14Clean up indentationClinton R. Nixon
Signed-off-by: Max Howell <max@methylblue.com> I didn't commit it all, apologies. But I just can't read the sections nearly as easily if you indent private and protected. If it's a Ruby convention it frankly seems at odds with the rest of Ruby spacing conventions.
2009-09-14Formula::varMax Howell
Points to eg. Cellar/wget/var rather than Cellar/wget/1.1.5/var Discussion: 1689bbc326f1201ea979178ebcadba344abf2568
2009-09-11Overriding Object.class was not my intentionMax Howell
Renamed to Formula::class_s.
2009-09-10Dependency resolutionMax Howell
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-10Display exit code when nonzero.Adam Vandenberg
Brew fails if a tool (make, or whatever) doesn't return an exit code of 0. This patch displays the non-zero code on failure, so we can better diagnose what caused the build to fail (or if we need to add that exit code as exception 'success code'.)
2009-09-10We should certainly have a Formula::share()Max Howell
I removed this months back as I found it confusing, does it mean: prefix+'share' or prefix+'share'+name() But honestly, it's obvious, it's the former. It's the same as the other path functions.
2009-09-07Add support for SHA256Étienne Barrié
2009-09-05Fix double newline after InterruptMax Howell
Seems to be an issue with Ruby system() call doing a double fork.
2009-09-03Thrift formulaAsk Solem
Thrift is a software framework for scalable cross-language services development. It combines a powerful software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, and Ruby. Thrift was developed at Facebook and released as open source.
2009-09-01Dict.org client formulaBen Alpert
Added Formula::etc() Added Pathname::write() convenience function which can write a string out to the file it points too, raising if it would have to overwrite.
2009-08-31Change license to BSDMax Howell
I confirmed this change with all relevant contributors first.
2009-08-30Better cache names for accessory-formulaMax Howell
Because formula don't get named unless the brew kit instantiates them accessory formula were getting named "__UNKNOWN__". Which sucks. This isn't ideal for me as I made the naming use @name and @version to ensure unique naming. Now it is possible to have name clashes in the cache. So I need to solve it better at some point.
2009-08-30FIX GithubGistFormula (fixes Homebrew/homebrew#20)Max Howell
2009-08-29Clarify --debug behavior.Adam Vandenberg
Add a note that 'exit 1' will abort the installation in --debug mode. Signed Off By: Max Howell <max@methylblue.com> I ammended the text slightly and made the lines all 78 chars wide maximum.
2009-08-24Support optional HEAD builds for any formulaMax Howell
A formula can have just a @head url or the user can specify to install HEAD with --head. We support subversion and git checkouts. The version is set to HEAD for head builds. Next step is making brew update handle these installs correctly.