You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-ml/facile/facile-1.1.2.ebuild

51 lines
1.3 KiB

# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils
DESCRIPTION="OCaml constraint programming library on integer & integer set finite domains"
HOMEPAGE="http://opti.recherche.enac.fr/"
SRC_URI="http://opti.recherche.enac.fr/facile/distrib/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0/${PV}"
KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
IUSE="+ocamlopt"
RDEPEND=">=dev-lang/ocaml-4:=[ocamlopt?]"
DEPEND="${RDEPEND}
sys-apps/sed"
src_prepare() {
# Fix building on FreeBSD
epatch "${FILESDIR}/${PN}"-1.1-make.patch
# Disable building native code objects if we dont have/want ocamlopt
if ! use ocamlopt; then
sed -i -e 's/\.opt//' src/Makefile || die "failed to change native code compiler to bytecode ones"
sed -i -e 's/ facile\.cmxa//' src/Makefile || die "failed to remove native code objects"
sed -i -e 's/\.opt/.out/g' \
-e 's: src/facile\.cmxa::'\
-e 's: src/facile\.a::'\
-e 's:^.*facile\.cmxa::'\
-e 's:^.*facile\.a::' Makefile || die "failed to remove native code objects"
fi
}
src_configure(){
# This is a custom configure script and it does not support standard options
./configure --faciledir "${D}"$(ocamlc -where)/facile/ || die
}
src_test() {
emake check
}
src_install(){
dodir $(ocamlc -where)
emake install
dodoc README
}