opam-version: "2.0"
maintainer: "Ivan Gotovchits <ivg@ieee.org>"
authors: "BAP Team"
homepage: "https://github.com/BinaryAnalysisPlatform/bap/"
bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues"
dev-repo: "git://github.com/BinaryAnalysisPlatform/bap/"
license: "MIT"
build: [
  ["ocaml" "unix.cma" "find-ida.ml"]
]
depends: [
   "ocaml" {>= "4.03"}
   "base-unix"
   "conf-which" {build}
]
substs: [ "find-ida.ml" ]
flags: [ conf ]
x-ci-accept-failures: ["debian-unstable"]

synopsis: "Checks that IDA Pro is installed"
description: """
We search for IDA via 'which` utility and in the following locations:
on Linux: in $HOME
on macOS: in /Applications, $HOME/Applications/, $HOME.
up to depth 4, and no more than 1024 entries in total.
The first found entry is used.

A path to ida can be hinted by setting opam config variable:
opam config set ida-path <path-to-ida>

Also can be hinted with IDA_PATH environment variable, e.g.,
IDA_PATH=<path-to-ida> opam install conf-ida
"""

post-messages: [
  "We search in the following locations:" { failure}

  "
/Applications
$HOME/Applications
$HOME" {os = "macos" & failure}

  "$HOME"  {os = "linux" & failure}

  "up to depth 4, and no more than 1024 entries in total. The first found entry is used. To control the search use the 'ida-path' opam variable or the 'IDA_PATH' environment variable."  {failure}

]
