diff options
Diffstat (limited to 'dev-ml/ppx_tools')
-rw-r--r-- | dev-ml/ppx_tools/Manifest | 6 | ||||
-rw-r--r-- | dev-ml/ppx_tools/files/ocaml404.patch | 47 | ||||
-rw-r--r-- | dev-ml/ppx_tools/metadata.xml | 11 | ||||
-rw-r--r-- | dev-ml/ppx_tools/ppx_tools-5.0.4.03.0.ebuild | 33 | ||||
-rw-r--r-- | dev-ml/ppx_tools/ppx_tools-5.0.4.05.0.ebuild | 29 |
5 files changed, 126 insertions, 0 deletions
diff --git a/dev-ml/ppx_tools/Manifest b/dev-ml/ppx_tools/Manifest new file mode 100644 index 000000000000..e7a8d37c97e2 --- /dev/null +++ b/dev-ml/ppx_tools/Manifest @@ -0,0 +1,6 @@ +AUX ocaml404.patch 2031 BLAKE2B 02341fa3b292d713995f95d76f1b47970b9ff34d8b177212074c0a3c027aff1d0f27a0e3e7f03b8131904a28d285f9cc4b7b795e62327ad2da7c29f1b74240da SHA512 507bda106d25a92718aae1b0e95103d481cbe18624f80a59af6b3e884594c1d18b0c15b51f014b1af39b09a5264272f92ee8d18dcca37e7595964f85241c141a +DIST ppx_tools-5.0.4.03.0.tar.gz 17209 BLAKE2B bd51e5b2482a9eab09bf9a02ac0231fa7bbc721d54a932e6cfdc1d719c106eca0fe90563b636601110e796fab439f6c6d7fccd5d2920f5bcb3c115f622d90381 SHA512 d1867b084885704757f390b6f6ca8b5d7702f0476149d99ea227f98230ab35d57f5c4aa779881231a0a77cfd1861255118fa2551a49ab85553f63e9aab9baae4 +DIST ppx_tools-5.0.4.05.0.tar.gz 17893 BLAKE2B 0902f53ef19338396cf2a2319a4c2d4b7bbbfb66bbfd0fb2290c29ecebcda02ff90d2f0d0221b08d027c41c863c2bc0a02c50363d83474864c08e619641b7ad6 SHA512 33b4420500a2b5880e770f8fdf2b37ef08e52ff84f96f955c6321492de906568979feccb1b2b477b1117619ba28edd8d3e0f178c5684f0dc43c6ed56266c4d64 +EBUILD ppx_tools-5.0.4.03.0.ebuild 813 BLAKE2B 1f5897d4905c89e741e5fca93d922e81113a5ce26e376c9eb95fc298ae77c15308af7133645e895d473ba75259760f1f509ec205a2e074fa17c710b336de703d SHA512 8cce9af5162c38603b538a91c35b82163ea96c4fa49f01eb6d71d970f80d62cee549d7abc38a367f2e7ac40b7c961f3e58d5759c318f4157580f781f49fc30b0 +EBUILD ppx_tools-5.0.4.05.0.ebuild 716 BLAKE2B dcd835e06c7349df3bb49c16c14378e5b90de9ece37c478b66b5bd35f116c66d65981aa12322505e48c60dc07ef393c5181e3609db26302850bfa5fb53cb33fa SHA512 991090e274d2897d872bb706e2295d9964a1f8182947617683d7d054ac80501586dc4e2239add6c18effce80c6f78f0022ab28f46d942b51ec975cf5188ad1df +MISC metadata.xml 343 BLAKE2B 74fea15b992b811ea11c6b9e536dbf79bbd72329f5d62b200e7d320816f6470969b92f06a0d0243a24e4063d3190e3c1a2c656b8a8209fbe86332741d7a0da7b SHA512 af6d8ea7cea8aee25e51afdd9b2f6a8353467a67089121d3dfddef55ae48b31f8f3e539cea90455d0044dba784ca21b6af4be8eb55a455c97827b7277ac37aff diff --git a/dev-ml/ppx_tools/files/ocaml404.patch b/dev-ml/ppx_tools/files/ocaml404.patch new file mode 100644 index 000000000000..8a2ccee071e4 --- /dev/null +++ b/dev-ml/ppx_tools/files/ocaml404.patch @@ -0,0 +1,47 @@ +Index: ppx_tools-5.0-4.03.0/ast_mapper_class.ml +=================================================================== +--- ppx_tools-5.0-4.03.0.orig/ast_mapper_class.ml ++++ ppx_tools-5.0-4.03.0/ast_mapper_class.ml +@@ -335,6 +335,7 @@ module P = struct + | Ppat_unpack s -> unpack ~loc ~attrs (map_loc sub s) + | Ppat_exception p -> exception_ ~loc ~attrs (sub # pat p) + | Ppat_extension x -> extension ~loc ~attrs (sub # extension x) ++ | Ppat_open (l, p) -> open_ ~loc ~attrs (map_loc sub l) (sub # pat p) + end + + module CE = struct +Index: ppx_tools-5.0-4.03.0/genlifter.ml +=================================================================== +--- ppx_tools-5.0-4.03.0.orig/genlifter.ml ++++ ppx_tools-5.0-4.03.0/genlifter.ml +@@ -49,8 +49,8 @@ module Main : sig end = struct + let rec gen ty = + if Hashtbl.mem printed ty then () + else let tylid = Longident.parse ty in +- let (_, td) = +- try Env.lookup_type tylid env ++ let td = ++ try Env.find_type (Env.lookup_type tylid env) env + with Not_found -> + Format.eprintf "** Cannot resolve type %s@." ty; + exit 2 +Index: ppx_tools-5.0-4.03.0/rewriter.ml +=================================================================== +--- ppx_tools-5.0-4.03.0.orig/rewriter.ml ++++ ppx_tools-5.0-4.03.0/rewriter.ml +@@ -92,13 +92,13 @@ let () = + | `Struct -> + let pstr = Parse.implementation lexer in + let pstr = Pparse.apply_rewriters (* ~restore:true *) ~tool_name:!tool_name +- Config.ast_impl_magic_number pstr in ++ Pparse.Structure pstr in + Pprintast.structure fmt pstr; + Format.pp_print_newline fmt () + | `Sig -> + let psig = Parse.interface lexer in + let psig = Pparse.apply_rewriters (* ~restore:true *) ~tool_name:!tool_name +- Config.ast_intf_magic_number psig in ++ Pparse.Signature psig in + Pprintast.signature fmt psig; + Format.pp_print_newline fmt ()) + with exn -> diff --git a/dev-ml/ppx_tools/metadata.xml b/dev-ml/ppx_tools/metadata.xml new file mode 100644 index 000000000000..56d1f00f232a --- /dev/null +++ b/dev-ml/ppx_tools/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>ml@gentoo.org</email> + <name>Gentoo ML Project</name> + </maintainer> + <upstream> + <remote-id type="github">alainfrisch/ppx_tools</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-ml/ppx_tools/ppx_tools-5.0.4.03.0.ebuild b/dev-ml/ppx_tools/ppx_tools-5.0.4.03.0.ebuild new file mode 100644 index 000000000000..3b440d54aeb0 --- /dev/null +++ b/dev-ml/ppx_tools/ppx_tools-5.0.4.03.0.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit findlib versionator eutils + +MY_PV=$(replace_version_separator 2 '+') +DESCRIPTION="Tools for authors of ppx rewriters" +HOMEPAGE="https://github.com/alainfrisch/ppx_tools" +SRC_URI="https://github.com/alainfrisch/ppx_tools/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" +IUSE="+ocamlopt" + +DEPEND=">=dev-lang/ocaml-4.03.0:=[ocamlopt?]" +RDEPEND="${DEPEND}" +S="${WORKDIR}/${PN}-$(replace_version_separator 2 '-')" + +src_prepare() { + has_version '>=dev-lang/ocaml-4.04_beta' && epatch "${FILESDIR}/ocaml404.patch" +} + +src_compile() { + emake -j1 $(usex ocamlopt "" "ARCH=none") +} + +src_install() { + findlib_src_install + dodoc README.md +} diff --git a/dev-ml/ppx_tools/ppx_tools-5.0.4.05.0.ebuild b/dev-ml/ppx_tools/ppx_tools-5.0.4.05.0.ebuild new file mode 100644 index 000000000000..28e7b0d5bb50 --- /dev/null +++ b/dev-ml/ppx_tools/ppx_tools-5.0.4.05.0.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit findlib versionator eutils + +MY_PV=$(replace_version_separator 2 '+') +DESCRIPTION="Tools for authors of ppx rewriters" +HOMEPAGE="https://github.com/alainfrisch/ppx_tools" +SRC_URI="https://github.com/alainfrisch/ppx_tools/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" +IUSE="+ocamlopt" + +DEPEND=">=dev-lang/ocaml-4.05_beta:=[ocamlopt?]" +RDEPEND="${DEPEND}" +S="${WORKDIR}/${PN}-$(replace_version_separator 2 '-')" + +src_compile() { + emake -j1 $(usex ocamlopt "" "ARCH=none") +} + +src_install() { + findlib_src_install + dodoc README.md +} |