aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/tmux/APKBUILD12
-rw-r--r--main/tmux/reg-startend.patch60
2 files changed, 67 insertions, 5 deletions
diff --git a/main/tmux/APKBUILD b/main/tmux/APKBUILD
index d359bd9ca2..4776225bd0 100644
--- a/main/tmux/APKBUILD
+++ b/main/tmux/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tmux
-pkgver=2.9a
-pkgrel=1
+pkgver=3.0
+pkgrel=0
pkgdesc="Tool to control multiple terminals from a single terminal"
url="https://tmux.github.io"
arch="all"
@@ -10,7 +10,8 @@ license="ISC"
depends="ncurses-terminfo"
makedepends="autoconf automake bsd-compat-headers libevent-dev ncurses-dev"
subpackages="$pkgname-doc"
-source="https://github.com/tmux/tmux/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"
+source="https://github.com/tmux/tmux/releases/download/$pkgver/$pkgname-$pkgver.tar.gz
+ reg-startend.patch"
builddir="$srcdir/$pkgname-$pkgver"
@@ -37,9 +38,10 @@ package() {
install -D -m644 example_tmux.conf \
"$pkgdir"/usr/share/doc/$pkgname/examples/$pkgname.conf
- local file; for file in CHANGES README TODO; do
+ local file; for file in CHANGES README; do
install -m644 "$file" "$pkgdir"/usr/share/doc/$pkgname/
done
}
-sha512sums="aca6882688727c10c5647443fdd18bbd6c0f80b7a3bf9667903d1b89d523e604cd715f176f33f2e5673258f00e626a6dc273f80fe97ae4f91621814d89985713 tmux-2.9a.tar.gz"
+sha512sums="50fc25f84f04486e9b5dc598b884419d95ef158e9b36d63805db97149811cdfa71f086eafa9610a6a9a3041d1e9eb6d6ccc9277d1926d0e936b0d6a8e1d1cbf8 tmux-3.0.tar.gz
+73c3998f3faf45e98269b8ebf2c237667c80d0193d1bc9ec0ebb24e6b21ceb582ed78bddbf607fd84fc6d4d793e783fc2328fa6fb2a74ce816b393aa30fc1342 reg-startend.patch"
diff --git a/main/tmux/reg-startend.patch b/main/tmux/reg-startend.patch
new file mode 100644
index 0000000000..5369fdd78b
--- /dev/null
+++ b/main/tmux/reg-startend.patch
@@ -0,0 +1,60 @@
+From eb4d60b1ce0e2dc917bd47b10a3ce89de840448a Mon Sep 17 00:00:00 2001
+From: nicm <nicm>
+Date: Wed, 27 Nov 2019 20:54:30 +0000
+Subject: [PATCH] REG_STARTEND is not portable, but it turns out we don't
+ actually need it. From Evan Green, GitHub issue 1982.
+
+---
+ regsub.c | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/regsub.c b/regsub.c
+index 199b21714..22e236dc7 100644
+--- a/regsub.c
++++ b/regsub.c
+@@ -77,10 +77,7 @@ regsub(const char *pattern, const char *with, const char *text, int flags)
+ end = strlen(text);
+
+ while (start <= end) {
+- m[0].rm_so = start;
+- m[0].rm_eo = end;
+-
+- if (regexec(&r, text, nitems(m), m, REG_STARTEND) != 0) {
++ if (regexec(&r, text + start, nitems(m), m, 0) != 0) {
+ regsub_copy(&buf, &len, text, start, end);
+ break;
+ }
+@@ -89,22 +86,25 @@ regsub(const char *pattern, const char *with, const char *text, int flags)
+ * Append any text not part of this match (from the end of the
+ * last match).
+ */
+- regsub_copy(&buf, &len, text, last, m[0].rm_so);
++ regsub_copy(&buf, &len, text, last, m[0].rm_so + start);
+
+ /*
+ * If the last match was empty and this one isn't (it is either
+ * later or has matched text), expand this match. If it is
+ * empty, move on one character and try again from there.
+ */
+- if (empty || m[0].rm_so != last || m[0].rm_so != m[0].rm_eo) {
+- regsub_expand(&buf, &len, with, text, m, nitems(m));
+-
+- last = m[0].rm_eo;
+- start = m[0].rm_eo;
++ if (empty ||
++ start + m[0].rm_so != last ||
++ m[0].rm_so != m[0].rm_eo) {
++ regsub_expand(&buf, &len, with, text + start, m,
++ nitems(m));
++
++ last = start + m[0].rm_eo;
++ start += m[0].rm_eo;
+ empty = 0;
+ } else {
+- last = m[0].rm_eo;
+- start = m[0].rm_eo + 1;
++ last = start + m[0].rm_eo;
++ start += m[0].rm_eo + 1;
+ empty = 1;
+ }
+