dev-ml/ocaml-gettext: fix build with ocaml 4.03
[gentoo.git] / dev-ml / ocaml-gettext / ocaml-gettext-0.3.5.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit findlib eutils
8
9 DESCRIPTION="Provides support for internationalization of OCaml program"
10 HOMEPAGE="http://forge.ocamlcore.org/projects/ocaml-gettext"
11 SRC_URI="http://forge.ocamlcore.org/frs/download.php/1433/${P}.tar.gz"
12
13 LICENSE="LGPL-2.1-with-linking-exception"
14 SLOT="0/${PV}"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="doc test"
17
18 RDEPEND=">=dev-lang/ocaml-3.12.1:=
19         >=dev-ml/ocaml-fileutils-0.4.0:=
20         >=dev-ml/camomile-0.8.3:=
21         sys-devel/gettext
22         || ( dev-ml/camlp4:= <dev-lang/ocaml-4.02.0 )
23         "
24 DEPEND="${RDEPEND}
25         doc? ( app-text/docbook-xsl-stylesheets dev-libs/libxslt )
26         test? ( dev-ml/ounit )"
27
28 src_prepare() {
29         has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch"
30 }
31
32 src_configure() {
33         econf \
34                 --with-docbook-stylesheet="${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets/" \
35                 $(use_enable doc) \
36                 $(use_enable test)
37 }
38
39 src_compile() {
40         emake -j1
41 }
42
43 src_install() {
44         findlib_src_preinst
45         emake -j1 DESTDIR="${D}" \
46                 BINDIR="${ED}/usr/bin" \
47                 PODIR="${ED}/usr/share/locale/" \
48                 DOCDIR="${ED}/usr/share/doc/${PF}" \
49                 MANDIR="${ED}/usr/share/man" \
50                 install
51         dodoc CHANGELOG README THANKS TODO
52 }