dev-ml/ocamlbuild: 0.10.1 and 0.11.0 don't compile with ocaml-4.09
[gentoo.git] / dev-ml / ocamlbuild / ocamlbuild-0.10.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
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"
9
10 LICENSE="LGPL-2.1-with-linking-exception"
11 SLOT="0/${PV}"
12 KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
13 IUSE="+ocamlopt"
14
15 # does not compile with ocaml-4.09 (bug # 708696 and #708872)
16 DEPEND="<dev-lang/ocaml-4.09:=[ocamlopt?]"
17 RDEPEND="${DEPEND}
18         !<dev-ml/findlib-1.6.1-r1
19 "
20
21 src_configure() {
22         emake -f configure.make Makefile.config \
23                 PREFIX="${EPREFIX}/usr" \
24                 BINDIR="${EPREFIX}/usr/bin" \
25                 LIBDIR="$(ocamlc -where)" \
26                 OCAML_NATIVE=$(usex ocamlopt true false) \
27                 OCAML_NATIVE_TOOLS=$(usex ocamlopt true false) \
28                 NATDYNLINK=$(usex ocamlopt true false)
29 }
30
31 src_install() {
32         emake CHECK_IF_PREINSTALLED=false DESTDIR="${D}" install
33         dodoc Changes
34 }