opam-version: "2.0"
maintainer: "https://github.com/ocaml/opam-repository/issues"
authors: ["Emmanuel Onzo" "Philip Blair"]
homepage: "https://github.com/grain-lang/dypgen"
license: "CeCILL-B"
build: make
depends: [
  "ocaml" {>= "4.07.0"}
  "ocamlfind" {build}
]
patches: ["install-bsd-compatible.patch"]
install: [
  [make "install" "DYPGENLIBDIR=%{lib}%" "BINDIR=%{bin}%" "MANDIR=%{man}%/man1"]
  ["sh.exe" "-c" "if [ -f '%{bin}%/dypgen' ] && [ ! -f '%{bin}%/dypgen.exe' ] ; then mv '%{bin}%/dypgen' '%{bin}%/dypgen.exe' ; fi" ] { os = "win32" }
  ["sh.exe" "-c" "if [ -f '%{bin}%/dypgen.opt' ] && [ ! -f '%{bin}%/dypgen.opt.exe' ] ; then mv '%{bin}%/dypgen.opt' '%{bin}%/dypgen.opt.exe' ; fi" ] { os = "win32" }
]
synopsis: "Self-extensible parsers and lexers for OCaml"
description: """
dypgen is a GLR parser generator for OCaml, it is able to
generate self-extensible parsers (also called adaptive parsers) as
well as extensible lexers for the parsers it produces.
(fork of pre-4.06 dypgen: http://dypgen.free.fr/)"""
extra-files: [
  ["install-bsd-compatible.patch" "md5=f4885881bb9e16bae3f9e88ebb54c582"]
  ["dypgen.install" "md5=3af2bc7343588caf1a6de8af49a3b1b5"]
]
url {
  src: "https://github.com/grain-lang/dypgen/archive/0.2.tar.gz"
  checksum: [
    "md5=321d677c64368b4b6fae4a31aa8def64"
    "sha512=b01044243d76550194ea1a9e93eb53f525ae9e88ef0a1d69c5c00ef7adf3791d88df72f8ccb47fe0966c54fc214ff8e54f3cdf34c7627ea10b3a1a64f2e683a0"
  ]
}
