Hello community, here is the log from the commit of package ocaml-result for openSUSE:Factory checked in at 2019-09-07 11:52:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ocaml-result (Old) and /work/SRC/openSUSE:Factory/.ocaml-result.new.7948 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ocaml-result" Sat Sep 7 11:52:48 2019 rev:2 rq:728576 version:1.4 Changes: -------- --- /work/SRC/openSUSE:Factory/ocaml-result/ocaml-result.changes 2018-01-29 14:57:35.558143508 +0100 +++ /work/SRC/openSUSE:Factory/.ocaml-result.new.7948/ocaml-result.changes 2019-09-07 11:52:49.402279290 +0200 @@ -1,0 +2,9 @@ +Thu Sep 5 16:51:04 UTC 2019 - [email protected] + +- Update to version 1.4: + * Support for OCaml 4.08. + * Switch to dune. +- Changes from version 1.3: + * Switch to jbuilder. + +------------------------------------------------------------------- Old: ---- result-1.2.tar.gz New: ---- result-1.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ocaml-result.spec ++++++ --- /var/tmp/diff_new_pack.5UDA6f/_old 2019-09-07 11:52:49.886279221 +0200 +++ /var/tmp/diff_new_pack.5UDA6f/_new 2019-09-07 11:52:49.890279221 +0200 @@ -1,7 +1,7 @@ # # spec file for package ocaml-result # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,25 +12,23 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define _name result Name: ocaml-result -Version: 1.2 +Version: 1.4 Release: 0 %{?ocaml_preserve_bytecode} Summary: Compatibility OCaml Result module License: BSD-3-Clause Group: Development/Languages/OCaml Url: https://github.com/janestreet/result -Source: %{_name}-%{version}.tar.gz +Source0: %{url}/archive/%{version}/%{_name}-%{version}.tar.gz BuildRequires: ocaml -BuildRequires: ocaml-oasis -BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-dune BuildRequires: ocaml-rpm-macros >= 4.03 -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Projects that want to use the new result type defined in OCaml >= 4.03 while @@ -38,7 +36,7 @@ defined in this library. %package devel -Summary: Compatibility OCaml Result module -- Development files +Summary: Development files for the Compatibility OCaml Result module Group: Development/Languages/OCaml Requires: %{name} = %{version} @@ -53,64 +51,33 @@ %setup -q -n %{_name}-%{version} %build -make result.ml -rm -fv setup.ml myocamlbuild.ml META* _* */_* -# obs service changes every ^Version line ... -sh -c "sed 's/^Version.*/Version: %{version}/' | tee _oasis" <<_EOF_ -OASISFormat: 0.4 -Name: %{_name} -Version: 0 -Synopsis: Result type -Authors: Jane Street Group, LLC <[email protected]> -License: %{license} -LicenseFile: LICENSE -Plugins: META(`oasis version`) -BuildTools: ocamlbuild - -Library %{_name} - Path: . - Install: true - Modules: Result - -Document %{_name} - Title: API reference for %{_name} - Type: ocamlbuild - BuildTools+: ocamldoc - InstallDir: \$htmldir - Install: true - XOCamlbuildPath: . - XOCamlbuildLibraries: %{_name} -_EOF_ -%oasis_setup -%ocaml_oasis_configure --enable-docs -%ocaml_oasis_build -%ocaml_oasis_doc +dune build @install --profile=release %install -%ocaml_oasis_findlib_install +dune install --prefix=%{buildroot}%{_prefix} --libdir=%{buildroot}%{_libdir}/ocaml +rm -r %{buildroot}%{_prefix}/doc %files -%defattr(-,root,root) +%doc CHANGES.md README.md +%license LICENSE.md %dir %{_libdir}/ocaml -%dir %{_libdir}/ocaml/* %if 0%{?ocaml_native_compiler} %{_libdir}/ocaml/*/*.cmxs %endif %files devel -%defattr(-,root,root,-) -%{oasis_docdir_html} %dir %{_libdir}/ocaml/* %if 0%{?ocaml_native_compiler} %{_libdir}/ocaml/*/*.a %{_libdir}/ocaml/*/*.cmx %{_libdir}/ocaml/*/*.cmxa %endif -%{_libdir}/ocaml/*/*.annot %{_libdir}/ocaml/*/*.cma %{_libdir}/ocaml/*/*.cmi %{_libdir}/ocaml/*/*.cmt %{_libdir}/ocaml/*/*.ml %{_libdir}/ocaml/*/META +%{_libdir}/ocaml/*/dune-package +%{_libdir}/ocaml/*/opam %changelog ++++++ result-1.2.tar.gz -> result-1.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/.gitignore new/result-1.4/.gitignore --- old/result-1.2/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/result-1.4/.gitignore 2019-04-04 09:57:52.000000000 +0200 @@ -0,0 +1,4 @@ +_build +*.install +*.merlin +_opam diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/CHANGES.md new/result-1.4/CHANGES.md --- old/result-1.2/CHANGES.md 1970-01-01 01:00:00.000000000 +0100 +++ new/result-1.4/CHANGES.md 2019-04-04 09:57:52.000000000 +0200 @@ -0,0 +1,4 @@ +1.3 (05/02/2018) +---------------- + +- Switch to jbuilder diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/LICENSE new/result-1.4/LICENSE --- old/result-1.2/LICENSE 2016-03-03 16:24:37.000000000 +0100 +++ new/result-1.4/LICENSE 1970-01-01 01:00:00.000000000 +0100 @@ -1,24 +0,0 @@ -Copyright (c) 2015, Jane Street Group, LLC <[email protected]> -All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Jane Street Group nor the names of his - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/LICENSE.md new/result-1.4/LICENSE.md --- old/result-1.2/LICENSE.md 1970-01-01 01:00:00.000000000 +0100 +++ new/result-1.4/LICENSE.md 2019-04-04 09:57:52.000000000 +0200 @@ -0,0 +1,24 @@ +Copyright (c) 2015, Jane Street Group, LLC <[email protected]> +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Jane Street Group nor the names of his + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/META new/result-1.4/META --- old/result-1.2/META 2016-03-03 16:24:37.000000000 +0100 +++ new/result-1.4/META 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -version = "1.0" -description = "Result type" -archive(byte) = "result.cma" -archive(byte, plugin) = "result.cma" -archive(native) = "result.cmxa" -archive(native, plugin) = "result.cmxs" -exists_if = "result.cma" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/Makefile new/result-1.4/Makefile --- old/result-1.2/Makefile 2016-03-03 16:24:37.000000000 +0100 +++ new/result-1.4/Makefile 2019-04-04 09:57:52.000000000 +0200 @@ -1,32 +1,20 @@ -.PHONY: all -all: byte native result.install +INSTALL_ARGS := $(if $(PREFIX),--prefix $(PREFIX),) -result.ml: which_result.ml - cp `ocaml which_result.ml` result.ml +default: + jbuilder build @install -.PHONY: byte -byte: result.ml - ocamlc -c result.ml - ocamlc -a -o result.cma result.cmo - -.PHONY: native -native: result.ml - ocamlopt -c result.ml - ocamlopt -a -o result.cmxa result.cmx - ocamlopt -shared -linkall -o result.cmxs result.cmxa || true - -result.install: result.cma gen_result_install.ml - ocaml gen_result_install.ml - -.PHONY: install install: - ocamlfind remove result 2> /dev/null || true - ocamlfind install result META result.* + jbuilder install $(INSTALL_ARGS) -.PHONY: uninstall uninstall: - ocamlfind remove result + jbuilder uninstall $(INSTALL_ARGS) + +reinstall: uninstall reinstall -.PHONY: clean clean: - rm -f result.* + jbuilder clean + +all-supported-ocaml-versions: + jbuilder build --workspace jbuild-workspace.dev + +.PHONY: default install uninstall reinstall clean all-supported-ocaml-versions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/dune new/result-1.4/dune --- old/result-1.2/dune 1970-01-01 01:00:00.000000000 +0100 +++ new/result-1.4/dune 2019-04-04 09:57:52.000000000 +0200 @@ -0,0 +1,12 @@ +(library + (name result) + (public_name result) + (modules result)) + +(rule + (with-stdout-to + selected + (run %{ocaml} %{dep:which_result.ml} %{ocaml_version}))) + +(rule + (copy# %{read:selected} result.ml)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/dune-project new/result-1.4/dune-project --- old/result-1.2/dune-project 1970-01-01 01:00:00.000000000 +0100 +++ new/result-1.4/dune-project 2019-04-04 09:57:52.000000000 +0200 @@ -0,0 +1,2 @@ +(lang dune 1.0) +(name result) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/gen_result_install.ml new/result-1.4/gen_result_install.ml --- old/result-1.2/gen_result_install.ml 2016-03-03 16:24:37.000000000 +0100 +++ new/result-1.4/gen_result_install.ml 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -let is_prefix s ~prefix = - let len = String.length prefix in - String.length s >= len && String.sub s 0 len = prefix -;; - -let () = - let install_it = function - | "META" -> true - | "result.install" -> false - | s -> is_prefix s ~prefix:"result." - in - let to_install = - let ( |> ) x f = f x in - Sys.readdir "." - |> Array.to_list - |> List.filter install_it - |> List.sort String.compare - |> List.map (Printf.sprintf "%S") - in - let oc = open_out "result.install" in - Printf.fprintf oc "lib: [ %s ]\n" - (String.concat " " to_install) -;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/jbuild-workspace.dev new/result-1.4/jbuild-workspace.dev --- old/result-1.2/jbuild-workspace.dev 1970-01-01 01:00:00.000000000 +0100 +++ new/result-1.4/jbuild-workspace.dev 2019-04-04 09:57:52.000000000 +0200 @@ -0,0 +1,12 @@ +;; Install the following opam switches, copy this file as +;; jbuild-workspace and run: +;; +;; $ jbuilder build @install +;; +;; This will build result against all these version of OCaml + +(context ((switch 4.02.3))) +(context ((switch 4.03.0))) +(context ((switch 4.04.2))) +(context ((switch 4.05.0))) +(context ((switch 4.06.0))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/pkg/pkg.ml new/result-1.4/pkg/pkg.ml --- old/result-1.2/pkg/pkg.ml 1970-01-01 01:00:00.000000000 +0100 +++ new/result-1.4/pkg/pkg.ml 2019-04-04 09:57:52.000000000 +0200 @@ -0,0 +1,2 @@ +#use "topfind" +#require "topkg-jbuilder.auto" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/result-as-alias.ml new/result-1.4/result-as-alias.ml --- old/result-1.2/result-as-alias.ml 2016-03-03 16:24:37.000000000 +0100 +++ new/result-1.4/result-as-alias.ml 2019-04-04 09:57:52.000000000 +0200 @@ -1 +1 @@ -type ('a, 'b) result = ('a, 'b) Pervasives.result = Ok of 'a | Error of 'b +type nonrec ('a, 'b) result = ('a, 'b) result = Ok of 'a | Error of 'b diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/result.opam new/result-1.4/result.opam --- old/result-1.2/result.opam 1970-01-01 01:00:00.000000000 +0100 +++ new/result-1.4/result.opam 2019-04-04 09:57:52.000000000 +0200 @@ -0,0 +1,9 @@ +opam-version: "1.2" +maintainer: "[email protected]" +authors: ["Jane Street Group, LLC <[email protected]>"] +homepage: "https://github.com/janestreet/result" +dev-repo: "https://github.com/janestreet/result.git" +bug-reports: "https://github.com/janestreet/result/issues" +license: "BSD3" +build: [["dune" "build" "-p" name "-j" jobs]] +depends: ["dune" {build}] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/result-1.2/which_result.ml new/result-1.4/which_result.ml --- old/result-1.2/which_result.ml 2016-03-03 16:24:37.000000000 +0100 +++ new/result-1.4/which_result.ml 2019-04-04 09:57:52.000000000 +0200 @@ -1,6 +1,6 @@ let () = let version = - Scanf.sscanf Sys.ocaml_version "%d.%d" (fun major minor -> (major, minor)) + Scanf.sscanf Sys.argv.(1) "%d.%d" (fun major minor -> (major, minor)) in let file = if version < (4, 03) then
