* [gentoo-commits] repo/gentoo:master commit in: dev-ml/ppx_deriving_yojson/, dev-ml/ppx_deriving_yojson/files/
@ 2017-07-13 22:26 Alexis Ballier
0 siblings, 0 replies; 2+ messages in thread
From: Alexis Ballier @ 2017-07-13 22:26 UTC (permalink / raw
To: gentoo-commits
commit: 844662b66f65e88ea8bce1d33108599f4fe6a7e4
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 13 22:22:57 2017 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Thu Jul 13 22:26:19 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=844662b6
dev-ml/ppx_deriving_yojson: fix build with ocaml 4.05
Package-Manager: Portage-2.3.6, Repoman-2.3.2
dev-ml/ppx_deriving_yojson/files/ocaml405.patch | 76 ++++++++++++++++++++++
.../ppx_deriving_yojson-3.0.ebuild | 8 ++-
2 files changed, 83 insertions(+), 1 deletion(-)
diff --git a/dev-ml/ppx_deriving_yojson/files/ocaml405.patch b/dev-ml/ppx_deriving_yojson/files/ocaml405.patch
new file mode 100644
index 00000000000..33440fabdd1
--- /dev/null
+++ b/dev-ml/ppx_deriving_yojson/files/ocaml405.patch
@@ -0,0 +1,76 @@
+Index: ppx_deriving_yojson-3.0/src/ppx_deriving_yojson.cppo.ml
+===================================================================
+--- ppx_deriving_yojson-3.0.orig/src/ppx_deriving_yojson.cppo.ml
++++ ppx_deriving_yojson-3.0/src/ppx_deriving_yojson.cppo.ml
+@@ -260,7 +260,7 @@ let ser_str_of_type ~options ~path ({ pt
+ let polymorphize_ser = Ppx_deriving.poly_arrow_of_type_decl
+ (fun var -> [%type: [%t var] -> Yojson.Safe.json]) type_decl
+ in
+- let ty = Typ.poly poly_vars (polymorphize_ser [%type: [%t typ] -> Yojson.Safe.json]) in
++ let ty = Typ.poly (List.map Location.mknoloc poly_vars) (polymorphize_ser [%type: [%t typ] -> Yojson.Safe.json]) in
+ let default_fun =
+ let type_path = String.concat "." (path @ [type_decl.ptype_name.txt]) in
+ let e_type_path = Exp.constant (Pconst_string (type_path, None)) in
+@@ -270,7 +270,7 @@ let ser_str_of_type ~options ~path ({ pt
+ in
+ let poly_fun = polymorphize default_fun in
+ let poly_fun =
+- (Ppx_deriving.fold_left_type_decl (fun exp name -> Exp.newtype name exp) poly_fun type_decl)
++ (Ppx_deriving.fold_left_type_decl (fun exp name -> Exp.newtype (Location.mknoloc name) exp) poly_fun type_decl)
+ in
+ let mod_name = "M_"^to_yojson_name in
+ let typ = Type.mk ~kind:(Ptype_record [Type.field ~mut:Mutable (mknoloc "f") ty])
+@@ -337,7 +337,7 @@ let ser_str_of_type ~options ~path ({ pt
+ raise_errorf ~loc "%s cannot be derived for fully abstract types" deriver
+ in
+ let ty = ser_type_of_decl ~options ~path type_decl in
+- let fv = Ppx_deriving.free_vars_in_core_type ty in
++ let fv = List.map Location.mknoloc (Ppx_deriving.free_vars_in_core_type ty) in
+ let poly_type = Typ.force_poly @@ Typ.poly fv @@ ty in
+ let var = pvar (Ppx_deriving.mangle_type_decl (`Suffix "to_yojson") type_decl) in
+ ([],
+@@ -431,7 +431,7 @@ let desu_str_of_type ~options ~path ({ p
+ raise_errorf ~loc "%s: extensible type manifest should be a type name" deriver
+ | None ->
+ let poly_vars = List.rev
+- (Ppx_deriving.fold_left_type_decl (fun acc name -> name :: acc) [] type_decl)
++ (List.map Location.mknoloc (Ppx_deriving.fold_left_type_decl (fun acc name -> name :: acc) [] type_decl))
+ in
+ let polymorphize_desu = Ppx_deriving.poly_arrow_of_type_decl
+ (fun var -> [%type: Yojson.Safe.json -> [%t error_or var]]) type_decl in
+@@ -441,7 +441,7 @@ let desu_str_of_type ~options ~path ({ p
+ let default_fun = Exp.function_ [Exp.case [%pat? _] top_error] in
+ let poly_fun = polymorphize default_fun in
+ let poly_fun =
+- (Ppx_deriving.fold_left_type_decl (fun exp name -> Exp.newtype name exp) poly_fun type_decl)
++ (Ppx_deriving.fold_left_type_decl (fun exp name -> Exp.newtype (Location.mknoloc name) exp) poly_fun type_decl)
+ in
+ let mod_name = "M_"^of_yojson_name in
+ let typ = Type.mk ~kind:(Ptype_record [Type.field ~mut:Mutable (mknoloc "f") ty])
+@@ -514,7 +514,7 @@ let desu_str_of_type ~options ~path ({ p
+ raise_errorf ~loc "%s cannot be derived for fully abstract types" deriver
+ in
+ let ty = desu_type_of_decl ~options ~path type_decl in
+- let fv = Ppx_deriving.free_vars_in_core_type ty in
++ let fv = List.map Location.mknoloc (Ppx_deriving.free_vars_in_core_type ty) in
+ let poly_type = Typ.force_poly @@ Typ.poly fv @@ ty in
+ let var = pvar (Ppx_deriving.mangle_type_decl (`Suffix "of_yojson") type_decl) in
+ ([],
+@@ -579,7 +579,7 @@ let ser_sig_of_type ~options ~path type_
+ (`PrefixSuffix ("M", "to_yojson")) type_decl
+ in
+ let poly_vars = List.rev
+- (Ppx_deriving.fold_left_type_decl (fun acc name -> name :: acc) [] type_decl)
++ (List.map Location.mknoloc (Ppx_deriving.fold_left_type_decl (fun acc name -> name :: acc) [] type_decl))
+ in
+ let typ = Ppx_deriving.core_type_of_type_decl type_decl in
+ let polymorphize_ser = Ppx_deriving.poly_arrow_of_type_decl
+@@ -614,7 +614,7 @@ let desu_sig_of_type ~options ~path type
+ (`PrefixSuffix ("M", "of_yojson")) type_decl
+ in
+ let poly_vars = List.rev
+- (Ppx_deriving.fold_left_type_decl (fun acc name -> name :: acc) [] type_decl)
++ (List.map Location.mknoloc (Ppx_deriving.fold_left_type_decl (fun acc name -> name :: acc) [] type_decl))
+ in
+ let typ = Ppx_deriving.core_type_of_type_decl type_decl in
+ let polymorphize_desu = Ppx_deriving.poly_arrow_of_type_decl
diff --git a/dev-ml/ppx_deriving_yojson/ppx_deriving_yojson-3.0.ebuild b/dev-ml/ppx_deriving_yojson/ppx_deriving_yojson-3.0.ebuild
index c6b55db684d..f2a359e3470 100644
--- a/dev-ml/ppx_deriving_yojson/ppx_deriving_yojson-3.0.ebuild
+++ b/dev-ml/ppx_deriving_yojson/ppx_deriving_yojson-3.0.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
+inherit eutils
+
DESCRIPTION="A Yojson codec generator for OCaml"
HOMEPAGE="https://github.com/whitequark/ppx_deriving_yojson/"
SRC_URI="https://github.com/whitequark/ppx_deriving_yojson/archive/v${PV}.tar.gz -> ${P}.tar.gz"
@@ -25,6 +27,10 @@ DEPEND="${DEPEND}
dev-ml/ocamlbuild
test? ( dev-ml/ounit dev-ml/ppx_import )"
+src_prepare() {
+ has_version '>=dev-lang/ocaml-4.05_rc' && epatch "${FILESDIR}/ocaml405.patch"
+}
+
src_compile() {
cp pkg/META.in pkg/META
ocaml pkg/build.ml \
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-ml/ppx_deriving_yojson/, dev-ml/ppx_deriving_yojson/files/
@ 2021-12-03 2:49 Maciej Barć
0 siblings, 0 replies; 2+ messages in thread
From: Maciej Barć @ 2021-12-03 2:49 UTC (permalink / raw
To: gentoo-commits
commit: b3b6632b81a39255e67621bad656630d5eadd3ad
Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 3 02:49:04 2021 +0000
Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Fri Dec 3 02:49:14 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3b6632b
dev-ml/ppx_deriving_yojson: new package; add version 3.6.1
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
dev-ml/ppx_deriving_yojson/Manifest | 1 +
...eriving_yojson-3.6.1-src_test_dune-ounit2.patch | 12 ++++++++++
dev-ml/ppx_deriving_yojson/metadata.xml | 13 +++++++++++
.../ppx_deriving_yojson-3.6.1.ebuild | 27 ++++++++++++++++++++++
4 files changed, 53 insertions(+)
diff --git a/dev-ml/ppx_deriving_yojson/Manifest b/dev-ml/ppx_deriving_yojson/Manifest
new file mode 100644
index 000000000000..3474db68ca3e
--- /dev/null
+++ b/dev-ml/ppx_deriving_yojson/Manifest
@@ -0,0 +1 @@
+DIST ppx_deriving_yojson-3.6.1.tar.gz 19477 BLAKE2B f7b4e34e1c5ca77af6dbe6f4639c00a3b47076e2cf1f79b157a4c8f9aef34ec0e95e2c6c805fe9d0f9fa0ec72ea0672696b7e7a21d0a7d93764fad2e8d89a15a SHA512 b1bf04f77e1c1a887352b21cfd43a67d37de9f61a70f89d06828c7d9611027711a600b22e4bbc95ab128511a48fce3ae1a1c7a655f25c4bb2b6944444cea4989
diff --git a/dev-ml/ppx_deriving_yojson/files/ppx_deriving_yojson-3.6.1-src_test_dune-ounit2.patch b/dev-ml/ppx_deriving_yojson/files/ppx_deriving_yojson-3.6.1-src_test_dune-ounit2.patch
new file mode 100644
index 000000000000..ad27a24d39f1
--- /dev/null
+++ b/dev-ml/ppx_deriving_yojson/files/ppx_deriving_yojson-3.6.1-src_test_dune-ounit2.patch
@@ -0,0 +1,12 @@
+diff --git a/src_test/dune b/src_test/dune_
+index f7a8440..d5337c5 100644
+--- a/src_test/dune
++++ b/src_test/dune_
+@@ -1,6 +1,6 @@
+ (executable
+ (name test_ppx_yojson)
+- (libraries oUnit result)
++ (libraries ounit2 result)
+ (preprocess (pps ppx_deriving.show ppx_deriving_yojson))
+ (flags (:standard -w -9-39-27-34-37)))
+
diff --git a/dev-ml/ppx_deriving_yojson/metadata.xml b/dev-ml/ppx_deriving_yojson/metadata.xml
new file mode 100644
index 000000000000..3db44a512450
--- /dev/null
+++ b/dev-ml/ppx_deriving_yojson/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ml@gentoo.org</email>
+ <name>ML</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://github.com/ocaml-ppx/ppx_deriving_yojson/issues</bugs-to>
+ <remote-id type="github">ocaml-ppx/ppx_deriving_yojson</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-ml/ppx_deriving_yojson/ppx_deriving_yojson-3.6.1.ebuild b/dev-ml/ppx_deriving_yojson/ppx_deriving_yojson-3.6.1.ebuild
new file mode 100644
index 000000000000..603d1909b88f
--- /dev/null
+++ b/dev-ml/ppx_deriving_yojson/ppx_deriving_yojson-3.6.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit dune
+
+DESCRIPTION="JSON codec generator for OCaml"
+HOMEPAGE="https://github.com/ocaml-ppx/ppx_deriving_yojson/"
+SRC_URI="https://github.com/ocaml-ppx/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="+ocamlopt test"
+RESTRICT="!test? ( test )"
+
+PATCHES=( "${FILESDIR}"/${PN}-${PV}-src_test_dune-ounit2.patch )
+
+RDEPEND="
+ <dev-ml/yojson-2.0.0:=
+ >=dev-ml/ppxlib-0.20.0:=
+ dev-ml/ppx_deriving:=
+ dev-ml/result:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="test? ( dev-ml/ounit2 )"
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-03 2:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-13 22:26 [gentoo-commits] repo/gentoo:master commit in: dev-ml/ppx_deriving_yojson/, dev-ml/ppx_deriving_yojson/files/ Alexis Ballier
-- strict thread matches above, loose matches on Subject: below --
2021-12-03 2:49 Maciej Barć
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox