dev-ml/camlp5: ppc stable wrt bug #709348
[gentoo.git] / dev-ml / ocamlbuild / ocamlbuild-0.11.0.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 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
13 IUSE="+ocamlopt test"
14 RESTRICT="!test? ( test )"
15
16 # does not compile with ocaml-4.09 (bug # 708696 and #708872)
17 DEPEND="<dev-lang/ocaml-4.09:=[ocamlopt?]"
18 RDEPEND="${DEPEND}
19         !<dev-ml/findlib-1.6.1-r1
20 "
21 DEPEND="${DEPEND}
22         test? ( dev-ml/findlib )"
23
24 src_configure() {
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)
32 }
33
34 src_install() {
35         emake CHECK_IF_PREINSTALLED=false DESTDIR="${D}" install
36         dodoc Changes
37 }