Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a formula for JoCaml.

  • Loading branch information...
commit 8a2d40321238f40f0fc287f8a6705390f3ed60e5 1 parent 5c97e31
@rapha authored
Showing with 26 additions and 0 deletions.
  1. +26 −0 Library/Formula/jocaml.rb
View
26 Library/Formula/jocaml.rb
@@ -0,0 +1,26 @@
+require 'formula'
+
+class Jocaml < Formula
+ homepage 'http://http://jocaml.inria.fr/'
@adamv
adamv added a note

Fix this line.

@rapha Owner
rapha added a note

What needs fixing here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ 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
@adamv
adamv added a note

Prefix should be prefix, not the HOMEBREW_PREFIX, right?

@rapha Owner
rapha added a note

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ 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"
@adamv
adamv added a note

Don't link directly into HOMEBREW_PREFIX from a formula.

@rapha Owner
rapha added a note

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.