dev-ml/camlp5: restricted 7.10 wrt ocaml
[gentoo.git] / dev-ml / camlp4 / camlp4-4.08_p1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 MY_PV=${PV/_p/+}
7 MY_P=${PN}-${MY_PV}
8
9 DESCRIPTION="System for writing extensible parsers for programming languages"
10 HOMEPAGE="https://github.com/ocaml/camlp4"
11 SRC_URI="https://github.com/ocaml/camlp4/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="LGPL-2-with-linking-exception"
14 SLOT="0/${PV}"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
16 IUSE="+ocamlopt"
17
18 DEPEND=">=dev-lang/ocaml-4.09.0:=[ocamlopt?]"
19 RDEPEND="${DEPEND}
20         !<dev-lang/ocaml-4.02
21         !<dev-ml/findlib-1.5.5-r1"
22 DEPEND="${DEPEND}
23         dev-ml/ocamlbuild"
24
25 S=${WORKDIR}/${P/_p/-}
26 PATCHES=( "${FILESDIR}/reload.patch" "${FILESDIR}/oc409.patch" )
27
28 src_configure() {
29         ./configure \
30                 --bindir="${EPREFIX}/usr/bin" \
31                 --libdir="$(ocamlc -where)" \
32                 --pkgdir="$(ocamlc -where)" \
33                 || die
34 }
35
36 src_compile() {
37         emake byte
38         use ocamlopt && emake native
39 }
40
41 src_install() {
42         emake DESTDIR="${D}" install install-META
43         dodoc CHANGES.md README.md
44 }