diff --git a/dev-ml/pci/Manifest b/dev-ml/pci/Manifest new file mode 100644 index 0000000000..7dc425435c --- /dev/null +++ b/dev-ml/pci/Manifest @@ -0,0 +1 @@ +DIST pci-1.0.1.tar.gz 71886 BLAKE2B f01544daab4156ca3c03e97aa9a16bcd054813f299e6b32c2de314a1b90f5a54bae814fb9f685049240a1231899c58b9b961a56ba1fd2897a8a9882bf10e90f3 SHA512 814d189d3cdea73363982b6c4e9dd1aa8678f40883e74da7bd65c9ac0a6c2ac069d28f56b056e7f7e10ad5d800a0323888afcb161448f6a1b1408a826440471b diff --git a/dev-ml/pci/metadata.xml b/dev-ml/pci/metadata.xml new file mode 100644 index 0000000000..784a8e785a --- /dev/null +++ b/dev-ml/pci/metadata.xml @@ -0,0 +1,11 @@ + + + + + lssndrbarbieri@gmail.com + Alessandro Barbieri + + + simonjbeaumont/ocaml-pci + + diff --git a/dev-ml/pci/pci-1.0.1.ebuild b/dev-ml/pci/pci-1.0.1.ebuild new file mode 100644 index 0000000000..070a12855c --- /dev/null +++ b/dev-ml/pci/pci-1.0.1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit findlib opam + +MY_P="ocaml-${P}" + +DESCRIPTION="OCaml bindings to libpci using Ctypes" +HOMEPAGE="https://github.com/simonjbeaumont/ocaml-pci" +SRC_URI="https://github.com/simonjbeaumont/ocaml-pci/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="LGPL-2.1-with-linking-exception" +SLOT="0/${PV}" +KEYWORDS="~amd64" +IUSE="test" + +RDEPEND=" + sys-apps/pciutils + dev-ml/ocaml-ctypes +" +DEPEND=" + ${RDEPEND} + dev-ml/ounit +" + +RESTRICT="!test? ( test )" +OPAM_FILE=opam + +src_configure() { + myconf=( + $(usex test '--enable-test' '') + --prefix "/usr" + --destdir "${D}" + --libdir "/usr/$(get_libdir)" + --docdir "/usr/share/doc/${PF}" + --htmldir "/usr/share/doc/${PF}/html" + --override debug false + --override is_native $(usex ocamlopt true false) + ) + ./configure "${myconf[@]}" || die +} + +src_compile() { + emake + use test && emake test +} + +src_install() { + findlib_src_preinst + emake install +} + +src_test() { + opam_src_test +}