aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2014-08-19 21:55:11 +0800
committermarino <marino@FreeBSD.org>2014-08-19 21:55:11 +0800
commit8a6371b0eadbe93cb74017a911b8783902a5bf6c (patch)
tree1147eaacd45e3d665029993908acb16bc38154fb /lang
parent00ac59e9c3c1687fd660ca8509ba2e7538791b8d (diff)
downloadfreebsd-ports-gnome-8a6371b0eadbe93cb74017a911b8783902a5bf6c.tar.gz
freebsd-ports-gnome-8a6371b0eadbe93cb74017a911b8783902a5bf6c.tar.zst
freebsd-ports-gnome-8a6371b0eadbe93cb74017a911b8783902a5bf6c.zip
lang/ocaml: Improve jobcontrol in ocamlbuild
Apply patch for upstream issue 0005371. It improves job control in ocamlbuild and fixes some faulty sigpipe affecting ports build with ocamlbuild. PR: 189710 Submitted by: edwin (skylable.com) patch by: glondu Approved by: maintainer (Michael Gruenewald)
Diffstat (limited to 'lang')
-rw-r--r--lang/ocaml/Makefile2
-rw-r--r--lang/ocaml/files/patch-ocamlbuild24
2 files changed, 25 insertions, 1 deletions
diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile
index 91706bb5b89b..173aa920d2e6 100644
--- a/lang/ocaml/Makefile
+++ b/lang/ocaml/Makefile
@@ -4,7 +4,7 @@
# for committer: bump PORTREVISION for math/facile whenever ocaml gets updated
PORTNAME= ocaml
PORTVERSION= 4.01.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= lang
MASTER_SITES= http://caml.inria.fr/pub/distrib/${DISTNAME:R}/ \
${MASTER_SITE_GENTOO}
diff --git a/lang/ocaml/files/patch-ocamlbuild b/lang/ocaml/files/patch-ocamlbuild
new file mode 100644
index 000000000000..7b4c41add6a8
--- /dev/null
+++ b/lang/ocaml/files/patch-ocamlbuild
@@ -0,0 +1,24 @@
+--- ocamlbuild/ocamlbuild_executor.ml.orig 2011-10-06 11:39:50.358159931 +0300
++++ ocamlbuild/ocamlbuild_executor.ml 2011-10-06 12:48:32.966029354 +0300
+@@ -200,7 +200,11 @@
+ try
+ read fd u 0 (String.length u)
+ with
+- | Unix.Unix_error(_,_,_) -> 0
++ | Unix.Unix_error(e,_,_) ->
++ let msg = error_message e in
++ display (fun oc -> fp oc
++ "Error while reading stdout/stderr: %s\n" msg);
++ 0
+ in
+ if m = 0 then
+ if job.job_dying then
+@@ -236,6 +240,8 @@
+ (*display begin fun oc -> fp oc "Terminating job %a\n%!" print_job_id job.job_id; end;*)
+
+ decr jobs_active;
++ clear_nonblock (doi job.job_stdout);
++ clear_nonblock (doi job.job_stderr); (* we would get EAGAIN below otherwise *)
+ do_read ~loop:true (doi job.job_stdout) job;
+ do_read ~loop:true (doi job.job_stderr) job;
+ outputs := FDM.remove (doi job.job_stdout) (FDM.remove (doi job.job_stderr) !outputs);