diff options
author | Mark Wright <gienah@gentoo.org> | 2020-10-13 17:44:46 +1100 |
---|---|---|
committer | Mark Wright <gienah@gentoo.org> | 2020-10-13 23:53:40 +1100 |
commit | 79fa88da1a208bf3eebf88e340adeaf5c34557fb (patch) | |
tree | 3611f6963a83f956be5cf328131e96ab787e309c /dev-ml | |
parent | dev-ml/ppx_module_timer: Dependency of dev-ml/ppx_jane (diff) | |
download | gentoo-79fa88da1a208bf3eebf88e340adeaf5c34557fb.tar.gz gentoo-79fa88da1a208bf3eebf88e340adeaf5c34557fb.tar.bz2 gentoo-79fa88da1a208bf3eebf88e340adeaf5c34557fb.zip |
dev-ml/ppx_optcomp: Bump to 0.14.0
Co-Author: Alexis Ballier <aballier@gentoo.org>
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Mark Wright <gienah@gentoo.org>
Diffstat (limited to 'dev-ml')
-rw-r--r-- | dev-ml/ppx_optcomp/Manifest | 1 | ||||
-rw-r--r-- | dev-ml/ppx_optcomp/files/ppx_optcomp-0.14.0-ppxlib-0.18.0.patch | 63 | ||||
-rw-r--r-- | dev-ml/ppx_optcomp/metadata.xml | 5 | ||||
-rw-r--r-- | dev-ml/ppx_optcomp/ppx_optcomp-0.14.0.ebuild | 26 |
4 files changed, 94 insertions, 1 deletions
diff --git a/dev-ml/ppx_optcomp/Manifest b/dev-ml/ppx_optcomp/Manifest index 97571ab30d40..a27b0ede003c 100644 --- a/dev-ml/ppx_optcomp/Manifest +++ b/dev-ml/ppx_optcomp/Manifest @@ -1 +1,2 @@ +DIST ppx_optcomp-0.14.0.tar.gz 16583 BLAKE2B 9b139708e02501245d5440a862324fe0191c9c96772e6599ed474a734263c4d2c0fa08fff666abd2efb218ec03a2b9b47c5ef6480d53a8d0f280550b741ac39a SHA512 e86b108d805500cbd7be628f41436ec8de0e8622d4218631d01bf73b0e70da0a057b8531465206baa9b8851ce9c22c5cd53921fccfae352ee46527d69964dc44 DIST ppx_optcomp-0.9.0.tar.gz 14611 BLAKE2B 6fc431fd3ed173835a48814718a05b3ae619f182f4c008415dba77c88bfeab780e6fc49c4faed2ee4e362b6a151544b1a707651dcbfdbfcdce979a2a3d6d6c02 SHA512 ce4a5049045458533b783b99b7569e72e074bd425a81315d43fcab26dbc2a4b141cfda2b2365c69b3d0251f2bf0b8c8f0d14fc8883f1a0f4edae824776565a9c diff --git a/dev-ml/ppx_optcomp/files/ppx_optcomp-0.14.0-ppxlib-0.18.0.patch b/dev-ml/ppx_optcomp/files/ppx_optcomp-0.14.0-ppxlib-0.18.0.patch new file mode 100644 index 000000000000..063b9df74aba --- /dev/null +++ b/dev-ml/ppx_optcomp/files/ppx_optcomp-0.14.0-ppxlib-0.18.0.patch @@ -0,0 +1,63 @@ +commit a4422ecd7e0677569533b1dae07924f5d786e8f6 (HEAD, origin/upgrade-ppxlib-0.18.0) +Author: Nathan Rebours <nathan.p.rebours@gmail.com> +Date: Mon Oct 5 18:35:26 2020 +0200 + + Make ppx_optcomp 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_optcomp + 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_optcomp.opam b/ppx_optcomp.opam +index 20eb7c5..cbe8b5c 100644 +--- a/ppx_optcomp.opam ++++ b/ppx_optcomp.opam +@@ -15,7 +15,7 @@ depends: [ + "base" {>= "v0.14" & < "v0.15"} + "stdio" {>= "v0.14" & < "v0.15"} + "dune" {>= "2.0.0"} +- "ppxlib" {>= "0.11.0"} ++ "ppxlib" {>= "0.18.0"} + ] + synopsis: "Optional compilation for OCaml" + description: " +diff --git a/src/interpreter.ml b/src/interpreter.ml +index f1da14b..1c6d726 100644 +--- a/src/interpreter.ml ++++ b/src/interpreter.ml +@@ -241,7 +241,7 @@ let rec eval env e : Value.t = + match e.pexp_desc with + | Pexp_constant (Pconst_integer (x, None)) -> Int (parse_int loc x) + | Pexp_constant (Pconst_char x ) -> Char x +- | Pexp_constant (Pconst_string (x, _ )) -> String x ++ | Pexp_constant (Pconst_string (x, _, _ )) -> String x + + | Pexp_construct ({ txt = Lident "true" ; _ }, None) -> Bool true + | Pexp_construct ({ txt = Lident "false"; _ }, None) -> Bool false +@@ -361,7 +361,7 @@ and bind env patt value = + + | Ppat_constant (Pconst_integer (x, None)), Int y when parse_int loc x = y -> env + | Ppat_constant (Pconst_char x ), Char y when Char.equal x y -> env +- | Ppat_constant (Pconst_string (x, _ )), String y when String.equal x y -> env ++ | Ppat_constant (Pconst_string (x, _, _ )), String y when String.equal x y -> env + + | Ppat_construct ({ txt = Lident "true" ; _ }, None), Bool true -> env + | Ppat_construct ({ txt = Lident "false"; _ }, None), Bool false -> env +diff --git a/src/ppx_optcomp.ml b/src/ppx_optcomp.ml +index a2573de..d87ea24 100644 +--- a/src/ppx_optcomp.ml ++++ b/src/ppx_optcomp.ml +@@ -81,7 +81,7 @@ module Ast_utils = struct + let get_string ~loc payload = + let e = get_expr ~loc payload in + match e with +- | { pexp_desc = Pexp_constant (Pconst_string (x, _ )); _ } -> x ++ | { pexp_desc = Pexp_constant (Pconst_string (x, _, _ )); _ } -> x + | _ -> Location.raise_errorf ~loc "optcomp: invalid directive syntax, expected string" + + end diff --git a/dev-ml/ppx_optcomp/metadata.xml b/dev-ml/ppx_optcomp/metadata.xml index f45619ffca46..30b65cf1fd3a 100644 --- a/dev-ml/ppx_optcomp/metadata.xml +++ b/dev-ml/ppx_optcomp/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_optcomp</remote-id> </upstream> diff --git a/dev-ml/ppx_optcomp/ppx_optcomp-0.14.0.ebuild b/dev-ml/ppx_optcomp/ppx_optcomp-0.14.0.ebuild new file mode 100644 index 000000000000..f1290a509500 --- /dev/null +++ b/dev-ml/ppx_optcomp/ppx_optcomp-0.14.0.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="Optional compilation for OCaml" +HOMEPAGE="https://github.com/janestreet/ppx_optcomp" +SRC_URI="https://github.com/janestreet/ppx_optcomp/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/stdio:= + >=dev-ml/ppxlib-0.18.0:= + dev-ml/ocaml-migrate-parsetree:= + dev-ml/result:= +" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}"/${P}-ppxlib-0.18.0.patch ) |