Compare commits

..

No commits in common. "rawhide" and "f33" have entirely different histories.
rawhide ... f33

3 changed files with 43 additions and 41 deletions

View File

@ -10,7 +10,7 @@
build: [
--- a/src/csexp.ml
+++ b/src/csexp.ml
@@ -102,12 +102,6 @@ end
@@ -15,12 +15,6 @@ end
module Make (Sexp : Sexp) = struct
open Sexp
@ -23,7 +23,7 @@
module Parser = struct
exception Parse_error of string
@@ -370,9 +364,9 @@ module Make (Sexp : Sexp) = struct
@@ -283,9 +277,9 @@ module Make (Sexp : Sexp) = struct
module Monad : Monad
@ -37,37 +37,37 @@
module Make_parser (Input : Input) = struct
--- a/src/csexp.mli
+++ b/src/csexp.mli
@@ -34,24 +34,24 @@ module type S = sig
@@ -33,24 +33,24 @@ module Make (Sexp : Sexp) : sig
[s]. It is an error for [s] to contain a S-expression followed by more
data. In case of error, the offset of the error as well as an error
message is returned. *)
- val parse_string : string -> (sexp, int * string) Result.t
+ val parse_string : string -> (sexp, int * string) result
- val parse_string : string -> (Sexp.t, int * string) Result.t
+ val parse_string : string -> (Sexp.t, int * string) result
(** [parse_string s] parses a sequence of S-expressions encoded in canonical
form in [s] *)
- val parse_string_many : string -> (sexp list, int * string) Result.t
+ val parse_string_many : string -> (sexp list, int * string) result
- val parse_string_many : string -> (Sexp.t list, int * string) Result.t
+ val parse_string_many : string -> (Sexp.t list, int * string) result
(** Read exactly one canonical S-expressions from the given channel. Note that
this function never raises [End_of_file]. Instead, it returns [Error]. *)
- val input : in_channel -> (sexp, string) Result.t
+ val input : in_channel -> (sexp, string) result
- val input : in_channel -> (Sexp.t, string) Result.t
+ val input : in_channel -> (Sexp.t, string) result
(** Same as [input] but returns [Ok None] if the end of file has already been
reached. If some more characters are available but the end of file is
reached before reading a complete S-expression, this function returns
[Error]. *)
- val input_opt : in_channel -> (sexp option, string) Result.t
+ val input_opt : in_channel -> (sexp option, string) result
- val input_opt : in_channel -> (Sexp.t option, string) Result.t
+ val input_opt : in_channel -> (Sexp.t option, string) result
(** Read many S-expressions until the end of input is reached. *)
- val input_many : in_channel -> (sexp list, string) Result.t
+ val input_many : in_channel -> (sexp list, string) result
- val input_many : in_channel -> (Sexp.t list, string) Result.t
+ val input_many : in_channel -> (Sexp.t list, string) result
(** {2 Serialising} *)
@@ -353,18 +353,18 @@ module type S = sig
@@ -352,18 +352,18 @@ module Make (Sexp : Sexp) : sig
val bind : 'a t -> ('a -> 'b t) -> 'b t
end
@ -82,11 +82,11 @@
[@@@warning "-3"]
module Make_parser (Input : Input) : sig
- val parse : Input.t -> (sexp, string) Result.t Input.Monad.t
+ val parse : Input.t -> (sexp, string) result Input.Monad.t
- val parse : Input.t -> (Sexp.t, string) Result.t Input.Monad.t
+ val parse : Input.t -> (Sexp.t, string) result Input.Monad.t
- val parse_many : Input.t -> (sexp list, string) Result.t Input.Monad.t
+ val parse_many : Input.t -> (sexp list, string) result Input.Monad.t
- val parse_many : Input.t -> (Sexp.t list, string) Result.t Input.Monad.t
+ val parse_many : Input.t -> (Sexp.t list, string) result Input.Monad.t
end
[@@deprecated "Use Parser module instead"]
end

View File

