Compare commits

...

4 Commits
f33 ... rawhide

Author SHA1 Message Date
Richard W.M. Jones
16cf52440e OCaml 4.12.0 build 2021-03-01 23:50:56 +00:00
Jerry James
c71598703a Version 2.3. Drop upstreamed -pervasives patch. 2021-02-20 21:42:39 -07:00
Fedora Release Engineering
893d898f6f - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 22:07:41 +00:00
Jerry James
281c774afd Version 2.2
- Add -pervasives and -no-curl patches
- Use local Unicode tables instead of downloading
- Build documentation with odoc
- Add a %check script
2020-12-08 14:39:00 -07:00
4 changed files with 64 additions and 12 deletions

3
.gitignore vendored
View File

@ -1,2 +1 @@
/ocaml-sedlex-1.99.4.tar.gz
/ocaml-sedlex-2.1.tar.gz
/ocaml-sedlex-*.tar.gz

View File

@ -0,0 +1,20 @@
--- sedlex-2.2/src/generator/data/dune.orig 2020-02-08 14:55:37.000000000 -0700
+++ sedlex-2.2/src/generator/data/dune 2020-06-18 09:51:50.348134755 -0600
@@ -1,14 +1,11 @@
(rule
(targets DerivedCoreProperties.txt)
- (deps base_url)
- (action (run curl -L -s %{read:base_url}/ucd/DerivedCoreProperties.txt -o DerivedCoreProperties.txt)))
+ (action (copy /usr/share/unicode/ucd/DerivedCoreProperties.txt DerivedCoreProperties.txt)))
(rule
(targets DerivedGeneralCategory.txt)
- (deps base_url)
- (action (run curl -L -s %{read:base_url}/ucd/extracted/DerivedGeneralCategory.txt -o DerivedGeneralCategory.txt)))
+ (action (copy /usr/share/unicode/ucd/extracted/DerivedGeneralCategory.txt DerivedGeneralCategory.txt)))
(rule
(targets PropList.txt)
- (deps base_url)
- (action (run curl -L -s %{read:base_url}/ucd/PropList.txt -o PropList.txt)))
+ (action (copy /usr/share/unicode/ucd/PropList.txt PropList.txt)))

View File

@ -1,20 +1,21 @@
Name: ocaml-sedlex
Version: 2.1
Release: 12%{?dist}
Version: 2.3
Release: 2%{?dist}
Summary: Unicode-friendly lexer generator
License: MIT
URL: https://github.com/ocaml-community/sedlex
Source0: https://github.com/ocaml-community/sedlex/archive/v%{version}/%{name}-%{version}.tar.gz
# Use local Unicode files instead of attempting to download them
Patch0: %{name}-no-curl.patch
BuildRequires: ocaml
BuildRequires: ocaml-findlib
BuildRequires: ocaml-dune
BuildRequires: ocaml-result-devel
BuildRequires: ocaml-migrate-parsetree-devel
BuildRequires: ocaml-ppx-derivers-devel
BuildRequires: ocaml-ppx-tools-versioned-devel
BuildRequires: ocaml-odoc
BuildRequires: ocaml-ppxlib-devel
BuildRequires: ocaml-gen-devel
BuildRequires: unicode-ucd
%description
A lexer generator for OCaml, similar to ocamllex, but supporting Unicode.
@ -25,6 +26,8 @@ regular OCaml source files.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: ocaml-ppxlib-devel%{?_isa}
Requires: ocaml-gen-devel%{?_isa}
%description devel
@ -33,10 +36,18 @@ files for developing applications that use %{name}.
%prep
%setup -q -n sedlex-%{version}
%autosetup -p1 -n sedlex-%{version}
# Upstream's regression test is written for Unicode 6.3.0 through 12.1.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
%build
dune build -p sedlex --verbose
dune build %{?_smp_mflags} -p sedlex --verbose
dune build %{?_smp_mflags} @doc
%install
dune install --destdir="$RPM_BUILD_ROOT" --verbose
@ -52,6 +63,11 @@ 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
%files
%doc README.md CHANGES
%license LICENSE
@ -74,6 +90,23 @@ sed -i 's/"uchar"//g' $RPM_BUILD_ROOT%{_libdir}/ocaml/sedlex/opam
%changelog
* Mon Mar 1 23:50:55 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 2.3-2
- OCaml 4.12.0 build
* Sat Feb 20 2021 Jerry James <loganjerry@gmail.com> - 2.3-1
- Version 2.3
- Drop upstreamed -pervasives patch
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Dec 7 2020 Jerry James <loganjerry@gmail.com> - 2.2-1
- Version 2.2
- Add -pervasives and -no-curl patches
- Use local Unicode tables instead of downloading
- Build documentation with odoc
- Add a %%check script
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 2.1-12
- OCaml 4.11.1 rebuild

View File

@ -1 +1 @@
SHA512 (ocaml-sedlex-2.1.tar.gz) = df379c0b9db396cec454d1ac151f8bfc597d26447f30220f87b0d919be541d44dce56c932a6573d066395932f5d59e429922a0b44c8f853e3954faf1893856eb
SHA512 (ocaml-sedlex-2.3.tar.gz) = f91bbda9e79417e0a7c723a8efd9644404ffc91c60898b8fa07a514c38bc8472eae34419405354ae80966feb8d3203943f78776ad395a16132c7c890e3dbd7d8