-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19d2956
commit 4902407
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |