public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-ml/alcotest/files/, dev-ml/alcotest/
@ 2024-07-13  9:26 Alfredo Tupone
  0 siblings, 0 replies; only message in thread
From: Alfredo Tupone @ 2024-07-13  9:26 UTC (permalink / raw
  To: gentoo-commits

commit:     d9e4f880a0c5c291654237dae6a8f2fecbc314e4
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 13 09:24:20 2024 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sat Jul 13 09:25:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9e4f880

dev-ml/alcotest: build with dev-ml/core-0.16+

Patch from: Alain Emilia Anna Zscheile

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-ml/alcotest/alcotest-1.7.0-r1.ebuild           | 45 ++++++++++++++++++++
 .../files/alcotest-1.7.0-time_float_unix.patch     | 49 ++++++++++++++++++++++
 dev-ml/alcotest/metadata.xml                       |  4 ++
 3 files changed, 98 insertions(+)

diff --git a/dev-ml/alcotest/alcotest-1.7.0-r1.ebuild b/dev-ml/alcotest/alcotest-1.7.0-r1.ebuild
new file mode 100644
index 000000000000..d4859697c59c
--- /dev/null
+++ b/dev-ml/alcotest/alcotest-1.7.0-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit dune
+
+DESCRIPTION="A lightweight and colourful test framework"
+HOMEPAGE="https://github.com/mirage/alcotest/"
+SRC_URI="https://github.com/mirage/alcotest/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="+ocamlopt"
+
+RDEPEND="
+	dev-ml/astring:=
+	dev-ml/async:=[ocamlopt?]
+	dev-ml/async_kernel:=[ocamlopt?]
+	>=dev-ml/async_unix-0.15.0:=[ocamlopt?]
+	dev-ml/base:=[ocamlopt?]
+	dev-ml/cmdliner:=[ocamlopt?]
+	>=dev-ml/core-0.15.0:=[ocamlopt?]
+	>=dev-ml/core_unix-0.15.0:=[ocamlopt?]
+	dev-ml/duration:=[ocamlopt?]
+	dev-ml/fmt:=[ocamlopt?]
+	dev-ml/lwt:=[ocamlopt?]
+	dev-ml/mirage-clock:=[ocamlopt?]
+	dev-ml/re:=[ocamlopt?]
+	dev-ml/result:=[ocamlopt?]
+	dev-ml/logs:=[ocamlopt?]
+	dev-ml/uutf:=[ocamlopt?]
+	dev-ml/uuidm:=[ocamlopt?]
+"
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-ml/dune-3.0"
+
+src_prepare() {
+	default
+
+	if has_version '>=dev-ml/core_unix-0.16.0' ; then
+		eapply "${FILESDIR}"/${P}-time_float_unix.patch
+	fi
+}

diff --git a/dev-ml/alcotest/files/alcotest-1.7.0-time_float_unix.patch b/dev-ml/alcotest/files/alcotest-1.7.0-time_float_unix.patch
new file mode 100644
index 000000000000..cb54fb280a43
--- /dev/null
+++ b/dev-ml/alcotest/files/alcotest-1.7.0-time_float_unix.patch
@@ -0,0 +1,49 @@
+This fixes the following errors:
+Error: The module Time_unix.Span is an alias for module Time_float_unix.Span, which is missing
+Error: Unbound module Time_float_unix
+---
+diff --git a/src/alcotest-async/alcotest_async.ml b/src/alcotest-async/alcotest_async.ml
+index 97ed610..b6a826f 100644
+--- a/src/alcotest-async/alcotest_async.ml
++++ b/src/alcotest-async/alcotest_async.ml
+@@ -7,7 +7,7 @@ let run_test timeout name fn args =
+   | `Timeout ->
+       Alcotest.fail
+         (Printf.sprintf "%s timed out after %s" name
+-           (Time_unix.Span.to_string_hum timeout))
++           (Time_float_unix.Span.to_string_hum timeout))
+ 
+ module Promise = struct
+   include Deferred
+@@ -24,7 +24,7 @@ module V1 = struct
+ 
+   let test_case_sync n s f = test_case n s (fun x -> Deferred.return (f x))
+ 
+-  let test_case ?(timeout = Time_unix.Span.of_sec 2.) name s f =
++  let test_case ?(timeout = Time_float_unix.Span.of_sec 2.) name s f =
+     test_case name s (run_test timeout name f)
+ end
+ 
+diff --git a/src/alcotest-async/alcotest_async_intf.ml b/src/alcotest-async/alcotest_async_intf.ml
+index 27df58c..baa55cd 100644
+--- a/src/alcotest-async/alcotest_async_intf.ml
++++ b/src/alcotest-async/alcotest_async_intf.ml
+@@ -2,7 +2,7 @@ module type V1 = sig
+   include Alcotest_engine.V1.Cli.S with type return = unit Async.Deferred.t
+ 
+   val test_case :
+-    ?timeout:Time_unix.Span.t ->
++    ?timeout:Time_float_unix.Span.t ->
+     string ->
+     Alcotest.speed_level ->
+     ('a -> unit Async.Deferred.t) ->
+diff --git a/src/alcotest-async/dune b/src/alcotest-async/dune
+index 9497c26..52ab50c 100644
+--- a/src/alcotest-async/dune
++++ b/src/alcotest-async/dune
+@@ -9,4 +9,4 @@
+   async_unix
+   base
+   core
+-  core_unix.time_unix))
++  core_unix.time_float_unix))

diff --git a/dev-ml/alcotest/metadata.xml b/dev-ml/alcotest/metadata.xml
index 33063c514b9c..f6ce5fdda9c8 100644
--- a/dev-ml/alcotest/metadata.xml
+++ b/dev-ml/alcotest/metadata.xml
@@ -1,6 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
+	<maintainer type="person">
+		<email>fogti+devel@ytrizja.de</email>
+		<name>Alain Emilia Anna Zscheile</name>
+	</maintainer>
 	<maintainer type="project">
 		<email>ml@gentoo.org</email>
 		<name>ML</name>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-13  9:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-13  9:26 [gentoo-commits] repo/gentoo:master commit in: dev-ml/alcotest/files/, dev-ml/alcotest/ Alfredo Tupone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox