diff --git a/ocaml-sedlex-uchar.patch b/ocaml-sedlex-uchar.patch new file mode 100644 index 0000000..7eb82e3 --- /dev/null +++ b/ocaml-sedlex-uchar.patch @@ -0,0 +1,28 @@ +--- a/dune-project 2021-07-31 00:53:24.000000000 -0600 ++++ b/dune-project 2021-09-01 10:35:54.195593680 -0600 +@@ -21,5 +21,4 @@ extension.") + (ocaml (>= 4.04)) + dune + (ppxlib (>= 0.18.0)) +- gen +- uchar)) ++ gen)) +--- a/sedlex.opam 2021-07-31 00:53:24.000000000 -0600 ++++ b/sedlex.opam 2021-09-01 10:36:10.123626201 -0600 +@@ -20,7 +20,6 @@ depends: [ + "dune" {>= "2.8"} + "ppxlib" {>= "0.18.0"} + "gen" +- "uchar" + "odoc" {with-doc} + ] + build: [ +--- a/src/lib/dune 2021-07-31 00:53:24.000000000 -0600 ++++ b/src/lib/dune 2021-09-01 10:35:25.851535799 -0600 +@@ -2,5 +2,5 @@ + (name sedlex) + (public_name sedlex) + (wrapped false) +- (libraries gen uchar) ++ (libraries gen) + (flags :standard -w +A-4-9 -safe-string)) diff --git a/ocaml-sedlex.spec b/ocaml-sedlex.spec index 3d93093..5fabf0a 100644 --- a/ocaml-sedlex.spec +++ b/ocaml-sedlex.spec @@ -1,6 +1,6 @@ Name: ocaml-sedlex -Version: 2.3 -Release: 5%{?dist} +Version: 2.4 +Release: 1%{?dist} Summary: Unicode-friendly lexer generator License: MIT @@ -10,6 +10,9 @@ Source0: https://github.com/ocaml-community/sedlex/archive/v%{version}/%{ # Use local Unicode files instead of attempting to download them Patch0: %{name}-no-curl.patch +# Do not depend on the uchar compatibility package; our OCaml is new enough +Patch1: %{name}-uchar.patch + BuildRequires: ocaml BuildRequires: ocaml-dune BuildRequires: ocaml-odoc @@ -38,12 +41,14 @@ files for developing applications that use %{name}. %prep %autosetup -p1 -n sedlex-%{version} -# Upstream's regression test is written for Unicode 6.3.0 through 12.1.0. Our +if false; then +# Upstream's regression test is written for Unicode 6.3.0 through 13.0.0. Our # Unicode files are from a more recent version of the standard. The test has a # good chance of succeeding anyway, so we cross our fingers and give it a try. # If the regression test fails, we'll have to try another approach. univer=$(sed -n 's/.*PropList-\([.[:digit:]]*\)\.txt/\1/p' %{_datadir}/unicode/ucd/PropList.txt) -sed -i "s/12\\.1\\.0/$univer/" examples/regressions.ml +sed -i "s/13\\.0\\.0/$univer/" examples/regressions.ml +fi %build dune build %{?_smp_mflags} -p sedlex --verbose @@ -55,14 +60,6 @@ dune install --destdir="$RPM_BUILD_ROOT" --verbose # These will be installed using doc and license directives. rm -r $RPM_BUILD_ROOT%{_prefix}/doc/sedlex/{CHANGES,README.md,LICENSE} -# Makes *.opt executable such that they will be stripped. -find $RPM_BUILD_ROOT -name '*.opt' -exec chmod 0755 {} \; - -# uchar is a compatibility package for older OCaml version -sed -i 's/uchar//g' $RPM_BUILD_ROOT%{_libdir}/ocaml/sedlex/META -sed -i 's/uchar//g' $RPM_BUILD_ROOT%{_libdir}/ocaml/sedlex/dune-package -sed -i 's/"uchar"//g' $RPM_BUILD_ROOT%{_libdir}/ocaml/sedlex/opam - %check dune runtest @@ -90,6 +87,10 @@ dune runtest %changelog +* Wed Sep 1 2021 Jerry James - 2.4-1 +- Version 2.4 +- Add -uchar patch to avoid the need for a compatibility package + * Thu Jul 29 2021 Jerry James - 2.3-5 - Rebuild for ocaml-ppxlib 0.22.2 diff --git a/sources b/sources index 73aadb7..1c1627b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ocaml-sedlex-2.3.tar.gz) = f91bbda9e79417e0a7c723a8efd9644404ffc91c60898b8fa07a514c38bc8472eae34419405354ae80966feb8d3203943f78776ad395a16132c7c890e3dbd7d8 +SHA512 (ocaml-sedlex-2.4.tar.gz) = 848a06517c89d40a8162c2d06d2ff3197de5aae5f22345f8f172183f8cf4d728406cc0e3f94365170a9d6167dc083973b4e4a4683871693138c8e82df7877b5f