[arch-commits] Commit in camlp4/repos/community-x86_64 (4 files)

Jürgen Hötzel juergen at archlinux.org
Mon May 18 17:33:55 UTC 2020


    Date: Monday, May 18, 2020 @ 17:33:54
  Author: juergen
Revision: 629569

archrelease: copy trunk to community-x86_64

Added:
  camlp4/repos/community-x86_64/0001-compile-with-4.10-AST.patch
    (from rev 629568, camlp4/trunk/0001-compile-with-4.10-AST.patch)
  camlp4/repos/community-x86_64/PKGBUILD
    (from rev 629568, camlp4/trunk/PKGBUILD)
Deleted:
  camlp4/repos/community-x86_64/PKGBUILD
  camlp4/repos/community-x86_64/configure.patch

----------------------------------+
 0001-compile-with-4.10-AST.patch |  230 +++++++++++++++++++++++++++++++++++++
 PKGBUILD                         |   76 ++++++------
 configure.patch                  |   14 --
 3 files changed, 268 insertions(+), 52 deletions(-)

Copied: camlp4/repos/community-x86_64/0001-compile-with-4.10-AST.patch (from rev 629568, camlp4/trunk/0001-compile-with-4.10-AST.patch)
===================================================================
--- 0001-compile-with-4.10-AST.patch	                        (rev 0)
+++ 0001-compile-with-4.10-AST.patch	2020-05-18 17:33:54 UTC (rev 629569)
@@ -0,0 +1,230 @@
+From 98e094a7c3c01c6375c63e7b944d83142ea3166e Mon Sep 17 00:00:00 2001
+From: ygrek <ygrek at autistici.org>
+Date: Wed, 25 Mar 2020 16:04:36 -0400
+Subject: [PATCH 1/2] compile with 4.10 AST
+
+---
+ camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml | 20 ++++++++++----------
+ camlp4/Camlp4Top/Rprint.ml                 |  8 ++++----
+ camlp4/boot/Camlp4.ml                      | 22 ++++++++++------------
+ configure                                  |  4 ++--
+ opam                                       |  2 +-
+ 5 files changed, 27 insertions(+), 29 deletions(-)
+
+diff --git a/camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml b/camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml
+index c0bdf54e3..6ba906f4e 100644
+--- a/camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml
++++ b/camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml
+@@ -713,7 +713,7 @@ and row_field =
+     | PaTyp loc i -> mkpat loc (Ppat_type (long_type_ident i))
+     | PaVrn loc s -> mkpat loc (Ppat_variant (conv_con s) None)
+     | PaLaz loc p -> mkpat loc (Ppat_lazy (patt p))
+-    | PaMod loc m -> mkpat loc (Ppat_unpack (with_loc m loc))
++    | PaMod loc m -> mkpat loc (Ppat_unpack (with_loc (Some m) loc))
+     | PaExc loc p -> mkpat loc (Ppat_exception (patt p))
+     | PaAtt loc s str e ->
+         let e = patt e in
+@@ -931,7 +931,7 @@ value varify_constructors var_names =
+         match binding bi [] with
+         [ [] -> e
+         | bi -> mkexp loc (Pexp_let (mkrf rf) bi e) ]
+-    | ExLmd loc i me e -> mkexp loc (Pexp_letmodule (with_loc i loc) (module_expr me) (expr e))
++    | ExLmd loc i me e -> mkexp loc (Pexp_letmodule (with_loc (Some i) loc) (module_expr me) (expr e))
+     | ExMat loc e a -> mkexp loc (Pexp_match (expr e) (match_case a []))
+     | ExNew loc id -> mkexp loc (Pexp_new (long_type_ident id))
+     | ExObj loc po cfl ->
+@@ -1132,9 +1132,9 @@ value varify_constructors var_names =
+     [ <:module_type at loc<>> -> error loc "abstract/nil module type not allowed here"
+     | <:module_type at loc< $id:i$ >> -> mkmty loc (Pmty_ident (long_uident i))
+     | Ast.MtFun(loc, "*", Ast.MtNil _, mt) ->
+-        mkmty loc (Pmty_functor (with_loc "*" loc) None (module_type mt))
++        mkmty loc (Pmty_functor Unit (module_type mt))
+     | <:module_type at loc< functor ($n$ : $nt$) -> $mt$ >> ->
+-        mkmty loc (Pmty_functor (with_loc n loc) (Some (module_type nt)) (module_type mt))
++        mkmty loc (Pmty_functor (Named (with_loc (Some n) loc) (module_type nt)) (module_type mt))
+     | <:module_type at loc< '$_$ >> -> error loc "module type variable not allowed here"
+     | <:module_type at loc< sig $sl$ end >> ->
+         mkmty loc (Pmty_signature (sig_item sl []))
+@@ -1185,7 +1185,7 @@ value varify_constructors var_names =
+     | SgInc loc mt -> [mksig loc (Psig_include {pincl_mod=module_type mt;
+                                                 pincl_attributes=[];
+                                                 pincl_loc = mkloc loc}) :: l]
+-    | SgMod loc n mt -> [mksig loc (Psig_module {pmd_loc=mkloc loc; pmd_name=with_loc n loc; pmd_type=module_type mt; pmd_attributes=[]}) :: l]
++    | SgMod loc n mt -> [mksig loc (Psig_module {pmd_loc=mkloc loc; pmd_name=with_loc (Some n) loc; pmd_type=module_type mt; pmd_attributes=[]}) :: l]
+     | SgRecMod loc mb ->
+         [mksig loc (Psig_recmodule (module_sig_binding mb [])) :: l]
+     | SgMty loc n mt ->
+@@ -1215,7 +1215,7 @@ value varify_constructors var_names =
+     [ <:module_binding< $x$ and $y$ >> ->
+         module_sig_binding x (module_sig_binding y acc)
+     | <:module_binding at loc< $s$ : $mt$ >> ->
+-        [{pmd_loc=mkloc loc; pmd_name=with_loc s loc; pmd_type=module_type mt; pmd_attributes=[]} :: acc]
++        [{pmd_loc=mkloc loc; pmd_name=with_loc (Some s) loc; pmd_type=module_type mt; pmd_attributes=[]} :: acc]
+     | _ -> assert False ]
+   and module_str_binding x acc =
+     match x with
+@@ -1223,7 +1223,7 @@ value varify_constructors var_names =
+         module_str_binding x (module_str_binding y acc)
+     | <:module_binding at loc< $s$ : $mt$ = $me$ >> ->
+         [{pmb_loc=mkloc loc;
+-          pmb_name=with_loc s loc;
++          pmb_name=with_loc (Some s) loc;
+           pmb_expr=
+           {pmod_loc=Location.none;
+            pmod_desc=Pmod_constraint(module_expr me,module_type mt);
+@@ -1238,9 +1238,9 @@ value varify_constructors var_names =
+     | <:module_expr at loc< $me1$ $me2$ >> ->
+         mkmod loc (Pmod_apply (module_expr me1) (module_expr me2))
+     | Ast.MeFun(loc, "*", Ast.MtNil _, me) ->
+-        mkmod loc (Pmod_functor (with_loc "*" loc) None (module_expr me))
++        mkmod loc (Pmod_functor Unit (module_expr me))
+     | <:module_expr at loc< functor ($n$ : $mt$) -> $me$ >> ->
+-        mkmod loc (Pmod_functor (with_loc n loc) (Some (module_type mt)) (module_expr me))
++        mkmod loc (Pmod_functor (Named (with_loc (Some n) loc) (module_type mt)) (module_expr me))
+     | <:module_expr at loc< struct $sl$ end >> ->
+         mkmod loc (Pmod_structure (str_item sl []))
+     | <:module_expr at loc< ($me$ : $mt$) >> ->
+@@ -1299,7 +1299,7 @@ value varify_constructors var_names =
+     | StInc loc me -> [mkstr loc (Pstr_include {pincl_mod=module_expr me;
+                                                 pincl_attributes=[];
+                                                 pincl_loc=mkloc loc}) :: l]
+-    | StMod loc n me -> [mkstr loc (Pstr_module {pmb_loc=mkloc loc; pmb_name=with_loc n loc;pmb_expr=module_expr me;pmb_attributes=[]}) :: l]
++    | StMod loc n me -> [mkstr loc (Pstr_module {pmb_loc=mkloc loc; pmb_name=with_loc (Some n) loc;pmb_expr=module_expr me;pmb_attributes=[]}) :: l]
+     | StRecMod loc mb ->
+         [mkstr loc (Pstr_recmodule (module_str_binding mb [])) :: l]
+     | StMty loc n mt ->
+diff --git a/camlp4/Camlp4Top/Rprint.ml b/camlp4/Camlp4Top/Rprint.ml
+index c785b1d68..8961bc8b7 100644
+--- a/camlp4/Camlp4Top/Rprint.ml
++++ b/camlp4/Camlp4Top/Rprint.ml
+@@ -366,11 +366,11 @@ value rec print_out_module_type ppf =
+   | Omty_signature sg ->
+       fprintf ppf "@[<hv 2>sig@ %a@;<1 -2>end@]"
+         Toploop.print_out_signature.val sg
+-  | Omty_functor name None mty_res ->
+-      fprintf ppf "@[<2>functor@ (%s) ->@ %a@]" name
++  | Omty_functor None mty_res ->
++      fprintf ppf "@[<2>functor@ () ->@ %a@]"
+         print_out_module_type mty_res
+-  | Omty_functor name (Some mty_arg) mty_res ->
+-      fprintf ppf "@[<2>functor@ (%s : %a) ->@ %a@]" name
++  | Omty_functor (Some name mty_arg) mty_res ->
++      fprintf ppf "@[<2>functor@ (%s : %a) ->@ %a@]" (match name with [ None -> "_" | Some n -> n ])
+         print_out_module_type mty_arg print_out_module_type mty_res
+   | Omty_abstract -> () ]
+ and needs_semi =
+diff --git a/camlp4/boot/Camlp4.ml b/camlp4/boot/Camlp4.ml
+index dcb6a996b..32b8a8865 100644
+--- a/camlp4/boot/Camlp4.ml
++++ b/camlp4/boot/Camlp4.ml
+@@ -16216,7 +16216,7 @@ module Struct =
+               | PaVrn (loc, s) ->
+                   mkpat loc (Ppat_variant ((conv_con s), None))
+               | PaLaz (loc, p) -> mkpat loc (Ppat_lazy (patt p))
+-              | PaMod (loc, m) -> mkpat loc (Ppat_unpack (with_loc m loc))
++              | PaMod (loc, m) -> mkpat loc (Ppat_unpack (with_loc (Some m) loc))
+               | PaExc (loc, p) -> mkpat loc (Ppat_exception (patt p))
+               | PaAtt (loc, s, str, e) ->
+                   let e = patt e
+@@ -16483,7 +16483,7 @@ module Struct =
+                      | bi -> mkexp loc (Pexp_let ((mkrf rf), bi, e)))
+               | ExLmd (loc, i, me, e) ->
+                   mkexp loc
+-                    (Pexp_letmodule ((with_loc i loc), (module_expr me),
++                    (Pexp_letmodule ((with_loc (Some i) loc), (module_expr me),
+                        (expr e)))
+               | ExMat (loc, e, a) ->
+                   mkexp loc (Pexp_match ((expr e), (match_case a [])))
+@@ -16735,11 +16735,10 @@ module Struct =
+               | Ast.MtId (loc, i) -> mkmty loc (Pmty_ident (long_uident i))
+               | Ast.MtFun ((loc, "*", Ast.MtNil _, mt)) ->
+                   mkmty loc
+-                    (Pmty_functor ((with_loc "*" loc), None,
+-                       (module_type mt)))
++                    (Pmty_functor (Unit, (module_type mt)))
+               | Ast.MtFun (loc, n, nt, mt) ->
+                   mkmty loc
+-                    (Pmty_functor ((with_loc n loc), (Some (module_type nt)),
++                    (Pmty_functor (Named ((with_loc (Some n) loc), (module_type nt)),
+                        (module_type mt)))
+               | Ast.MtQuo (loc, _) ->
+                   error loc "module type variable not allowed here"
+@@ -16835,7 +16834,7 @@ module Struct =
+                      (Psig_module
+                         {
+                           pmd_loc = mkloc loc;
+-                          pmd_name = with_loc n loc;
++                          pmd_name = with_loc (Some n) loc;
+                           pmd_type = module_type mt;
+                           pmd_attributes = [];
+                         })) ::
+@@ -16890,7 +16889,7 @@ module Struct =
+               | Ast.MbCol (loc, s, mt) ->
+                   {
+                     pmd_loc = mkloc loc;
+-                    pmd_name = with_loc s loc;
++                    pmd_name = with_loc (Some s) loc;
+                     pmd_type = module_type mt;
+                     pmd_attributes = [];
+                   } :: acc
+@@ -16902,7 +16901,7 @@ module Struct =
+               | Ast.MbColEq (loc, s, mt, me) ->
+                   {
+                     pmb_loc = mkloc loc;
+-                    pmb_name = with_loc s loc;
++                    pmb_name = with_loc (Some s) loc;
+                     pmb_expr =
+                       {
+                         pmod_loc = Location.none;
+@@ -16923,11 +16922,10 @@ module Struct =
+                     (Pmod_apply ((module_expr me1), (module_expr me2)))
+               | Ast.MeFun ((loc, "*", Ast.MtNil _, me)) ->
+                   mkmod loc
+-                    (Pmod_functor ((with_loc "*" loc), None,
+-                       (module_expr me)))
++                    (Pmod_functor (Unit, (module_expr me)))
+               | Ast.MeFun (loc, n, mt, me) ->
+                   mkmod loc
+-                    (Pmod_functor ((with_loc n loc), (Some (module_type mt)),
++                    (Pmod_functor (Named ((with_loc (Some n) loc), (module_type mt)),
+                        (module_expr me)))
+               | Ast.MeStr (loc, sl) ->
+                   mkmod loc (Pmod_structure (str_item sl []))
+@@ -17050,7 +17048,7 @@ module Struct =
+                      (Pstr_module
+                         {
+                           pmb_loc = mkloc loc;
+-                          pmb_name = with_loc n loc;
++                          pmb_name = with_loc (Some n) loc;
+                           pmb_expr = module_expr me;
+                           pmb_attributes = [];
+                         })) ::
+diff --git a/configure b/configure
+index 277556b63..7bb18bb6c 100755
+--- a/configure
++++ b/configure
+@@ -39,8 +39,8 @@ if [ $major -lt 4 -o \( $major -eq 4 -a $minor -lt 2 \) ]; then
+     echo "The standalone Camlp4 requires OCaml >= 4.02."
+     echo "For previous versions of OCaml use the Camlp4 distributed with OCaml."
+     exit 2
+-elif [ $major -ne 4 -o $minor -ne 9 ]; then
+-    echo "This version of Camlp4 is for OCaml 4.09 but you are using OCaml $ocaml_version."
++elif [ $major -ne 4 -o $minor -ne 10 ]; then
++    echo "This version of Camlp4 is for OCaml 4.10 but you are using OCaml $ocaml_version."
+     if [ -d .git ] ; then
+       if [ $PINNED -eq 1 ] ; then
+         echo "You've used the wrong opam pin URL for this switch.">&2
+diff --git a/opam b/opam
+index 273e79aab..402d2d0f9 100644
+--- a/opam
++++ b/opam
+@@ -1,5 +1,5 @@
+ opam-version: "1.2"
+-version: "4.09"
++version: "4.10"
+ authors: ["Daniel de Rauglaudre" "Nicolas Pouillard"]
+ maintainer: "ygrek at autistici.org"
+ homepage: "https://github.com/ocaml/camlp4"
+-- 
+2.26.2
+

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-05-18 17:31:25 UTC (rev 629568)
+++ PKGBUILD	2020-05-18 17:33:54 UTC (rev 629569)
@@ -1,38 +0,0 @@
-# Maintainer: Alexander Rødseth <rodseth at gmail.com>
-# Contributor: Tobias Powalowski <tpowa at archlinux.org>
-
-pkgname=camlp4
-pkgver=4.08
-pkgrel=4
-pkgdesc='Caml preprocessor and pretty-printer'
-arch=('x86_64')
-license=('GPL2')
-url='https://github.com/ocaml/camlp4/releases'
-depends=('ocaml>=4.09.0')
-makedepends=('git' 'ocamlbuild' 'ocaml-compiler-libs')
-options=('!makeflags' '!emptydirs' 'staticlibs')
-source=("https://github.com/ocaml/camlp4/archive/4.08+1.tar.gz" "configure.patch")
-sha256sums=('655cd3bdcafbf8435877f60f4b47dd2eb69feef5afd8881291ef01ba12bd9d88'
-            '6add54ea15e44df000446deede1e9aa0bad742c647b3d1cd4e67db0bb947fb98')
-
-prepare() {
-  cd "${srcdir}/$pkgname-${pkgver}-1"
-  patch -i  "${srcdir}/configure.patch" -p0
-}
-
-build() {
-  cd "${srcdir}/$pkgname-${pkgver}-1"
-  ./configure
-  make all camlp4/META
-}
-
-package() {
-  cd "${srcdir}/$pkgname-${pkgver}-1"
-  make \
-    BINDIR="$pkgdir/usr/bin" \
-    LIBDIR="$pkgdir/usr/lib/ocaml" \
-    PKGDIR="$pkgdir/usr/lib/ocaml" \
-    install install-META
-}
-
-# vim:set ts=2 sw=2 et:

Copied: camlp4/repos/community-x86_64/PKGBUILD (from rev 629568, camlp4/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-05-18 17:33:54 UTC (rev 629569)
@@ -0,0 +1,38 @@
+# Maintainer: Alexander Rødseth <rodseth at gmail.com>
+# Contributor: Tobias Powalowski <tpowa at archlinux.org>
+
+pkgname=camlp4
+pkgver=4.09
+pkgrel=1
+pkgdesc='Caml preprocessor and pretty-printer'
+arch=('x86_64')
+license=('GPL2')
+url='https://github.com/ocaml/camlp4/releases'
+depends=('ocaml>=4.10.0')
+makedepends=('git' 'ocamlbuild' 'ocaml-compiler-libs')
+options=('!makeflags' '!emptydirs' 'staticlibs')
+source=("https://github.com/ocaml/camlp4/archive/4.09+1.tar.gz" "0001-compile-with-4.10-AST.patch")
+sha256sums=('7b4a8b0632dfb06b85b95c400fcf700230997246240e30d74ff996a36763282c'
+            '2750badbbcc10e2c26afbf5b9ca8620d50a15872c2a3b2cf2975860d01c6d50e')
+
+prepare() {
+  cd "${srcdir}/$pkgname-${pkgver}-1"
+  patch -i "${srcdir}/0001-compile-with-4.10-AST.patch" -p1
+}
+
+build() {
+  cd "${srcdir}/$pkgname-${pkgver}-1"
+  ./configure
+  make all camlp4/META
+}
+
+package() {
+  cd "${srcdir}/$pkgname-${pkgver}-1"
+  make \
+    BINDIR="$pkgdir/usr/bin" \
+    LIBDIR="$pkgdir/usr/lib/ocaml" \
+    PKGDIR="$pkgdir/usr/lib/ocaml" \
+    install install-META
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: configure.patch
===================================================================
--- configure.patch	2020-05-18 17:31:25 UTC (rev 629568)
+++ configure.patch	2020-05-18 17:33:54 UTC (rev 629569)
@@ -1,14 +0,0 @@
---- configure.sic	2019-09-30 15:48:53.742897037 +0200
-+++ configure	2019-09-30 15:49:12.492545288 +0200
-@@ -39,8 +39,8 @@
-     echo "The standalone Camlp4 requires OCaml >= 4.02."
-     echo "For previous versions of OCaml use the Camlp4 distributed with OCaml."
-     exit 2
--elif [ $major -ne 4 -o $minor -ne 8 ]; then
--    echo "This version of Camlp4 is for OCaml 4.07 but you are using OCaml $ocaml_version."
-+elif [ $major -ne 4 -o $minor -ne 9 ]; then
-+    echo "This version of Camlp4 is for OCaml 4.09 but you are using OCaml $ocaml_version."
-     if [ -d .git ] ; then
-       if [ $PINNED -eq 1 ] ; then
-         echo "You've used the wrong opam pin URL for this switch.">&2
-



More information about the arch-commits mailing list