summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2017-04-01 16:51:06 +0200
committerAlexis Ballier <aballier@gentoo.org>2017-04-02 10:37:45 +0200
commit1b44bd2e81c5469230faab830c52c0cbc14ea550 (patch)
tree323b93483d194b88c54edf1042e4f966ad769b6f /dev-ml/ppx_compare
parentdev-ml/ppx_type_conv: Bump to 0.9.0 (diff)
downloadgentoo-1b44bd2e81c5469230faab830c52c0cbc14ea550.tar.gz
gentoo-1b44bd2e81c5469230faab830c52c0cbc14ea550.tar.bz2
gentoo-1b44bd2e81c5469230faab830c52c0cbc14ea550.zip
dev-ml/ppx_compare: Bump to 0.9.0
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-ml/ppx_compare')
-rw-r--r--dev-ml/ppx_compare/Manifest2
-rw-r--r--dev-ml/ppx_compare/files/oc43.patch126
-rw-r--r--dev-ml/ppx_compare/ppx_compare-0.9.0.ebuild33
-rw-r--r--dev-ml/ppx_compare/ppx_compare-113.33.00.ebuild46
4 files changed, 34 insertions, 173 deletions
diff --git a/dev-ml/ppx_compare/Manifest b/dev-ml/ppx_compare/Manifest
index fd355e61a318..53124cd0aebe 100644
--- a/dev-ml/ppx_compare/Manifest
+++ b/dev-ml/ppx_compare/Manifest
@@ -1 +1 @@
-DIST ppx_compare-113.33.00.tar.gz 57591 SHA256 002955efc2606044b5ec7e5eca24c9113bd6ef230c1340807297659970b5ebd3 SHA512 4058330342a228eba748db4a6e4351c5b9eca11a515eaf7aa379d73b361e0b0fff0079eca20f3657fcfa1da2fc289a85a77cb8d9553a5f6cbbf1d6e21d39be82 WHIRLPOOL f789c9820252b3021ca535062df58ab6c3b88e864d7a8772f35cbe8b1ec47bb876c76e81c5c51731793f3cfcacc0d3e820b85b259fdced9de7600efa60b38845
+DIST ppx_compare-0.9.0.tar.gz 11760 SHA256 9ec627eae013d91886c5569573ddf7e6c0ac893b4575b111c24750ce5ac15007 SHA512 4f154bb67c2241712986247f8b3ed04b4ba874424171989f0421193a15cea45dedbf1c546408421bf33839ea45b85a45ec1cb43c034373fd80198ddb5d9045fe WHIRLPOOL 9bd52105706c6ab7582258f08060feec70f2ab14e1f4a68560a2edd5eae5ad50c35eeeaf81f340a304b923f7c49315a5a811d9c2c8be741653c917bb01e1c370
diff --git a/dev-ml/ppx_compare/files/oc43.patch b/dev-ml/ppx_compare/files/oc43.patch
deleted file mode 100644
index d346f7b4380e..000000000000
--- a/dev-ml/ppx_compare/files/oc43.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-diff -uNr ppx_compare-113.33.00/expander/ppx_compare_expander.ml ppx_compare-113.33.00+4.03/expander/ppx_compare_expander.ml
---- ppx_compare-113.33.00/expander/ppx_compare_expander.ml 2016-03-09 16:44:53.000000000 +0100
-+++ ppx_compare-113.33.00+4.03/expander/ppx_compare_expander.ml 2016-03-22 15:13:50.000000000 +0100
-@@ -219,53 +219,56 @@
- if cd.pcd_res <> None then
- Location.raise_errorf ~loc "GADTs are not supported by comparelib";
- match cd.pcd_args with
-- | [] ->
-- let pcnstr = pconstruct cd None in
-- let pany = ppat_any ~loc in
-- let case l r n =
-- case ~guard:None ~lhs:(ppat_tuple ~loc [l; r]) ~rhs:(eint ~loc n)
-- in
-- if rightmost then
-- [ case pcnstr pcnstr 0 ]
-- else
-- [ case pcnstr pcnstr 0
-- ; case pcnstr pany (-1)
-- ; case pany pcnstr 1
-- ]
-- | tps ->
-- let ids_ty =
-- List.map tps
-- ~f:(fun ty ->
-- (gen_symbol ~prefix:"_a" (),
-- gen_symbol ~prefix:"_b" (),
-- ty))
-- in
-- let lpatt = List.map ids_ty ~f:(fun (l,_r,_ty) -> pvar ~loc l) |> ppat_tuple ~loc
-- and rpatt = List.map ids_ty ~f:(fun (_l,r,_ty) -> pvar ~loc r) |> ppat_tuple ~loc
-- and body =
-- List.map ids_ty ~f:(fun (l,r,ty) ->
-- compare_of_ty ty (evar ~loc l) (evar ~loc r))
-- |> chain_if
-- in
-- let res =
-- case ~guard:None
-- ~lhs:(ppat_tuple ~loc [ pconstruct cd (Some lpatt)
-- ; pconstruct cd (Some rpatt)
-- ])
-- ~rhs:body
-- in
-- if rightmost then
-- [ res ]
-- else
-+ | Pcstr_record _ -> failwith "Pcstr_record not supported"
-+ | Pcstr_tuple pcd_args ->
-+ match pcd_args with
-+ | [] ->
-+ let pcnstr = pconstruct cd None in
- let pany = ppat_any ~loc in
-- let pcnstr = pconstruct cd (Some pany) in
- let case l r n =
- case ~guard:None ~lhs:(ppat_tuple ~loc [l; r]) ~rhs:(eint ~loc n)
- in
-- [ res
-- ; case pcnstr pany (-1)
-- ; case pany pcnstr 1
-- ])
-+ if rightmost then
-+ [ case pcnstr pcnstr 0 ]
-+ else
-+ [ case pcnstr pcnstr 0
-+ ; case pcnstr pany (-1)
-+ ; case pany pcnstr 1
-+ ]
-+ | tps ->
-+ let ids_ty =
-+ List.map tps
-+ ~f:(fun ty ->
-+ (gen_symbol ~prefix:"_a" (),
-+ gen_symbol ~prefix:"_b" (),
-+ ty))
-+ in
-+ let lpatt = List.map ids_ty ~f:(fun (l,_r,_ty) -> pvar ~loc l) |> ppat_tuple ~loc
-+ and rpatt = List.map ids_ty ~f:(fun (_l,r,_ty) -> pvar ~loc r) |> ppat_tuple ~loc
-+ and body =
-+ List.map ids_ty ~f:(fun (l,r,ty) ->
-+ compare_of_ty ty (evar ~loc l) (evar ~loc r))
-+ |> chain_if
-+ in
-+ let res =
-+ case ~guard:None
-+ ~lhs:(ppat_tuple ~loc [ pconstruct cd (Some lpatt)
-+ ; pconstruct cd (Some rpatt)
-+ ])
-+ ~rhs:body
-+ in
-+ if rightmost then
-+ [ res ]
-+ else
-+ let pany = ppat_any ~loc in
-+ let pcnstr = pconstruct cd (Some pany) in
-+ let case l r n =
-+ case ~guard:None ~lhs:(ppat_tuple ~loc [l; r]) ~rhs:(eint ~loc n)
-+ in
-+ [ res
-+ ; case pcnstr pany (-1)
-+ ; case pany pcnstr 1
-+ ])
- |> List.map ~f:List.rev
- |> List.concat
- |> List.rev
-diff -uNr ppx_compare-113.33.00/_oasis ppx_compare-113.33.00+4.03/_oasis
---- ppx_compare-113.33.00/_oasis 2016-03-09 16:44:53.000000000 +0100
-+++ ppx_compare-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_compare
--Version: 113.33.00
-+Version: 113.33.00+4.03
- Synopsis: Generation of comparison functions from types
- Authors: Jane Street Group, LLC <opensource@janestreet.com>
- Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@janestreet.com>
-diff -uNr ppx_compare-113.33.00/opam ppx_compare-113.33.00+4.03/opam
---- ppx_compare-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100
-+++ ppx_compare-113.33.00+4.03/opam 2016-03-22 17:51:35.000000000 +0100
-@@ -17,4 +17,4 @@
- "ppx_tools" {>= "0.99.3"}
- "ppx_type_conv"
- ]
--available: [ ocaml-version >= "4.02.3" ]
-+available: [ ocaml-version >= "4.03.0" ]
diff --git a/dev-ml/ppx_compare/ppx_compare-0.9.0.ebuild b/dev-ml/ppx_compare/ppx_compare-0.9.0.ebuild
new file mode 100644
index 000000000000..63180fd07d74
--- /dev/null
+++ b/dev-ml/ppx_compare/ppx_compare-0.9.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Generation of comparison functions from types"
+HOMEPAGE="https://github.com/janestreet/ppx_compare"
+SRC_URI="https://github.com/janestreet/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="
+ dev-ml/ppx_driver:=
+ dev-ml/ppx_type_conv:=
+ dev-ml/ppx_core:=
+ dev-ml/base:=
+ dev-ml/ocaml-migrate-parsetree:=
+ dev-ml/ppx_metaquot:=
+"
+
+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_compare/ppx_compare-113.33.00.ebuild b/dev-ml/ppx_compare/ppx_compare-113.33.00.ebuild
deleted file mode 100644
index 4895106aeb17..000000000000
--- a/dev-ml/ppx_compare/ppx_compare-113.33.00.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit oasis
-
-DESCRIPTION="Generation of comparison functions from types"
-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_driver:=
- dev-ml/ppx_type_conv:=
- dev-ml/ppx_core:="
-
-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
-}
-
-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
-}