Skip to content

Loading…

Add JoCaml formula #13290

Closed
wants to merge 2 commits into from

3 participants

@rapha

No description provided.

@adamv

Fix this line.

What needs fixing here?

@adamv

Prefix should be prefix, not the HOMEBREW_PREFIX, right?

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.

@adamv

Don't link directly into HOMEBREW_PREFIX from a formula.

Done

@adamv

Does this conflict with the normal ocaml formula?

@rapha

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
Library/Formula/jocaml.rb
@@ -0,0 +1,26 @@
+require 'formula'
+
+class Jocaml < Formula
+ homepage 'http://http://jocaml.inria.fr/'

Double http:// here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jacknagel jacknagel commented on the diff
Library/Formula/jocaml.rb
((9 lines not shown))
+
+ # 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"

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jacknagel jacknagel commented on the diff
Library/Formula/jocaml.rb
((5 lines not shown))
+ 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'

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@adamv

Ping.

@adamv

Closing due to no response.

@adamv adamv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 9, 2012
  1. @rapha

    Added a formula for JoCaml.

    rapha committed
  2. @rapha

    s/HOMEBREW_PREFIX/prefix/

    rapha committed
This page is out of date. Refresh to see the latest.
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/'

Double http:// 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", 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'

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.

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

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?

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