1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 DESCRIPTION="OCaml constraint programming library on integer & integer set finite domains"
7 HOMEPAGE="http://opti.recherche.enac.fr/"
8 SRC_URI="http://opti.recherche.enac.fr/facile/distrib/${P}.tar.gz"
13 KEYWORDS="alpha amd64 arm64 hppa ia64 ppc ppc64 ~sparc x86"
16 RDEPEND=">=dev-lang/ocaml-4:=[ocamlopt?]"
23 PATCHES=( "${FILESDIR}/${PN}"-1.1-make.patch ) # Fix building on FreeBSD
28 # Disable building native code objects if we dont have/want ocamlopt
29 if ! use ocamlopt; then
30 sed -i -e 's/\.opt//' src/Makefile || die "failed to change native code compiler to bytecode ones"
31 sed -i -e 's/ facile\.cmxa//' src/Makefile || die "failed to remove native code objects"
32 sed -i -e 's/\.opt/.out/g' \
33 -e 's: src/facile\.cmxa::'\
34 -e 's: src/facile\.a::'\
35 -e 's:^.*facile\.cmxa::'\
36 -e 's:^.*facile\.a::' Makefile || die "failed to remove native code objects"
41 # This is a custom configure script and it does not support standard options
42 ./configure --faciledir "${D}"$(ocamlc -where)/facile/ || die
50 dodir $(ocamlc -where)