summaryrefslogtreecommitdiff
path: root/app-shells/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'app-shells/zsh')
-rw-r--r--app-shells/zsh/Manifest5
-rw-r--r--app-shells/zsh/files/zsh-5.8.1-performance_regression_fix.patch139
-rw-r--r--app-shells/zsh/zsh-5.8.1-r2.ebuild (renamed from app-shells/zsh/zsh-5.8.1-r1.ebuild)3
-rw-r--r--app-shells/zsh/zsh-9999.ebuild2
4 files changed, 145 insertions, 4 deletions
diff --git a/app-shells/zsh/Manifest b/app-shells/zsh/Manifest
index e6c34bbd462d..9d01962cd6b4 100644
--- a/app-shells/zsh/Manifest
+++ b/app-shells/zsh/Manifest
@@ -2,8 +2,9 @@ AUX prompt_gentoo_setup-1 820 BLAKE2B 26fc3348f16459462dddfd3f6864a3ae58bbcbbce0
AUX zprofile-4 1314 BLAKE2B 8373d9f68613d5d44121c46a02dd7a5c988f4a3d948aa6bf96a9b0c5f67967f4b787b7ab346e7fabcdd8805321a89b63e6919d5abef082d24e4c46157c68e4db SHA512 5f87b4f0e59bb338f9aa8ec811424d37042ab5ad889aa00f6f912003b7aaaf8b3ea59746590c639a45facace0743deab89779ae5cee8ff6a39beda99864c9cf7
AUX zsh-5.3-init.d-gentoo.diff 1048 BLAKE2B 295e391679ef876a7bdaeaf6dc4b1b3a342c40f092f8cbeba137ee5ea6d26e16f988fc92f105bfcec739bc2aeca62195839b80dee337de8bfdfb5ff00a34fa22 SHA512 9f059cf4b99b7006955ab0ac43d4a4b4d762d193da9a738f771c562f2c3af3a9125694da59c584a3ff829598443e5429c873319ecd8fae2feba7096b597798dd
AUX zsh-5.8.1-non_interactive_shell_regression_fix.patch 2277 BLAKE2B a670417a23ef05b616e32903f9ee26c746d98b5b927afad28b70b0c19a8f3841550d1a4476259cfffb848a4e2898bb8dcb6e5f00308dc2741f01ebb18d24cc7c SHA512 bb0f210d2759a9fef6971e654e44e813fcac69f4d430966295ad1da481d2d33584784c955a1a030407d23889c9ef2a33d7cc571beb0b6a8046832681bb43edb2
+AUX zsh-5.8.1-performance_regression_fix.patch 3900 BLAKE2B 3f6957468ac008970e3832bb4c3b06b7ace80c6fcdcda4e37a5728bbda643ef56996af8bdec36efc953b337d89fe8e6a6c2e060c1ab7793251454fad487cadce SHA512 98e19d5693571b3b492688cac2aa12b6b4e3e71b1d47613fb9a5334cc88758a8f88175cb9c3264f105159047085f3121d6032cd4468febfeff04ec523cbff145
DIST zsh-5.8.1-doc.tar.xz 3088728 BLAKE2B c7f62f50a8fce483d2946ac550fa0996e5749a9040cf9424a61d591024292a2f1eb0fc2401824104c6ef0fff2a4b38e07269a0069cde1b0bff6e8a7b09daf160 SHA512 0d8ca4c54c10e8a471ba7d53f1371ee057f7df4b710fc01194833f29a61b5465133432b891b0b891b6cc5235a928a783bf99f39c67314e29e3d161ca5abf3219
DIST zsh-5.8.1.tar.xz 3200540 BLAKE2B 19981d0cc208fb590af8e034bde66bda36a4a20abe76ff71ba9222d7150b7d53573e1f5b81ddb2cdd29f6aa0611071a35d8b48250e6bd4b196f0428b776c4af8 SHA512 f54a5a47ed15d134902613f6169c985680afc45a67538505e11b66b348fcb367145e9b8ae2d9eac185e07ef5f97254b85df01ba97294002a8c036fd02ed5e76d
-EBUILD zsh-5.8.1-r1.ebuild 6036 BLAKE2B 5e283a9b43f0191228090c777b9b47e4a528f82e01015e4969d61c192226e13521b7bf652f313650adb68119bd57bfc3c2d6183ac264b08a296d725c9df66aa8 SHA512 f500f267f408cce8c7f2503bf8e3d0402884caab46a135c648c3b24a4db2c120c69d017a70fa92c4db72094fc7e642ff5cb23932aeaf67d432d5a5bb9a4469c2
-EBUILD zsh-9999.ebuild 5967 BLAKE2B bcbabf0168e0b2893a06ca41f56ad85fc6719995cf153ecd9922a24db0576eaa0d4dc0b826e026253d1cbc92ec474ac36e5da3a7f0f9ec7667d08e66c42cdb14 SHA512 04f76d62147882ccf81a0a876e53177825b73bf41ad8ac829e534ebdb98def903234819e0ddfda30042b5d78041c2ae9f74661316ec64328eebb8a66959c22d8
+EBUILD zsh-5.8.1-r2.ebuild 6104 BLAKE2B 8b6f3bea5b870cb2f4a828d06dd18bd699560bdc43637260227acc1cf33f08e4e7b21144733d8a21b1d409afa1e13612d1261112b0d073a047924b89cdf39903 SHA512 3eb4418d9ea0df316a0e3684911f0811802bafd7e2ff4b2c74e67e3dc26184c42552b1f02560591f751c891df346d1b27f29d903311d6c946dfdfdd7ebbff44c
+EBUILD zsh-9999.ebuild 5974 BLAKE2B 3715d2d13fec78fe01e630a20eb0ad25a828ecd410154b281e5bb23000f387297fd2fedc846a016b123dd54b82ea2f3793270a981e7000dd9ef328cd0b774038 SHA512 7093ff4f200924d8526a862a23a4dc238645786ccbba9b65894380b9cfab7a353e1303cc9349918004ceb49ebb53cadb82f368f360083a216c102f2d30ade814
MISC metadata.xml 515 BLAKE2B d5fee9e19a273c932a4d1c8b8b58a816126eb22ae18d7cfdeacd49fcf8e2a5ffaf6dca653761c3389e69e476c65afbc9c90352066e50d129a4eaedc87b6834e9 SHA512 0966e2915ce21c9c34bbc75fa0cd9981227c8e7f78ed2f0d01dcbccacd1038859008a12611b5a2037ad8b1137a6c0f08fdf35e100a6162df3a0f8bbb9c0da353
diff --git a/app-shells/zsh/files/zsh-5.8.1-performance_regression_fix.patch b/app-shells/zsh/files/zsh-5.8.1-performance_regression_fix.patch
new file mode 100644
index 000000000000..14a3f38eb96d
--- /dev/null
+++ b/app-shells/zsh/files/zsh-5.8.1-performance_regression_fix.patch
@@ -0,0 +1,139 @@
+From cbe8d2bcdc20682464217856aa48628804637f28 Mon Sep 17 00:00:00 2001
+From: Bart Schaefer <schaefer@zsh.org>
+Date: Thu, 28 Apr 2022 21:06:51 -0700
+Subject: [PATCH] 50133: use read-ahead and lseek-rewind for efficient
+ line-buffered input
+
+---
+ ChangeLog | 6 ++++++
+ Src/input.c | 24 ++++++++++++++++++++-
+ configure.ac | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 88 insertions(+), 1 deletion(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index cae2fc4e3..79c77741b 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,9 @@
++2022-04-28 Bart Schaefer <schaefer@zsh.org>
++
++ * 50133 (Bart, PWS, Jun-ichi): Src/input.c, configure.ac: when
++ lseek(2) is available, use it to check for and rewind read-ahead
++ for more efficient line-buffered input.
++
+ 2022-03-03 Peter Stephenson <p.w.stephenson@ntlworld.com>
+
+ * 49792: Src/input.c, Test/A01grammar.ztst: Use line buffering
+diff --git a/Src/input.c b/Src/input.c
+index caa8e23b0..6cc1b8a51 100644
+--- a/Src/input.c
++++ b/Src/input.c
+@@ -217,12 +217,34 @@ shinbufrestore(void)
+ static int
+ shingetchar(void)
+ {
+- int nread;
++ int nread, rsize = isset(SHINSTDIN) ? 1 : SHINBUFSIZE;
+
+ if (shinbufptr < shinbufendptr)
+ return STOUC(*shinbufptr++);
+
+ shinbufreset();
++#ifdef USE_LSEEK
++ if (rsize == 1 && lseek(SHIN, 0, SEEK_CUR) != (off_t)-1)
++ rsize = SHINBUFSIZE;
++ if (rsize > 1) {
++ do {
++ errno = 0;
++ nread = read(SHIN, shinbuffer, rsize);
++ } while (nread < 0 && errno == EINTR);
++ if (nread <= 0)
++ return -1;
++ if (isset(SHINSTDIN) &&
++ (shinbufendptr = memchr(shinbuffer, '\n', nread))) {
++ shinbufendptr++;
++ rsize = (shinbufendptr - shinbuffer);
++ if (nread > rsize &&
++ lseek(SHIN, -(nread - rsize), SEEK_CUR) < 0)
++ zerr("lseek(%d, %d): %e", SHIN, -(nread - rsize), errno);
++ } else
++ shinbufendptr = shinbuffer + nread;
++ return STOUC(*shinbufptr++);
++ }
++#endif
+ for (;;) {
+ errno = 0;
+ nread = read(SHIN, shinbufendptr, 1);
+diff --git a/configure.ac b/configure.ac
+index af8c5bba8..42f2837cd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2304,6 +2304,65 @@ if test x$zsh_cv_sys_fifo = xyes; then
+ AC_DEFINE(HAVE_FIFOS)
+ fi
+
++dnl -----------
++dnl check that lseek() correctly reports seekability.
++dnl -----------
++AC_CACHE_CHECK(if lseek() correctly reports seekability,
++zsh_cv_sys_lseek,
++[AC_RUN_IFELSE([AC_LANG_SOURCE([[
++#include <stdio.h>
++#include <sys/types.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <sys/socket.h>
++#include <sys/stat.h>
++int main() {
++ int pipefd[2], fd;
++ off_t ret;
++ char* tmpfile = "seekfiletest.tmp";
++ if ((fd = open(tmpfile, O_CREAT, S_IRUSR)) < 0) {
++ fprintf(stderr, "creating file failed\n");
++ return 1;
++ }
++ ret = lseek(fd, 0, SEEK_CUR);
++ close(fd);
++ unlink(tmpfile);
++ if (ret == (off_t)-1) {
++ fprintf(stderr, "lseek on regular file failed\n");
++ return 1;
++ }
++ if (pipe(pipefd) < 0) {
++ fprintf(stderr, "creating pipe failed\n");
++ return 1;
++ }
++ write(pipefd[1], "abcdefgh", 8);
++ ret = lseek(pipefd[0], 0, SEEK_CUR);
++ close(pipefd[0]);
++ close(pipefd[1]);
++ if (ret != (off_t)-1) {
++ fprintf(stderr, "lseek on pipe succeeded\n");
++ return 1;
++ }
++ if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
++ fprintf(stderr, "creating UNIX domain socket failed\n");
++ return 1;
++ }
++ ret = lseek(fd, 0, SEEK_CUR);
++ close(fd);
++ if (ret != (off_t)-1) {
++ fprintf(stderr, "lseek on UNIX domain socket succeeded\n");
++ return 1;
++ }
++ return 0;
++}
++]])],[zsh_cv_sys_lseek=yes],[zsh_cv_sys_lseek=no],[zsh_cv_sys_lseek=yes])
++])
++AH_TEMPLATE([USE_LSEEK],
++[Define to 1 if lseek() can be used for SHIN.])
++if test x$zsh_cv_sys_lseek = xyes; then
++ AC_DEFINE(USE_LSEEK)
++fi
++
+ dnl -----------
+ dnl test for whether link() works
+ dnl for instance, BeOS R4.51 doesn't support hard links yet
+--
+2.36.0
+
diff --git a/app-shells/zsh/zsh-5.8.1-r1.ebuild b/app-shells/zsh/zsh-5.8.1-r2.ebuild
index 6cbf8622fe20..4aedba310b22 100644
--- a/app-shells/zsh/zsh-5.8.1-r1.ebuild
+++ b/app-shells/zsh/zsh-5.8.1-r2.ebuild
@@ -9,7 +9,7 @@ if [[ ${PV} == 9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://git.code.sf.net/p/zsh/code"
else
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SRC_URI="https://www.zsh.org/pub/${P}.tar.xz
https://www.zsh.org/pub/old/${P}.tar.xz
mirror://sourceforge/${PN}/${P}.tar.xz
@@ -53,6 +53,7 @@ fi
PATCHES=(
"${FILESDIR}/${P}-non_interactive_shell_regression_fix.patch"
+ "${FILESDIR}/${P}-performance_regression_fix.patch" #839900
)
src_prepare() {
diff --git a/app-shells/zsh/zsh-9999.ebuild b/app-shells/zsh/zsh-9999.ebuild
index 1e2235175665..89b4b12aae9c 100644
--- a/app-shells/zsh/zsh-9999.ebuild
+++ b/app-shells/zsh/zsh-9999.ebuild
@@ -9,7 +9,7 @@ if [[ ${PV} == 9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://git.code.sf.net/p/zsh/code"
else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SRC_URI="https://www.zsh.org/pub/${P}.tar.xz
https://www.zsh.org/pub/old/${P}.tar.xz
mirror://sourceforge/${PN}/${P}.tar.xz