summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2017-04-25 18:34:19 +0200
committerAlexis Ballier <aballier@gentoo.org>2017-04-25 19:32:17 +0200
commit38cf9c02c6ae0043bbac15191fd38c434b0aee24 (patch)
treeaab217cbf8eeddd60e98d4b815ddbffc5ae2ae11 /dev-ml/cppo/cppo-1.5.0.ebuild
parentdev-ml/cppo: bump to 1.5.0 (diff)
downloadgentoo-38cf9c02c6ae0043bbac15191fd38c434b0aee24.tar.gz
gentoo-38cf9c02c6ae0043bbac15191fd38c434b0aee24.tar.bz2
gentoo-38cf9c02c6ae0043bbac15191fd38c434b0aee24.zip
dev-ml/cppo: add ocamlopt useflag
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-ml/cppo/cppo-1.5.0.ebuild')
-rw-r--r--dev-ml/cppo/cppo-1.5.0.ebuild14
1 files changed, 10 insertions, 4 deletions
diff --git a/dev-ml/cppo/cppo-1.5.0.ebuild b/dev-ml/cppo/cppo-1.5.0.ebuild
index 933faf0db619..39915b69c089 100644
--- a/dev-ml/cppo/cppo-1.5.0.ebuild
+++ b/dev-ml/cppo/cppo-1.5.0.ebuild
@@ -13,16 +13,22 @@ SLOT="0/${PV}"
LICENSE="BSD"
KEYWORDS="~amd64 ~arm ~ppc ~x86"
-IUSE="examples"
+IUSE="examples +ocamlopt"
-RDEPEND=">=dev-lang/ocaml-3.12:=
- dev-ml/ocamlbuild:="
+RDEPEND="
+ >=dev-lang/ocaml-3.12:=[ocamlopt?]
+ dev-ml/ocamlbuild:=[ocamlopt?]"
DEPEND="${RDEPEND}"
+src_compile() {
+ use ocamlopt || sed -e 's/ocamlbuild_cppo.cmx/ocamlbuild_cppo.cmo/' -i Makefile
+ emake BEST="$(usex ocamlopt '.native' '.byte')"
+}
+
src_install() {
findlib_src_preinst
mkdir -p "${ED}"/usr/bin
- emake PREFIX="${ED}"/usr install
+ emake PREFIX="${ED}"/usr BEST="$(usex ocamlopt '.native' '.byte')" install
dodoc README.md Changes
if use examples ; then
dodoc -r examples