diff options
author | Alexis Ballier <aballier@gentoo.org> | 2017-02-23 09:04:53 +0100 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2017-02-23 10:15:49 +0100 |
commit | a1985ce68bf3a5cdcf72cf3f000ecdafcd0acd5e (patch) | |
tree | b3bfcd6319bce04bb7d138ddecfd20e0e0cbedbc | |
parent | dev-ml/gen_js_api: Add proper subslot (diff) | |
download | gentoo-a1985ce68bf3a5cdcf72cf3f000ecdafcd0acd5e.tar.gz gentoo-a1985ce68bf3a5cdcf72cf3f000ecdafcd0acd5e.tar.bz2 gentoo-a1985ce68bf3a5cdcf72cf3f000ecdafcd0acd5e.zip |
dev-ml/mtime: Initial import. Ebuild by me.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
-rw-r--r-- | dev-ml/mtime/Manifest | 1 | ||||
-rw-r--r-- | dev-ml/mtime/files/firstinstall.patch | 13 | ||||
-rw-r--r-- | dev-ml/mtime/metadata.xml | 8 | ||||
-rw-r--r-- | dev-ml/mtime/mtime-0.8.4.ebuild | 49 |
4 files changed, 71 insertions, 0 deletions
diff --git a/dev-ml/mtime/Manifest b/dev-ml/mtime/Manifest new file mode 100644 index 000000000000..d4cd096f59eb --- /dev/null +++ b/dev-ml/mtime/Manifest @@ -0,0 +1 @@ +DIST mtime-0.8.4.tbz 11705 SHA256 b0a1eb1fb2d30e413ab24f5261e099881cadbac5af440f53f2544e3a9846b5a9 SHA512 fc08df2abc3500d18db3c4bb9a67336b902483da24056fac2c9f0b4c93ac8860c29a59b47c1ade62f6f5b51ac32c7d16e31d5c9f8cb51900accf73ddeaf6d307 WHIRLPOOL 543168a929e4eaf158cd05420f9139664a4289c5ae1e69bf9081f842d97b08182c99dc3ac82b242afca4067f69b1efc53fb11c116056162871f59b988be2a8d5 diff --git a/dev-ml/mtime/files/firstinstall.patch b/dev-ml/mtime/files/firstinstall.patch new file mode 100644 index 000000000000..4a7ca696021c --- /dev/null +++ b/dev-ml/mtime/files/firstinstall.patch @@ -0,0 +1,13 @@ +Index: mtime-0.8.4/myocamlbuild.ml +=================================================================== +--- mtime-0.8.4.orig/myocamlbuild.ml ++++ mtime-0.8.4/myocamlbuild.ml +@@ -34,7 +34,7 @@ let () = + flag ["library"; "ocaml"; "byte"; "record_mtime_os_stubs"] + (S ([A "-dllib"; A "-lmtime_stubs"] @ system_support_lib)); + flag ["library"; "ocaml"; (* byte and native *) "record_mtime_os_stubs"] +- (S ([A "-cclib"; A "-lmtime_stubs"] @ system_support_lib)); ++ (S ([A "-cclib"; A "-Lsrc-os"; A "-cclib"; A "-lmtime_stubs"] @ system_support_lib)); + + ocaml_lib ~tag_name:"use_mtime_os" ~dir:"src-os" "src-os/mtime"; + flag ["link"; "ocaml"; "use_mtime_os"] (S [A "-ccopt"; A "-Lsrc-os"]); diff --git a/dev-ml/mtime/metadata.xml b/dev-ml/mtime/metadata.xml new file mode 100644 index 000000000000..ffac4d7ebc01 --- /dev/null +++ b/dev-ml/mtime/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>ml@gentoo.org</email> + <name>Gentoo ML Project</name> +</maintainer> +</pkgmetadata> diff --git a/dev-ml/mtime/mtime-0.8.4.ebuild b/dev-ml/mtime/mtime-0.8.4.ebuild new file mode 100644 index 000000000000..d80d2c83ad3e --- /dev/null +++ b/dev-ml/mtime/mtime-0.8.4.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils + +DESCRIPTION="OCaml module to access monotonic wall-clock time" +HOMEPAGE="http://erratique.ch/software/mtime https://github.com/dbuenzli/mtime" +SRC_URI="http://erratique.ch/software/mtime/releases/${P}.tbz" + +LICENSE="ISC" +SLOT="0/${PV}" +KEYWORDS="~amd64" +IUSE="javascript test" + +RDEPEND="dev-lang/ocaml:=[ocamlopt] + javascript? ( dev-ml/js_of_ocaml:= ) +" +DEPEND="${RDEPEND} + dev-ml/opam + dev-ml/topkg + dev-ml/ocamlbuild + dev-ml/findlib" + +src_prepare() { + epatch "${FILESDIR}/firstinstall.patch" +} + +src_compile() { + ocaml pkg/pkg.ml build \ + --with-js_of_ocaml $(usex javascript true false) \ + --tests $(usex test true false) \ + || die +} + +src_test() { + ocaml pkg/pkg.ml test || die +} + +src_install() { + opam-installer -i \ + --prefix="${ED}/usr" \ + --libdir="${D}/$(ocamlc -where)" \ + --docdir="${ED}/usr/share/doc/${PF}" \ + ${PN}.install || die + dodoc CHANGES.md README.md +} |