aboutsummaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2022-04-12 13:01:37 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2022-04-12 13:06:25 +0000
commitb5a08339f85294c93af1af5abeb68c4074e2b1d8 (patch)
tree9489acc66fd74d8d6de3cdc0ba887bca65a977cf /net-im
parent2a7e137f48303a59b88b8ebd1b338758b3221f1b (diff)
downloadports-b5a08339f85294c93af1af5abeb68c4074e2b1d8.tar.gz
ports-b5a08339f85294c93af1af5abeb68c4074e2b1d8.zip
net-im/gomuks: Fix runtime within a tmux session
An upstream change [1] made it a requirement to have `infocmp` installed for parsing terminal capabilities within a tmux session. While ncurses from base works perfectly fine with gomuks, base does not ship with `infocmp` thus creating a hard dependency to devel/ncurses. Patch port to revert upstream change. [1] https://github.com/tulir/tcell/commit/aef08b141333dfbaad8a7f0c187d7ab7d2b203c9 https://github.com/tulir/tcell/blob/bb9a2b9b1937b1ede6a00450b2650b7b0befe2fc/terminfo/dynamic/dynamic.go#L121 PR: 263213 Upstream issue: https://github.com/tulir/gomuks/issues/363 Reported by: parakleta@darkreality.org (cherry picked from commit fa4b531894f88d21307b3e8640b197fbe99038ec)
Diffstat (limited to 'net-im')
-rw-r--r--net-im/gomuks/Makefile2
-rw-r--r--net-im/gomuks/files/patch-vendor_maunium.net_go_tcell_tscreen.go18
2 files changed, 19 insertions, 1 deletions
diff --git a/net-im/gomuks/Makefile b/net-im/gomuks/Makefile
index 126fa4b15e67..c78dcbc0e549 100644
--- a/net-im/gomuks/Makefile
+++ b/net-im/gomuks/Makefile
@@ -3,7 +3,7 @@
PORTNAME= gomuks
PORTVERSION= 0.2.4
DISTVERSIONPREFIX= v
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net-im
MAINTAINER= ehaupt@FreeBSD.org
diff --git a/net-im/gomuks/files/patch-vendor_maunium.net_go_tcell_tscreen.go b/net-im/gomuks/files/patch-vendor_maunium.net_go_tcell_tscreen.go
new file mode 100644
index 000000000000..a556e946df72
--- /dev/null
+++ b/net-im/gomuks/files/patch-vendor_maunium.net_go_tcell_tscreen.go
@@ -0,0 +1,18 @@
+--- vendor/maunium.net/go/tcell/tscreen.go.orig 2022-04-12 11:45:41 UTC
++++ vendor/maunium.net/go/tcell/tscreen.go
+@@ -50,13 +50,9 @@ const (
+ // $COLUMNS environment variables can be set to the actual window size,
+ // otherwise defaults taken from the terminal database are used.
+ func NewTerminfoScreen() (Screen, error) {
+- term := os.Getenv("TERM")
+- if len(term) >= 6 && term[:6] == "screen" && len(os.Getenv("TMUX")) > 0 {
+- term = "tmux"
+- }
+- ti, e := terminfo.LookupTerminfo(term)
++ ti, e := terminfo.LookupTerminfo(os.Getenv("TERM"))
+ if e != nil {
+- ti, e = loadDynamicTerminfo(term)
++ ti, e = loadDynamicTerminfo(os.Getenv("TERM"))
+ if e != nil {
+ return nil, e
+ }