Version 0.6.4
Other changes: - New project URLs - Convert License tag to SPDX - Drop upstreamed bytes and ounit2 patches - Build with dune
This commit is contained in:
parent
5e2f341d10
commit
8e92218a71
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ ocaml-fileutils-0.4.0.tar.gz
|
||||
/ocaml-fileutils-0.4.5.tar.gz
|
||||
/ocaml-fileutils-0.5.1.tar.gz
|
||||
/ocaml-fileutils-0.5.2.tar.gz
|
||||
/fileutils-0.6.4.tbz
|
||||
|
@ -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 =
|
@ -1,30 +0,0 @@
|
||||
diff -ur ocaml-fileutils-0.5.2.old/setup.ml ocaml-fileutils-0.5.2.new/setup.ml
|
||||
--- ocaml-fileutils-0.5.2.old/setup.ml 2017-05-23 21:12:33.000000000 +0100
|
||||
+++ ocaml-fileutils-0.5.2.new/setup.ml 2020-02-27 08:52:42.964618292 +0000
|
||||
@@ -7621,7 +7621,7 @@
|
||||
InternalLibrary "fileutils";
|
||||
InternalLibrary "fileutils-str";
|
||||
FindlibPackage
|
||||
- ("oUnit",
|
||||
+ ("ounit2",
|
||||
Some (OASISVersion.VGreaterEqual "2.0.0"))
|
||||
];
|
||||
bs_build_tools = [ExternalTool "ocamlbuild"];
|
||||
diff -ur ocaml-fileutils-0.5.2.old/_tags ocaml-fileutils-0.5.2.new/_tags
|
||||
--- ocaml-fileutils-0.5.2.old/_tags 2017-05-23 21:12:33.000000000 +0100
|
||||
+++ ocaml-fileutils-0.5.2.new/_tags 2020-02-27 08:52:38.020680545 +0000
|
||||
@@ -25,12 +25,12 @@
|
||||
<test/BenchFind.{native,byte}>: pkg_unix
|
||||
<test/BenchFind.{native,byte}>: use_fileutils
|
||||
# Executable test
|
||||
-"test/test.byte": pkg_oUnit
|
||||
+"test/test.byte": pkg_ounit2
|
||||
"test/test.byte": pkg_str
|
||||
"test/test.byte": pkg_unix
|
||||
"test/test.byte": use_fileutils
|
||||
"test/test.byte": use_fileutils-str
|
||||
-<test/*.ml{,i,y}>: pkg_oUnit
|
||||
+<test/*.ml{,i,y}>: pkg_ounit2
|
||||
<test/*.ml{,i,y}>: pkg_str
|
||||
<test/*.ml{,i,y}>: pkg_unix
|
||||
<test/*.ml{,i,y}>: use_fileutils
|
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,30 +1,27 @@
|
||||
%undefine _package_note_flags
|
||||
|
||||
# We're probbaly not adding -g correctly:
|
||||
# error: Empty %files file /builddir/build/BUILD/ocaml-fileutils-0.5.2/debugsourcefiles.list
|
||||
%ifnarch %{ocaml_native_compiler}
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
Name: ocaml-fileutils
|
||||
Version: 0.5.2
|
||||
Release: 36%{?dist}
|
||||
Version: 0.6.4
|
||||
Release: 1%{?dist}
|
||||
Summary: OCaml library for common file and filename operations
|
||||
|
||||
License: LGPLv2 with exceptions
|
||||
URL: https://forge.ocamlcore.org/projects/ocaml-fileutils/
|
||||
Source0: http://forge.ocamlcore.org/frs/download.php/1695/ocaml-fileutils-0.5.2.tar.gz
|
||||
License: LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
|
||||
URL: https://gildor478.github.io/ocaml-fileutils/
|
||||
Source0: https://github.com/gildor478/ocaml-fileutils/releases/download/v%{version}/fileutils-%{version}.tbz
|
||||
# Fedora does not need the stdlib-shims or seq forward compatibility packages
|
||||
Patch0: ocaml-fileutils-0.6.4-forward-compat.patch
|
||||
# Given two distinct files with identical contents, the cmp function evaluates
|
||||
# to "Some x", where x is the size of each file, instead of None. This breaks
|
||||
# the ocaml-gettext tests, which expect None in that case.
|
||||
Patch1: ocaml-fileutils-0.6.4-cmp.patch
|
||||
|
||||
Patch1: fileutils-0.5.2-fix-bytes.patch
|
||||
# Use ounit2.
|
||||
Patch2: ocaml-fileutils-0.5.2-ounit2.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: ocaml >= 4.00.1
|
||||
BuildRequires: ocaml-findlib-devel >= 1.3.3-3
|
||||
BuildRequires: ocaml-ocamldoc
|
||||
BuildRequires: ocaml >= 4.03.0
|
||||
BuildRequires: ocaml-dune >= 1.11.0
|
||||
%if 0%{?fedora} || 0%{?rhel} <= 6
|
||||
BuildRequires: ocaml-ounit-devel
|
||||
BuildRequires: ocaml-ounit-devel >= 2.0.0
|
||||
%endif
|
||||
BuildRequires: ocaml-ocamlbuild
|
||||
|
||||
|
||||
%description
|
||||
@ -40,7 +37,7 @@ abstract filenames.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
|
||||
%description devel
|
||||
@ -49,61 +46,41 @@ developing applications that use %{name}.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autopatch -p1
|
||||
%autosetup -n fileutils-%{version} -p1
|
||||
|
||||
|
||||
%build
|
||||
# Disable the tests (RHEL 7 only) since they require ocaml-ounit.
|
||||
ocaml setup.ml -configure --prefix %{_prefix} --destdir $RPM_BUILD_ROOT \
|
||||
%if 0%{?rhel} >= 7
|
||||
--disable-tests
|
||||
%else
|
||||
--enable-tests
|
||||
%endif
|
||||
make
|
||||
%dune_build
|
||||
|
||||
|
||||
%install
|
||||
export DESTDIR=$RPM_BUILD_ROOT
|
||||
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
||||
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
|
||||
|
||||
# Set htmldir to current directory, then copy the docs (in api/)
|
||||
# as a %doc rule.
|
||||
make htmldir=. install
|
||||
%dune_install
|
||||
|
||||
|
||||
# Do not run the tests (RHEL 7+ only) since they require ocaml-ounit.
|
||||
%if 0%{?fedora} || 0%{?rhel} <= 6
|
||||
%check
|
||||
%if ! 0%{?rhel} >= 7
|
||||
make test
|
||||
%dune_check
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
%doc COPYING.txt
|
||||
%{_libdir}/ocaml/fileutils
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%exclude %{_libdir}/ocaml/fileutils/*.a
|
||||
%exclude %{_libdir}/ocaml/fileutils/*.cmx
|
||||
%exclude %{_libdir}/ocaml/fileutils/*.cmxa
|
||||
%endif
|
||||
%exclude %{_libdir}/ocaml/fileutils/*.ml
|
||||
%exclude %{_libdir}/ocaml/fileutils/*.mli
|
||||
%files -f .ofiles
|
||||
%license LICENSE.txt
|
||||
|
||||
|
||||
%files devel
|
||||
%doc COPYING.txt AUTHORS.txt CHANGELOG.txt README.txt TODO.txt
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%{_libdir}/ocaml/fileutils/*.a
|
||||
%{_libdir}/ocaml/fileutils/*.cmx
|
||||
%{_libdir}/ocaml/fileutils/*.cmxa
|
||||
%endif
|
||||
%{_libdir}/ocaml/fileutils/*.ml
|
||||
%{_libdir}/ocaml/fileutils/*.mli
|
||||
%files devel -f .ofiles-devel
|
||||
%doc README.md CHANGES.md
|
||||
%license LICENSE.txt
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jul 10 2023 Jerry James <loganjerry@gmail.com> - 0.6.4-1
|
||||
- Version 0.6.4
|
||||
- New project URLs
|
||||
- Convert License tag to SPDX
|
||||
- Drop upstreamed bytes and ounit2 patches
|
||||
- Build with dune
|
||||
|
||||
* Tue Jan 24 2023 Richard W.M. Jones <rjones@redhat.com> - 0.5.2-36
|
||||
- Bump release and rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (ocaml-fileutils-0.5.2.tar.gz) = 264282c54ff693686ca9e60f371038f8ea9bce219d04556297dc7b6028c9f65c5a03b7cd263c3519cb212e29665200db1c95c88874bb2cb3d7b610e3b832018d
|
||||
SHA512 (fileutils-0.6.4.tbz) = 7053f8d92655d5631f1ec61ab7f9e3f6e3afedbe435038858dd9a026b9c769c6182afaa436491a398e7c4513b384a609e016718e030855996b2d9d54b461bd19
|
||||
|
Loading…
Reference in New Issue
Block a user