From 40a3dfa14d3f06dd4d20804a50f34dc7573c1d01 Mon Sep 17 00:00:00 2001 From: Tee KOBAYASHI Date: Thu, 7 Apr 2022 20:01:21 +0900 Subject: [PATCH] emacs-x: Update to 28.1 --- x11-packages/emacs-x/build.sh | 5 ++--- .../lisp-server.el.patch.beforehostbuild | 16 ++++++++-------- .../lisp-term.el.patch.beforehostbuild | 10 +++++----- ...-textmodes-ispell.el.patch.beforehostbuild | 11 ----------- .../emacs-x/no-procent_n-android.patch | 19 +++++++++++++++++++ x11-packages/emacs-x/no_user_fullname.patch | 12 ++++++------ .../src-sysdep.c.patch.beforehostbuild | 14 -------------- 7 files changed, 40 insertions(+), 47 deletions(-) create mode 100644 x11-packages/emacs-x/no-procent_n-android.patch delete mode 100644 x11-packages/emacs-x/src-sysdep.c.patch.beforehostbuild diff --git a/x11-packages/emacs-x/build.sh b/x11-packages/emacs-x/build.sh index a3ce76148..cf20a7f7d 100644 --- a/x11-packages/emacs-x/build.sh +++ b/x11-packages/emacs-x/build.sh @@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/emacs/ TERMUX_PKG_DESCRIPTION="Extensible, customizable text editor-and more" TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=27.2 -TERMUX_PKG_REVISION=8 +TERMUX_PKG_VERSION=28.1 TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/emacs/emacs-${TERMUX_PKG_VERSION}.tar.xz -TERMUX_PKG_SHA256=b4a7cc4e78e63f378624e0919215b910af5bb2a0afc819fad298272e9f40c1b9 +TERMUX_PKG_SHA256=28b1b3d099037a088f0a4ca251d7e7262eab5ea1677aabffa6c4426961ad75e1 TERMUX_PKG_DEPENDS="fontconfig, freetype, gdk-pixbuf, giflib, glib, libgnutls, libice, libjansson, libjpeg-turbo, libpng, librsvg, libsm, libtiff, libx11, libxaw, libxcb, libxext, libxfixes, libxft, libxinerama, libxml2, libxmu, libxpm, libxrandr, libxrender, libxt, littlecms, ncurses, zlib" TERMUX_PKG_CONFLICTS="emacs" TERMUX_PKG_REPLACES="emacs" diff --git a/x11-packages/emacs-x/lisp-server.el.patch.beforehostbuild b/x11-packages/emacs-x/lisp-server.el.patch.beforehostbuild index 537d2782c..817c29267 100644 --- a/x11-packages/emacs-x/lisp-server.el.patch.beforehostbuild +++ b/x11-packages/emacs-x/lisp-server.el.patch.beforehostbuild @@ -1,11 +1,11 @@ ---- ./lisp/server.el.orig 2019-11-28 10:49:15.353433913 +0100 -+++ ./lisp/server.el 2019-11-28 10:50:18.741175439 +0100 -@@ -277,7 +277,7 @@ - (let ((xdg_runtime_dir (getenv "XDG_RUNTIME_DIR"))) - (if xdg_runtime_dir - (format "%s/emacs" xdg_runtime_dir) -- (format "%s/emacs%d" (or (getenv "TMPDIR") "/tmp") (user-uid)))))) -+ (format "%s/emacs%d" "@TERMUX_PREFIX@/var/run" (user-uid)))))) +--- ./lisp/server.el.orig 2022-04-06 12:26:52.889010658 +0200 ++++ ./lisp/server.el 2022-04-06 12:28:46.006501888 +0200 +@@ -282,7 +282,7 @@ + (if runtime-dir + (expand-file-name "emacs" runtime-dir) + (expand-file-name (format "emacs%d" (user-uid)) +- (or (getenv "TMPDIR") "/tmp")))))) ++ "@TERMUX_PREFIX@/var/run"))))) "The directory in which to place the server socket. If local sockets are not supported, this is nil.") diff --git a/x11-packages/emacs-x/lisp-term.el.patch.beforehostbuild b/x11-packages/emacs-x/lisp-term.el.patch.beforehostbuild index fc56b5714..5355d7cd0 100644 --- a/x11-packages/emacs-x/lisp-term.el.patch.beforehostbuild +++ b/x11-packages/emacs-x/lisp-term.el.patch.beforehostbuild @@ -1,11 +1,11 @@ ---- ./lisp/term.el.orig 2019-11-28 10:52:45.633666279 +0100 -+++ ./lisp/term.el 2019-11-28 10:53:51.234778668 +0100 -@@ -1558,7 +1558,7 @@ +--- ./lisp/term.el.orig 2022-04-06 12:29:31.256831618 +0200 ++++ ./lisp/term.el 2022-04-06 12:29:59.820373057 +0200 +@@ -1651,7 +1651,7 @@ (push (format "EMACS=%s (term:%s)" emacs-version term-protocol-version) process-environment)) (apply #'start-process name buffer - "/bin/sh" "-c" + "@TERMUX_PREFIX@/bin/sh" "-c" - (format "stty -nl echo rows %d columns %d sane 2>/dev/null;\ + (format "stty -nl echo rows %d columns %d sane 2>%s;\ if [ $1 = .. ]; then shift; fi; exec \"$@\"" - term-height term-width) + term-height term-width null-device) diff --git a/x11-packages/emacs-x/lisp-textmodes-ispell.el.patch.beforehostbuild b/x11-packages/emacs-x/lisp-textmodes-ispell.el.patch.beforehostbuild index 1d0ffec0c..97ed3cbbc 100644 --- a/x11-packages/emacs-x/lisp-textmodes-ispell.el.patch.beforehostbuild +++ b/x11-packages/emacs-x/lisp-textmodes-ispell.el.patch.beforehostbuild @@ -24,14 +24,3 @@ diff -u -r ../emacs-26.2/lisp/textmodes/ispell.el ./lisp/textmodes/ispell.el "Alternate plain word-list dictionary for spelling help." :type '(choice file (const :tag "None" nil)) :group 'ispell) -@@ -266,9 +266,7 @@ - :group 'ispell) - - (defcustom ispell-look-command -- (cond ((file-exists-p "/bin/look") "/bin/look") -- ((file-exists-p "/usr/local/bin/look") "/usr/local/bin/look") -- ((file-exists-p "/usr/bin/look") "/usr/bin/look") -+ (cond ((file-exists-p "@TERMUX_PREFIX@/bin/look") "@TERMUX_PREFIX@/bin/look") - (t "look")) - "Name of the look command for search processes. - This must be an absolute file name." diff --git a/x11-packages/emacs-x/no-procent_n-android.patch b/x11-packages/emacs-x/no-procent_n-android.patch new file mode 100644 index 000000000..5d63f35db --- /dev/null +++ b/x11-packages/emacs-x/no-procent_n-android.patch @@ -0,0 +1,19 @@ +--- ./src/emacs.c~ 2021-12-24 16:44:24.693460891 +0100 ++++ ./src/emacs.c 2021-12-24 23:09:28.461964680 +0100 +@@ -2462,13 +2462,13 @@ + reset_all_sys_modes (); + if (sig && sig != SIGTERM) + { +- static char const fmt[] = "Fatal error %d: %n%s\n"; +- char buf[max ((sizeof fmt - sizeof "%d%n%s\n" ++ static char const fmt[] = "Fatal error %d: %s\n"; ++ char buf[max ((sizeof fmt - sizeof "%d%s\n" + + INT_STRLEN_BOUND (int) + 1), + min (PIPE_BUF, MAX_ALLOCA))]; + char const *sig_desc = safe_strsignal (sig); + int nlen; +- int buflen = snprintf (buf, sizeof buf, fmt, sig, &nlen, sig_desc); ++ int buflen = snprintf (buf, sizeof buf, fmt, sig, sig_desc); + if (0 <= buflen && buflen < sizeof buf) + emacs_write (STDERR_FILENO, buf, buflen); + else diff --git a/x11-packages/emacs-x/no_user_fullname.patch b/x11-packages/emacs-x/no_user_fullname.patch index 153dbe63a..b3c513202 100644 --- a/x11-packages/emacs-x/no_user_fullname.patch +++ b/x11-packages/emacs-x/no_user_fullname.patch @@ -1,11 +1,11 @@ ---- ./src/editfns.c.orig 2020-07-29 23:40:42.000000000 +0200 -+++ ./src/editfns.c 2020-09-14 21:36:04.890630177 +0200 -@@ -1250,7 +1250,7 @@ +--- ./src/editfns.c.orig 2022-04-06 12:34:24.052297271 +0200 ++++ ./src/editfns.c 2022-04-06 12:34:54.075849159 +0200 +@@ -1266,7 +1266,7 @@ if (!pw) return Qnil; - p = USER_FULL_NAME; -+ p = "unknown"; - /* Chop off everything after the first comma. */ ++ p = "termux"; + /* Chop off everything after the first comma, since 'pw_gecos' is a + comma-separated list. */ q = strchr (p, ','); - full = make_string (p, q ? q - p : strlen (p)); \ No newline at end of file diff --git a/x11-packages/emacs-x/src-sysdep.c.patch.beforehostbuild b/x11-packages/emacs-x/src-sysdep.c.patch.beforehostbuild deleted file mode 100644 index a233c49ff..000000000 --- a/x11-packages/emacs-x/src-sysdep.c.patch.beforehostbuild +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/sysdep.c -+++ b/src/sysdep.c -@@ -1818,7 +1818,11 @@ - - /* Alternate stack used by SIGSEGV handler below. */ - -+#ifdef __GLIBC__ -+static unsigned char sigsegv_stack[16384]; -+#else - static unsigned char sigsegv_stack[SIGSTKSZ]; -+#endif - - - /* Return true if SIGINFO indicates a stack overflow. */