From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8868B138334 for ; Thu, 28 Nov 2019 09:09:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 70B42E09BC; Thu, 28 Nov 2019 09:09:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 48978E09B7 for ; Thu, 28 Nov 2019 09:09:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9A4CC34D50E for ; Thu, 28 Nov 2019 09:09:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 29EF98B1 for ; Thu, 28 Nov 2019 09:09:34 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1574932168.e53d3b04c12ae039d5b74bf755635020c61743a7.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/tmux/, app-misc/tmux/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-misc/tmux/files/tmux-3.0-musl.patch app-misc/tmux/tmux-3.0.ebuild X-VCS-Directories: app-misc/tmux/ app-misc/tmux/files/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: e53d3b04c12ae039d5b74bf755635020c61743a7 X-VCS-Branch: master Date: Thu, 28 Nov 2019 09:09:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e98eac7a-b2db-4f45-8123-20a13f9edc0b X-Archives-Hash: 36980303cc201d0eab9cd391d7403026 commit: e53d3b04c12ae039d5b74bf755635020c61743a7 Author: Lars Wendler gentoo org> AuthorDate: Thu Nov 28 08:09:00 2019 +0000 Commit: Lars Wendler gentoo org> CommitDate: Thu Nov 28 09:09:28 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e53d3b04 app-misc/tmux: Fixed musl build Package-Manager: Portage-2.3.80, Repoman-2.3.19 Signed-off-by: Lars Wendler gentoo.org> app-misc/tmux/files/tmux-3.0-musl.patch | 60 +++++++++++++++++++++++++++++++++ app-misc/tmux/tmux-3.0.ebuild | 1 + 2 files changed, 61 insertions(+) diff --git a/app-misc/tmux/files/tmux-3.0-musl.patch b/app-misc/tmux/files/tmux-3.0-musl.patch new file mode 100644 index 00000000000..5369fdd78b0 --- /dev/null +++ b/app-misc/tmux/files/tmux-3.0-musl.patch @@ -0,0 +1,60 @@ +From eb4d60b1ce0e2dc917bd47b10a3ce89de840448a Mon Sep 17 00:00:00 2001 +From: 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; + } + diff --git a/app-misc/tmux/tmux-3.0.ebuild b/app-misc/tmux/tmux-3.0.ebuild index 350d8121d21..b0b4fb817a7 100644 --- a/app-misc/tmux/tmux-3.0.ebuild +++ b/app-misc/tmux/tmux-3.0.ebuild @@ -46,6 +46,7 @@ PATCHES=( "${FILESDIR}/${PN}-2.4-flags.patch" # upstream fixes (can be removed with next version bump) + "${FILESDIR}/${P}-musl.patch" ) src_prepare() {