diff --git a/dev-ml/uri/metadata.xml b/dev-ml/uri/metadata.xml index 982af7c50a..57acd83577 100644 --- a/dev-ml/uri/metadata.xml +++ b/dev-ml/uri/metadata.xml @@ -9,4 +9,8 @@ mirage/ocaml-uri + + This is an OCaml implementation of the RFC3986 specification for parsing URI or URLs + ocaml-uri with sexp support + diff --git a/dev-ml/uri/uri-4.2.0.ebuild b/dev-ml/uri/uri-4.2.0.ebuild index e8103d4f00..4ece589c32 100644 --- a/dev-ml/uri/uri-4.2.0.ebuild +++ b/dev-ml/uri/uri-4.2.0.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit dune +inherit dune multiprocessing DESCRIPTION="RFC3986 URI parsing library for OCaml" HOMEPAGE="https://github.com/mirage/ocaml-uri" @@ -13,19 +13,42 @@ S="${WORKDIR}/ocaml-${P}" LICENSE="ISC" SLOT="0/${PV}" KEYWORDS="~amd64" -IUSE="ocamlopt" +IUSE="ocamlopt re sexp test" RDEPEND=" dev-ml/angstrom - dev-ml/ppx_sexp_conv - dev-ml/re - dev-ml/sexplib0 dev-ml/stringext + + re? ( + dev-ml/re + ) + sexp? ( + dev-ml/ppx_sexp_conv + dev-ml/sexplib0 + ) " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + test? ( + dev-ml/ounit + dev-ml/ppx_sexp_conv + ) +" + +RESTRICT="!test? ( test )" + +src_compile() { + local pkgs="uri" + for u in sexp re ; do + if use ${u} ; then + pkgs="${pkgs},uri-${u}" + fi + done + dune build --only-packages "${pkgs}" -j $(makeopts_jobs) --profile release || die +} src_install() { dune_src_install uri - dune_src_install uri-re - dune_src_install uri-sexp + use re && dune_src_install uri-re + use sexp && dune_src_install uri-sexp }