dev-ml/tar: initial import

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-04-09 16:00:13 +02:00
parent 4e244927bc
commit 70f4fb6651
3 changed files with 76 additions and 0 deletions

1
dev-ml/tar/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST tar-2.0.1.tar.gz 26751 BLAKE2B a381c258c75350198c25c105f8ca33f33dd8d946f88cb102186ece414def2fa5e25191c2ed43d5d0e9286a0bc352ffec8b6999d17f18479642900b59f4d1cc17 SHA512 fd2e302497eb673a4e8000d0bcfd9012b1f118021e1d071a7c56cc6652ec6da9c6f755c18aa4b275daf1f722409d71cbb4519285096682344bfa65bbe800cbd1

15
dev-ml/tar/metadata.xml Normal file
View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<upstream>
<remote-id type="github">mirage/ocaml-tar</remote-id>
</upstream>
<use>
<flag name="mirage">Read and write tar format files via MirageOS interfaces</flag>
<flag name="unix">Decode and encode tar format files from Unix</flag>
</use>
</pkgmetadata>

View File

@@ -0,0 +1,60 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit dune multiprocessing
MYPN="ocaml-${PN}"
DESCRIPTION="Pure OCaml library to read and write tar files"
HOMEPAGE="https://github.com/mirage/ocaml-tar"
SRC_URI="https://github.com/mirage/${MYPN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${MYPN}-${PV}"
LICENSE="ISC"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="mirage ocamlopt test unix"
RDEPEND="
dev-ml/camlp-streams
dev-ml/cstruct
dev-ml/re
dev-ml/lwt
mirage? (
dev-ml/io-page
dev-ml/mirage-block
dev-ml/mirage-kv
dev-ml/ptime
)
"
DEPEND="
${RDEPEND}
test? (
dev-ml/mirage-block-unix
>=dev-ml/ounit-2[lwt]
)
"
RESTRICT="!test? ( test )"
REQUIRED_USE="
test? ( mirage unix )
"
src_compile() {
local pkgs="tar"
for u in mirage unix ; do
if use ${u} ; then
pkgs="${pkgs},tar-${u}"
fi
done
dune build -p "${pkgs}" -j $(makeopts_jobs) || die
}
src_install() {
dune_src_install tar
use mirage && dune_src_install tar-mirage
use unix && dune_src_install tar-unix
}