Skip to content

Commit

Permalink
camlp-streams 5.0.1 (new formula)
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m authored and BrewTestBot committed Sep 20, 2022
1 parent 19d2956 commit 4902407
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Formula/camlp-streams.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class CamlpStreams < Formula
desc "Stream and Genlex libraries for use with Camlp4 and Camlp5"
homepage "https://github.com/ocaml/camlp-streams"
url "https://github.com/ocaml/camlp-streams/archive/refs/tags/v5.0.1.tar.gz"
sha256 "ad71f62406e9bb4e7fb5d4593ede2af6c68f8b0d96f25574446e142c3eb0d9a4"
license "LGPL-2.1-only" => { with: "OCaml-LGPL-linking-exception" }

depends_on "dune" => :build
depends_on "ocaml-findlib" => :test
depends_on "ocaml"

def install
system "dune", "build", "@install"
system "dune", "install", "--prefix=#{prefix}", "--libdir=#{lib}/ocaml", "--docdir=#{doc.parent}"
end

test do
(testpath/"test.ml").write <<~EOS
let stream = Stream.of_list ([] : unit list)
EOS
system "ocamlfind", "ocamlopt", "-linkpkg", "-package", "camlp-streams",
"-warn-error", "+3", "-o", "test", "test.ml"
assert_predicate testpath/"test", :exist?
end
end

0 comments on commit 4902407

Please sign in to comment.