!5 update to 0.6.4
From: @lyn1001 Reviewed-by: @caodongxia Signed-off-by: @caodongxia
This commit is contained in:
commit
eb2428c625
@ -1,20 +0,0 @@
|
||||
--- ocaml-fileutils-0.5.2.old/src/FileUtilCP.ml 2017-05-23 21:12:19.000000000 +0100
|
||||
+++ ocaml-fileutils-0.5.2/src/FileUtilCP.ml 2017-11-08 17:36:42.271524209 +0000
|
||||
@@ -138,7 +138,7 @@
|
||||
end
|
||||
in
|
||||
|
||||
- let buffer = String.make 1024 ' ' in
|
||||
+ let buffer = Bytes.make 1024 ' ' in
|
||||
|
||||
let cp_file st_src dst_exists fn_src fn_dst =
|
||||
let mode = int_of_permission st_src.permission in
|
||||
@@ -176,7 +176,7 @@
|
||||
try
|
||||
while (read :=
|
||||
handle_exception
|
||||
- (Unix.read fd_src buffer 0) (String.length buffer)
|
||||
+ (Unix.read fd_src buffer 0) (Bytes.length buffer)
|
||||
(fun e -> `ErrorRead(fn_src, e));
|
||||
!read <> 0) do
|
||||
let written =
|
||||
BIN
fileutils-0.6.4.tbz
Normal file
BIN
fileutils-0.6.4.tbz
Normal file
Binary file not shown.
Binary file not shown.
18
ocaml-fileutils-0.6.4-cmp.patch
Normal file
18
ocaml-fileutils-0.6.4-cmp.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- fileutils-0.6.4/src/lib/fileutils/FileUtilCMP.ml.orig 2022-10-28 14:22:35.000000000 -0600
|
||||
+++ fileutils-0.6.4/src/lib/fileutils/FileUtilCMP.ml 2023-06-22 15:04:21.317130686 -0600
|
||||
@@ -48,11 +48,14 @@ let cmp ?(skip1 = 0) fln1 ?(skip2 = 0) f
|
||||
let rec loop count s1 s2 =
|
||||
match s1, s2 with
|
||||
| Seq.Cons (v1, s1), Seq.Cons (v2, s2) when v1 = v2 -> loop (count + 1) (s1 ()) (s2 ())
|
||||
+ | Seq.Nil, Seq.Nil -> (-1)
|
||||
| _ -> count
|
||||
in
|
||||
let count = loop 0 (stream1 ()) (stream2 ()) in
|
||||
clean_fd ();
|
||||
- Some count
|
||||
+ match count with
|
||||
+ | (-1) -> None
|
||||
+ | x -> Some x
|
||||
end else
|
||||
Some (-1)
|
||||
|
||||
27
ocaml-fileutils-0.6.4-forward-compat.patch
Normal file
27
ocaml-fileutils-0.6.4-forward-compat.patch
Normal file
@ -0,0 +1,27 @@
|
||||
--- fileutils-0.6.4/fileutils.opam.orig 2022-10-28 14:22:35.000000000 -0600
|
||||
+++ fileutils-0.6.4/fileutils.opam 2023-06-22 13:01:26.779533940 -0600
|
||||
@@ -16,8 +16,6 @@ build: [
|
||||
depends: [
|
||||
"ocaml" {>= "4.03"}
|
||||
"base-unix"
|
||||
- "stdlib-shims"
|
||||
- "seq"
|
||||
"dune" {>= "1.11.0"}
|
||||
"ounit2" {with-test & >= "2.0.0"}
|
||||
]
|
||||
--- fileutils-0.6.4/src/lib/fileutils/dune.orig 2022-10-28 14:22:35.000000000 -0600
|
||||
+++ fileutils-0.6.4/src/lib/fileutils/dune 2023-06-22 13:01:47.403222843 -0600
|
||||
@@ -30,4 +30,4 @@
|
||||
fileUtilWHICH
|
||||
unixPath
|
||||
win32Path)
|
||||
- (libraries unix seq stdlib-shims))
|
||||
+ (libraries unix))
|
||||
--- fileutils-0.6.4/test/dune.orig 2022-10-28 14:22:35.000000000 -0600
|
||||
+++ fileutils-0.6.4/test/dune 2023-06-22 13:02:04.739961336 -0600
|
||||
@@ -6,4 +6,4 @@
|
||||
(test
|
||||
(name test)
|
||||
(modules test)
|
||||
- (libraries fileutils fileutils_str ounit2 stdlib-shims))
|
||||
+ (libraries fileutils fileutils_str ounit2))
|
||||
@ -1,15 +1,15 @@
|
||||
Name: ocaml-fileutils
|
||||
Version: 0.5.2
|
||||
Release: 7
|
||||
Version: 0.6.4
|
||||
Release: 1
|
||||
Summary: API to manipulate files (POSIX like) and filenames
|
||||
License: LGPLv2 with exceptions
|
||||
URL: https://github.com/gildor478/ocaml-fileutils
|
||||
Source0: https://download.ocamlcore.org/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
|
||||
Source0: https://github.com/gildor478/ocaml-fileutils/releases/download/v%{version}/fileutils-%{version}.tbz
|
||||
Patch0000: ocaml-fileutils-0.6.4-forward-compat.patch
|
||||
Patch0001: ocaml-fileutils-0.6.4-cmp.patch
|
||||
|
||||
Patch0001: fileutils-0.5.2-fix-bytes.patch
|
||||
|
||||
BuildRequires: ocaml >= 4.00.1 ocaml-findlib-devel >= 1.3.3-3
|
||||
BuildRequires: ocaml-ocamlbuild ocaml-ocamldoc ocaml-ounit-devel
|
||||
BuildRequires: ocaml >= 4.00.1 ocaml-dune
|
||||
BuildRequires: ocaml-ounit-devel
|
||||
|
||||
%description
|
||||
This library provides an API to perform POSIX like operations on files like:
|
||||
@ -34,23 +34,23 @@ The package provides libraries and some other development documents for developi
|
||||
that use %{name}.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%autosetup -n fileutils-%{version} -p1
|
||||
sed -i 's/ounit2/ounit/g' fileutils.opam
|
||||
sed -i 's/ounit2/oUnit/g' test/dune
|
||||
|
||||
%build
|
||||
ocaml setup.ml -configure --destdir $RPM_BUILD_ROOT --prefix %{_prefix} --enable-tests
|
||||
make
|
||||
dune build --verbose --release %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
export DESTDIR=$RPM_BUILD_ROOT OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
||||
install -d $OCAMLFIND_DESTDIR/stublibs
|
||||
|
||||
make htmldir=. install
|
||||
dune install --destdir=%{buildroot} --verbose --release %{?_smp_mflags}
|
||||
rm -rf %{buildroot}/usr/doc
|
||||
|
||||
%check
|
||||
make test
|
||||
dune runtest --verbose --release %{?_smp_mflags}
|
||||
|
||||
%files
|
||||
%doc AUTHORS.txt CHANGELOG.txt COPYING.txt README.txt TODO.txt
|
||||
%license LICENSE.txt
|
||||
%doc README.md CHANGES.md
|
||||
%{_libdir}/ocaml/fileutils
|
||||
%exclude %{_libdir}/ocaml/fileutils/*.{a,cmx,cmxa,ml,mli}
|
||||
|
||||
@ -58,6 +58,9 @@ make test
|
||||
%{_libdir}/ocaml/fileutils/*.{a,cmx,cmxa,ml,mli}
|
||||
|
||||
%changelog
|
||||
* Thu Sep 21 2023 liyanan <thistleslyn@163.com> - 0.6.4-1
|
||||
- update to 0.6.4
|
||||
|
||||
* Tue Nov 22 2022 xu_ping<xu_ping33@h-partners.com> - 0.5.2-7
|
||||
- Modify invalid source
|
||||
|
||||
|
||||
4
ocaml-fileutils.yaml
Normal file
4
ocaml-fileutils.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: github
|
||||
src_repo: gildor478/ocaml-fileutils
|
||||
tag_prefix: "^v"
|
||||
separator: .
|
||||
Loading…
x
Reference in New Issue
Block a user