- Require current dune macros

- Update to 20191021.1b17a5d from dune branch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-parmap?expand=0&rev=34
This commit is contained in:
Olaf Hering 2019-11-01 22:49:22 +00:00 committed by Git OBS Bridge
parent 5301e1760f
commit ca6e242f64
5 changed files with 28 additions and 69 deletions

View File

@ -1,9 +1,9 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="url">git://github.com/rdicosmo/parmap.git</param>
<param name="url">git://github.com/olafhering/parmap.git</param>
<param name="scm">git</param>
<param name="versionformat">%cd.%h</param>
<param name="revision">803edbb03aedda79b0c681b4f14ea9a2f10b1514</param>
<param name="revision">dune-wip</param>
<param name="filename">ocaml-parmap</param>
</service>
<service name="recompress" mode="disabled">

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:67c9fbefe2cfc319e0a741f072efec60404383a40866b99a3f15cd7e4df33808
size 63512

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a433c605c2845a0e1d07af83e14384f59d01b3f646cabaaa8e56aa7d515d262
size 31620

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Nov 1 12:34:56 UTC 2019 - ohering@suse.de
- Require current dune macros
- Update to 20191021.1b17a5d from dune branch
-------------------------------------------------------------------
Wed Oct 9 05:48:16 UTC 2019 - ohering@suse.de

View File

@ -17,7 +17,7 @@
Name: ocaml-parmap
Version: 20191002.803edbb
Version: 20191021.1b17a5d
Release: 0
%{?ocaml_preserve_bytecode}
Summary: Multicore architecture exploitation for OCaml programs with minimal modifications
@ -26,14 +26,13 @@ Group: Development/Languages/OCaml
URL: http://rdicosmo.github.io/parmap/
Source: %{name}-%{version}.tar.xz
BuildRequires: ocaml
BuildRequires: ocaml-oasis
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-rpm-macros >= 20191009
BuildRequires: ocaml-dune
BuildRequires: ocaml-rpm-macros >= 20191101
BuildRequires: ocamlfind(bigarray)
BuildRequires: ocamlfind(dune.configurator)
BuildRequires: ocamlfind(graphics)
BuildRequires: ocamlfind(unix)
BuildRequires: pkgconfig(x11)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
If you want to use your many cores to accelerate an operation
@ -58,70 +57,24 @@ developing applications that use %{name}.
%autosetup -p1
%build
echo -n > config.h
if grep -w sched_setaffinity /usr/include/sched.h
then
tee -a config.h <<_EOF_
#define HAVE_DECL_SCHED_SETAFFINITY 1
_EOF_
fi
ocaml_version="$(ocamlc -version)"
case "${ocaml_version}" in
4.03.*|4.04.*|4.05.*)
echo 'let map_file = Bigarray.Genarray.map_file' >>parmap_compat.ml
;;
*)
echo 'let map_file = Unix.map_file' >>parmap_compat.ml
;;
esac
rm -fv setup.ml myocamlbuild.ml META* _* */_*
# obs service changes every ^Version line ...
sh -c "sed 's/^Version.*/Version: %{version}/' | tee _oasis" <<_EOF_
OASISFormat: 0.4
Name: parmap
Version: 0
Synopsis: library to exploit multicore architectures (parallel programming)
Authors: Marco Danelutto and Roberto Di Cosmo
License: WTFPL
LicenseFile: LICENSE
Plugins: META(`oasis version`)
BuildTools: ocamlbuild
Library parmap
Path: .
Install: true
Modules: Parmap, Parmap_compat
CSources: bytearray_stubs.c, setcore_stubs.c, config.h
CCOpt: %{optflags} -I$PWD -Werror -D_GNU_SOURCE
Document parmap
Title: API reference for parmap
Type: ocamlbuild
BuildTools+: ocamldoc
InstallDir: \$htmldir
Install: true
XOCamlbuildPath: .
XOCamlbuildLibraries: parmap
Executable "%{name}-mandels"
Install: true
Path: example
MainIs: mandels.ml
CompiledObject: best
BuildDepends: parmap, graphics, unix, bigarray
_EOF_
%oasis_setup
%ocaml_oasis_configure --enable-docs
%ocaml_oasis_build
%ocaml_oasis_doc
dune_release_pkgs='parmap'
%ocaml_dune_setup
%ocaml_dune_build
%install
%ocaml_oasis_findlib_install
%ocaml_dune_install
%ocaml_create_file_list
%check
%ifarch x86_64
%else
dune_test_tolerate_fail='dune_test_tolerate_fail bitsize'
%endif
%ocaml_dune_test
%files -f %{name}.files
%doc README.md
%{_bindir}/*
%files devel -f %{name}.files.devel
%{oasis_docdir_html}
%changelog