pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/x11/ocaml-graphics Fix undefined PLT symbol "caml_proc...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e3196981917a
branches: trunk
changeset: 771749:e3196981917a
user: dholland <dholland%pkgsrc.org@localhost>
date: Sun Dec 26 05:09:45 2021 +0000
description:
Fix undefined PLT symbol "caml_process_pending_signals" in ocaml-graphics.
Patch from upstream.
Bump PKGREVISION (to 2) as it built but didn't run.
XXX: this package needs to be updated after the freeze
diffstat:
x11/ocaml-graphics/Makefile | 4 +-
x11/ocaml-graphics/distinfo | 3 +-
x11/ocaml-graphics/patches/patch-60b5f91ebd7dd86f4c801f801e2e28bde1fd0cc3 | 41 ++++++++++
3 files changed, 45 insertions(+), 3 deletions(-)
diffs (70 lines):
diff -r 4bf004bedf54 -r e3196981917a x11/ocaml-graphics/Makefile
--- a/x11/ocaml-graphics/Makefile Sun Dec 26 05:09:38 2021 +0000
+++ b/x11/ocaml-graphics/Makefile Sun Dec 26 05:09:45 2021 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.40 2021/03/08 08:13:10 jaapb Exp $
+# $NetBSD: Makefile,v 1.41 2021/12/26 05:09:45 dholland Exp $
GITHUB_PROJECT= graphics
DISTNAME= ocaml-${GITHUB_PROJECT}-2.0.0
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_GITHUB:=ocaml/}
diff -r 4bf004bedf54 -r e3196981917a x11/ocaml-graphics/distinfo
--- a/x11/ocaml-graphics/distinfo Sun Dec 26 05:09:38 2021 +0000
+++ b/x11/ocaml-graphics/distinfo Sun Dec 26 05:09:45 2021 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2021/10/26 11:34:17 nia Exp $
+$NetBSD: distinfo,v 1.4 2021/12/26 05:09:45 dholland Exp $
BLAKE2s (ocaml-graphics-2.0.0.tar.gz) = e4f7ce2c5d30344582a88274efa7c0e62c74b9ab28af70ec48fb28b68f4d892c
SHA512 (ocaml-graphics-2.0.0.tar.gz) = 4cef7b44f21cb2b24845d662e238aea12d7ade26e10fbc58edda51ed2f6cc1eb8d5221b21983c52d9cd026b08d23042f489681b4257c5123846e89c26d8bf43f
Size (ocaml-graphics-2.0.0.tar.gz) = 38043 bytes
+SHA1 (patch-60b5f91ebd7dd86f4c801f801e2e28bde1fd0cc3) = 4437050712aeefac67fbff955ed6db0c4fddaca2
diff -r 4bf004bedf54 -r e3196981917a x11/ocaml-graphics/patches/patch-60b5f91ebd7dd86f4c801f801e2e28bde1fd0cc3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/ocaml-graphics/patches/patch-60b5f91ebd7dd86f4c801f801e2e28bde1fd0cc3 Sun Dec 26 05:09:45 2021 +0000
@@ -0,0 +1,41 @@
+$NetBSD: patch-60b5f91ebd7dd86f4c801f801e2e28bde1fd0cc3,v 1.1 2021/12/26 05:09:45 dholland Exp $
+
+https://github.com/xavierleroy/graphics/commit/60b5f91ebd7dd86f4c801f801e2e28bde1fd0cc3.diff
+
+ Replace call to caml_process_pending_signals by explicit processing of events
+
+ caml_process_pending_signals is a function from OCaml's runtime system
+ that disappeared in version 4.10.
+
+ The reason this function was called in caml_gr_wait_event_poll
+ was to process pending X events and merge them in our event queue
+ before the results of the poll are determined.
+
+ It should be just as good to explicitly purge pending X events instead.
+
+See https://github.com/ocaml/graphics/issues/14.
+
+diff --git a/src/unix/events.c b/src/unix/events.c
+index b858b03..93f3fef 100644
+--- src/unix/events.c
++++ src/unix/events.c
+@@ -157,13 +157,18 @@ static value caml_gr_wait_allocate_result(int mouse_x, int mouse_y, int button,
+
+ static value caml_gr_wait_event_poll(void)
+ {
++ XEvent grevent;
+ int mouse_x, mouse_y, button, key, keypressed;
+ Window rootwin, childwin;
+ int root_x, root_y, win_x, win_y;
+ unsigned int modifiers;
+ unsigned int i;
+
+- caml_process_pending_signals ();
++ /* Process pending X events before polling */
++ while (XCheckMaskEvent(caml_gr_display, -1 /*all events*/, &grevent)) {
++ caml_gr_handle_event(&grevent);
++ }
++ /* Poll the mouse state */
+ if (XQueryPointer(caml_gr_display, caml_gr_window.win,
+ &rootwin, &childwin,
+ &root_x, &root_y, &win_x, &win_y,
Home |
Main Index |
Thread Index |
Old Index