Compare commits

...

3 Commits

Author SHA1 Message Date
Fedora Release Engineering 0c43e7e377 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 01:06:19 +00:00
Jerry James 3ce918a734 Optionally run tests.
- Link against the math library.
- Use new OCaml macros.
2022-07-20 13:37:05 -06:00
Richard W.M. Jones b6387cb0e6 OCaml 4.14.0 rebuild 2022-06-18 15:25:51 +01:00
2 changed files with 49 additions and 54 deletions

10
ocaml-base-mathlib.patch Normal file
View File

@ -0,0 +1,10 @@
--- a/src/dune 2022-02-18 15:56:18.448932476 -0700
+++ b/src/dune 2022-02-18 15:57:07.165948459 -0700
@@ -11,6 +11,7 @@
(libraries base_internalhash_types caml sexplib0 shadow_stdlib)
(flags :standard -w -55)
(c_flags :standard -D_LARGEFILE64_SOURCE (:include mpopcnt.sexp))
+ (c_library_flags -lm)
(c_names exn_stubs int_math_stubs hash_stubs am_testing)
(preprocess no_preprocessing)
(lint

View File

@ -1,27 +1,36 @@
%undefine _package_note_flags
# TESTING NOTE: The ppx_jane module is needed to run the tests. However,
# ppx_jane transitively requires this module. Therefore, we cannot run the
# tests at all until we are able to add ppx_jane to Fedora, and even then we
# will only be able to run the tests in non-bootstrap mode.
%global srcname base
# This package is needed to build ppx_jane, but its tests require ppx_jane.
# Break the dependency cycle here.
%bcond_with test
Name: ocaml-%{srcname}
Name: ocaml-base
Version: 0.15.0
Release: 4%{?dist}
Release: 6%{?dist}
Summary: Jane Street standard library for OCaml
License: MIT
URL: https://opensource.janestreet.com/base/
Source0: https://github.com/janestreet/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz
Source0: https://github.com/janestreet/base/archive/v%{version}/base-%{version}.tar.gz
# Adapt to changes in the OCaml 4.13 standard library
# See https://github.com/janestreet/base/issues/125
Patch0: %{name}-ocaml413.patch
# Expose a dependency on the math library so RPM can see it
Patch1: %{name}-mathlib.patch
BuildRequires: ocaml >= 4.10.0
BuildRequires: ocaml-dune-devel >= 2.0.0
BuildRequires: ocaml >= 4.08.0
BuildRequires: ocaml-dune >= 2.0.0
BuildRequires: ocaml-dune-configurator-devel
BuildRequires: ocaml-sexplib0-devel >= 0.15
%if %{with test}
BuildRequires: ocaml-num-devel
BuildRequires: ocaml-ppx-jane-devel
BuildRequires: ocaml-sexplib-devel
BuildRequires: ocaml-stdio-devel
BuildRequires: ocaml-uutf-devel
%endif
%description
Base is a standard library for OCaml. It provides a standard set of
general purpose modules that are well-tested, performant, and
@ -42,10 +51,10 @@ The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%prep
%autosetup -n %{srcname}-%{version} -p1
%autosetup -n base-%{version} -p1
%build
dune build %{?_smp_mflags} --verbose --release
%dune_build
# Dune passes %%build_ldflags to ocamlmklib without -ldopt, resulting in
# "Unknown option" warnings from ocamlmklib and a library that has not been
@ -61,55 +70,31 @@ ocamlmklib -g -ldopt "%build_ldflags" -o base_internalhash_types_stubs *.o
popd
%install
dune install --destdir=%{buildroot}
%dune_install
# We install the documentation with the doc macro
rm -fr %{buildroot}%{_prefix}/doc
%if %{with test}
%check
%dune_check
%endif
%files
%files -f .ofiles
%doc CHANGES.md README.org ROADMAP.md
%license LICENSE.md
%dir %{_libdir}/ocaml/%{srcname}/
%dir %{_libdir}/ocaml/%{srcname}/base_internalhash_types/
%dir %{_libdir}/ocaml/%{srcname}/caml/
%dir %{_libdir}/ocaml/%{srcname}/md5/
%dir %{_libdir}/ocaml/%{srcname}/shadow_stdlib/
%{_libdir}/ocaml/%{srcname}/META
%{_libdir}/ocaml/%{srcname}/*.cma
%{_libdir}/ocaml/%{srcname}/*.cmi
%{_libdir}/ocaml/%{srcname}/*.js
%{_libdir}/ocaml/%{srcname}/*/*.cma
%{_libdir}/ocaml/%{srcname}/*/*.cmi
%{_libdir}/ocaml/%{srcname}/*/*.js
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}/*.cmxs
%{_libdir}/ocaml/%{srcname}/*/*.cmxs
%endif
%{_libdir}/ocaml/stublibs/dllbase_stubs.so
%{_libdir}/ocaml/stublibs/dllbase_internalhash_types_stubs.so
%files devel
%{_libdir}/ocaml/%{srcname}/dune-package
%{_libdir}/ocaml/%{srcname}/opam
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}/*.a
%{_libdir}/ocaml/%{srcname}/*.cmx
%{_libdir}/ocaml/%{srcname}/*.cmxa
%{_libdir}/ocaml/%{srcname}/*/*.a
%{_libdir}/ocaml/%{srcname}/*/*.cmx
%{_libdir}/ocaml/%{srcname}/*/*.cmxa
%endif
%{_libdir}/ocaml/%{srcname}/*.cmt
%{_libdir}/ocaml/%{srcname}/*.cmti
%{_libdir}/ocaml/%{srcname}/*.ml
%{_libdir}/ocaml/%{srcname}/*.mli
%{_libdir}/ocaml/%{srcname}/*/*.cmt
%{_libdir}/ocaml/%{srcname}/*/*.cmti
%{_libdir}/ocaml/%{srcname}/*/*.h
%{_libdir}/ocaml/%{srcname}/*/*.ml
%{_libdir}/ocaml/%{srcname}/*/*.mli
%files devel -f .ofiles-devel
%changelog
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 27 2022 Jerry James <loganjerry@gmail.com> - 0.15.0-5
- Optionally run tests
- Link against the math library
- Use new OCaml macros
* Sat Jun 18 2022 Richard W.M. Jones <rjones@redhat.com> - 0.15.0-5
- OCaml 4.14.0 rebuild
* Thu Feb 24 2022 Jerry James <loganjerry@gmail.com> - 0.15.0-4
- Version 0.15.0 rerelease