opam-version: "2.0"
synopsis: "A library manager for OCaml"
description: """
Findlib is a library manager for OCaml. It provides a convention how
to store libraries, and a file format ("META") to describe the
properties of libraries. There is also a tool (ocamlfind) for
interpreting the META files, so that it is very easy to use libraries
in programs and scripts.
"""
license: "MIT"
maintainer: "Thomas Gazagnaire <thomas@gazagnaire.org>"
authors: "Gerd Stolpmann <gerd@gerd-stolpmann.de>"
homepage: "http://projects.camlcity.org/projects/findlib.html"
bug-reports: "https://github.com/ocaml/ocamlfind/issues"
depends: [
  "ocaml" {>= "4.02.0"}
]
depopts: ["graphics"]
build: [
  [
    "./configure"
    "-bindir" bin
    "-sitelib" lib
    "-mandir" man
    "-config" "%{lib}%/findlib.conf"
    "-no-custom"
    "-no-camlp4" {!ocaml:preinstalled & ocaml:version >= "4.02.0"}
    "-no-topfind" {ocaml:preinstalled}
  ]
  [make "all"]
  [make "opt"] {ocaml:native}
]
install: [
  [make "install"]
  ["install" "-m" "0755" "ocaml-stub" "%{bin}%/ocaml"] {ocaml:preinstalled}
]
patches: ["0001-Fix-bug-when-installing-with-a-system-compiler.patch"]
dev-repo: "git+https://github.com/ocaml/ocamlfind.git"
url {
  src: "http://download.camlcity.org/download/findlib-1.9.5.tar.gz"
  checksum: [
    "md5=8b893525ce36cb3d4d4952483bcc7cf4"
    "sha512=03514c618a16b02889db997c6c4789b3436b3ad7d974348d2c6dea53eb78898ab285ce5f10297c074bab4fd2c82931a8b7c5c113b994447a44abb30fca74c715"
  ]
}
extra-source "0001-Fix-bug-when-installing-with-a-system-compiler.patch" {
  src:
    "https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/ocamlfind/0001-Fix-bug-when-installing-with-a-system-compiler.patch"
  checksum: [
    "sha256=66776698f5ea1e686f5b81014119a5f0d48278604a721036c7def0346a4749a3"
    "md5=130d3d6fe399948ed7991b7756f50dc3"
  ]
}

