--- /dev/null
+diff -ur ulex-1.1.old/ulexing.mli ulex-1.1/ulexing.mli
+--- ulex-1.1.old/ulexing.mli 2008-04-18 13:42:18.000000000 +0100
++++ ulex-1.1/ulexing.mli 2017-11-08 22:24:38.727320352 +0000
+@@ -142,12 +142,12 @@
+ matched by the regular expression as an array of Unicode code point. *)
+
+
+-val latin1_lexeme: lexbuf -> string
++val latin1_lexeme: lexbuf -> bytes
+ (** As [Ulexing.lexeme] with a result encoded in Latin1.
+ This function throws an exception [InvalidCodepoint] if it is not possible
+ to encode the result in Latin1. *)
+
+-val latin1_sub_lexeme: lexbuf -> int -> int -> string
++val latin1_sub_lexeme: lexbuf -> int -> int -> bytes
+ (** As [Ulexing.sub_lexeme] with a result encoded in Latin1.
+ This function throws an exception [InvalidCodepoint] if it is not possible
+ to encode the result in Latin1. *)
#
# Conditional build:
-%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
+%bcond_without ocaml_opt # native optimized binaries (bytecode is always built)
-# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
-%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
+# not yet available on x32 (ocaml 4.02.1), update when upstream will support it
+%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
%undefine with_ocaml_opt
%endif
Summary(pl.UTF-8): Lexer dla OCamla i Unicode
Name: ocaml-ulex
Version: 1.1
-Release: 5
+Release: 6
License: MIT
Group: Development/Tools
Source0: http://www.cduce.org/download/ulex-%{version}.tar.gz
# Source0-md5: ce49a013bc4a0e085977a9fe157017bf
-BuildRequires: ocaml >= 3.09.0
+Patch0: %{name}-fix-bytes.patch
+URL: http://www.cduce.org/ulex/
+BuildRequires: ocaml >= 1:3.10.0
BuildRequires: ocaml-findlib-devel
%requires_eq ocaml-runtime
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%prep
%setup -q -n ulex-%{version}
+%patch0 -p1
%build
-%{__make} -j1 all %{?with_ocaml_opt:all.opt} \
+%{__make} -j1 all %{?with_ocaml_opt:all.opt}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
-# move to dir pld ocamlfind looks
-install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ulex
-mv $RPM_BUILD_ROOT%{_libdir}/ocaml/ulex/META \
- $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ulex
-cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ulex/META
-directory="+ulex"
-EOF
-
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README
+%doc CHANGES LICENSE README
%dir %{_libdir}/ocaml/ulex
+%{_libdir}/ocaml/ulex/META
%{_libdir}/ocaml/ulex/*.cma
-%{_libdir}/ocaml/ulex/*.cm[xi]
+%{_libdir}/ocaml/ulex/*.cmi
%if %{with ocaml_opt}
%{_libdir}/ocaml/ulex/ulexing.a
+%{_libdir}/ocaml/ulex/*.cmx
%{_libdir}/ocaml/ulex/*.cmxa
%endif
%{_libdir}/ocaml/ulex/ulexing.mli
%{_libdir}/ocaml/ulex/utf8.mli
-%{_libdir}/ocaml/site-lib/ulex