From nobody Fri Jun 14 08:32:15 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0svz5v1Bz5NRhf; Fri, 14 Jun 2024 08:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0svz2xPjz3xLq; Fri, 14 Jun 2024 08:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718353935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LEVucBg0sAwV1pRSnTO1b7o1RwzDlJRH18wTz4vZ5Rk=; b=nMrfpEXuWuDD3sLx8ZNom+AkgInq4LRoY0bfyGHaohhML8LQF8YemI2zNdlyiA8dye9jHo 7ro5+HO1xzWmWEHwv4/tIq2WGHpszr+e3tQUpqoRDtrzjJCa5ju8NHEjwcJ1QIxzR7C9HE 5+yD6SD2EYAiWpaMl8H8i7uIWUe3YjlT/9dyoEsqtMu2FF+uH5ubwtN74UFaTlvSySJpu/ YLLVojzVykUypNv3BBXpr+DofPlcAF2xHzdT8uc1e6LSeAXBRrwh/9RqqRYBUJ5nBQJjzq JeEHLlw2DiOJuoefjxmrZdzXvs7dqG6pQMiq8uMgyvhQIZ7yV70nZ4dUQaBgyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718353935; a=rsa-sha256; cv=none; b=UvNIqhyxiUf++cb6+A/7k5TZUhiw+LrN9Ogay8gaHuKme98RouEzUqKyUQZXDuBg/F+M5d EQh98aPF+WBkkhMUMlUzChXMjkIgFNaPzw+6qGKAqhD//D22TTdaWypGJsWYqnE2nufjLB NoVoZvrEQ1JLfGurLsHEa9cVGcGKemrfqeQHFQrM6pAxACB1H4JR71dtTWXxnEUd1oCTXk A1pV30zndupuPasuE3d1w+JsQfxI+9WKmOAjOqW+zVLuOlTTicfSRgecGL12o95Pb5oE14 ErSzRc8gRIN6j3J9Y/BT9ayPxA4rwhpOSwXBJIAh7nfiSlTiN2uNsJwDocoCAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718353935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LEVucBg0sAwV1pRSnTO1b7o1RwzDlJRH18wTz4vZ5Rk=; b=VTRv3f5JuyJO4KlZooHQMmrqs5NhsTPX3a7HY6eyAEpciCS0gchSDkqvGCb4ROmlOM3o9q PNg6CeJX7VDpeEE1zntGVa5dvP2m2TuQD9sLm4F7st2WIw7/eRju9Tnsv+eg7qOmy1TbBf 3p4yeWBGm3sJtRI42AAZVB5otIWbNVuKswtYTVvmAvWyVA20sNWfjmtl4P0MNmzbjqyoEq 5obTV5LcoQX2wgLRo6jvrl/14EfaSUyH6Jio+KRRYytQiIpXytpK9c7FjJS6p/U52rQJcz fgpPraIMLFlhycuqGy+jHqC3R+z50XYuVUoBees4c/sezx+IBoQ3NRJmgrxF0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0svz2Ycjz1CkT; Fri, 14 Jun 2024 08:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45E8WFK6087932; Fri, 14 Jun 2024 08:32:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E8WFJd087929; Fri, 14 Jun 2024 08:32:15 GMT (envelope-from git) Date: Fri, 14 Jun 2024 08:32:15 GMT Message-Id: <202406140832.45E8WFJd087929@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Koichiro Iwao Subject: git: 5a77b3ff4c0e - main - sysutils/tmux: Fix crash when text selection using mouse List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: meta X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a77b3ff4c0e9fed2b3dab55023735008cff1e73 Auto-Submitted: auto-generated The branch main has been updated by meta: URL: https://cgit.FreeBSD.org/ports/commit/?id=5a77b3ff4c0e9fed2b3dab55023735008cff1e73 commit 5a77b3ff4c0e9fed2b3dab55023735008cff1e73 Author: Koichiro Iwao AuthorDate: 2024-05-24 18:15:51 +0000 Commit: Koichiro Iwao CommitDate: 2024-06-14 08:31:54 +0000 sysutils/tmux: Fix crash when text selection using mouse I re-ported a patch originally ported to 3.2a by Tobias Brick, a Microsoft employee to 3.3a. The patch depends on ncurses 6.4-20230423 or later so I bind this port to ncurses:port. See commit message of the patch for detail [1] [1] https://github.com/microsoft/azurelinux/blob/a1f78f2/SPECS/tmux/manual-patch-to-fix-crash-due-to-change-to-ncurses.patch PR: 279276 Approved by: maintainer timeout Obtained from: https://github.com/microsoft/azurelinux/issues/6598 Obtained from: https://github.com/microsoft/azurelinux/pull/6766 --- sysutils/tmux/Makefile | 4 +- ...tch-to-fix-crash-due-to-change-to-ncurses.patch | 63 ++++++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/sysutils/tmux/Makefile b/sysutils/tmux/Makefile index 0e0c0280a234..4ae211a218d3 100644 --- a/sysutils/tmux/Makefile +++ b/sysutils/tmux/Makefile @@ -1,6 +1,6 @@ PORTNAME= tmux PORTVERSION= 3.3a -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils MASTER_SITES= https://github.com/tmux/tmux/releases/download/${PORTVERSION}/ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} @@ -16,7 +16,7 @@ LICENSE_FILE_GPLv2= ${WRKSRC_bash}/COPYING LICENSE_DISTFILES_ISCL= ${DISTNAME}${EXTRACT_SUFX} LICENSE_DISTFILES_GPLv2= ${DISTFILE_bash} -USES= cpe ncurses pkgconfig +USES= cpe ncurses:port pkgconfig CPE_VENDOR= tmux_project diff --git a/sysutils/tmux/files/patch-to-fix-crash-due-to-change-to-ncurses.patch b/sysutils/tmux/files/patch-to-fix-crash-due-to-change-to-ncurses.patch new file mode 100644 index 000000000000..00922273763c --- /dev/null +++ b/sysutils/tmux/files/patch-to-fix-crash-due-to-change-to-ncurses.patch @@ -0,0 +1,63 @@ +diff --git tty-term.c tty-term.c +index fdf0c4fa..873e1ce2 100644 +--- tty-term.c ++++ tty-term.c +@@ -762,33 +762,53 @@ tty_term_string(struct tty_term *term, enum tty_code_code code) + const char * + tty_term_string1(struct tty_term *term, enum tty_code_code code, int a) + { +- return (tparm((char *) tty_term_string(term, code), a, 0, 0, 0, 0, 0, 0, 0, 0)); ++ const char *x = tty_term_string(term, code), *s; ++ s = tiparm_s(1, 0, x, a); ++ if (s == NULL) ++ fatalx("could not expand %s", tty_term_codes[code].name); ++ return (s); + } + + const char * + tty_term_string2(struct tty_term *term, enum tty_code_code code, int a, int b) + { +- return (tparm((char *) tty_term_string(term, code), a, b, 0, 0, 0, 0, 0, 0, 0)); ++ const char *x = tty_term_string(term, code), *s; ++ s = tiparm_s(2, 0, x, a, b); ++ if (s == NULL) ++ fatalx("could not expand %s", tty_term_codes[code].name); ++ return (s); + } + + const char * + tty_term_string3(struct tty_term *term, enum tty_code_code code, int a, int b, + int c) + { +- return (tparm((char *) tty_term_string(term, code), a, b, c, 0, 0, 0, 0, 0, 0)); ++ const char *x = tty_term_string(term, code), *s; ++ s = tiparm_s(3, 0, x, a, b, c); ++ if (s == NULL) ++ fatalx("could not expand %s", tty_term_codes[code].name); ++ return (s); + } + + const char * + tty_term_ptr1(struct tty_term *term, enum tty_code_code code, const void *a) + { +- return (tparm((char *) tty_term_string(term, code), (long)a, 0, 0, 0, 0, 0, 0, 0, 0)); ++ const char *x = tty_term_string(term, code), *s; ++ s = tiparm_s(1, 1, x, a); ++ if (s == NULL) ++ fatalx("could not expand %s", tty_term_codes[code].name); ++ return (s); + } + + const char * + tty_term_ptr2(struct tty_term *term, enum tty_code_code code, const void *a, + const void *b) + { +- return (tparm((char *) tty_term_string(term, code), (long)a, (long)b, 0, 0, 0, 0, 0, 0, 0)); ++ const char *x = tty_term_string(term, code), *s; ++ s = tiparm_s(2, 3, x, a, b); ++ if (s == NULL) ++ fatalx("could not expand %s", tty_term_codes[code].name); ++ return (s); + } + + int