0108e84
# NB: We are stuck on an old version of LWT because we require various
0108e84
# packages to be added to Fedora to support the new version.  They are:
0108e84
#   - jbuilder (DONE)
0108e84
#   - ocaml-result (DONE)
0108e84
#   - bisect_ppx
0108e84
#   - ocaml-migrate-parsetree
0108e84
#   - ppx_tools_versioned
0108e84
# Please DO NOT move to a new version until you have added all of the
0108e84
# above to Fedora.
138d93c
138d93c
Name:           ocaml-lwt
ac54fcc
Version:        2.5.0
112063f
Release:        17%{?dist}
138d93c
Summary:        OCaml lightweight thread library
138d93c
Jerry James 284721b
# The openssl linking exception is granted.
138d93c
License:        LGPLv2+ with exceptions
c24489a
URL:            http://ocsigen.org/lwt
f87314c
Source0:        https://github.com/ocsigen/lwt/archive/2.5.0/lwt-2.5.0.tar.gz
f9ddd56
4808efb
# Change some deprecated functions for OCaml 4.5.0.
4808efb
Patch1:         lwt-2.5.0-ocaml45.patch
4808efb
138d93c
BuildRequires:  ocaml >= 3.10.0
582bb31
BuildRequires:  ocaml-ocamlbuild
138d93c
BuildRequires:  ocaml-findlib-devel
138d93c
BuildRequires:  ocaml-ocamldoc
dd50d5a
BuildRequires:  ocaml-camlp4-devel
ac54fcc
BuildRequires:  ocaml-ssl-devel >= 0.5.1
3f7f6bc
BuildRequires:  ocaml-react-devel >= 1.0.0
c24489a
BuildRequires:  chrpath
Jerry James 284721b
BuildRequires:  glib2-devel
f9ddd56
BuildRequires:  libev-devel
138d93c
138d93c
138d93c
%description
138d93c
Lwt is a lightweight thread library for Objective Caml.  This library
138d93c
is part of the Ocsigen project.
138d93c
138d93c
138d93c
%package        devel
138d93c
Summary:        Development files for %{name}
Jerry James 284721b
Requires:       %{name}%{?_isa} = %{version}-%{release}
138d93c
138d93c
138d93c
%description    devel
138d93c
The %{name}-devel package contains libraries and signature files for
138d93c
developing applications that use %{name}.
138d93c
138d93c
138d93c
%prep
ac54fcc
%setup -q -n lwt-%{version}
138d93c
4808efb
%patch1 -p1
4808efb
138d93c
138d93c
%build
f87314c
./configure \
3f7f6bc
    --enable-ssl --enable-glib --enable-react \
f87314c
    --enable-camlp4 \
f87314c
    --prefix=%{_prefix}
138d93c
make
138d93c
138d93c
138d93c
%install
138d93c
export DESTDIR=$RPM_BUILD_ROOT
138d93c
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
138d93c
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
138d93c
make install
138d93c
c24489a
chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
c24489a
138d93c
Jerry James 284721b
%check
4808efb
%ifarch %{ocaml_native_compiler}
3f7f6bc
./configure --enable-ssl --enable-glib --enable-react --enable-tests \
Jerry James 284721b
  --prefix=%{_prefix}
