dev-ml/cstruct: update SRC_URI

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-04-06 17:19:25 +02:00
parent a58966db09
commit 572086dca1
3 changed files with 62 additions and 18 deletions

View File

@@ -3,35 +3,72 @@
EAPI=8
inherit dune
inherit dune multiprocessing
DESCRIPTION="Map OCaml arrays onto C-like structs"
HOMEPAGE="https://github.com/mirage/ocaml-cstruct"
SRC_URI="https://github.com/mirage/ocaml-cstruct/archive/v${PV}.tar.gz -> ocaml-ctruct-${PV}.tar.gz"
S="${WORKDIR}/ocaml-cstruct-${PV}"
SRC_URI="https://github.com/mirage/ocaml-cstruct/archive/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/ocaml-${P}"
LICENSE="ISC"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="ocamlopt"
IUSE="async lwt ocamlopt ppx sexp test unix"
RDEPEND="
>=dev-lang/ocaml-4.08.0
>=dev-ml/fmt-0.8.9
dev-ml/async
dev-ml/async_unix
dev-ml/core
dev-ml/lwt
dev-ml/sexplib
dev-ml/ppxlib
async? (
dev-ml/async
dev-ml/async_unix
dev-ml/core
)
lwt? (
dev-ml/base-unix
dev-ml/lwt
)
ppx? (
dev-ml/ppxlib
dev-ml/stdlib-shims
)
sexp? ( dev-ml/sexplib )
unix? ( dev-ml/base-unix )
"
DEPEND="${RDEPEND}"
DEPEND="
${RDEPEND}
test? (
dev-ml/alcotest
dev-ml/crowbar
dev-ml/ocaml-migrate-parsetree
dev-ml/ounit
dev-ml/ppx_sexp_conv
dev-ml/cppo
dev-ml/lwt
)
"
RESTRICT="!test? ( test )"
REQUIRED_USE="
ppx? ( sexp )
test? ( sexp ppx )
"
src_compile() {
local pkgs="cstruct"
for u in async lwt ppx sexp unix ; do
if use ${u} ; then
pkgs="${pkgs},cstruct-${u}"
fi
done
dune build --only-packages "${pkgs}" -j $(makeopts_jobs) --profile release || die
}
src_install() {
dune_src_install cstruct-async
dune_src_install cstruct-lwt
dune_src_install cstruct-sexp
dune_src_install cstruct-unix
dune_src_install cstruct
dune_src_install ppx_cstruct
use async && dune_src_install cstruct-async
use lwt && dune_src_install cstruct-lwt
use sexp && dune_src_install cstruct-sexp
use unix && dune_src_install cstruct-unix
use ppx && dune_src_install ppx_cstruct
}