]> git.pld-linux.org Git - packages/ocaml-ulex.git/commitdiff
- added fix-bytes patch from Fedora, updated META file location; release 6
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 26 Nov 2021 20:49:05 +0000 (21:49 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 26 Nov 2021 20:49:05 +0000 (21:49 +0100)
ocaml-ulex-fix-bytes.patch [new file with mode: 0644]
ocaml-ulex.spec

diff --git a/ocaml-ulex-fix-bytes.patch b/ocaml-ulex-fix-bytes.patch
new file mode 100644 (file)
index 0000000..7041506
--- /dev/null
@@ -0,0 +1,18 @@
+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. *)
index 6575e1a93577a09c694a43f144b594da5d1a60aa..31d6a10f7d35ce81000da9a6607e4c677c9b8f8b 100644 (file)
@@ -1,9 +1,9 @@
 #
 # 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
 
@@ -11,12 +11,14 @@ Summary:    Lexer generator for Unicode and OCaml
 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)
@@ -29,9 +31,10 @@ ulex jest lexerem dla OCamla i Unicode.
 
 %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
@@ -40,27 +43,20 @@ install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ulex
 %{__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
This page took 0.088793 seconds and 4 git commands to generate.