commit:     216c94add051b5fb61539b5e444ada5c6c023636
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  8 22:04:54 2023 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Wed Feb  8 22:17:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=216c94ad

dev-ml/ppx_inline_test: patch for newest ppxlib

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 .../files/ppx_inline_test-0.15.0-pr39.patch        | 23 ++++++++++++++++++
 .../ppx_inline_test-0.15.0-r3.ebuild               | 28 ++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/dev-ml/ppx_inline_test/files/ppx_inline_test-0.15.0-pr39.patch 
b/dev-ml/ppx_inline_test/files/ppx_inline_test-0.15.0-pr39.patch
new file mode 100644
index 000000000000..39c5a9c8ca0a
--- /dev/null
+++ b/dev-ml/ppx_inline_test/files/ppx_inline_test-0.15.0-pr39.patch
@@ -0,0 +1,23 @@
+From 99e6e5819118c3ebf06bccc879a15175b9221148 Mon Sep 17 00:00:00 2001
+From: Carl Eastlund <[email protected]>
+Date: Thu, 19 Jan 2023 12:25:16 -0500
+Subject: [PATCH] Stop using [Ppxlib.File_path].
+
+Signed-off-by: Carl Eastlund <[email protected]>
+---
+ src/ppx_inline_test.ml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ppx_inline_test.ml b/src/ppx_inline_test.ml
+index 7f2e854..37c9791 100644
+--- a/src/ppx_inline_test.ml
++++ b/src/ppx_inline_test.ml
+@@ -82,7 +82,7 @@ let rec short_desc_of_expr ~max_len e =
+ ;;
+ 
+ let descr ~(loc:Location.t) ?(inner_loc=loc) e_opt id_opt =
+-  let filename  = File_path.get_default_path loc                 in
++  let filename  = loc.loc_start.pos_fname                        in
+   let line      = loc.loc_start.pos_lnum                         in
+   let start_pos = loc.loc_start.pos_cnum - loc.loc_start.pos_bol in
+   let end_pos   = inner_loc.Location.loc_end.pos_cnum - loc.loc_start.pos_bol 
in

diff --git a/dev-ml/ppx_inline_test/ppx_inline_test-0.15.0-r3.ebuild 
b/dev-ml/ppx_inline_test/ppx_inline_test-0.15.0-r3.ebuild
new file mode 100644
index 000000000000..c54ad31da8b2
--- /dev/null
+++ b/dev-ml/ppx_inline_test/ppx_inline_test-0.15.0-r3.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit dune
+
+DESCRIPTION="Syntax extension for writing in-line tests in ocaml code"
+HOMEPAGE="https://github.com/janestreet/ppx_inline_test";
+SRC_URI="https://github.com/janestreet/${PN}/archive/v${PV}.tar.gz
+       -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="+ocamlopt"
+
+# https://bugs.gentoo.org/749291#c2
+RESTRICT="test"
+
+RDEPEND="
+       >=dev-ml/ppxlib-0.29.0:=
+       dev-ml/base:=
+       dev-ml/time_now:${SLOT}
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-pr39.patch )

Reply via email to