Skip to content

Commit

Permalink
Added a formula for JoCaml.
Browse files Browse the repository at this point in the history
  • Loading branch information
rapha committed Jul 9, 2012
1 parent 5c97e31 commit 8a2d403
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Library/Formula/jocaml.rb
@@ -0,0 +1,26 @@
require 'formula'

class Jocaml < Formula
homepage 'http://http://jocaml.inria.fr/'

This comment has been minimized.

Copy link
@adamv

adamv Jul 9, 2012

Fix this line.

This comment has been minimized.

Copy link
@rapha

rapha Jul 9, 2012

Author Owner

What needs fixing here?

url 'http://jocaml.inria.fr/pub/distri/jocaml-3.12/jocaml-3.12.1.tar.gz'
sha1 '34c8954c766c7a7b50ba10006b10129b924ecb4b'

depends_on 'ocaml'

# Don't strip symbols, so dynamic linking doesn't break.
skip_clean :all

def install
system "./configure", "--prefix", HOMEBREW_PREFIX, "--mandir", man

This comment has been minimized.

Copy link
@adamv

adamv Jul 9, 2012

Prefix should be prefix, not the HOMEBREW_PREFIX, right?

This comment has been minimized.

Copy link
@rapha

rapha Jul 9, 2012

Author Owner

I just copied this line from the ocaml formula.
I've replaced it with prefix and it installed fine for me.

This comment has been minimized.

Copy link
@jacknagel

jacknagel Aug 28, 2012

The main ocaml formula uses HOMEBREW_PREFIX in configure but passes the cellar prefix to make; I would assume this is done intentionally so ocaml can locate stuff in the right places.

ENV.deparallelize # Builds are not parallel-safe, esp. with many cores
system "make world"
system "make opt"
system "make opt.opt"
system "make", "PREFIX=#{prefix}", "install"
(lib+'ocaml/compiler-libs').install 'typing', 'parsing', 'utils'

# site-lib in the Cellar will be a symlink to the HOMEBREW_PREFIX location,
# which is mkpath'd by Keg#link when something installs into it
ln_s HOMEBREW_PREFIX+"lib/ocaml/site-lib", lib+"ocaml/site-lib"

This comment has been minimized.

Copy link
@adamv

adamv Jul 9, 2012

Don't link directly into HOMEBREW_PREFIX from a formula.

This comment has been minimized.

Copy link
@rapha

rapha Jul 9, 2012

Author Owner

Done

end
end

0 comments on commit 8a2d403

Please sign in to comment.