diff -Nru ocaml-visitors-20170725/debian/changelog ocaml-visitors-20170725/debian/changelog --- ocaml-visitors-20170725/debian/changelog 2017-10-29 11:54:43.000000000 +0000 +++ ocaml-visitors-20170725/debian/changelog 2017-10-30 19:22:58.000000000 +0000 @@ -1,9 +1,11 @@ -ocaml-visitors (20170725-1ubuntu1) bionic; urgency=medium +ocaml-visitors (20170725-2) unstable; urgency=medium - * debian/patches/07948b5b9207d87d510b920dc72c7ea08b267ea5.patch: - fix build with new ocaml + * Patch ocaml-4.05: migrate to ocaml 4.05, patch picked from upstream git + (closes: #880063) + * Standards-Version 4.1.1: + - replace Priority extra by optional. - -- Gianfranco Costamagna Sun, 29 Oct 2017 12:54:43 +0100 + -- Ralf Treinen Mon, 30 Oct 2017 20:22:58 +0100 ocaml-visitors (20170725-1) unstable; urgency=medium diff -Nru ocaml-visitors-20170725/debian/control ocaml-visitors-20170725/debian/control --- ocaml-visitors-20170725/debian/control 2017-07-28 20:32:00.000000000 +0000 +++ ocaml-visitors-20170725/debian/control 2017-10-30 19:22:58.000000000 +0000 @@ -1,6 +1,6 @@ Source: ocaml-visitors Section: ocaml -Priority: extra +Priority: optional Maintainer: Debian OCaml Maintainers Uploaders: Ralf Treinen , Build-Depends: debhelper (>= 10), dh-ocaml (>= 0.9~), @@ -9,7 +9,7 @@ Build-Depends-Indep: texlive-latex-base, latexmk, lmodern, texlive-fonts-recommended, texlive-latex-extra, ocp-indent -Standards-Version: 4.0.0 +Standards-Version: 4.1.1 Homepage: https://gitlab.inria.fr/fpottier/visitors Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ocaml-maint/packages/ocaml-visitors.git Vcs-Git: https://anonscm.debian.org/git/pkg-ocaml-maint/packages/ocaml-visitors.git diff -Nru ocaml-visitors-20170725/debian/patches/07948b5b9207d87d510b920dc72c7ea08b267ea5.patch ocaml-visitors-20170725/debian/patches/07948b5b9207d87d510b920dc72c7ea08b267ea5.patch --- ocaml-visitors-20170725/debian/patches/07948b5b9207d87d510b920dc72c7ea08b267ea5.patch 2017-10-29 11:54:42.000000000 +0000 +++ ocaml-visitors-20170725/debian/patches/07948b5b9207d87d510b920dc72c7ea08b267ea5.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -## Description: add some description -## Origin/Author: add some origin or author -## Bug: bug URL -From 07948b5b9207d87d510b920dc72c7ea08b267ea5 Mon Sep 17 00:00:00 2001 -From: François Pottier -Date: Mon, 28 Aug 2017 18:20:44 +0200 -Subject: [PATCH] Compatibility with OCaml 4.05.0. - ---- - src/Visitors.ml | 4 ++-- - src/VisitorsCompatibility.cppo.ml | 19 +++++++++++++++++++ - src/VisitorsGeneration.ml | 2 +- - 3 files changed, 22 insertions(+), 3 deletions(-) - -diff --git a/src/Visitors.ml b/src/Visitors.ml -index 0ad37aa..2fea732 100644 ---- a/src/Visitors.ml -+++ b/src/Visitors.ml -@@ -387,7 +387,7 @@ let ty_env = - - let tyvar_visitor_method_type = - if X.poly "env" then -- Typ.poly ["env"] (ty_arrow ty_env ty_any) -+ typ_poly ["env"] (ty_arrow ty_env ty_any) - else - ty_any - -@@ -538,7 +538,7 @@ let quantify (alphas : tyvars) (ty : core_type) : core_type = - alphas - in - (* Done. *) -- Typ.poly alphas ty -+ typ_poly alphas ty - - (* -------------------------------------------------------------------------- *) - -diff --git a/src/VisitorsCompatibility.cppo.ml b/src/VisitorsCompatibility.cppo.ml -index 71b6b0f..d263409 100644 ---- a/src/VisitorsCompatibility.cppo.ml -+++ b/src/VisitorsCompatibility.cppo.ml -@@ -1,3 +1,4 @@ -+let mknoloc = Location.mknoloc - open Asttypes - open Parsetree - open Ast_helper -@@ -68,3 +69,21 @@ let data_constructor_variety (cd : constructor_declaration) = - | Pcstr_record lds -> - DataInlineRecord (ld_labels lds, ld_tys lds) - #endif -+ -+(* Between OCaml 4.04 and OCaml 4.05, the types of several functions in [Ast_helper] -+ have changed. They used to take arguments of type [string], and now take arguments -+ of type [str], thus requiring a conversion. These functions include [Typ.object_], -+ [Typ.poly], [Exp.send], [Exp.newtype], [Ctf.val_], [Ctf.method_], [Cf.inherit_]. *) -+ -+let string2str (s : string) = -+ #if OCAML_VERSION < (4, 05, 0) -+ s -+ #else -+ mknoloc s -+ #endif -+ -+let typ_poly (tyvars : string list) (cty : core_type) : core_type = -+ Typ.poly (List.map string2str tyvars) cty -+ -+let exp_send (e : expression) (m : string) : expression = -+ Exp.send e (string2str m) -diff --git a/src/VisitorsGeneration.ml b/src/VisitorsGeneration.ml -index 01fae98..2d656c2 100644 ---- a/src/VisitorsGeneration.ml -+++ b/src/VisitorsGeneration.ml -@@ -467,7 +467,7 @@ let is_virtual (Meth (_, _, oe, _)) : bool = - (* [send o m es] produces a call to the method [o#m] with arguments [es]. *) - - let send (o : variable) (m : methode) (es : expressions) : expression = -- app (Exp.send (evar o) m) es -+ app (exp_send (evar o) m) es - - (* -------------------------------------------------------------------------- *) - --- -libgit2 0.26.0 - diff -Nru ocaml-visitors-20170725/debian/patches/ocaml-4.05 ocaml-visitors-20170725/debian/patches/ocaml-4.05 --- ocaml-visitors-20170725/debian/patches/ocaml-4.05 1970-01-01 00:00:00.000000000 +0000 +++ ocaml-visitors-20170725/debian/patches/ocaml-4.05 2017-10-30 19:22:58.000000000 +0000 @@ -0,0 +1,70 @@ +Author: François Pottier +Description: compile with ocaml 4.05 +Upstream-commit: 07948b5b9207d87d510b920dc72c7ea08b267ea5 + +diff --git a/src/Visitors.ml b/src/Visitors.ml +index 0ad37aa..2fea732 100644 +--- a/src/Visitors.ml ++++ b/src/Visitors.ml +@@ -387,7 +387,7 @@ let ty_env = + + let tyvar_visitor_method_type = + if X.poly "env" then +- Typ.poly ["env"] (ty_arrow ty_env ty_any) ++ typ_poly ["env"] (ty_arrow ty_env ty_any) + else + ty_any + +@@ -538,7 +538,7 @@ let quantify (alphas : tyvars) (ty : core_type) : core_type = + alphas + in + (* Done. *) +- Typ.poly alphas ty ++ typ_poly alphas ty + + (* -------------------------------------------------------------------------- *) + +diff --git a/src/VisitorsCompatibility.cppo.ml b/src/VisitorsCompatibility.cppo.ml +index 71b6b0f..d263409 100644 +--- a/src/VisitorsCompatibility.cppo.ml ++++ b/src/VisitorsCompatibility.cppo.ml +@@ -1,3 +1,4 @@ ++let mknoloc = Location.mknoloc + open Asttypes + open Parsetree + open Ast_helper +@@ -68,3 +69,21 @@ let data_constructor_variety (cd : constructor_declaration) = + | Pcstr_record lds -> + DataInlineRecord (ld_labels lds, ld_tys lds) + #endif ++ ++(* Between OCaml 4.04 and OCaml 4.05, the types of several functions in [Ast_helper] ++ have changed. They used to take arguments of type [string], and now take arguments ++ of type [str], thus requiring a conversion. These functions include [Typ.object_], ++ [Typ.poly], [Exp.send], [Exp.newtype], [Ctf.val_], [Ctf.method_], [Cf.inherit_]. *) ++ ++let string2str (s : string) = ++ #if OCAML_VERSION < (4, 05, 0) ++ s ++ #else ++ mknoloc s ++ #endif ++ ++let typ_poly (tyvars : string list) (cty : core_type) : core_type = ++ Typ.poly (List.map string2str tyvars) cty ++ ++let exp_send (e : expression) (m : string) : expression = ++ Exp.send e (string2str m) +diff --git a/src/VisitorsGeneration.ml b/src/VisitorsGeneration.ml +index 01fae98..2d656c2 100644 +--- a/src/VisitorsGeneration.ml ++++ b/src/VisitorsGeneration.ml +@@ -467,7 +467,7 @@ let is_virtual (Meth (_, _, oe, _)) : bool = + (* [send o m es] produces a call to the method [o#m] with arguments [es]. *) + + let send (o : variable) (m : methode) (es : expressions) : expression = +- app (Exp.send (evar o) m) es ++ app (exp_send (evar o) m) es + + (* -------------------------------------------------------------------------- *) + diff -Nru ocaml-visitors-20170725/debian/patches/series ocaml-visitors-20170725/debian/patches/series --- ocaml-visitors-20170725/debian/patches/series 2017-10-29 11:54:42.000000000 +0000 +++ ocaml-visitors-20170725/debian/patches/series 2017-10-30 19:22:58.000000000 +0000 @@ -1 +1 @@ -07948b5b9207d87d510b920dc72c7ea08b267ea5.patch +ocaml-4.05