Hello community,

here is the log from the commit of package ocaml-cppo for openSUSE:Factory 
checked in at 2017-05-27 13:18:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocaml-cppo (Old)
 and      /work/SRC/openSUSE:Factory/.ocaml-cppo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocaml-cppo"

Sat May 27 13:18:03 2017 rev:2 rq:498037 version:1.5.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocaml-cppo/ocaml-cppo.changes    2016-10-19 
13:01:08.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ocaml-cppo.new/ocaml-cppo.changes       
2017-05-27 13:19:04.397497211 +0200
@@ -1,0 +2,5 @@
+Wed May 17 14:40:14 UTC 2017 - oher...@suse.de
+
+- Update to version 1.5.0
+
+-------------------------------------------------------------------

Old:
----
  ocaml-cppo-1.3.2.tar.xz

New:
----
  ocaml-cppo-1.5.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ocaml-cppo.spec ++++++
--- /var/tmp/diff_new_pack.DgyVeY/_old  2017-05-27 13:19:05.557333241 +0200
+++ /var/tmp/diff_new_pack.DgyVeY/_new  2017-05-27 13:19:05.557333241 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ocaml-cppo
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2015 LISA GmbH, Bingen, Germany.
 #
 # All modifications and additions to the file contributed by third parties
@@ -16,14 +16,15 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 Name:           ocaml-cppo
-Version:       1.3.2
+Version:        1.5.0
 Release:       0
 %{ocaml_preserve_bytecode}
-License:       BSD-3-Clause
 Summary:       The C preprocessor written in OCaml
-Url:           http://mjambon.com/cppo.html
+License:        BSD-3-Clause
 Group:         Development/Libraries/Other
+Url:            http://mjambon.com/cppo.html
 Source:                %{name}-%{version}.tar.xz
 BuildRequires:  ocaml
 BuildRequires:  ocaml-oasis
@@ -37,7 +38,8 @@
 # ocaml autodep start for pkg: ocaml-cppo
 # hardcoded rpm dependency for pre 12.1 to compensate for lack of ocaml() 
provides/requires
 %if 0%{?suse_version} < 1210
-Requires:       ocaml-ocamlbuild ocaml-runtime
+Requires:       ocaml-ocamlbuild
+Requires:       ocaml-runtime
 %endif
 # ocaml autodep end for pkg: ocaml-cppo
 
@@ -72,7 +74,7 @@
 sh -c "sed 's/^Version.*/Version: %{version}/' | tee _oasis" <<_EOF_
 OASISFormat: 0.4
 Name:        cppo
-Version:     %{version}
+Version:     0
 Synopsis:    The C preprocessor written in OCaml
 Authors:     Martin Jambon
 LicenseFile: LICENSE
@@ -145,3 +147,4 @@
 %{_libdir}/ocaml/*/*.mli
 %{_libdir}/ocaml/*/META
 
+%changelog

++++++ _service ++++++
--- /var/tmp/diff_new_pack.DgyVeY/_old  2017-05-27 13:19:05.593328152 +0200
+++ /var/tmp/diff_new_pack.DgyVeY/_new  2017-05-27 13:19:05.593328152 +0200
@@ -2,8 +2,8 @@
   <service name="tar_scm" mode="disabled">
     <param name="url">git://github.com/mjambon/cppo.git</param>
     <param name="scm">git</param>
-    <param name="versionformat">1.3.2</param>
-    <param name="revision">v1.3.2</param>
+    <param name="versionformat">1.5.0</param>
+    <param name="revision">v1.5.0</param>
     <param name="filename">ocaml-cppo</param>
   </service>
   <service name="recompress" mode="disabled">

++++++ ocaml-cppo-1.3.2.tar.xz -> ocaml-cppo-1.5.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-cppo-1.3.2/Makefile 
new/ocaml-cppo-1.5.0/Makefile
--- old/ocaml-cppo-1.3.2/Makefile       2016-06-20 22:00:25.000000000 +0200
+++ new/ocaml-cppo-1.5.0/Makefile       2017-04-24 22:34:11.000000000 +0200
@@ -1,4 +1,4 @@
-VERSION = 1.3.2
+VERSION = 1.5.0
 
 ifeq "$(shell ocamlc -config |grep os_type)" "os_type: Win32"
 EXE=.exe
@@ -45,6 +45,7 @@
 endif
 
 OCAMLBUILD_INSTALL = ocamlbuild_plugin/_build/ocamlbuild_cppo.cmi \
+                     ocamlbuild_plugin/_build/ocamlbuild_cppo.cmx \
                      $(addprefix ocamlbuild_plugin/_build/,$(OCAMLBUILD_IMPL))
 
 
