diff --git a/dev-ml/tls/Manifest b/dev-ml/tls/Manifest new file mode 100644 index 0000000000..c5b08613cf --- /dev/null +++ b/dev-ml/tls/Manifest @@ -0,0 +1 @@ +DIST tls-v0.13.1.tbz 299082 BLAKE2B e366f0135233c67aac72cb930d9c702ff660bb2eeaa4e2105a695026866d7723a6e41657d3f4d1a107742325d875612183ed51d96d2a9d5da50d358a99688fa3 SHA512 f5ec06a9401c5bba7b9ba011fbec14136685b673f4ec87d0eefedb9cb53f93d02142bb9a75955b8c2c5832cdcebec8751c63ce092d2b6e361a19fe1a8a1e36b1 diff --git a/dev-ml/tls/metadata.xml b/dev-ml/tls/metadata.xml new file mode 100644 index 0000000000..ec20f745d5 --- /dev/null +++ b/dev-ml/tls/metadata.xml @@ -0,0 +1,16 @@ + + + + + co-maintainers welcome + lssndrbarbieri@gmail.com + Alessandro Barbieri + + + mirleft/ocaml-tls + + + Async laye + MirageOS layer + + diff --git a/dev-ml/tls/tls-0.13.1.ebuild b/dev-ml/tls/tls-0.13.1.ebuild new file mode 100644 index 0000000000..0927c8ed6a --- /dev/null +++ b/dev-ml/tls/tls-0.13.1.ebuild @@ -0,0 +1,75 @@ +# Copyright 2020-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit dune multiprocessing + +MY_P="${PN}-v${PV}" + +DESCRIPTION="Transport Layer Security purely in OCaml" +HOMEPAGE="https://github.com/mirleft/ocaml-tls" +SRC_URI="https://github.com/mirleft/ocaml-tls/releases/download/v${PV}/${MY_P}.tbz" +S="${WORKDIR}/${MY_P}" + +LICENSE="BSD-2" +SLOT="0/${PV}" +KEYWORDS="~amd64" +IUSE="async mirage ocamlopt test" + +RDEPEND=" + dev-ml/ppx_sexp_conv + dev-ml/cstruct[ppx,sexp] + dev-ml/sexplib + dev-ml/mirage-crypto[ec,pk,rng] + dev-ml/x509 + dev-ml/domain-name + dev-ml/fmt + dev-ml/lwt + dev-ml/ptime + dev-ml/hkdf + dev-ml/logs + dev-ml/ipaddr[sexp] + + async? ( + dev-ml/async + dev-ml/async_unix + dev-ml/core + dev-ml/cstruct[async] + dev-ml/ppx_jane + dev-ml/mirage-crypto[rng-async] + ) + mirage? ( + dev-ml/mirage-flow + dev-ml/mirage-kv + dev-ml/mirage-clock + dev-ml/mirage-crypto[pk] + ) +" +DEPEND=" + ${RDEPEND} + test? ( + dev-ml/cstruct[unix] + dev-ml/alcotest + dev-ml/randomconv + >=dev-ml/ounit-2 + ) +" + +RESTRICT="!test? ( test )" + +src_compile() { + local pkgs="tls" + for u in async mirage ; do + if use ${u} ; then + pkgs="${pkgs},tls-${u}" + fi + done + dune build --only-packages "${pkgs}" -j $(makeopts_jobs) --profile release || die +} + +src_install() { + dune_src_install tls + use async && dune_src_install tls-async + use mirage && dune_src_install tls-mirage +}