mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-10 15:45:15 -04:00
dev-ml/uri: tests and useflags
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
@@ -9,4 +9,8 @@
|
||||
<upstream>
|
||||
<remote-id type="github">mirage/ocaml-uri</remote-id>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="re">This is an OCaml implementation of the RFC3986 specification for parsing URI or URLs</flag>
|
||||
<flag name="sexp">ocaml-uri with sexp support</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user