From 07add6ba835342b02273365d4ce640163a826f7b Mon Sep 17 00:00:00 2001 From: Jerry James Date: Jul 18 2022 21:59:01 +0000 Subject: Version 0.19.1. - Add ocaml-ppx-deriving-qcheck subpackage. - Reenable tests on 32-bit x86. - Add patch to expose a dependency on libm. - Build the documentation with asciidoc. - Use new OCaml macros. --- diff --git a/README.md b/README.md new file mode 100644 index 0000000..697f1a3 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# ocaml-qcheck + +[Qcheck](https://c-cube.github.io/qcheck/) enables checking invariants +(properties of a type) over randomly generated instances of the type. It +provides combinators for generating instances and printing them. diff --git a/ocaml-qcheck-mathlib.patch b/ocaml-qcheck-mathlib.patch new file mode 100644 index 0000000..59b7df3 --- /dev/null +++ b/ocaml-qcheck-mathlib.patch @@ -0,0 +1,9 @@ +--- qcheck-0.19.1/src/core/dune.orig 2022-07-13 10:11:04.000000000 -0600 ++++ qcheck-0.19.1/src/core/dune 2022-07-18 15:20:43.579153215 -0600 +@@ -4,5 +4,6 @@ + (public_name qcheck-core) + (wrapped false) + (libraries unix bytes) ++ (c_library_flags -lm) + (flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string) + ) diff --git a/ocaml-qcheck.spec b/ocaml-qcheck.spec index 6485f4f..854035d 100644 --- a/ocaml-qcheck.spec +++ b/ocaml-qcheck.spec @@ -1,21 +1,30 @@ %undefine _package_note_flags Name: ocaml-qcheck -Version: 0.18.1 -Release: 2%{?dist} +Version: 0.19.1 +Release: 1%{?dist} Summary: QuickCheck inspired property-based testing for OCaml License: BSD URL: https://c-cube.github.io/qcheck/ Source0: https://github.com/c-cube/qcheck/archive/v%{version}/%{name}-%{version}.tar.gz +# Expose a dependency on the math library so RPM can see it +Patch0: %{name}-mathlib.patch +BuildRequires: asciidoc BuildRequires: ocaml >= 4.08.0 -BuildRequires: ocaml-dune -BuildRequires: ocaml-odoc -BuildRequires: ocaml-alcotest-devel +BuildRequires: ocaml-dune >= 2.8.0 +BuildRequires: ocaml-alcotest-devel >= 1.4.0 BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-ppxlib-devel >= 0.22.0 +BuildRequires: ocaml-ppx-deriving-devel >= 5.2.1 +BuildRequires: python3-pygments -Requires: %{name}-ounit = %{version}-%{release} +Requires: %{name}-core%{?_isa} = %{version}-%{release} +Requires: %{name}-ounit%{?_isa} = %{version}-%{release} + +# This can be removed when F40 reaches EOL +Obsoletes: %{name}-doc < 0.19 %global _desc %{expand: Qcheck enables checking invariants (properties of a type) over randomly @@ -31,6 +40,7 @@ use either ocaml-qcheck-alcotest or ocaml-qcheck-ounit. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-core-devel%{?_isa} = %{version}-%{release} Requires: %{name}-ounit-devel%{?_isa} = %{version}-%{release} @@ -75,6 +85,7 @@ This package provides ounit support for qcheck. Summary: Development files for %{name}-ounit Requires: %{name}-ounit%{?_isa} = %{version}-%{release} Requires: %{name}-core-devel%{?_isa} = %{version}-%{release} +Requires: ocaml-ounit-devel%{?_isa} %description ounit-devel %_desc @@ -97,6 +108,7 @@ This package provides alcotest support for qcheck. Summary: Development files for %{name}-alcotest Requires: %{name}-alcotest%{?_isa} = %{version}-%{release} Requires: %{name}-core-devel%{?_isa} = %{version}-%{release} +Requires: ocaml-alcotest-devel%{?_isa} %description alcotest-devel %_desc @@ -105,158 +117,90 @@ The %{name}-alcotest-devel package contains libraries and signature files for developing applications that use %{name}-alcotest. -%package doc -Summary: Documentation for %{name} -BuildArch: noarch +%package -n ocaml-ppx-deriving-qcheck +Summary: PPX deriver for QCheck +Requires: %{name}-alcotest%{?_isa} = %{version}-%{release} +Requires: %{name}-core%{?_isa} = %{version}-%{release} + + +%description -n ocaml-ppx-deriving-qcheck %_desc +This package provides a PPX deriver for QCheck. -%description doc -Documentation for %{name}. + +%package -n ocaml-ppx-deriving-qcheck-devel +Summary: Development files for ocaml-ppx-deriving-qcheck +Requires: %{name}-core-devel%{?_isa} = %{version}-%{release} +Requires: ocaml-ppxlib-devel%{?_isa} + + +%description -n ocaml-ppx-deriving-qcheck-devel %_desc + +The ocaml-ppx-deriving-qcheck-devel package contains libraries and +signature files for developing applications that use +ocaml-ppx-deriving-qcheck. %prep %autosetup -n qcheck-%{version} -p1 +# Fix a markup bug in the README +sed -i 's/\[@@deriving/\\&/' README.adoc + %build -dune build %{?_smp_mflags} --verbose --release @install -dune build %{?_smp_mflags} @doc +%dune_build +asciidoc README.adoc %install -dune install --destdir=%{buildroot} - -# We do not want the dune markers -find _build/default/_doc/_html -name .dune-keep -delete - -# These files will be installed using doc and license directives. -rm -r %{buildroot}%{_prefix}/doc +%dune_install -s -# Tests do not pass on i686 due to taking fewer shrink steps than expected -%ifnarch %{ix86} %check -# ppc64le, at least, needs extra stack space to avoid a segfault -ulimit -s unlimited -dune runtest --no-buffer --release -%endif +%dune_check -%files -%doc README.adoc CHANGELOG.md +%files -f .ofiles-qcheck +%doc README.html CHANGELOG.md %license LICENSE -%dir %{_libdir}/ocaml/qcheck/ -%{_libdir}/ocaml/qcheck/META -%{_libdir}/ocaml/qcheck/*.cma -%{_libdir}/ocaml/qcheck/*.cmi -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/qcheck/*.cmxs -%endif -%files devel -%doc README.adoc CHANGELOG.md -%license LICENSE -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/qcheck/*.a -%{_libdir}/ocaml/qcheck/*.cmxa -%{_libdir}/ocaml/qcheck/*.cmx -%endif -%{_libdir}/ocaml/qcheck/*.ml -%{_libdir}/ocaml/qcheck/*.cma -%{_libdir}/ocaml/qcheck/*.cmi -%{_libdir}/ocaml/qcheck/*.cmt -%{_libdir}/ocaml/qcheck/dune-package -%{_libdir}/ocaml/qcheck/opam - - -%files core -%dir %{_libdir}/ocaml/qcheck-core/ -%dir %{_libdir}/ocaml/qcheck-core/runner/ -%{_libdir}/ocaml/qcheck-core/META -%{_libdir}/ocaml/qcheck-core/{*/,}*.cma -%{_libdir}/ocaml/qcheck-core/{*/,}*.cmi -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/qcheck-core/{*/,}*.cmxs -%endif - - -%files core-devel -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/qcheck-core/{*/,}*.a -%{_libdir}/ocaml/qcheck-core/{*/,}*.cmxa -%{_libdir}/ocaml/qcheck-core/{*/,}*.cmx -%endif -%{_libdir}/ocaml/qcheck-core/{*/,}*.ml -%{_libdir}/ocaml/qcheck-core/{*/,}*.mli -%{_libdir}/ocaml/qcheck-core/{*/,}*.cma -%{_libdir}/ocaml/qcheck-core/{*/,}*.cmi -%{_libdir}/ocaml/qcheck-core/{*/,}*.cmt -%{_libdir}/ocaml/qcheck-core/{*/,}*.cmti -%{_libdir}/ocaml/qcheck-core/dune-package -%{_libdir}/ocaml/qcheck-core/opam - - -%files ounit -%dir %{_libdir}/ocaml/qcheck-ounit/ -%{_libdir}/ocaml/qcheck-ounit/META -%{_libdir}/ocaml/qcheck-ounit/*.cma -%{_libdir}/ocaml/qcheck-ounit/*.cmi -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/qcheck-ounit/*.cmxs -%endif - - -%files ounit-devel -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/qcheck-ounit/*.a -%{_libdir}/ocaml/qcheck-ounit/*.cmxa -%{_libdir}/ocaml/qcheck-ounit/*.cmx -%endif -%{_libdir}/ocaml/qcheck-ounit/*.ml -%{_libdir}/ocaml/qcheck-ounit/*.mli -%{_libdir}/ocaml/qcheck-ounit/*.cma -%{_libdir}/ocaml/qcheck-ounit/*.cmi -%{_libdir}/ocaml/qcheck-ounit/*.cmt -%{_libdir}/ocaml/qcheck-ounit/*.cmti -%{_libdir}/ocaml/qcheck-ounit/dune-package -%{_libdir}/ocaml/qcheck-ounit/opam - - -%files alcotest -%dir %{_libdir}/ocaml/qcheck-alcotest/ -%{_libdir}/ocaml/qcheck-alcotest/META -%{_libdir}/ocaml/qcheck-alcotest/*.cma -%{_libdir}/ocaml/qcheck-alcotest/*.cmi -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/qcheck-alcotest/*.cmxs -%endif - - -%files alcotest-devel -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/qcheck-alcotest/*.a -%{_libdir}/ocaml/qcheck-alcotest/*.cmxa -%{_libdir}/ocaml/qcheck-alcotest/*.cmx -%endif -%{_libdir}/ocaml/qcheck-alcotest/*.ml -%{_libdir}/ocaml/qcheck-alcotest/*.mli -%{_libdir}/ocaml/qcheck-alcotest/*.cma -%{_libdir}/ocaml/qcheck-alcotest/*.cmi -%{_libdir}/ocaml/qcheck-alcotest/*.cmt -%{_libdir}/ocaml/qcheck-alcotest/*.cmti -%{_libdir}/ocaml/qcheck-alcotest/dune-package -%{_libdir}/ocaml/qcheck-alcotest/opam - - -%files doc -%doc _build/default/_doc/_html/ -%doc _build/default/_doc/_mlds/ -%doc _build/default/_doc/_odoc/ +%files devel -f .ofiles-qcheck-devel +%doc README.html CHANGELOG.md %license LICENSE +%files core -f .ofiles-qcheck-core + + +%files core-devel -f .ofiles-qcheck-core-devel + + +%files ounit -f .ofiles-qcheck-ounit + + +%files ounit-devel -f .ofiles-qcheck-ounit-devel + + +%files alcotest -f .ofiles-qcheck-alcotest + + +%files alcotest-devel -f .ofiles-qcheck-alcotest-devel + +%files -n ocaml-ppx-deriving-qcheck -f .ofiles-ppx_deriving_qcheck + +%files -n ocaml-ppx-deriving-qcheck-devel -f .ofiles-ppx_deriving_qcheck-devel + %changelog +* Mon Jul 18 2022 Jerry James - 0.19.1-1 +- Version 0.19.1 +- Add ocaml-ppx-deriving-qcheck subpackage +- Reenable tests on 32-bit x86 +- Add patch to expose a dependency on libm +- Build the documentation with asciidoc +- Use new OCaml macros + * Sun Jun 19 2022 Richard W.M. Jones - 0.18.1-2 - OCaml 4.14.0 rebuild diff --git a/sources b/sources index a8cdd61..e4307d6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ocaml-qcheck-0.18.1.tar.gz) = 6fd5fd4348ed6a48a8f64a466fedd07374eaf23d516b3c250ebad2a32ddbca3ae4ad9c84fe1112858075df46c119cd6550205a4228a553b014d135581f024ded +SHA512 (ocaml-qcheck-0.19.1.tar.gz) = f6af650381d4100ca019082c77f9aceda00b6158356f46a5bcb091ca1f56d41d9c819d3bae7736f1e70b3d1827c5a4af53cc80d94d66025dd52044438207a4c1