This repository has been archived by the owner. It is now read-only.

Add JoCaml formula #13290

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

rapha commented Jul 9, 2012

No description provided.

Fix this line.

Owner

rapha replied Jul 9, 2012

What needs fixing here?

Prefix should be prefix, not the HOMEBREW_PREFIX, right?

Owner

rapha replied Jul 9, 2012

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.

Don't link directly into HOMEBREW_PREFIX from a formula.

Owner

rapha replied Jul 9, 2012

Done

Contributor

adamv commented Jul 9, 2012

Does this conflict with the normal ocaml formula?

rapha commented Jul 9, 2012

No, doesn't conflict with the ocaml formula, it complements it. I've installed them both through homebrew, the jocaml formula depends on the ocaml one.

@jacknagel jacknagel commented on the diff Aug 28, 2012

Library/Formula/jocaml.rb
@@ -0,0 +1,26 @@
+require 'formula'
+
+class Jocaml < Formula
+ homepage 'http://http://jocaml.inria.fr/'
@jacknagel

jacknagel Aug 28, 2012

Contributor

Double http:// here.

@jacknagel jacknagel commented on the diff Aug 28, 2012

Library/Formula/jocaml.rb
+
+ # Don't strip symbols, so dynamic linking doesn't break.
+ skip_clean :all
+
+ def install
+ system "./configure", "--prefix", prefix, "--mandir", man
+ 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 prefix+"lib/ocaml/site-lib", lib+"ocaml/site-lib"
@jacknagel

jacknagel Aug 28, 2012

Contributor

The src and dst of this symlink are identical.

In the ocaml formula, this is done like ln_s HOMEBREW_PREFIX+"lib/ocaml/site-lib", lib+"ocaml/site-lib", in order to allow other packages to install ocaml bindings and have them picked up by the main ocaml formula. Is that relevant here?

@jacknagel jacknagel commented on the diff Aug 28, 2012

Library/Formula/jocaml.rb
+ 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", prefix, "--mandir", man
+ 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'
@jacknagel

jacknagel Aug 28, 2012

Contributor

These will conflict with the identical directories installed by the main ocaml formula when linked into HOMEBREW_PREFIX.

I worry about how much of this was just straight copied from the ocaml formula.

Contributor

adamv commented Sep 28, 2012

Ping.

Contributor

adamv commented Oct 20, 2012

Closing due to no response.

@adamv adamv closed this Oct 20, 2012

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.