Rebuild for OCaml 4.01.0, and add -ocaml41 patch to adapt to changes.
Enable debuginfo. Enable glib integration. Add check script. Add manual to -devel subpackage. Minor spec file cleanups.
This commit is contained in:
parent
4218d9635d
commit
284721bb1d
@ -1,22 +0,0 @@
|
||||
--- lwt-2.3.2.orig/discover.ml 2011-04-15 17:42:59.000000000 +0200
|
||||
+++ lwt-2.3.2/discover.ml 2011-05-21 21:21:58.882050121 +0200
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
let libev_code = "
|
||||
#include <caml/mlvalues.h>
|
||||
-#include <ev.h>
|
||||
+#include <libev/ev.h>
|
||||
|
||||
CAMLprim value lwt_test()
|
||||
{
|
||||
--- lwt-2.3.2.orig/src/unix/lwt_libev_stubs.c 2011-04-15 17:42:59.000000000 +0200
|
||||
+++ lwt-2.3.2/src/unix/lwt_libev_stubs.c 2011-05-21 21:24:05.681330220 +0200
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <caml/signals.h>
|
||||
#include <caml/custom.h>
|
||||
#include <caml/callback.h>
|
||||
-#include <ev.h>
|
||||
+#include <libev/ev.h>
|
||||
|
||||
#include "lwt_unix.h"
|
||||
|
22
lwt-2.4.3-libev.patch
Normal file
22
lwt-2.4.3-libev.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- ./discover.ml.orig 2012-12-27 05:29:57.000000000 -0700
|
||||
+++ ./discover.ml 2013-09-18 10:00:00.000000000 -0600
|
||||
@@ -96,7 +96,7 @@ CAMLprim value lwt_test()
|
||||
|
||||
let libev_code = "
|
||||
#include <caml/mlvalues.h>
|
||||
-#include <ev.h>
|
||||
+#include <libev/ev.h>
|
||||
|
||||
CAMLprim value lwt_test()
|
||||
{
|
||||
--- ./src/unix/lwt_libev_stubs.c.orig 2012-12-27 05:29:57.000000000 -0700
|
||||
+++ ./src/unix/lwt_libev_stubs.c 2013-09-18 10:00:00.000000000 -0600
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <caml/signals.h>
|
||||
#include <caml/custom.h>
|
||||
#include <caml/callback.h>
|
||||
-#include <ev.h>
|
||||
+#include <libev/ev.h>
|
||||
|
||||
#include "lwt_unix.h"
|
||||
|
24
lwt-2.4.3-ocaml41.patch
Normal file
24
lwt-2.4.3-ocaml41.patch
Normal file
@ -0,0 +1,24 @@
|
||||
--- ./src/unix/lwt_unix.ml.orig 2012-12-27 05:29:57.000000000 -0700
|
||||
+++ ./src/unix/lwt_unix.ml 2013-09-18 11:00:00.000000000 -0600
|
||||
@@ -596,6 +596,9 @@ type open_flag =
|
||||
#if ocaml_version >= (3, 13)
|
||||
| O_SHARE_DELETE
|
||||
#endif
|
||||
+#if ocaml_version >= (4, 1)
|
||||
+ | O_CLOEXEC
|
||||
+#endif
|
||||
|
||||
#if windows
|
||||
|
||||
--- ./src/unix/lwt_unix.mli.orig 2012-12-27 05:29:57.000000000 -0700
|
||||
+++ ./src/unix/lwt_unix.mli 2013-09-18 11:00:00.000000000 -0600
|
||||
@@ -315,6 +315,9 @@ type open_flag =
|
||||
#if ocaml_version >= (3, 13)
|
||||
| O_SHARE_DELETE
|
||||
#endif
|
||||
+#if ocaml_version >= (4, 1)
|
||||
+ | O_CLOEXEC
|
||||
+#endif
|
||||
|
||||
val openfile : string -> open_flag list -> file_perm -> file_descr Lwt.t
|
||||
(** Wrapper for [Unix.openfile]. *)
|
@ -1,19 +1,22 @@
|
||||
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: ocaml-lwt
|
||||
Version: 2.4.3
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: OCaml lightweight thread library
|
||||
|
||||
# The openssl linking exception is granted.
|
||||
License: LGPLv2+ with exceptions
|
||||
URL: http://ocsigen.org/lwt
|
||||
Source0: http://ocsigen.org/download/lwt-%{version}.tar.gz
|
||||
ExcludeArch: sparc64 s390 s390x
|
||||
ExclusiveArch: %{ocaml_arches}
|
||||
|
||||
# Location of libev headers on Fedora is in /usr/include/libev/ev.h
|
||||
# so we need to patch the source accordingly.
|
||||
Patch0: lwt-2.3.2-libev.patch
|
||||
Patch0: lwt-2.4.3-libev.patch
|
||||
|
||||
# Adapt to changes in OCaml 4.01.0
|
||||
Patch1: lwt-2.4.3-ocaml41.patch
|
||||
|
||||
BuildRequires: ocaml >= 3.10.0
|
||||
BuildRequires: ocaml-findlib-devel
|
||||
@ -22,6 +25,7 @@ BuildRequires: ocaml-camlp4-devel
|
||||
BuildRequires: ocaml-ssl >= 0.4.0
|
||||
BuildRequires: ocaml-react >= 0.9.0
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: libev-devel
|
||||
|
||||
|
||||
@ -32,7 +36,7 @@ is part of the Ocsigen project.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
|
||||
%description devel
|
||||
@ -43,13 +47,16 @@ developing applications that use %{name}.
|
||||
%prep
|
||||
%setup -q -n lwt-%{version}
|
||||
|
||||
%patch0 -p1
|
||||
%patch0
|
||||
%patch1
|
||||
|
||||
mv README README.old
|
||||
iconv -f iso-8859-1 -t utf-8 < README.old > README
|
||||
touch -r README.old README
|
||||
|
||||
|
||||
%build
|
||||
./configure --enable-ssl --enable-glib --enable-react --prefix=%{_prefix}
|
||||
make
|
||||
|
||||
|
||||
@ -59,10 +66,15 @@ export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
||||
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
|
||||
make install
|
||||
|
||||
strip $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
||||
chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
||||
|
||||
|
||||
%check
|
||||
./configure --enable-ssl --enable-glib --enable-react --enable-tests \
|
||||
--prefix=%{_prefix}
|
||||
make test
|
||||
|
||||
|
||||
%files
|
||||
%doc LICENSE COPYING
|
||||
%{_libdir}/ocaml/lwt
|
||||
@ -77,7 +89,7 @@ chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
||||
|
||||
|
||||
%files devel
|
||||
%doc LICENSE COPYING CHANGES CHANGES.darcs README
|
||||
%doc CHANGES CHANGES.darcs README manual/manual.pdf
|
||||
%if %opt
|
||||
%{_libdir}/ocaml/lwt/*.a
|
||||
%{_libdir}/ocaml/lwt/*.cmxa
|
||||
@ -87,7 +99,15 @@ chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Sep 14 2013 Scott Tsai <scottt.tw@gmail.com> 2.4.3-3
|
||||
* Wed Sep 18 2013 Jerry James <loganjerry@gmail.com> - 2.4.3-4
|
||||
- Rebuild for OCaml 4.01.0, and add -ocaml41 patch to adapt to changes
|
||||
- Enable debuginfo
|
||||
- Enable glib integration
|
||||
- Add check script
|
||||
- Add manual to -devel subpackage
|
||||
- Minor spec file cleanups
|
||||
|
||||
* Sat Sep 14 2013 Scott Tsai <scottt.tw@gmail.com> - 2.4.3-3
|
||||
- New upstream version 2.4.3
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-3
|
||||
|
Loading…
Reference in New Issue
Block a user