From: Jakub Bogusz Date: Sun, 24 Oct 2021 05:52:05 +0000 (+0200) Subject: - updated to 2.2.4 (now ounit2 with ounit compatibility metadata) X-Git-Tag: auto/th/ocaml-ounit-2.2.4-1~1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=0681e12540bcd7ed2de93eaf037e3c21619e0b10;p=packages%2Focaml-ounit.git - updated to 2.2.4 (now ounit2 with ounit compatibility metadata) - added remove-stdlib-shims,remove-Thread-kill patches from Fedora --- diff --git a/ocaml-ounit-remove-Thread-kill.patch b/ocaml-ounit-remove-Thread-kill.patch new file mode 100644 index 0000000..1180fe4 --- /dev/null +++ b/ocaml-ounit-remove-Thread-kill.patch @@ -0,0 +1,13 @@ +--- ounit-v2.2.4.old/src/lib/ounit2/threads/oUnitRunnerThreads.ml 2021-03-01 21:14:43.656815139 +0000 ++++ ounit-v2.2.4/src/lib/ounit2/threads/oUnitRunnerThreads.ml 2020-12-19 23:59:04.000000000 +0000 +@@ -143,8 +143,8 @@ + Mutex.lock worker_finished_mutex + done; + if not !worker_finished then begin +- (* This will fail... because probably not implemented. *) +- Thread.kill thread; ++ (* This will fail... because probably not implemented. ++ Thread.kill thread; *) + worker_finished := true; + Condition.broadcast worker_finished_cond + end; diff --git a/ocaml-ounit-remove-stdlib-shims.patch b/ocaml-ounit-remove-stdlib-shims.patch new file mode 100644 index 0000000..9426ef5 --- /dev/null +++ b/ocaml-ounit-remove-stdlib-shims.patch @@ -0,0 +1,39 @@ +From fec0a725231d5769b3d3454687d6b0e1bd6b5e58 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 5 May 2020 12:30:50 +0100 +Subject: [PATCH] Remove stdlib-shims. + +We neither need nor want the stdlib-shims package in Fedora. It is a +forward compatibility package for older OCaml installations. Patch it +out instead. Upstream does not want this patch until stdlib-shims is +obsolete. +--- + ounit2.opam | 1 - + src/lib/ounit2/advanced/dune | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/ounit2.opam b/ounit2.opam +index d07d8ca..2ae6fe9 100644 +--- a/ounit2.opam ++++ b/ounit2.opam +@@ -10,7 +10,6 @@ depends: [ + "dune" {>= "1.11.0"} + "base-bytes" + "base-unix" +- "stdlib-shims" + ] + build: [ + ["dune" "build" "-p" name "-j" jobs] +diff --git a/src/lib/ounit2/advanced/dune b/src/lib/ounit2/advanced/dune +index df87fe1..529a7e4 100644 +--- a/src/lib/ounit2/advanced/dune ++++ b/src/lib/ounit2/advanced/dune +@@ -7,4 +7,4 @@ + (name oUnitAdvanced) + (public_name ounit2.advanced) + (wrapped false) +- (libraries unix bytes stdlib-shims)) ++ (libraries unix bytes)) +-- +2.29.2 + diff --git a/ocaml-ounit.spec b/ocaml-ounit.spec index ec028e1..e623345 100644 --- a/ocaml-ounit.spec +++ b/ocaml-ounit.spec @@ -1,23 +1,28 @@ # # Conditional build: -%bcond_without ocaml_opt # build opt (native code) +%bcond_without ocaml_opt # native optimized binaries (bytecode is always built) -%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9 +%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 %undefine with_ocaml_opt %endif Summary: OUnit: unit tests for OCaml Summary(pl.UTF-8): OUnit - testy jednostkowe dla OCamla Name: ocaml-ounit -Version: 2.0.0 -Release: 6 +Version: 2.2.4 +Release: 1 License: MIT -Group: Libraries -Source0: http://forge.ocamlcore.org/frs/download.php/1258/ounit-%{version}.tar.gz -# Source0-md5: 2e0a24648c55005978d4923eb4925b28 -URL: http://ounit.forge.ocamlcore.org/ -BuildRequires: ocaml >= 3.04-7 +Group: Development/Libraries +#Source0Download: https://github.com/gildor478/ounit/releases +Source0: https://github.com/gildor478/ounit/releases/download/v%{version}/ounit-v%{version}.tbz +# Source0-md5: 7cc70da6eb7a69bc18936ade68dfae61 +Patch0: %{name}-remove-stdlib-shims.patch +Patch1: %{name}-remove-Thread-kill.patch +URL: https://github.com/gildor478/ounit +BuildRequires: ocaml >= 1:4.04.0 +BuildRequires: ocaml-dune >= 1.11.0 BuildRequires: ocaml-findlib +BuildRequires: ocaml-lwt-devel %requires_eq ocaml BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -29,49 +34,107 @@ tool for Java, and the HUnit tool for Haskell. OUnit to szkielet testów jednostkowych dla OCamla, zainspirowany narzędziami JUnit dla Javy oraz HUnit dla Haskella. +%package lwt +Summary: Helper functions for building Lwt tests using OUnit +Summary(pl.UTF-8): Funkcje pomocnicze do tworzenia testów Lwt przy użyciu biblioteki OUnit +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: ocaml-lwt-devel + +%description lwt +This library contains helper functions for building Lwt tests using +OUnit. + +%description lwt -l pl.UTF-8 +Biblioteka zawierająca funkcje pomocnicze do tworzenia testów Lwt przy +użyciu biblioteki OUnit. + %prep -%setup -q -n ounit-%{version} +%setup -q -n ounit-v%{version} +%patch0 -p1 +%patch1 -p1 %build -# not autoconf configure -./configure \ - --prefix=%{_prefix} \ - --override bytecomp_c_compiler "%{__cc} %{rpmcflags} -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC" \ - --override native_c_compiler "%{__cc} %{rpmcflags} -D_FILE_OFFSET_BITS=64 -D_REENTRANT" - -%{__make} +dune build @all --verbose %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{site-lib/oUnit,stublibs} - -%{__make} install \ - OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mv $RPM_BUILD_ROOT%{_libdir}/ocaml/oUnit/META $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/oUnit -cat >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/oUnit/META <