1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 DESCRIPTION="Generic build tool with built-in rules for building OCaml library and programs"
7 HOMEPAGE="https://github.com/ocaml/ocamlbuild"
8 SRC_URI="https://github.com/ocaml/ocamlbuild/archive/${PV}.tar.gz -> ${P}.tar.gz"
10 LICENSE="LGPL-2.1-with-linking-exception"
12 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
14 RESTRICT="!test? ( test )"
16 # does not compile with ocaml-4.09 (bug # 708696 and #708872)
17 DEPEND="<dev-lang/ocaml-4.09:=[ocamlopt?]"
19 !<dev-ml/findlib-1.6.1-r1
22 test? ( dev-ml/findlib )"
25 emake -f configure.make Makefile.config \
26 PREFIX="${EPREFIX}/usr" \
27 BINDIR="${EPREFIX}/usr/bin" \
28 LIBDIR="$(ocamlc -where)" \
29 OCAML_NATIVE=$(usex ocamlopt true false) \
30 OCAML_NATIVE_TOOLS=$(usex ocamlopt true false) \
31 NATDYNLINK=$(usex ocamlopt true false)
35 emake CHECK_IF_PREINSTALLED=false DESTDIR="${D}" install