commit: d7d57903f6e0094b295fc3bcf9bb1f83443b9c5c
Author: Alexis Ballier gentoo org>
AuthorDate: Fri Jun 30 11:42:02 2017 +
Commit: Alexis Ballier gentoo org>
CommitDate: Fri Jun 30 12:47:13 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7d57903
dev-ml/ocamlnet: backport upstream fix to build with ocaml 4.05
Package-Manager: Portage-2.3.6, Repoman-2.3.2
dev-ml/ocamlnet/files/ocaml405.patch | 145 ++
dev-ml/ocamlnet/ocamlnet-4.1.2.ebuild | 6 +-
2 files changed, 150 insertions(+), 1 deletion(-)
diff --git a/dev-ml/ocamlnet/files/ocaml405.patch
b/dev-ml/ocamlnet/files/ocaml405.patch
new file mode 100644
index 000..a112d1fb447
--- /dev/null
+++ b/dev-ml/ocamlnet/files/ocaml405.patch
@@ -0,0 +1,145 @@
+commit f3d451b81c4caa8cce7f55af6463ec685e79e227
+Author: Gerd Stolpmann
+Date: Sun Feb 26 21:04:49 2017 +0100
+
+ocaml-4.05: support for O_KEEPEXEC
+
+diff --git a/code/src/netsys/Makefile b/code/src/netsys/Makefile
+index cbc1ce2..cb70a09 100644
+--- a/code/src/netsys/Makefile
b/code/src/netsys/Makefile
+@@ -56,7 +56,7 @@ OCAMLC_OPTIONS_FOR_netsys_c_xdr.c = -ccopt -O
+ OCAMLC_OPTIONS += $(STRING_OPTS)
+ OCAMLOPT_OPTIONS += $(STRING_OPTS)
+
+-PP_OPTIONS = -pp "$(CPPO) $(DEF_O_SHARE_DELETE) $(DEF_O_CLOEXEC) $(PP_BYTES)
$(PP_DEPRECATED)"
++PP_OPTIONS = -pp "$(CPPO) $(DEF_O_SHARE_DELETE) $(DEF_O_CLOEXEC)
$(DEF_O_KEEPEXEC) $(PP_BYTES) $(PP_DEPRECATED)"
+
+ INSTALL_EXTRA += netsys_c_event.h $(OOH_OBJECT)
+
+diff --git a/code/src/netsys/configure b/code/src/netsys/configure
+index 1325843..f4dbc09 100755
+--- a/code/src/netsys/configure
b/code/src/netsys/configure
+@@ -437,6 +437,21 @@ else
+ echo "no"
+ fi
+
++##
++
++printf "Checking for O_KEEPEXEC... "
++mkdir -p tmp
++cat <<_EOF_ >tmp/t.ml
++let x = Unix.O_KEEPEXEC;;
++_EOF_
++
++def_o_keepexec="-D NO_O_KEEPEXEC"
++if ocaml unix.cma tmp/t.ml >/dev/null 2>/dev/null; then
++echo "yes"
++def_o_keepexec="-D HAVE_O_KEEPEXEC"
++else
++echo "no"
++fi
+
+ ##
+
+@@ -445,6 +460,7 @@ cat