pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/x11/ocaml-graphics



Module Name:    pkgsrc
Committed By:   dholland
Date:           Sun Dec 26 05:09:45 UTC 2021

Modified Files:
        pkgsrc/x11/ocaml-graphics: Makefile distinfo
Added Files:
        pkgsrc/x11/ocaml-graphics/patches:
            patch-60b5f91ebd7dd86f4c801f801e2e28bde1fd0cc3

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 pkgsrc/x11/ocaml-graphics/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/x11/ocaml-graphics/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/x11/ocaml-graphics/patches/patch-60b5f91ebd7dd86f4c801f801e2e28bde1fd0cc3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/x11/ocaml-graphics/Makefile
diff -u pkgsrc/x11/ocaml-graphics/Makefile:1.40 pkgsrc/x11/ocaml-graphics/Makefile:1.41
--- pkgsrc/x11/ocaml-graphics/Makefile:1.40     Mon Mar  8 08:13:10 2021
+++ pkgsrc/x11/ocaml-graphics/Makefile  Sun Dec 26 05:09:45 2021
@@ -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/}
 

Index: pkgsrc/x11/ocaml-graphics/distinfo
diff -u pkgsrc/x11/ocaml-graphics/distinfo:1.3 pkgsrc/x11/ocaml-graphics/distinfo:1.4
--- pkgsrc/x11/ocaml-graphics/distinfo:1.3      Tue Oct 26 11:34:17 2021
+++ pkgsrc/x11/ocaml-graphics/distinfo  Sun Dec 26 05:09:45 2021
@@ -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

Added files:

Index: pkgsrc/x11/ocaml-graphics/patches/patch-60b5f91ebd7dd86f4c801f801e2e28bde1fd0cc3
diff -u /dev/null pkgsrc/x11/ocaml-graphics/patches/patch-60b5f91ebd7dd86f4c801f801e2e28bde1fd0cc3:1.1
--- /dev/null   Sun Dec 26 05:09:45 2021
+++ pkgsrc/x11/ocaml-graphics/patches/patch-60b5f91ebd7dd86f4c801f801e2e28bde1fd0cc3    Sun Dec 26 05:09:45 2021
@@ -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