From e1fe85d39337c4042289a555c06a2405363facd7 Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Sat, 1 Apr 2017 16:32:46 +0200 Subject: dev-ml/ppx_optcomp: Bump to 0.9.0 Package-Manager: Portage-2.3.5, Repoman-2.3.2 --- dev-ml/ppx_optcomp/Manifest | 2 +- dev-ml/ppx_optcomp/files/oc43.patch | 93 ------------------------- dev-ml/ppx_optcomp/files/oc44.patch | 31 --------- dev-ml/ppx_optcomp/ppx_optcomp-0.9.0.ebuild | 25 +++++++ dev-ml/ppx_optcomp/ppx_optcomp-113.33.00.ebuild | 43 ------------ 5 files changed, 26 insertions(+), 168 deletions(-) delete mode 100644 dev-ml/ppx_optcomp/files/oc43.patch delete mode 100644 dev-ml/ppx_optcomp/files/oc44.patch create mode 100644 dev-ml/ppx_optcomp/ppx_optcomp-0.9.0.ebuild delete mode 100644 dev-ml/ppx_optcomp/ppx_optcomp-113.33.00.ebuild (limited to 'dev-ml/ppx_optcomp') diff --git a/dev-ml/ppx_optcomp/Manifest b/dev-ml/ppx_optcomp/Manifest index 5e09bd22dc7a..a2138473e5dd 100644 --- a/dev-ml/ppx_optcomp/Manifest +++ b/dev-ml/ppx_optcomp/Manifest @@ -1 +1 @@ -DIST ppx_optcomp-113.33.00.tar.gz 59227 SHA256 b2a3140a03dff8314bcca84a3d0691f3c1d78172cbb6c03390c7952f9b7747c1 SHA512 956cb3007d4c13eac789e02f7f132c3ef153af5d3ae7d69aea3e8a10395a0984bc48e136c7dc6b245aebcc193a05cb47493873f9952e65765310c28a7242be63 WHIRLPOOL 906a4ac35c05d89f2001f831049688205e4647d766b05a3af1f751cd3fed84de616011f015df76973aa2e8cde6640ff52353861eece51b5409b4000e201381d7 +DIST ppx_optcomp-0.9.0.tar.gz 14611 SHA256 6dcbea3257d104dcf1a3a89c8cf51ec88ba79e07f9ca30caaa1da4fbb9b66fbc SHA512 ce4a5049045458533b783b99b7569e72e074bd425a81315d43fcab26dbc2a4b141cfda2b2365c69b3d0251f2bf0b8c8f0d14fc8883f1a0f4edae824776565a9c WHIRLPOOL b8fe502dcb21b103e890e48c7f4a4764503dd593bf1160c7e2cbfc78301cfd0de58625670bc25bc5c35ece73b68a0c8034015407adde487e74598afd5754a31f diff --git a/dev-ml/ppx_optcomp/files/oc43.patch b/dev-ml/ppx_optcomp/files/oc43.patch deleted file mode 100644 index 6203c077e0c8..000000000000 --- a/dev-ml/ppx_optcomp/files/oc43.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -uNr ppx_optcomp-113.33.00/_oasis ppx_optcomp-113.33.00+4.03/_oasis ---- ppx_optcomp-113.33.00/_oasis 2016-03-09 16:44:54.000000000 +0100 -+++ ppx_optcomp-113.33.00+4.03/_oasis 2016-03-22 15:13:51.000000000 +0100 -@@ -1,8 +1,8 @@ - OASISFormat: 0.4 --OCamlVersion: >= 4.02.3 -+OCamlVersion: >= 4.03.0 - FindlibVersion: >= 1.3.2 - Name: ppx_optcomp --Version: 113.33.00 -+Version: 113.33.00+4.03 - Synopsis: Optional compilation for OCaml - Authors: Jane Street Group, LLC - Copyrights: (C) 2015-2016 Jane Street Group LLC -diff -uNr ppx_optcomp-113.33.00/opam ppx_optcomp-113.33.00+4.03/opam ---- ppx_optcomp-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100 -+++ ppx_optcomp-113.33.00+4.03/opam 2016-03-22 17:51:37.000000000 +0100 -@@ -15,4 +15,4 @@ - "ppx_core" - "ppx_tools" {>= "0.99.3"} - ] --available: [ ocaml-version >= "4.02.3" ] -+available: [ ocaml-version >= "4.03.0" ] -diff -uNr ppx_optcomp-113.33.00/src/ppx_optcomp.ml ppx_optcomp-113.33.00+4.03/src/ppx_optcomp.ml ---- ppx_optcomp-113.33.00/src/ppx_optcomp.ml 2016-03-09 16:44:54.000000000 +0100 -+++ ppx_optcomp-113.33.00+4.03/src/ppx_optcomp.ml 2016-03-22 15:13:51.000000000 +0100 -@@ -169,12 +169,19 @@ - Location.raise_errorf ~loc:e.pexp_loc "optcomp: expression not supported" - ;; - -+let parse_int loc x = -+ match int_of_string x with -+ | v -> v -+ | exception _ -> -+ Location.raise_errorf ~loc "optcomp: invalid integer" -+;; -+ - let rec eval env e : Value.t = - let loc = e.pexp_loc in - match e.pexp_desc with -- | Pexp_constant (Const_int x ) -> Int x -- | Pexp_constant (Const_char x ) -> Char x -- | Pexp_constant (Const_string (x, _)) -> String x -+ | 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_construct ({ txt = Lident "true" ; _ }, None) -> Bool true - | Pexp_construct ({ txt = Lident "false"; _ }, None) -> Bool false -@@ -192,7 +199,7 @@ - - | Pexp_apply ({ pexp_desc = Pexp_ident { txt = Lident s; _ }; _ }, args) -> begin - let args = -- List.map args ~f:(fun (l, x) -> if l <> "" then not_supported e else x) -+ List.map args ~f:(fun (l, x) -> if l <> Asttypes.Nolabel then not_supported e else x) - in - match s, args with - | "=" , [x; y] -> eval_cmp env ( = ) x y -@@ -283,12 +290,13 @@ - | _ -> not_supported e - - and bind env patt value = -+ let loc = patt.ppat_loc in - match patt.ppat_desc, value with - | Ppat_any, _ -> env - -- | Ppat_constant (Const_int x ), Int y when x = y -> env -- | Ppat_constant (Const_char x ), Char y when x = y -> env -- | Ppat_constant (Const_string (x, _)), String y when x = y -> env -+ | Ppat_constant (Pconst_integer (x, None)), Int y when parse_int loc x = y -> env -+ | Ppat_constant (Pconst_char x ), Char y when x = y -> env -+ | Ppat_constant (Pconst_string (x, _ )), String y when x = y -> env - - | Ppat_construct ({ txt = Lident "true" ; _ }, None), Bool true -> env - | Ppat_construct ({ txt = Lident "false"; _ }, None), Bool false -> env -@@ -506,7 +514,7 @@ - | Pexp_construct (x, Some y) -> - let id = var_of_lid x in - Let (ppat_var ~loc:id.loc id, y) -- | Pexp_apply (x, [("", y)]) -> -+ | Pexp_apply (x, [(Nolabel, y)]) -> - let id = var_of_expr x in - Let (ppat_var ~loc:id.loc id, y) - | _ -> -@@ -517,7 +525,7 @@ - | LIDENT "import" -> begin - let e = get_expr () in - match e.pexp_desc with -- | Pexp_constant (Const_string (s, _)) -> Import s -+ | Pexp_constant (Pconst_string (s, _)) -> Import s - | _ -> - Location.raise_errorf ~loc:e.pexp_loc "optcomp: #import expect a string" - end diff --git a/dev-ml/ppx_optcomp/files/oc44.patch b/dev-ml/ppx_optcomp/files/oc44.patch deleted file mode 100644 index 332b58b98884..000000000000 --- a/dev-ml/ppx_optcomp/files/oc44.patch +++ /dev/null @@ -1,31 +0,0 @@ -Index: ppx_optcomp-113.33.00/src/ppx_optcomp.ml -=================================================================== ---- ppx_optcomp-113.33.00.orig/src/ppx_optcomp.ml -+++ ppx_optcomp-113.33.00/src/ppx_optcomp.ml -@@ -552,7 +552,7 @@ end = struct - - let rec next_directive (lexer : lexer) lexbuf = - match lexer lexbuf with -- | SHARP -> parse_directive lexer lexbuf -+ | HASH -> parse_directive lexer lexbuf - | EOL -> next_directive lexer lexbuf - | EOF -> endif_missing lexbuf - | _ -> skip_line lexer lexbuf; next_directive lexer lexbuf -@@ -647,7 +647,7 @@ end = struct - (* Return the next token from a stream, interpreting directives. *) - let rec lexer_internal (lexer : lexer) lexbuf : Parser.token = - match lexer lexbuf with -- | SHARP when at_bol lexbuf -> -+ | HASH when at_bol lexbuf -> - interpret_directive lexer lexbuf (parse_directive lexer lexbuf); - lexer_internal lexer lexbuf - | EOF -> Stack.check_eof lexbuf; EOF -@@ -749,7 +749,7 @@ end = struct - Location.init lexbuf fn; - let rec loop pos acc = - match Lexer.token lexbuf with -- | SHARP when at_bol lexbuf -> -+ | HASH when at_bol lexbuf -> - let acc = (pos, Lexing.lexeme_start lexbuf) :: acc in - interpret_directive Lexer.token lexbuf (parse_directive Lexer.token lexbuf); - loop (Lexing.lexeme_end lexbuf) acc diff --git a/dev-ml/ppx_optcomp/ppx_optcomp-0.9.0.ebuild b/dev-ml/ppx_optcomp/ppx_optcomp-0.9.0.ebuild new file mode 100644 index 000000000000..735f51015a6e --- /dev/null +++ b/dev-ml/ppx_optcomp/ppx_optcomp-0.9.0.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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" +IUSE="" + +DEPEND="dev-ml/ppx_core:=" +RDEPEND="${DEPEND}" +DEPEND="${DEPEND} dev-ml/opam dev-ml/jbuilder" + +src_install() { + opam-installer -i \ + --prefix="${ED}/usr" \ + --libdir="${D}/$(ocamlc -where)" \ + --docdir="${ED}/usr/share/doc/${PF}" \ + ${PN}.install || die +} diff --git a/dev-ml/ppx_optcomp/ppx_optcomp-113.33.00.ebuild b/dev-ml/ppx_optcomp/ppx_optcomp-113.33.00.ebuild deleted file mode 100644 index 27edcffd82e6..000000000000 --- a/dev-ml/ppx_optcomp/ppx_optcomp-113.33.00.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit oasis eutils - -DESCRIPTION="Optional compilation for OCaml" -HOMEPAGE="http://www.janestreet.com/ocaml" -SRC_URI="http://ocaml.janestreet.com/ocaml-core/${PV%.*}/files/${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0/${PV}" -KEYWORDS="~amd64" -IUSE="" - -DEPEND="dev-ml/ppx_tools:= - dev-ml/ppx_core:=" - -RDEPEND="${DEPEND}" - -src_prepare() { - has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch" - has_version '>=dev-lang/ocaml-4.04' && epatch "${FILESDIR}/oc44.patch" -} - -src_configure() { - emake setup.exe - OASIS_SETUP_COMMAND="./setup.exe" oasis_src_configure -} - -src_compile() { - emake -} - -src_install() { - opam-installer -i \ - --prefix="${ED}/usr" \ - --libdir="${D}/$(ocamlc -where)" \ - --docdir="${ED}/usr/share/doc/${PF}" \ - ${PN}.install || die - dodoc CHANGES.md -} -- cgit v1.2.3-65-gdbad