@@ -61,14 +62,14 @@
 OCAMLBUILD_ML = ocamlbuild_cppo.ml
 
 all: $(ML)
-       ocamlc -o cppo$(EXE) -dtypes unix.cma str.cma $(ML)
+       ocamlfind ocamlc -o cppo$(EXE) -dtypes -linkpkg -package "unix str 
bytes" $(ML)
 
 opt: $(ML)
-       ocamlopt -o cppo$(EXE) -dtypes unix.cmxa str.cmxa $(ML)
+       ocamlfind ocamlopt -o cppo$(EXE) -dtypes -linkpkg -package "unix str 
bytes" $(ML)
 
 # For debugging; not installed.
 toplib: $(ML)
-       ocamlc -a -o cppo.cma -dtypes unix.cma str.cma $(ML)
+       ocamlfind ocamlc -a -o cppo.cma -dtypes -linkpkg -package "unix str 
bytes" $(ML)
 
 ocamlbuild:
        cd ocamlbuild_plugin && ocamlbuild -use-ocamlfind $(OCAMLBUILD_IMPL)
@@ -83,6 +84,11 @@
        ocamlfind install -patch-version ${VERSION} "cppo_ocamlbuild" \
                META $(OCAMLBUILD_INSTALL)
 
+uninstall-lib:
+       ocamlfind remove cppo_ocamlbuild
+
+reinstall-lib: uninstall-lib install-lib
+
 cppo_version.ml: Makefile
        echo 'let cppo_version = "$(VERSION)"' > cppo_version.ml
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-cppo-1.3.2/README.md 
new/ocaml-cppo-1.5.0/README.md
--- old/ocaml-cppo-1.3.2/README.md      2016-06-20 22:00:25.000000000 +0200
+++ new/ocaml-cppo-1.5.0/README.md      2017-04-24 22:34:11.000000000 +0200
@@ -358,6 +358,24 @@
 
 `CONCAT(a,b)` is roughly equivalent to `a##b` in cpp syntax.
 
+CAPITALIZE
+---------------
+
+`CAPITALIZE()` is a predefined macro that takes one argument,
+removes any leading and trailing whitespace, reduces each internal
+whitespace sequence to a single space character and produces
+a valid OCaml identifer with first character.
+
+For example,
+```ocaml
+#define EVENT(n,ty) external CONCAT(on,CAPITALIZE(n)) : ty = STRINGIFY(n) 
[@@bs.val] 
+EVENT(exit, unit -> unit)
+```
+is expanded into:
+
+```ocaml
+external  onExit  :  unit -> unit = "exit" [@@bs.val]
+```
 
 Stringification
 ---------------
@@ -406,8 +424,9 @@
     )
 ```
 
-The plugin will apply cppo on all files ending in `.cppo.ml` in order
-to produce`.ml` files. The following tags are available:
+By default the plugin will apply cppo on all files ending in `.cppo.ml`
+`cppo.mli`, and `cppo.mlpack`, in order to produce `.ml`, `.mli`,
+and`.mlpack` files.  The following tags are available:
 * `cppo_D(X)` ≡ `-D X`
 * `cppo_U(X)` ≡ `-U X`
 * `cppo_q` ≡ `-q`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-cppo-1.3.2/cppo_eval.ml 
new/ocaml-cppo-1.5.0/cppo_eval.ml
--- old/ocaml-cppo-1.3.2/cppo_eval.ml   2016-06-20 22:00:25.000000000 +0200
+++ new/ocaml-cppo-1.5.0/cppo_eval.ml   2017-04-24 22:34:11.000000000 +0200
@@ -23,6 +23,13 @@
                                  `Ident (dummy_loc, "y", None))],
                        env)
             );
