summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2016-05-03 16:08:11 +0200
committerAlexis Ballier <aballier@gentoo.org>2016-05-03 16:17:38 +0200
commit9a34654a3ba90fde69401627faf0891d0455d7ed (patch)
treedda1889130bb690e403f54527d6db3f14d59e3fa /dev-ml/ppx_custom_printf
parentdev-ml/ppx_inline_test: fix build with ocaml 4.03 (diff)
downloadgentoo-9a34654a3ba90fde69401627faf0891d0455d7ed.tar.gz
gentoo-9a34654a3ba90fde69401627faf0891d0455d7ed.tar.bz2
gentoo-9a34654a3ba90fde69401627faf0891d0455d7ed.zip
dev-ml/ppx_custom_printf: fix build with ocaml 4.03
Package-Manager: portage-2.2.28 Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'dev-ml/ppx_custom_printf')
-rw-r--r--dev-ml/ppx_custom_printf/files/oc43.patch145
-rw-r--r--dev-ml/ppx_custom_printf/ppx_custom_printf-113.33.00.ebuild6
2 files changed, 150 insertions, 1 deletions
diff --git a/dev-ml/ppx_custom_printf/files/oc43.patch b/dev-ml/ppx_custom_printf/files/oc43.patch
new file mode 100644
index 000000000000..959a4be2ac1d
--- /dev/null
+++ b/dev-ml/ppx_custom_printf/files/oc43.patch
@@ -0,0 +1,145 @@
+diff -uNr ppx_custom_printf-113.33.00/CHANGES.md ppx_custom_printf-113.33.00+4.03/CHANGES.md
+--- ppx_custom_printf-113.33.00/CHANGES.md 2016-03-09 16:44:54.000000000 +0100
++++ ppx_custom_printf-113.33.00+4.03/CHANGES.md 2016-03-22 15:13:50.000000000 +0100
+@@ -1,3 +1,7 @@
++## 113.33.00+4.03
++
++Various updates to work with OCaml 4.03.0
++
+ ## 113.24.00
+
+ - OCaml makes no distinctions between "foo" and
+diff -uNr ppx_custom_printf-113.33.00/format-lifter/META ppx_custom_printf-113.33.00+4.03/format-lifter/META
+--- ppx_custom_printf-113.33.00/format-lifter/META 2016-03-18 12:08:01.000000000 +0100
++++ ppx_custom_printf-113.33.00+4.03/format-lifter/META 2016-03-22 17:51:36.000000000 +0100
+@@ -1,6 +1,6 @@
+ # OASIS_START
+-# DO NOT EDIT (digest: 30e281114bcfdcf7ccf231691613c2e6)
+-version = "113.33.00"
++# DO NOT EDIT (digest: 2c66a1ad37be0774b6cf2393020b734d)
++version = "113.33.00+4.03"
+ description =
+ "Printf-style format-strings for user-defined string conversion"
+ archive(byte) = "ppx_format_lifter.cma"
+diff -uNr ppx_custom_printf-113.33.00/INSTALL.txt ppx_custom_printf-113.33.00+4.03/INSTALL.txt
+--- ppx_custom_printf-113.33.00/INSTALL.txt 2016-03-18 12:08:01.000000000 +0100
++++ ppx_custom_printf-113.33.00+4.03/INSTALL.txt 2016-03-22 17:51:36.000000000 +0100
+@@ -1,5 +1,5 @@
+ (* OASIS_START *)
+-(* DO NOT EDIT (digest: aa3e5a8a416bfdc4bbbd15b0bcdbfede) *)
++(* DO NOT EDIT (digest: d41a009725728d3aa9236f47b80b9b12) *)
+
+ This is the INSTALL file for the ppx_custom_printf distribution.
+
+@@ -11,7 +11,7 @@
+
+ In order to compile this package, you will need:
+
+-* ocaml (>= 4.02.3)
++* ocaml (>= 4.03.0)
+ * findlib (>= 1.3.2)
+ * ppx_core for library ppx_custom_printf
+ * ppx_driver for library ppx_custom_printf, executable ppx
+diff -uNr ppx_custom_printf-113.33.00/_oasis ppx_custom_printf-113.33.00+4.03/_oasis
+--- ppx_custom_printf-113.33.00/_oasis 2016-03-09 16:44:54.000000000 +0100
++++ ppx_custom_printf-113.33.00+4.03/_oasis 2016-03-22 15:13:50.000000000 +0100
+@@ -1,8 +1,8 @@
+ OASISFormat: 0.4
+-OCamlVersion: >= 4.02.3
++OCamlVersion: >= 4.03.0
+ FindlibVersion: >= 1.3.2
+ Name: ppx_custom_printf
+-Version: 113.33.00
++Version: 113.33.00+4.03
+ Synopsis: Printf-style format-strings for user-defined string conversion
+ Authors: Jane Street Group, LLC <opensource@janestreet.com>
+ Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@janestreet.com>
+diff -uNr ppx_custom_printf-113.33.00/opam ppx_custom_printf-113.33.00+4.03/opam
+--- ppx_custom_printf-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100
++++ ppx_custom_printf-113.33.00+4.03/opam 2016-03-22 17:51:36.000000000 +0100
+@@ -17,4 +17,4 @@
+ "ppx_sexp_conv"
+ "ppx_tools" {>= "0.99.3"}
+ ]
+-available: [ ocaml-version >= "4.02.3" ]
++available: [ ocaml-version >= "4.03.0" ]
+diff -uNr ppx_custom_printf-113.33.00/setup.ml ppx_custom_printf-113.33.00+4.03/setup.ml
+--- ppx_custom_printf-113.33.00/setup.ml 2016-03-18 12:08:01.000000000 +0100
++++ ppx_custom_printf-113.33.00+4.03/setup.ml 2016-03-22 17:51:36.000000000 +0100
+@@ -1,5 +1,5 @@
+ (* OASIS_START *)
+-(* DO NOT EDIT (digest: c9a6b21baa91c0680f8cba2e849204cf) *)
++(* DO NOT EDIT (digest: 924f534c954af21abd6099b21f46beee) *)
+ (*
+ Regenerated by OASIS v0.4.5
+ Visit http://oasis.forge.ocamlcore.org for more information and
+@@ -6666,12 +6666,12 @@
+ package =
+ {
+ oasis_version = "0.4";
+- ocaml_version = Some (OASISVersion.VGreaterEqual "4.02.3");
++ ocaml_version = Some (OASISVersion.VGreaterEqual "4.03.0");
+ findlib_version = Some (OASISVersion.VGreaterEqual "1.3.2");
+ alpha_features = [];
+ beta_features = [];
+ name = "ppx_custom_printf";
+- version = "113.33.00";
++ version = "113.33.00+4.03";
+ license =
+ OASISLicense.DEP5License
+ (OASISLicense.DEP5Unit
+@@ -6841,7 +6841,7 @@
+ };
+ oasis_fn = Some "_oasis";
+ oasis_version = "0.4.5";
+- oasis_digest = Some "Hd\2128>@-\017\228\178\138\253\228l<\r";
++ oasis_digest = Some "UJ\215>\004\182B+\173\217\151\0165\212\011,";
+ oasis_exec = None;
+ oasis_setup_args = [];
+ setup_update = false
+diff -uNr ppx_custom_printf-113.33.00/src/META ppx_custom_printf-113.33.00+4.03/src/META
+--- ppx_custom_printf-113.33.00/src/META 2016-03-18 12:08:01.000000000 +0100
++++ ppx_custom_printf-113.33.00+4.03/src/META 2016-03-22 17:51:36.000000000 +0100
+@@ -1,6 +1,6 @@
+ # OASIS_START
+-# DO NOT EDIT (digest: 2dabcf3bd944c3b9b0a168e17d64eb20)
+-version = "113.33.00"
++# DO NOT EDIT (digest: 148f0da22163c9e0ef38850349ca8160)
++version = "113.33.00+4.03"
+ description =
+ "Printf-style format-strings for user-defined string conversion"
+ requires =
+diff -uNr ppx_custom_printf-113.33.00/src/ppx_custom_printf.ml ppx_custom_printf-113.33.00+4.03/src/ppx_custom_printf.ml
+--- ppx_custom_printf-113.33.00/src/ppx_custom_printf.ml 2016-03-09 16:44:54.000000000 +0100
++++ ppx_custom_printf-113.33.00+4.03/src/ppx_custom_printf.ml 2016-03-22 15:13:50.000000000 +0100
+@@ -182,7 +182,7 @@
+ let ty = Parse.core_type lexbuf in
+ let e = Ppx_sexp_conv_expander.Sexp_of.core_type ty in
+ let arg = gen_symbol () in
+- pexp_fun ~loc "" None (pvar ~loc arg)
++ pexp_fun ~loc Nolabel None (pvar ~loc arg)
+ (eapply ~loc sexp_converter [eapply ~loc e [evar ~loc arg]])
+ | None ->
+ let fail loc =
+@@ -214,7 +214,7 @@
+ let func = pexp_ident ~loc (Located.mk ~loc to_string_id) in
+ (* Eta-expand as the to_string function might take optional arguments *)
+ let arg = gen_symbol () in
+- pexp_fun ~loc "" None (pvar ~loc arg) (eapply ~loc func [evar ~loc arg])
++ pexp_fun ~loc Nolabel None (pvar ~loc arg) (eapply ~loc func [evar ~loc arg])
+
+ class lifter ~loc ~custom_specs = object(self)
+ inherit [expression] Ppx_format_lifter.lifter as super
+@@ -296,9 +296,9 @@
+ match e.pexp_desc with
+ | Pexp_apply ({ pexp_desc = Pexp_ident { txt = Lident "!"; _ }
+ ; pexp_attributes = ident_attrs; _ },
+- [ ("", { pexp_desc = Pexp_constant (Const_string (str, _))
+- ; pexp_loc = loc
+- ; pexp_attributes = str_attrs }) ]) ->
++ [ (Nolabel, { pexp_desc = Pexp_constant (Pconst_string (str, _))
++ ; pexp_loc = loc
++ ; pexp_attributes = str_attrs }) ]) ->
+ assert_no_attributes ident_attrs;
+ assert_no_attributes str_attrs;
+ let e' = expand_format_string ~loc str in
diff --git a/dev-ml/ppx_custom_printf/ppx_custom_printf-113.33.00.ebuild b/dev-ml/ppx_custom_printf/ppx_custom_printf-113.33.00.ebuild
index 225be12ce3f9..3220becfae13 100644
--- a/dev-ml/ppx_custom_printf/ppx_custom_printf-113.33.00.ebuild
+++ b/dev-ml/ppx_custom_printf/ppx_custom_printf-113.33.00.ebuild
@@ -4,7 +4,7 @@
EAPI="5"
-inherit oasis
+inherit oasis eutils
DESCRIPTION="Printf-style format-strings for user-defined string conversion"
HOMEPAGE="http://www.janestreet.com/ocaml"
@@ -23,6 +23,10 @@ DEPEND="dev-ml/ppx_tools:=
RDEPEND="${DEPEND}"
DEPEND="${DEPEND} dev-ml/opam"
+src_prepare() {
+ has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch"
+}
+
src_configure() {
emake setup.exe
OASIS_SETUP_COMMAND="./setup.exe" oasis_src_configure