Browse files

Add support for external ocaml deps via opam

  • Loading branch information...
1 parent a013aa8 commit 9426eb48a1e8a384e873540bf26f4e05496a1cf1 @awreece committed Nov 28, 2012
Showing with 3 additions and 1 deletion.
  1. +1 −1 Library/Homebrew/dependencies.rb
  2. +2 −0 Library/Homebrew/requirements.rb
@@ -14,7 +14,7 @@
class DependencyCollector
# Define the languages that we can handle as external dependencies.
- :chicken, :jruby, :lua, :node, :perl, :python, :rbx, :ruby
+ :chicken, :jruby, :lua, :node, :ocaml, :perl, :python, :rbx, :ruby
attr_reader :deps, :requirements
@@ -25,6 +25,7 @@ def the_test
when :jruby then %W{/usr/bin/env jruby -rubygems -e require\ '#{@import_name}'}
when :lua then %W{/usr/bin/env luarocks show #{@import_name}}
when :node then %W{/usr/bin/env node -e require('#{@import_name}');}
+ when :ocaml then %W{/usr/bin/env opam list #{@import_name} | grep #{@import_name}}
when :perl then %W{/usr/bin/env perl -e use\ #{@import_name}}
when :python then %W{/usr/bin/env python -c import\ #{@import_name}}
when :ruby then %W{/usr/bin/env ruby -rubygems -e require\ '#{@import_name}'}
@@ -38,6 +39,7 @@ def command_line
when :jruby then "jruby -S gem install"
when :lua then "luarocks install"
when :node then "npm install"
+ when :ocaml then "opam install"
when :perl then "cpan -i"
when :python then "pip install"
when :rbx then "rbx gem install"

0 comments on commit 9426eb4

Please sign in to comment.