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

@@ -1 +1 @@
DIST ocaml-ctruct-6.0.1.tar.gz 243082 BLAKE2B 874ba34583bbc8b53c5b50ba038e2aa423fd704711194dcf99899239015d5fb383242b1d4654c1be2705fd80465e6da7e8eaa5265eceebca7b09dc036d4ebf40 SHA512 2f696b9dca1426d57f60fd4e997ee0c89b1af1a49e186e08c16911ceb03e9f89518a63faf4407b4a7e3c5f391d51979019e47a77f33961624d767a9e36146ca4
DIST cstruct-6.0.1.tar.gz 243082 BLAKE2B 874ba34583bbc8b53c5b50ba038e2aa423fd704711194dcf99899239015d5fb383242b1d4654c1be2705fd80465e6da7e8eaa5265eceebca7b09dc036d4ebf40 SHA512 2f696b9dca1426d57f60fd4e997ee0c89b1af1a49e186e08c16911ceb03e9f89518a63faf4407b4a7e3c5f391d51979019e47a77f33961624d767a9e36146ca4

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
}

View File

@@ -2,11 +2,18 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<description>co-mainteiners welcome</description>
<description>co-maintainers welcome</description>
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<upstream>
<remote-id type="github">mirage/ocaml-cstruct</remote-id>
</upstream>
<use>
<flag name="async">provide Async Pipe and Bigstring support</flag>
<flag name="lwt">provide Lwt variants of read/write functions</flag>
<flag name="ppx">a PPX syntax extension</flag>
<flag name="sexp">serialisers into s-expression format of Cstructs</flag>
<flag name="unix">provide Unix variations of the read/write functions using file descriptors</flag>
</use>
</pkgmetadata>