+  "CAPITALIZE", (fun env ->
+    `Defun (dummy_loc, "CAPITALIZE",
+            ["x"],
+            [`Capitalize (`Ident (dummy_loc, "x", None))],
+            env)
+  );
+
 ]
 
 let is_reserved s =
@@ -84,7 +91,11 @@
   let buf = Buffer.create (String.length s) in
   trim_and_compact buf s;
   Buffer.contents buf
-
+let trim_compact_and_capitalize_string s =
+  let buf = Buffer.create (String.length s) in
+  trim_and_compact buf s;
+  String.capitalize (Buffer.contents buf)
+  
 let is_ident s =
   let len = String.length s in
   len > 0
@@ -442,7 +453,7 @@
 and expand_list ?(top = false) g env l =
   List.fold_left (expand_node ~top g) env l
 
-and expand_node ?(top = false) g env0 x =
+and expand_node ?(top = false) g env0 (x : node) =
   match x with
       `Ident (loc, name, opt_args) ->
 
@@ -610,6 +621,20 @@
         g.enable_loc := enable_loc0;
         env0
 
+    | `Capitalize (x : node) ->
+        let enable_loc0 = !(g.enable_loc) in
+        g.enable_loc := false;
+        let buf0 = g.buf in
+        let local_buf = Buffer.create 100 in
+        g.buf <- local_buf;
+        ignore (expand_node g env0 x);
+        let xs = Buffer.contents local_buf in
+        let s = trim_compact_and_capitalize_string xs in
+          (* stringify buf0 (Buffer.contents local_buf); *)
+        Buffer.add_string buf0 s ;
+        g.buf <- buf0;
+        g.enable_loc := enable_loc0;
+        env0
     | `Concat (x, y) ->
         let enable_loc0 = !(g.enable_loc) in
         g.enable_loc := false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-cppo-1.3.2/cppo_lexer.mll 
new/ocaml-cppo-1.5.0/cppo_lexer.mll
--- old/ocaml-cppo-1.3.2/cppo_lexer.mll 2016-06-20 22:00:25.000000000 +0200
+++ new/ocaml-cppo-1.5.0/cppo_lexer.mll 2017-04-24 22:34:11.000000000 +0200
@@ -19,7 +19,7 @@
   let n = ref 0 in
   let s = lb.lex_buffer in
   for i = lb.lex_start_pos to lb.lex_curr_pos do
-    if s.[i] = '\n' then
+    if Bytes.get s i = '\n' then
       incr n
   done;
   let p = lb.lex_curr_p in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-cppo-1.3.2/cppo_types.ml 
new/ocaml-cppo-1.5.0/cppo_types.ml
--- old/ocaml-cppo-1.3.2/cppo_types.ml  2016-06-20 22:00:25.000000000 +0200
+++ new/ocaml-cppo-1.5.0/cppo_types.ml  2017-04-24 22:34:11.000000000 +0200
@@ -58,6 +58,7 @@
     | `Text of (loc * bool * string) (* bool is true for space tokens *)
     | `Seq of node list
     | `Stringify of node
+    | `Capitalize of node
     | `Concat of (node * node)
     | `Line of (loc * string option * int)
     | `Current_line of loc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-cppo-1.3.2/ocamlbuild_plugin/ocamlbuild_cppo.ml 
new/ocaml-cppo-1.5.0/ocamlbuild_plugin/ocamlbuild_cppo.ml
--- old/ocaml-cppo-1.3.2/ocamlbuild_plugin/ocamlbuild_cppo.ml   2016-06-20 
22:00:25.000000000 +0200
+++ new/ocaml-cppo-1.5.0/ocamlbuild_plugin/ocamlbuild_cppo.ml   2017-04-24 
22:34:11.000000000 +0200
@@ -1,23 +1,22 @@
 
 open Ocamlbuild_plugin
 
+let cppo_rules ext =
+  let dep   = "%(name).cppo"-.-ext
+  and prod1 = "%(name: <*> and not <*.cppo>)"-.-ext
+  and prod2 = "%(name: <**/*> and not <**/*.cppo>)"-.-ext in
+  let cppo_rule prod env _build =
+    let dep = env dep in
+    let prod = env prod in
+    let tags = tags_of_pathname prod ++ "cppo" in
+    Cmd (S[A "cppo"; T tags; S [A "-o"; P prod]; P dep ])
+  in
+  rule ("cppo: *.cppo."-.-ext^" -> *."-.-ext)  ~dep ~prod:prod1 (cppo_rule 
prod1);
+  rule ("cppo: **/*.cppo."-.-ext^" -> **/*."-.-ext)  ~dep ~prod:prod2 
(cppo_rule prod2)
+
 let dispatcher = function
   | After_rules -> begin
-      let cppo_rules ext =
-        let dep   = "%(name).cppo"-.-ext
-        and prod1 = "%(name: <*> and not <*.cppo>)"-.-ext
-        and prod2 = "%(name: <**/*> and not <**/*.cppo>)"-.-ext in
-        let cppo_rule prod env _build =
-          let dep = env dep in
-          let prod = env prod in
-          let tags = tags_of_pathname prod ++ "cppo" in
-          Cmd (S[A "cppo"; T tags; S [A "-o"; P prod]; P dep ])
-        in
-        rule ("cppo: *.cppo."-.-ext^" -> *."-.-ext)  ~dep ~prod:prod1 
(cppo_rule prod1);
-        rule ("cppo: **/*.cppo."-.-ext^" -> **/*."-.-ext)  ~dep ~prod:prod2 
(cppo_rule prod2);
-      in
-      List.iter cppo_rules ["ml"; "mli"];
-
+      List.iter cppo_rules ["ml"; "mli"; "mlpack"];
       pflag ["cppo"] "cppo_D" (fun s -> S [A "-D"; A s]) ;
       pflag ["cppo"] "cppo_U" (fun s -> S [A "-U"; A s]) ;
       pflag ["cppo"] "cppo_I" (fun s ->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-cppo-1.3.2/ocamlbuild_plugin/ocamlbuild_cppo.mli 
new/ocaml-cppo-1.5.0/ocamlbuild_plugin/ocamlbuild_cppo.mli
--- old/ocaml-cppo-1.3.2/ocamlbuild_plugin/ocamlbuild_cppo.mli  2016-06-20 
22:00:25.000000000 +0200
+++ new/ocaml-cppo-1.5.0/ocamlbuild_plugin/ocamlbuild_cppo.mli  2017-04-24 
22:34:11.000000000 +0200
@@ -1,2 +1,9 @@
 
+(** [cppo_rules extension] will add rules to Ocamlbuild so that
+    cppo is applied to files ending in "cppo.[extension]".
+
+    By default rules are inserted for files ending with "ml", "mli" and
+    "mlpack". *)
+val cppo_rules : string -> unit
+
 val dispatcher : Ocamlbuild_plugin.hook -> unit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-cppo-1.3.2/opam new/ocaml-cppo-1.5.0/opam
--- old/ocaml-cppo-1.3.2/opam   2016-06-20 22:00:25.000000000 +0200
+++ new/ocaml-cppo-1.5.0/opam   2017-04-24 22:34:11.000000000 +0200
@@ -1,13 +1,26 @@
-opam-version: "1"
-maintainer: "cont...@ocamlpro.com"
+opam-version: "1.2"
+maintainer: "mar...@mjambon.com"
 authors: ["Martin Jambon"]
 homepage: "http://mjambon.com/cppo.html";
+dev-repo: "https://github.com/mjambon/cppo.git";
+bug-reports: "https://github.com/mjambon/cppo/issues";
 license: "BSD-3-Clause"
 build: [
-  [make]
+  [make "all"] {!ocaml-native}
+  [make "opt"] {ocaml-native}
+  [make "ocamlbuild"]
+]
+
+install: [
   [make "install-lib"]
 ]
 
 remove: [
-  ["ocamlfind" "remove" "cppo_ocamlbuild"]
-]
\ No newline at end of file
+  ["make" "uninstall-lib"]
+]
+
+depends: [
+  "ocamlfind"
+  "ocamlbuild"
+  "base-bytes"
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-cppo-1.3.2/test/Makefile 
new/ocaml-cppo-1.5.0/test/Makefile
--- old/ocaml-cppo-1.3.2/test/Makefile  2016-06-20 22:00:25.000000000 +0200
+++ new/ocaml-cppo-1.5.0/test/Makefile  2017-04-24 22:34:11.000000000 +0200
@@ -1,4 +1,4 @@
-TESTS = ext comments cond tuple paren_arg unmatched version
+TESTS = ext comments cond tuple paren_arg unmatched version capital
 .PHONY: all clean $(TESTS)
 
 all: $(TESTS)
@@ -36,5 +36,8 @@
 version:
        ../cppo -V X:123.05.2-alpha.1+foo-2.1 version.cppo > version.out
 
+capital:
+       ../cppo $@.cppo > $@.out
+       diff -u $@.ref $@.out
 clean:
        rm -f *~ *.out
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-cppo-1.3.2/test/capital.cppo 
new/ocaml-cppo-1.5.0/test/capital.cppo
--- old/ocaml-cppo-1.3.2/test/capital.cppo      1970-01-01 01:00:00.000000000 
+0100
+++ new/ocaml-cppo-1.5.0/test/capital.cppo      2017-04-24 22:34:11.000000000 
+0200
@@ -0,0 +1,6 @@
+
+
+#define EVENT(n,ty) external CONCAT(on,CAPITALIZE(n)) : ty = STRINGIFY(n) 
[@@bs.val] 
+
+
+EVENT(exit, unit -> unit)
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-cppo-1.3.2/test/capital.ref 
new/ocaml-cppo-1.5.0/test/capital.ref
--- old/ocaml-cppo-1.3.2/test/capital.ref       1970-01-01 01:00:00.000000000 
+0100
+++ new/ocaml-cppo-1.5.0/test/capital.ref       2017-04-24 22:34:11.000000000 
+0200
@@ -0,0 +1,6 @@
+
+
+
+
+# 6 "capital.cppo"
+ external  onExit  :  unit -> unit = "exit" [@@bs.val]  
\ No newline at end of file


Reply via email to