summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-ml/ppx_fields_conv/Manifest1
-rw-r--r--dev-ml/ppx_fields_conv/files/ppx_fields_conv-0.14.1-ppxlib-0.18.0.patch60
-rw-r--r--dev-ml/ppx_fields_conv/metadata.xml5
-rw-r--r--dev-ml/ppx_fields_conv/ppx_fields_conv-0.14.1.ebuild26
4 files changed, 91 insertions, 1 deletions
diff --git a/dev-ml/ppx_fields_conv/Manifest b/dev-ml/ppx_fields_conv/Manifest
index b9d9329abf20..61f525af8478 100644
--- a/dev-ml/ppx_fields_conv/Manifest
+++ b/dev-ml/ppx_fields_conv/Manifest
@@ -1 +1,2 @@
+DIST ppx_fields_conv-0.14.1.tar.gz 14348 BLAKE2B 09bd2db4dab314ba50bcd5566c4ba4fd834fc34ba15be2132d5cbe3c27e5c76e37b4cccd3bc4cc4a5bd930f95215f6100557b89e44d54e906e382381be1fe257 SHA512 afd0f16b851e2984e46ac1d9347268a1cdb9a9054ea18435a5030dd512ba56f97b54639cc6cc6254498ca3fd2fa4d5c0053c7f2ceddd531ebbd9afef5b5f3e3d
DIST ppx_fields_conv-0.9.0.tar.gz 15171 BLAKE2B 5a0051a1b362dcf15ddd4ec4f3f6f4df6d709a8c2709222a2d2502eb12b8728fb28ce9213a1789270d30505c6084ab8203dc7b49d7043d9820aabb0cc74c51c2 SHA512 1edcd7076c1dbba84b86f05624b3792404b24ae4414ee0c3b32dcfc998da77a2a9d52d063fefc24be21d98472d6f58880c37ac29c610fb5b8a401224fc654ec1
diff --git a/dev-ml/ppx_fields_conv/files/ppx_fields_conv-0.14.1-ppxlib-0.18.0.patch b/dev-ml/ppx_fields_conv/files/ppx_fields_conv-0.14.1-ppxlib-0.18.0.patch
new file mode 100644
index 000000000000..23b5a8be82c2
--- /dev/null
+++ b/dev-ml/ppx_fields_conv/files/ppx_fields_conv-0.14.1-ppxlib-0.18.0.patch
@@ -0,0 +1,60 @@
+commit f3c6846ad9015de0adb44f519ff010ff0ed51180 (HEAD, origin/upgrade-ppxlib-0.18.0)
+Author: Nathan Rebours <nathan.p.rebours@gmail.com>
+Date: Mon Oct 5 18:20:23 2020 +0200
+
+ Make ppx_fields_conv compatible with ppxlib.0.18.0
+
+ ppxlib.0.18.0 upgrades to the 4.11 AST which results in a change
+ in string constants representation. This PR makes ppx_fields_conv
+ compatible with the latest ppxlib.
+
+ You might want for the actual release of ppxlib.0.18.0 before merging
+ this!
+
+ Signed-off-by: Nathan Rebours <nathan.p.rebours@gmail.com>
+
+diff --git a/ppx_fields_conv.opam b/ppx_fields_conv.opam
+index 91a9692..3e2d24a 100644
+--- a/ppx_fields_conv.opam
++++ b/ppx_fields_conv.opam
+@@ -15,7 +15,7 @@ depends: [
+ "base" {>= "v0.14" & < "v0.15"}
+ "fieldslib" {>= "v0.14" & < "v0.15"}
+ "dune" {>= "2.0.0"}
+- "ppxlib" {>= "0.14.0"}
++ "ppxlib" {>= "0.18.0"}
+ ]
+ synopsis: "Generation of accessor and iteration functions for ocaml records"
+ description: "
+diff --git a/src/ppx_fields_conv.ml b/src/ppx_fields_conv.ml
+index 130e82b..87752cb 100644
+--- a/src/ppx_fields_conv.ml
++++ b/src/ppx_fields_conv.ml
+@@ -34,9 +34,6 @@ let check_no_collision =
+
+ module A = struct (* Additional AST construction helpers *)
+
+- let exp_string : (loc:Location.t -> string -> expression) = fun ~loc s ->
+- pexp_constant ~loc (Pconst_string (s,None))
+-
+ let pat_name : (loc:Location.t -> string -> pattern) = fun ~loc name ->
+ ppat_var ~loc (Loc.make name ~loc)
+
+@@ -440,7 +437,7 @@ module Gen_struct = struct
+ [%expr
+ Fieldslib.Field.Field { Fieldslib.Field.For_generated_code.
+ force_variance = (fun (_ : [%t perm]) -> ());
+- name = [%e A.exp_string ~loc name];
++ name = [%e estring ~loc name];
+ getter = [%e A.exp_name ~loc name];
+ setter = [%e setter_field];
+ fset = [%e fset];}]
+@@ -725,7 +722,7 @@ module Gen_struct = struct
+ let getter_and_setters, fields = gen_fields ~private_ ~loc labdecs in
+ let create = creation_fun ~loc record_name labdecs in
+ let simple_create = simple_creation_fun ~loc record_name labdecs in
+- let names = List.map (Inspect.field_names labdecs) ~f:(A.exp_string ~loc) in
++ let names = List.map (Inspect.field_names labdecs) ~f:(estring ~loc) in
+ let fields_module =
+ if String.equal record_name "t" then "Fields" else "Fields_of_" ^ record_name
+ in
diff --git a/dev-ml/ppx_fields_conv/metadata.xml b/dev-ml/ppx_fields_conv/metadata.xml
index 69d1f03f1b85..06458282b1c0 100644
--- a/dev-ml/ppx_fields_conv/metadata.xml
+++ b/dev-ml/ppx_fields_conv/metadata.xml
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person">
+ <email>gienah@gentoo.org</email>
+ <name>Mark Wright</name>
+ </maintainer>
<upstream>
<remote-id type="github">janestreet/ppx_fields_conv</remote-id>
</upstream>
diff --git a/dev-ml/ppx_fields_conv/ppx_fields_conv-0.14.1.ebuild b/dev-ml/ppx_fields_conv/ppx_fields_conv-0.14.1.ebuild
new file mode 100644
index 000000000000..efa7ded5042e
--- /dev/null
+++ b/dev-ml/ppx_fields_conv/ppx_fields_conv-0.14.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit dune
+
+DESCRIPTION="Generation of accessor and iteration functions for ocaml records"
+HOMEPAGE="https://github.com/janestreet/ppx_fields_conv"
+SRC_URI="https://github.com/janestreet/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="+ocamlopt"
+
+DEPEND="
+ dev-ml/base:=
+ dev-ml/fieldslib:=
+ >=dev-ml/ppxlib-0.18.0:=
+ dev-ml/ocaml-migrate-parsetree:=
+ dev-ml/result:=
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-ppxlib-0.18.0.patch )