opam-version: "2.0"
maintainer: "https://github.com/ocaml/opam-repository/issues"
authors: "Xavier Leroy"
homepage: "https://forge.ocamlcore.org/projects/zarith"
build: [
  ["./configure"] {os != "openbsd" & os != "freebsd" & os != "macos"}
  [
    "env"
    "LDFLAGS=-L/usr/local/lib"
    "CC=cc"
    "CFLAGS=-I/usr/local/include -O3 -Wall -Wextra"
    "./configure"
  ] {os = "openbsd" | os = "freebsd" | os = "macos"}
  [make]
]
remove:  ["ocamlfind" "remove" "zarith"]
depends: [
  "ocaml"
  "ocamlfind"
  "conf-gmp"
  "conf-perl" {build}
]
patches: [ "z_pp.pl.patch" ]
install: [make "install"]
synopsis:
  "Implements arithmetic and logical operations over arbitrary-precision integers"
description: """
The Zarith library implements arithmetic and logical operations over
arbitrary-precision integers. It uses GMP to efficiently implement
arithmetic over big integers. Small integers are represented as Caml
unboxed integers, for speed and space economy."""
flags: light-uninstall
extra-files: ["z_pp.pl.patch" "md5=e138d44f86858d55c6e0911e1517ed2e"]
url {
  src: "https://download.ocamlcore.org/zarith/Zarith/1.3/zarith-1.3.tgz"
  checksum: "md5=9ed8ddafdebfa8c1b673dbe91a181f66"
}