@ -8,13 +8,14 @@
# package cannot depend on dune, or any package that depends on dune.
# Therefore, we:
# - hack up our own build, rather than using dune to do the build
# - bypass the need for ocaml-result (which requires dune to build)
# - skip tests, which require ppx_expect, which is built with dune
# - skip building documentation, which requires odoc, which is built with dune
# If you know what you are doing, build with dune anyway using this conditional.
%bcond_with dune
Name: ocaml-%{srcname}
Version: 1.5.1
Version: 1.3.2
Release: 1%{?dist}
Summary: Parsing and printing of S-expressions in canonical form
@ -22,10 +23,16 @@ License: MIT
URL: https://github.com/ocaml-dune/csexp
Source0: %{url}/releases/download/%{version}/%{srcname}-%{version}.tbz
BuildRequires: ocaml >= 4.03.0
# Depend on Stdlib.Result instead of ocaml-result. See comment above.
# This patch is not appropriate for upstream, which needs to keep compatibility
# with older OCaml versions.
Patch0: %{name}-result.patch
BuildRequires: ocaml >= 4.02.3
%if %{with dune}
BuildRequires: ocaml-dune >= 1.11
BuildRequires: ocaml-odoc
BuildRequires: ocaml-result-devel >= 1.5
%endif
%description
@ -36,6 +43,9 @@ binary encoding of S-expressions.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%if %{with dune}
Requires: ocaml-result-devel%{?_isa}
%endif
%description devel
The %{name}-devel package contains libraries and signature files for
@ -43,21 +53,24 @@ developing applications that use %{name}.
%prep
%autosetup -N -n %{srcname}-%{version}
%if %{without dune}
%autopatch -p1
%endif
%build
%if %{with dune}
dune build %{?_smp_mflags} --display=verbose @install
dune build %{?_smp_mflags} @doc
%else
OFLAGS="-strict-sequence -strict-formats -short-paths -keep-locs -g"
OFLAGS="-strict-sequence -strict-formats -short-paths -keep-locs -g -opaque"
OCFLAGS="$OFLAGS -bin-annot"
cd src
ocamlc $OCFLAGS -output-obj csexp.mli
ocamlc $OCFLAGS -a -o csexp.cma csexp.ml
%ifarch %{ocaml_native_compiler}
ocamlopt $OFLAGS -ccopt "%{build_cflags}" -cclib "%{build_ldflags}" -a \
ocamlopt $OFLAGS -ccopt "%{optflags}" -cclib "$RPM_LD_FLAGS" -a \
-o csexp.cmxa csexp.ml
ocamlopt $OFLAGS -ccopt "%{build_cflags}" -cclib "%{build_ldflags}" -shared \
ocamlopt $OFLAGS -ccopt "%{optflags}" -cclib "$RPM_LD_FLAGS" -shared \
-o csexp.cmxs csexp.ml
%endif
cd -
@ -75,6 +88,11 @@ find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
# We install the documentation with the doc macro
rm -fr %{buildroot}%{_prefix}/doc
%ifarch %{ocaml_native_compiler}
# Add missing executable bits
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
%endif
%else
# Install without dune. See comment at the top.
mkdir -p %{buildroot}%{_libdir}/ocaml/%{srcname}
@ -98,7 +116,7 @@ plugin(native) = "csexp.cmxs"
EOF
cat >> %{buildroot}%{_libdir}/ocaml/%{srcname}/dune-package << EOF
(lang dune 2.8)
(lang dune 2.5)
(name csexp)
(version %{version})
(library
@ -153,22 +171,6 @@ EOF
%{_libdir}/ocaml/%{srcname}/*.mli
%changelog
* Wed Mar 31 2021 Jerry James <loganjerry@gmail.com> - 1.5.1-1
- Version 1.5.1
- Drop upstreamed -result patch
* Sun Feb 28 22:16:45 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 1.4.0-3
- Bump release and rebuild.
* Sun Feb 28 22:08:24 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 1.4.0-2
- OCaml 4.12.0 build
* Wed Feb 24 2021 Jerry James <loganjerry@gmail.com> - 1.4.0-1
- Version 1.4.0
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Sep 18 2020 Jerry James <loganjerry@gmail.com> - 1.3.2-1
- Version 1.3.2

View File

@ -1 +1 @@
SHA512 (csexp-1.5.1.tbz) = d785bbabaff9f6bf601399149ef0a42e5e99647b54e27f97ef1625907793dda22a45bf83e0e8a1eba2c63634c5484b54739ff0904ef556f5fc592efa38af7505
SHA512 (csexp-1.3.2.tbz) = ff1bd6a7c6bb3a73ca9ab0506c9ec1f357657deaa9ecc7eb32955817d9b0f266d976af3e2b8fc34c621cb0caf1fde55f9a609dd184e2054f500bf09afeb83026