ac54fcc
# Some tests fail, unclear why.  Make the tests advisory for now.
ac54fcc
make test ||:
ac54fcc
%endif
Jerry James 284721b
6419d2d
# Check lwt.react support is enabled (RHBZ#1048367).
3f7f6bc
OCAMLPATH=$RPM_BUILD_ROOT%{_libdir}/ocaml ocamlfind query lwt.react
6419d2d
Jerry James 284721b
138d93c
%files
138d93c
%doc LICENSE COPYING
138d93c
%{_libdir}/ocaml/lwt
4808efb
%ifarch %{ocaml_native_compiler}
138d93c
%exclude %{_libdir}/ocaml/lwt/*.a
138d93c
%exclude %{_libdir}/ocaml/lwt/*.cmxa
f9ddd56
#%exclude %{_libdir}/ocaml/lwt/*.cmx
138d93c
%endif
138d93c
%exclude %{_libdir}/ocaml/lwt/*.mli
c24489a
%{_libdir}/ocaml/stublibs/*.so
c24489a
%{_libdir}/ocaml/stublibs/*.so.owner
138d93c
138d93c
138d93c
%files devel
ac54fcc
%doc CHANGES README.md
4808efb
%ifarch %{ocaml_native_compiler}
138d93c
%{_libdir}/ocaml/lwt/*.a
138d93c
%{_libdir}/ocaml/lwt/*.cmxa
f9ddd56
#%{_libdir}/ocaml/lwt/*.cmx
138d93c
%endif
138d93c
%{_libdir}/ocaml/lwt/*.mli
138d93c
138d93c
138d93c
%changelog
112063f
* Fri Nov 17 2017 Richard W.M. Jones <rjones@redhat.com> - 2.5.0-17
112063f
- OCaml 4.06.0 rebuild.
112063f
0108e84
* Tue Oct 03 2017 Richard W.M. Jones <rjones@redhat.com> - 2.5.0-16
0108e84
- Rebuild against new ocaml-ssl.
0108e84
4808efb
* Tue Aug 08 2017 Richard W.M. Jones <rjones@redhat.com> - 2.5.0-15
93b020e
- OCaml 4.05.0 rebuild.
93b020e
7526be3
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-13
7526be3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
7526be3
e5e05cd
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-12
e5e05cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e5e05cd
ea38091
* Tue Jun 27 2017 Richard W.M. Jones <rjones@redhat.com> - 2.5.0-11
ea38091
- Bump release and rebuild.
ea38091
d27cf07
* Mon Jun 26 2017 Richard W.M. Jones <rjones@redhat.com> - 2.5.0-10
d27cf07
- OCaml 4.04.2 rebuild.
d27cf07
0ee2d98
* Fri May 12 2017 Richard W.M. Jones <rjones@redhat.com> - 2.5.0-9
0ee2d98
- OCaml 4.04.1 rebuild.
0ee2d98
5ef5de1
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-8
5ef5de1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
5ef5de1
1529491
* Wed Nov 09 2016 Dan HorĂ¡k <dan@danny.cz> - 2.5.0-7
1529491
- rebuild for s390x codegen bug
1529491
f9388b3
* Mon Nov 07 2016 Richard W.M. Jones <rjones@redhat.com> - 2.5.0-6
f9388b3
- Rebuild for OCaml 4.04.0.
582bb31
- Add explicit dependency on ocamlbuild.
f9388b3
ffbe8be
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-5
ffbe8be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ffbe8be
3f7f6bc
* Sun Aug  2 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 2.5.0-4
3f7f6bc
- Re-enable React (fixes bz# 1249307)
3f7f6bc
4b83304
* Tue Jul 28 2015 Richard W.M. Jones <rjones@redhat.com> - 2.5.0-3
4b83304
- OCaml 4.02.3 rebuild.
4b83304
f87314c
* Fri Jul 24 2015 Richard W.M. Jones <rjones@redhat.com> - 2.5.0-2
f87314c
- Enable building the syntax extension.
f87314c
- Fix Source URL.
f87314c
ac54fcc
* Wed Jul 22 2015 Richard W.M. Jones <rjones@redhat.com> - 2.5.0-1
ac54fcc
- New version 2.5.0.
ac54fcc
- Enable bytecode builds.
ac54fcc
b14e1e2
* Wed Jun 24 2015 Richard W.M. Jones <rjones@redhat.com> - 2.4.5-6
b14e1e2
- ocaml-4.02.2 final rebuild.
b14e1e2
a482ac8
* Wed Jun 17 2015 Richard W.M. Jones <rjones@redhat.com> - 2.4.5-5
a482ac8
- ocaml-4.02.2 rebuild.
a482ac8
037fd23
* Tue Feb 17 2015 Richard W.M. Jones <rjones@redhat.com> - 2.4.5-4
037fd23
- ocaml-4.02.1 rebuild.
037fd23
da0f995
* Sun Aug 31 2014 Richard W.M. Jones <rjones@redhat.com> - 2.4.5-3
da0f995
- ocaml-4.02.0 final rebuild.
da0f995
277f52c
* Sat Aug 23 2014 Richard W.M. Jones <rjones@redhat.com> - 2.4.5-2
277f52c
- ocaml-4.02.0+rc1 rebuild.
277f52c
945f3d5
* Mon Aug 18 2014 Scott Tsai <scottt.tw@gmail.com> 2.4.5-1
945f3d5
- New upstream version 2.4.5 (tarball created from tag through github https://github.com/ocsigen/lwt/tags)
945f3d5
- Remove patches which are now upstream.
945f3d5
- Disable ocaml-react support since it breaks the build (https://github.com/ocsigen/lwt/issues/77)
945f3d5
- Remove manual.pdf for now since tarballs from git tags don't include the pre-built documentation
945f3d5
cc9d336
* Mon Aug 18 2014 Scott Tsai <scottt.tw@gmail.com> - 2.4.3-12
cc9d336
- Add lwt-fix-ocaml-camlp4-19.patch to fix OCaml 4.02+ build failure
b418509
- Rebuild for ocaml-4.02.0-0.8.git10e45753.fc22.
cc9d336
9bde3dc
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.3-11
9bde3dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9bde3dc
e48476f
* Sat Aug 09 2014 Richard W.M. Jones <rjones@redhat.com> - 2.4.3-10
e48476f
- ocaml-4.02.0-0.8.git10e45753.fc22 rebuild.
e48476f
f249e30
* Tue Jul 22 2014 Richard W.M. Jones <rjones@redhat.com> - 2.4.3-9
f249e30
- OCaml 4.02.0 beta rebuild.
f249e30
6c17ea3
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.3-8
6c17ea3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
6c17ea3
9c3a025
* Tue Apr 15 2014 Richard W.M. Jones <rjones@redhat.com> - 2.4.3-7
9c3a025
- Remove ocaml_arches macro (RHBZ#1087794).
9c3a025
9c3a025
* Tue Apr 15 2014 Richard W.M. Jones <rjones@redhat.com> - 2.4.3-6
9c3a025
- Remove ocaml_arches macro (RHBZ#1087794).
9c3a025
6419d2d
* Fri Jan  3 2014 Richard W.M. Jones <rjones@redhat.com> - 2.4.3-5
6419d2d
- Enable lwt.react support, and check it gets enabled (RHBZ#1048367).
131eff5
- Remove libev patch since headers are back to normal location
131eff5
  in libev >= 4.15-3.
6419d2d
Jerry James 284721b
* Wed Sep 18 2013 Jerry James <loganjerry@gmail.com> - 2.4.3-4
Jerry James 284721b
- Rebuild for OCaml 4.01.0, and add -ocaml41 patch to adapt to changes
Jerry James 284721b
- Enable debuginfo
Jerry James 284721b
- Enable glib integration
Jerry James 284721b
- Add check script
Jerry James 284721b
- Add manual to -devel subpackage
Jerry James 284721b
- Minor spec file cleanups
Jerry James 284721b
Jerry James 284721b
* Sat Sep 14 2013 Scott Tsai <scottt.tw@gmail.com> - 2.4.3-3
2cf5555
- New upstream version 2.4.3
2cf5555
fc5e69f
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-3
fc5e69f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
fc5e69f
c8bd1f8
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-2
c8bd1f8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
c8bd1f8
151ed62
* Tue Oct 30 2012 Richard W.M. Jones <rjones@redhat.com> - 2.4.2-1
151ed62
- New upstream version 2.4.2.
151ed62
- Rebuild for OCaml 4.00.1.
151ed62
- Remove patches which are now upstream.
151ed62
- Clean up spec file.
151ed62
e8251a5
* Mon Jul 30 2012 Richard W.M. Jones <rjones@redhat.com> - 2.3.2-7
e8251a5
- Rebuild for OCaml 4.00.0 official.
e8251a5
7f248b6
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.2-6
7f248b6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
7f248b6
a3e2501
* Thu Jun 14 2012 Scott Tsai <scottt.tw@gmail.com> - 2.3.2-5
a3e2501
- Patch myocamlobuild.ml in lwt-2.3.2-ocaml-4.patch to
a3e2501
  add compiler-libs to search patch for "Toploop".
a3e2501
- Add oasis-common.patch to make setup.ml work on OCaml 4.00.0
a3e2501
- Both patches from https://sympa.inria.fr/sympa/arc/caml-list/2012-05/msg00223.html
a3e2501
8fcc1d7
* Mon Jun 11 2012 Richard W.M. Jones <rjones@redhat.com> - 2.3.2-4
8fcc1d7
- Patch for OCaml 4.00.0.
8fcc1d7
3d9bcdb
* Sun Jun 10 2012 Richard W.M. Jones <rjones@redhat.com> - 2.3.2-3
3d9bcdb
- Rebuild for OCaml 4.00.0.
3d9bcdb
a03d556
* Sat Jan 07 2012 Richard W.M. Jones <rjones@redhat.com> - 2.3.2-2
a03d556
- Rebuild for OCaml 3.12.1.
a03d556
8ca35f2
* Thu Dec 08 2011 Scott Tsai scottt.tw@gmail.com - 2.3.2-1
6277ccd
- New upstream version 2.3.2. 
6277ccd
35e6ed0
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
35e6ed0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
35e6ed0
f9ddd56
* Thu Jan  6 2011 Richard W.M. Jones <rjones@redhat.com> - 2.2.0-1
f9ddd56
- New upstream version 2.2.0.
f9ddd56
- Rebuild for OCaml 3.12.0.
f9ddd56
- Add BR libev-devel.
f9ddd56
- Patch <ev.h> -> <libev/ev.h>
f9ddd56
- *.cmx files are no longer being distributed.
f9ddd56
- No VERSION file.
f9ddd56
3bc7090
* Wed Dec 30 2009 Richard W.M. Jones <rjones@redhat.com> - 2.0.0-0.3.rc1
3bc7090
- Rebuild for OCaml 3.11.2.
3bc7090
dd50d5a
* Mon Oct 12 2009 Richard W.M. Jones <rjones@redhat.com> - 2.0.0-0.2.rc1.fc13
8e464ff
- ocaml-react is now in Fedora, so build this package.
dd50d5a
- Missing BR on camlp4.
8e464ff
c24489a
* Thu Oct  8 2009 Richard W.M. Jones <rjones@redhat.com> - 2.0.0-0.rc1.fc13
c24489a
- New upstream version 2.0.0+rc1.
c24489a
- NB. This cannot be built as it depends on new package ocaml-react
c24489a
  (RHBZ#527971).
c24489a
7ce5cd1
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-6
7ce5cd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
7ce5cd1
5363081
* Sat May 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.1.0-5
5363081
- Rebuild for OCaml 3.11.1
5363081
16b5251
* Thu Apr 16 2009 S390x secondary arch maintainer <fedora-s390x@lists.fedoraproject.org>
16b5251
- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs
16b5251
  (added sparc64 per request from the sparc maintainer)
16b5251
d7d48fc
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-4
d7d48fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
d7d48fc
16665ef
* Thu Dec  4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.1.0-3
16665ef
- Rebuild.
16665ef
93e1b85
* Wed Sep  3 2008 Richard W.M. Jones <rjones@redhat.com> - 1.1.0-2
93e1b85
- Rebuild with higher EVR than F-9 branch.
93e1b85
138d93c
* Mon Sep  1 2008 Richard W.M. Jones <rjones@redhat.com> - 1.1.0-1
138d93c
- Initial RPM release.