mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
tmux: update to 3.0
Signed-off-by: Nathan Owens <ndowens04@gmail.com>
This commit is contained in:
parent
b688443d05
commit
282b7b5063
2 changed files with 64 additions and 4 deletions
60
srcpkgs/tmux/patches/REG_STARTEND.patch
Normal file
60
srcpkgs/tmux/patches/REG_STARTEND.patch
Normal file
|
@ -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 regsub.c regsub.c
|
||||||
|
index 199b21714..22e236dc7 100644
|
||||||
|
--- regsub.c
|
||||||
|
+++ 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;
|
||||||
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
# Template file for 'tmux'
|
# Template file for 'tmux'
|
||||||
pkgname=tmux
|
pkgname=tmux
|
||||||
version=2.9a
|
version=3.0
|
||||||
revision=3
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
makedepends="libevent-devel ncurses-devel"
|
makedepends="libevent-devel ncurses-devel"
|
||||||
short_desc="Terminal Multiplexer"
|
short_desc="Terminal Multiplexer"
|
||||||
maintainer="Nathan <ndowens04@gmail.com>"
|
maintainer="Nathan Owens <ndowens04@gmail.com>"
|
||||||
license="ISC"
|
license="ISC"
|
||||||
homepage="https://tmux.github.io"
|
homepage="https://tmux.github.io"
|
||||||
changelog="https://raw.githubusercontent.com/tmux/tmux/master/CHANGES"
|
changelog="https://raw.githubusercontent.com/tmux/tmux/master/CHANGES"
|
||||||
distfiles="https://github.com/tmux/tmux/releases/download/${version}/tmux-${version}.tar.gz"
|
distfiles="https://github.com/tmux/tmux/releases/download/${version}/tmux-${version}.tar.gz"
|
||||||
checksum=839d167a4517a6bffa6b6074e89a9a8630547b2dea2086f1fad15af12ab23b25
|
checksum=9edcd78df80962ee2e6471a8f647602be5ded62bb41c574172bb3dc3d0b9b4b4
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vlicense COPYING
|
vlicense COPYING
|
||||||
|
|
Loading…
Add table
Reference in a new issue