commit:     a1985ce68bf3a5cdcf72cf3f000ecdafcd0acd5e
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 23 08:04:53 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Thu Feb 23 09:15:49 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1985ce6

dev-ml/mtime: Initial import. Ebuild by me.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-ml/mtime/Manifest                 |  1 +
 dev-ml/mtime/files/firstinstall.patch | 13 ++++++++++
 dev-ml/mtime/metadata.xml             |  8 ++++++
 dev-ml/mtime/mtime-0.8.4.ebuild       | 49 +++++++++++++++++++++++++++++++++++
 4 files changed, 71 insertions(+)

diff --git a/dev-ml/mtime/Manifest b/dev-ml/mtime/Manifest
new file mode 100644
index 0000000000..d4cd096f59
--- /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 0000000000..4a7ca69602
--- /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 0000000000..ffac4d7ebc
--- /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>[email protected]</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 0000000000..d80d2c83ad
--- /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
+}

Reply via email to