pkgsrc-Changes archive

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

CVS commit: pkgsrc/editors/xemacs



Module Name:    pkgsrc
Committed By:   hauke
Date:           Tue Jan 20 22:27:15 UTC 2026

Modified Files:
        pkgsrc/editors/xemacs: distinfo
Added Files:
        pkgsrc/editors/xemacs/patches: patch-src_device-x.c

Log Message:
Teach XEmacs to find the Xquartz server socket on macOS.

Cherry-picked from f7f8c7a6c53c2f33d9915554deb823675441925c


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 pkgsrc/editors/xemacs/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/editors/xemacs/patches/patch-src_device-x.c

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

Modified files:

Index: pkgsrc/editors/xemacs/distinfo
diff -u pkgsrc/editors/xemacs/distinfo:1.37 pkgsrc/editors/xemacs/distinfo:1.38
--- pkgsrc/editors/xemacs/distinfo:1.37 Fri Jan  2 22:34:58 2026
+++ pkgsrc/editors/xemacs/distinfo      Tue Jan 20 22:27:15 2026
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.37 2026/01/02 22:34:58 hauke Exp $
+$NetBSD: distinfo,v 1.38 2026/01/20 22:27:15 hauke Exp $
 
 BLAKE2s (xemacs/xemacs-21.4.25.tar.gz) = 5ef4211f4be19623914e1104786971fb02631a08fcb62e67162aa67c62380531
 SHA512 (xemacs/xemacs-21.4.25.tar.gz) = 869aa61f7a32f2e9ed5cb8f755c9879e7bc3b1fd3e4bc31c4d978aeca3d19507c642093bbfda5bb4f4a7ea303ab267f3f647dfa3da868adb5d5b9970b4e03886
 Size (xemacs/xemacs-21.4.25.tar.gz) = 8427805 bytes
 SHA1 (patch-configure) = 260a4562450db001396379023a99cccdf240f719
 SHA1 (patch-lib-src_Makefile.in.in) = 5e11bf2904145804f521fed0ef956da94e5f21bd
+SHA1 (patch-src_device-x.c) = 864e4a9efbc6bff4058283e0fd8d3a3eb248a832

Added files:

Index: pkgsrc/editors/xemacs/patches/patch-src_device-x.c
diff -u /dev/null pkgsrc/editors/xemacs/patches/patch-src_device-x.c:1.1
--- /dev/null   Tue Jan 20 22:27:15 2026
+++ pkgsrc/editors/xemacs/patches/patch-src_device-x.c  Tue Jan 20 22:27:15 2026
@@ -0,0 +1,50 @@
+$NetBSD: patch-src_device-x.c,v 1.1 2026/01/20 22:27:15 hauke Exp $
+
+If XOpenDisplay() fails and there is an explicit zero screen number
+supplied, retry without that screen number, all going well addressing
+problems with macOS XQuartz and launchd sockets.
+
+Cherry-picked from f7f8c7a6c53c2f33d9915554deb823675441925c
+
+--- src/device-x.c.orig        2026-01-01 18:13:30.000000000 +0000
++++ src/device-x.c
+@@ -466,7 +466,7 @@ x_init_device (struct device *d, Lisp_Ob
+   Extbyte **argv;
+   const char *app_class;
+   const char *app_name;
+-  const char *disp_name;
++  Extbyte *disp_name;
+   Visual *visual = NULL;
+   int depth = 8;              /* shut up the compiler */
+   Colormap cmap;
+@@ -555,6 +555,7 @@ x_init_device (struct device *d, Lisp_Ob
+ 
+   LISP_STRING_TO_EXTERNAL (display, disp_name, Qctext);
+ 
++retry_without_screen:
+   /*
+    * Break apart the old XtOpenDisplay call into XOpenDisplay and
+    * XtDisplayInitialize so we can figure out whether there
+@@ -571,6 +572,22 @@ x_init_device (struct device *d, Lisp_Ob
+ 
+   if (dpy == 0)
+     {
++      size_t disp_name_len = strlen (disp_name);
++
++      /* Hauke Fath reports in #xemacs on libera.chat that XQuartz fails when
++         we supply the screen name explicitly, since it expects the
++         corresponding file name to exist
++         (e.g. "/private/tmp/com.apple.launchd.892T1F8SoB/org.xquartz:0.0"). If
++         we fail here (which is rare) and there is a zero screen (which
++         suggests we have appended the screen number), retry without the zero
++         screen. */
++      if (disp_name_len > 2
++          && !strcmp (disp_name + (int) disp_name_len - 2, ".0"))
++        {
++          disp_name[(int) disp_name_len - 2] = '\0';
++          goto retry_without_screen;
++        }
++
+       suppress_early_error_handler_backtrace = 1;
+       signal_simple_error ("X server not responding\n", display);
+     }



Home | Main Index | Thread Index | Old Index