summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2015-07-16 12:51:08 +0000
committerAlexis Ballier <aballier@gentoo.org>2015-07-16 12:51:08 +0000
commite308d2986402e2f93c1b72629d06354a8194af82 (patch)
tree7b1e11f8218e060272d7553f32c25a50a4432159 /www-servers
parentversion bump (diff)
downloadgentoo-2-e308d2986402e2f93c1b72629d06354a8194af82.tar.gz
gentoo-2-e308d2986402e2f93c1b72629d06354a8194af82.tar.bz2
gentoo-2-e308d2986402e2f93c1b72629d06354a8194af82.zip
backport upstream patches to build against lwt 2.5
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/ocsigenserver/ChangeLog11
-rw-r--r--www-servers/ocsigenserver/files/lwt.patch19
-rw-r--r--www-servers/ocsigenserver/files/lwt2.patch19
-rw-r--r--www-servers/ocsigenserver/files/lwt3.patch86
-rw-r--r--www-servers/ocsigenserver/ocsigenserver-2.5-r1.ebuild88
5 files changed, 221 insertions, 2 deletions
diff --git a/www-servers/ocsigenserver/ChangeLog b/www-servers/ocsigenserver/ChangeLog
index d0112018e689..fa132f37711f 100644
--- a/www-servers/ocsigenserver/ChangeLog
+++ b/www-servers/ocsigenserver/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for www-servers/ocsigenserver
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/ocsigenserver/ChangeLog,v 1.9 2014/12/01 10:04:01 aballier Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/ocsigenserver/ChangeLog,v 1.10 2015/07/16 12:51:08 aballier Exp $
+
+*ocsigenserver-2.5-r1 (16 Jul 2015)
+
+ 16 Jul 2015; Alexis Ballier <aballier@gentoo.org>
+ +ocsigenserver-2.5-r1.ebuild, +files/lwt.patch, +files/lwt2.patch,
+ +files/lwt3.patch:
+ backport upstream patches to build against lwt 2.5
*ocsigenserver-2.5 (01 Dec 2014)
diff --git a/www-servers/ocsigenserver/files/lwt.patch b/www-servers/ocsigenserver/files/lwt.patch
new file mode 100644
index 000000000000..360b2b06e913
--- /dev/null
+++ b/www-servers/ocsigenserver/files/lwt.patch
@@ -0,0 +1,19 @@
+commit 156f8deaae2a50d8b9614b99488f34b284382eaa
+Author: Drup <drupyog@zoho.com>
+Date: Thu Dec 11 16:52:33 2014 +0100
+
+ Remove dependency to Lwt_util.
+
+diff --git a/src/server/ocsigen_server.ml b/src/server/ocsigen_server.ml
+index c5563a6..e548f5e 100644
+--- a/src/server/ocsigen_server.ml
++++ b/src/server/ocsigen_server.ml
+@@ -1040,7 +1040,7 @@ let rec wait_connection use_ssl port socket =
+ >>= decr_connected
+ in
+
+- Lwt_util.iter handle_one l >>= fun () ->
++ Lwt_list.iter_p handle_one l >>= fun () ->
+ match e with
+ | Some e -> handle_exn e
+ | None -> Lwt.return ())
diff --git a/www-servers/ocsigenserver/files/lwt2.patch b/www-servers/ocsigenserver/files/lwt2.patch
new file mode 100644
index 000000000000..9b9e1b808853
--- /dev/null
+++ b/www-servers/ocsigenserver/files/lwt2.patch
@@ -0,0 +1,19 @@
+commit faaa943aacaeaee27e5a309bb54bd539ec1a58a2
+Author: Drup <drupyog@zoho.com>
+Date: Sat Dec 6 05:08:13 2014 +0100
+
+ Replace use of the deprecated `Lwt_event` by `Lwt_react.E`.
+
+diff --git a/src/extensions/ocsigen_comet.ml b/src/extensions/ocsigen_comet.ml
+index ad7d9dd..ccc0719 100644
+--- a/src/extensions/ocsigen_comet.ml
++++ b/src/extensions/ocsigen_comet.ml
+@@ -468,7 +468,7 @@ end = struct
+ Lwt.choose
+ [ (choosed >|= fun x -> Some x);
+ (Lwt_unix.sleep (get_timeout ()) >|= fun () -> None);
+- (Lwt_event.next Security.kill >>= fun () -> Lwt.fail Kill);
++ (Lwt_react.E.next Security.kill >>= fun () -> Lwt.fail Kill);
+ ] >|= fun x ->
+ List.iter (fun c -> Channels.send_listeners c (-1)) active ;
+ let s = Messages.encode_downgoing ended x in
diff --git a/www-servers/ocsigenserver/files/lwt3.patch b/www-servers/ocsigenserver/files/lwt3.patch
new file mode 100644
index 000000000000..d2a9ca578fe2
--- /dev/null
+++ b/www-servers/ocsigenserver/files/lwt3.patch
@@ -0,0 +1,86 @@
+commit 5b60babe229189c2be999e138c500527334c3415
+Author: pveber <philippe.veber@gmail.com>
+Date: Fri Feb 27 09:24:50 2015 +0100
+
+ fix configure and Makefiles following lwt.extra deprecation
+
+ Now that lwt.extra has been deprecated [0], the configure and Makefile
+ scripts should refer directly to lwt.preemptive.
+
+ [0] https://github.com/ocsigen/lwt/commit/91d549b54397a33ed80de962771d07180c4b8d4e
+
+Index: ocsigenserver-2.5/Makefile.options
+===================================================================
+--- ocsigenserver-2.5.orig/Makefile.options
++++ ocsigenserver-2.5/Makefile.options
+@@ -26,14 +26,14 @@ endif
+ ## but also to generate src/baselib/ocsigen_config.ml and src/files/META
+
+ ifeq "$(PREEMPTIVE)" "YES"
+-LWT_EXTRA_PACKAGE:=lwt.extra
++LWT_PREEMPTIVE_PACKAGE:=lwt.preemptive
+ endif
+
+ BASE_PACKAGE := lwt ipaddr
+
+ SERVER_PACKAGE := lwt.ssl \
+- ${LWT_EXTRA_PACKAGE} \
+- ipaddr \
++ ${LWT_PREEMPTIVE_PACKAGE} \
++ ipaddr \
+ netstring \
+ netstring-pcre \
+ findlib \
+Index: ocsigenserver-2.5/configure
+===================================================================
+--- ocsigenserver-2.5.orig/configure
++++ ocsigenserver-2.5/configure
+@@ -410,7 +410,7 @@ check_library lwt "See: http://ocsigen.o
+ check_library lwt.unix "Missing support for 'unix' in lwt."
+ check_library lwt.react "Missing support for 'react' in lwt."
+ check_library lwt.ssl "Missing support for 'ssl' in lwt."
+-#check_library lwt.extra "Missing support for 'extra' in lwt."
++check_library lwt.preemptive "Missing support for 'preemptive' in lwt."
+
+ check_library netstring \
+ "See ocamlnet: http://projects.camlcity.org/projects/ocamlnet.html"
+@@ -454,12 +454,12 @@ if [ "$with_camlzip" -gt 0 ]; then
+ fi
+ fi
+
+-# Check Lwt.extra
++# Check Lwt.preemptive
+ if [ "$with_preempt" -gt 0 ]; then
+- if test_library lwt.extra; then
++ if test_library lwt.preemptive; then
+ echo -n
+ elif [ "$with_preempt" -gt 1 ]; then
+- fail_library lwt.extra "Missing support for 'extra' in lwt."
++ fail_library lwt.preemptive "Missing support for 'preemptive' in lwt."
+ else
+ with_preempt=0
+ fi
+Index: ocsigenserver-2.5/src/baselib/Makefile
+===================================================================
+--- ocsigenserver-2.5.orig/src/baselib/Makefile
++++ ocsigenserver-2.5/src/baselib/Makefile
+@@ -1,6 +1,6 @@
+ include ../../Makefile.config
+
+-LIBS := -package lwt.unix,netstring,netstring-pcre,cryptokit,findlib,tyxml,lwt.syntax,${LWT_EXTRA_PACKAGE},ipaddr
++LIBS := -package lwt.unix,netstring,netstring-pcre,cryptokit,findlib,tyxml,lwt.syntax,${LWT_PREEMPTIVE_PACKAGE},ipaddr
+ OCAMLC := $(OCAMLFIND) ocamlc${BYTEDBG} ${THREAD}
+ OCAMLOPT := $(OCAMLFIND) ocamlopt ${OPTDBG} ${THREAD}
+ OCAMLDOC := $(OCAMLFIND) ocamldoc
+Index: ocsigenserver-2.5/src/extensions/ocsipersist-dbm/Makefile
+===================================================================
+--- ocsigenserver-2.5.orig/src/extensions/ocsipersist-dbm/Makefile
++++ ocsigenserver-2.5/src/extensions/ocsipersist-dbm/Makefile
+@@ -1,6 +1,6 @@
+ include ../../../Makefile.config
+
+-PACKAGE := ${LWT_EXTRA_PACKAGE} \
++PACKAGE := ${LWT_PREEMPTIVE_PACKAGE} \
+ lwt.unix \
+ tyxml.parser \
+ dbm \
diff --git a/www-servers/ocsigenserver/ocsigenserver-2.5-r1.ebuild b/www-servers/ocsigenserver/ocsigenserver-2.5-r1.ebuild
new file mode 100644
index 000000000000..09fa604fe0af
--- /dev/null
+++ b/www-servers/ocsigenserver/ocsigenserver-2.5-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/ocsigenserver/ocsigenserver-2.5-r1.ebuild,v 1.1 2015/07/16 12:51:08 aballier Exp $
+
+EAPI=5
+
+inherit eutils multilib findlib user
+
+DESCRIPTION="Ocaml-powered webserver and framework for dynamic web programming"
+HOMEPAGE="http://www.ocsigen.org"
+SRC_URI="https://github.com/ocsigen/ocsigenserver/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1-with-linking-exception"
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="debug doc dbm +ocamlopt +sqlite zlib"
+REQUIRED_USE="|| ( sqlite dbm )"
+RESTRICT="strip installsources"
+
+DEPEND=">=dev-ml/lwt-2.5.0:=[react,ssl]
+ >=dev-ml/react-0.9.3:=
+ zlib? ( >=dev-ml/camlzip-1.03-r1:= )
+ dev-ml/cryptokit:=
+ >=dev-ml/ocamlnet-3.6:=[pcre]
+ >=dev-ml/pcre-ocaml-6.2.5:=
+ >=dev-ml/tyxml-3.3:=
+ >=dev-lang/ocaml-3.12:=[ocamlopt?]
+ dev-ml/ocaml-ipaddr:=
+ dbm? ( || ( dev-ml/camldbm:= >=dev-lang/ocaml-3.12[gdbm] ) )
+ sqlite? ( dev-ml/ocaml-sqlite3:= )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup ocsigenserver
+ enewuser ocsigenserver -1 -1 /var/www ocsigenserver
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/lwt.patch"
+ epatch "${FILESDIR}/lwt2.patch"
+ epatch "${FILESDIR}/lwt3.patch"
+}
+
+src_configure() {
+ sh configure \
+ --prefix /usr \
+ --temproot "${ED}" \
+ --bindir /usr/bin \
+ --docdir /usr/share/doc/${PF} \
+ --mandir /usr/share/man/man1 \
+ --libdir /usr/$(get_libdir)/ocaml \
+ $(use_enable debug) \
+ $(use_with zlib camlzip) \
+ $(use_with sqlite) \
+ $(use_with dbm) \
+ --with-preempt \
+ --ocsigen-group ocsigenserver \
+ --ocsigen-user ocsigenserver \
+ --name ocsigenserver \
+ || die "Error : configure failed!"
+}
+
+src_compile() {
+ if use ocamlopt; then
+ emake
+ else
+ emake byte
+ fi
+ use doc && emake doc
+}
+
+src_install() {
+ findlib_src_preinst
+ if use ocamlopt; then
+ emake install
+ else
+ emake install.byte
+ fi
+ if use doc ; then
+ emake install.doc
+ fi
+ emake logrotate
+
+ newinitd "${FILESDIR}"/ocsigenserver.initd ocsigenserver || die
+ newconfd "${FILESDIR}"/ocsigenserver.confd ocsigenserver || die
+
+ dodoc README
+}