diff --git a/Formula/camlp5.rb b/Formula/camlp5.rb index 71e134d3e9..5281acab53 100644 --- a/Formula/camlp5.rb +++ b/Formula/camlp5.rb @@ -4,6 +4,7 @@ class Camlp5 < Formula url "https://github.com/camlp5/camlp5/archive/rel707.tar.gz" version "7.07" sha256 "a2c493b833b217adf94d2000eb19015b990c4e441beb35cf36b1d33ed2351991" + revision 1 head "https://gforge.inria.fr/anonscm/git/camlp5/camlp5.git" bottle do @@ -22,8 +23,13 @@ class Camlp5 < Formula end test do + ocaml = Formula["ocaml"] (testpath/"hi.ml").write "print_endline \"Hi!\";;" assert_equal "let _ = print_endline \"Hi!\"", - shell_output("#{bin}/camlp5 #{lib}/ocaml/camlp5/pa_o.cmo #{lib}/ocaml/camlp5/pr_o.cmo hi.ml") + # The purpose of linking with the file "bigarray.cma" is to ensure that the + # ocaml files are in sync with the camlp5 files. If camlp5 has been + # compiled with an older version of the ocaml compiler, then an error + # "interface mismatch" will occur. + shell_output("#{bin}/camlp5 #{lib}/ocaml/camlp5/pa_o.cmo #{lib}/ocaml/camlp5/pr_o.cmo #{ocaml.opt_lib}/ocaml/bigarray.cma hi.ml") end end