Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b2aab6bb1e | ||
|
1de1a4d1aa | ||
|
8438ebb45f | ||
|
91e4202b3e |
@ -10,7 +10,7 @@
|
||||
build: [
|
||||
--- a/src/csexp.ml
|
||||
+++ b/src/csexp.ml
|
||||
@@ -15,12 +15,6 @@ end
|
||||
@@ -102,12 +102,6 @@ end
|
||||
module Make (Sexp : Sexp) = struct
|
||||
open Sexp
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
module Parser = struct
|
||||
exception Parse_error of string
|
||||
|
||||
@@ -283,9 +277,9 @@ module Make (Sexp : Sexp) = struct
|
||||
@@ -370,9 +364,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
|
||||
@@ -33,24 +33,24 @@ module Make (Sexp : Sexp) : sig
|
||||
@@ -34,24 +34,24 @@ module type S = 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.t, int * string) Result.t
|
||||
+ val parse_string : string -> (Sexp.t, int * string) result
|
||||
- val parse_string : string -> (sexp, int * string) Result.t
|
||||
+ val parse_string : string -> (sexp, int * string) result
|
||||
|
||||
(** [parse_string s] parses a sequence of S-expressions encoded in canonical
|
||||
form in [s] *)
|
||||
- val parse_string_many : string -> (Sexp.t list, int * string) Result.t
|
||||
+ val parse_string_many : string -> (Sexp.t list, int * string) result
|
||||
- val parse_string_many : string -> (sexp list, int * string) Result.t
|
||||
+ val parse_string_many : string -> (sexp 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.t, string) Result.t
|
||||
+ val input : in_channel -> (Sexp.t, string) result
|
||||
- val input : in_channel -> (sexp, string) Result.t
|
||||
+ val input : in_channel -> (sexp, 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.t option, string) Result.t
|
||||
+ val input_opt : in_channel -> (Sexp.t option, string) result
|
||||
- val input_opt : in_channel -> (sexp option, string) Result.t
|
||||
+ val input_opt : in_channel -> (sexp option, string) result
|
||||
|
||||
(** Read many S-expressions until the end of input is reached. *)
|
||||
- val input_many : in_channel -> (Sexp.t list, string) Result.t
|
||||
+ val input_many : in_channel -> (Sexp.t list, string) result
|
||||
- val input_many : in_channel -> (sexp list, string) Result.t
|
||||
+ val input_many : in_channel -> (sexp list, string) result
|
||||
|
||||
(** {2 Serialising} *)
|
||||
|
||||
@@ -352,18 +352,18 @@ module Make (Sexp : Sexp) : sig
|
||||
@@ -353,18 +353,18 @@ module type S = 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.t, string) Result.t Input.Monad.t
|
||||
+ val parse : Input.t -> (Sexp.t, string) result Input.Monad.t
|
||||
- val parse : Input.t -> (sexp, string) Result.t Input.Monad.t
|
||||
+ val parse : Input.t -> (sexp, 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
|
||||
- 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
|
||||
end
|
||||
[@@deprecated "Use Parser module instead"]
|
||||
end
|
||||
|
@ -8,14 +8,13 @@
|
||||
# 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.3.2
|
||||
Version: 1.5.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Parsing and printing of S-expressions in canonical form
|
||||
|
||||
@ -23,16 +22,10 @@ License: MIT
|
||||
URL: https://github.com/ocaml-dune/csexp
|
||||
Source0: %{url}/releases/download/%{version}/%{srcname}-%{version}.tbz
|
||||
|
||||
# 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
|
||||
BuildRequires: ocaml >= 4.03.0
|
||||
%if %{with dune}
|
||||
BuildRequires: ocaml-dune >= 1.11
|
||||
BuildRequires: ocaml-odoc
|
||||
BuildRequires: ocaml-result-devel >= 1.5
|
||||
%endif
|
||||
|
||||
%description
|
||||
@ -43,9 +36,6 @@ 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
|
||||
@ -53,24 +43,21 @@ 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 -opaque"
|
||||
OFLAGS="-strict-sequence -strict-formats -short-paths -keep-locs -g"
|
||||
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 "%{optflags}" -cclib "$RPM_LD_FLAGS" -a \
|
||||
ocamlopt $OFLAGS -ccopt "%{build_cflags}" -cclib "%{build_ldflags}" -a \
|
||||
-o csexp.cmxa csexp.ml
|
||||
ocamlopt $OFLAGS -ccopt "%{optflags}" -cclib "$RPM_LD_FLAGS" -shared \
|
||||
ocamlopt $OFLAGS -ccopt "%{build_cflags}" -cclib "%{build_ldflags}" -shared \
|
||||
-o csexp.cmxs csexp.ml
|
||||
%endif
|
||||
cd -
|
||||
@ -88,11 +75,6 @@ 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}
|
||||
@ -116,7 +98,7 @@ plugin(native) = "csexp.cmxs"
|
||||
EOF
|
||||
|
||||
cat >> %{buildroot}%{_libdir}/ocaml/%{srcname}/dune-package << EOF
|
||||
(lang dune 2.5)
|
||||
(lang dune 2.8)
|
||||
(name csexp)
|
||||
(version %{version})
|
||||
(library
|
||||
@ -171,6 +153,22 @@ 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
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (csexp-1.3.2.tbz) = ff1bd6a7c6bb3a73ca9ab0506c9ec1f357657deaa9ecc7eb32955817d9b0f266d976af3e2b8fc34c621cb0caf1fde55f9a609dd184e2054f500bf09afeb83026
|
||||
SHA512 (csexp-1.5.1.tbz) = d785bbabaff9f6bf601399149ef0a42e5e99647b54e27f97ef1625907793dda22a45bf83e0e8a1eba2c63634c5484b54739ff0904ef556f5fc592efa38af7505
|
||||
|
Loading…
Reference in New Issue
Block a user