public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgnt/files/, dev-libs/libgnt/
Date: Tue, 24 Dec 2024 05:06:05 +0000 (UTC)	[thread overview]
Message-ID: <1735016527.3d72f18d045dae13ac30a61429ab2efa58296e5a.sam@gentoo> (raw)

commit:     3d72f18d045dae13ac30a61429ab2efa58296e5a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 24 05:02:07 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 24 05:02:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d72f18d

dev-libs/libgnt: fix build w/ opaque ncurses structures

Closes: https://bugs.gentoo.org/928976
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/libgnt-2.14.3-ncurses-opaque.patch       | 61 ++++++++++++++++++++++
 dev-libs/libgnt/libgnt-2.14.3.ebuild               |  5 +-
 2 files changed, 64 insertions(+), 2 deletions(-)

diff --git a/dev-libs/libgnt/files/libgnt-2.14.3-ncurses-opaque.patch b/dev-libs/libgnt/files/libgnt-2.14.3-ncurses-opaque.patch
new file mode 100644
index 000000000000..19e4a4d82121
--- /dev/null
+++ b/dev-libs/libgnt/files/libgnt-2.14.3-ncurses-opaque.patch
@@ -0,0 +1,61 @@
+https://bugs.gentoo.org/928976
+https://src.fedoraproject.org/rpms/libgnt/blob/rawhide/f/libgnt-2.14.1-gcc-14-fix.patch
+--- a/gntwm.c
++++ b/gntwm.c
+@@ -166,38 +166,40 @@
+ 		int sx, ex, sy, ey, w, y;
+ 		cchar_t ch;
+ 		PANEL *below = panel;
++		WINDOW *window = panel_window(panel);
+ 
+-		sx = getbegx(panel->win);
+-		ex = getmaxx(panel->win) + sx;
+-		sy = getbegy(panel->win);
+-		ey = getmaxy(panel->win) + sy;
++		sx = getbegx(window);
++		ex = getmaxx(window) + sx;
++		sy = getbegy(window);
++		ey = getmaxy(window) + sy;
+ 
+ 		while ((below = panel_below(below)) != NULL) {
+-			if (sy > getbegy(below->win) + getmaxy(below->win) ||
+-					ey < getbegy(below->win))
++			window = panel_window(below);
++			if (sy > getbegy(window) + getmaxy(window) ||
++					ey < getbegy(window))
+ 				continue;
+-			if (sx > getbegx(below->win) + getmaxx(below->win) ||
+-					ex < getbegx(below->win))
++			if (sx > getbegx(window) + getmaxx(window) ||
++					ex < getbegx(window))
+ 				continue;
+-			for (y = MAX(sy, getbegy(below->win)); y <= MIN(ey, getbegy(below->win) + getmaxy(below->win)); y++) {
+-				if (mvwin_wch(below->win, y - getbegy(below->win), sx - 1 - getbegx(below->win), &ch) != OK)
++			for (y = MAX(sy, getbegy(window)); y <= MIN(ey, getbegy(window) + getmaxy(window)); y++) {
++				if (mvwin_wch(window, y - getbegy(window), sx - 1 - getbegx(window), &ch) != OK)
+ 					goto right;
+ 				w = widestringwidth(ch.chars);
+ 				if (w > 1 && (ch.attr & 1)) {
+ 					ch.chars[0] = ' ';
+ 					ch.attr &= ~ A_CHARTEXT;
+-					mvwadd_wch(below->win, y - getbegy(below->win), sx - 1 - getbegx(below->win), &ch);
+-					touchline(below->win, y - getbegy(below->win), 1);
++					mvwadd_wch(window, y - getbegy(window), sx - 1 - getbegx(window), &ch);
++					touchline(window, y - getbegy(window), 1);
+ 				}
+ right:
+-				if (mvwin_wch(below->win, y - getbegy(below->win), ex + 1 - getbegx(below->win), &ch) != OK)
++				if (mvwin_wch(window, y - getbegy(window), ex + 1 - getbegx(window), &ch) != OK)
+ 					continue;
+ 				w = widestringwidth(ch.chars);
+ 				if (w > 1 && !(ch.attr & 1)) {
+ 					ch.chars[0] = ' ';
+ 					ch.attr &= ~ A_CHARTEXT;
+-					mvwadd_wch(below->win, y - getbegy(below->win), ex + 1 - getbegx(below->win), &ch);
+-					touchline(below->win, y - getbegy(below->win), 1);
++					mvwadd_wch(window, y - getbegy(window), ex + 1 - getbegx(window), &ch);
++					touchline(window, y - getbegy(window), 1);
+ 				}
+ 			}
+ 		}
+

diff --git a/dev-libs/libgnt/libgnt-2.14.3.ebuild b/dev-libs/libgnt/libgnt-2.14.3.ebuild
index ed67e5575771..cacf0932823e 100644
--- a/dev-libs/libgnt/libgnt-2.14.3.ebuild
+++ b/dev-libs/libgnt/libgnt-2.14.3.ebuild
@@ -8,9 +8,9 @@ inherit flag-o-matic meson
 DESCRIPTION="Pidgin's GLib Ncurses Toolkit"
 HOMEPAGE="https://keep.imfreedom.org/libgnt/libgnt"
 SRC_URI="https://downloads.sourceforge.net/pidgin/${P}.tar.xz"
+
 LICENSE="GPL-2"
 SLOT="0"
-
 KEYWORDS="~alpha amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux"
 IUSE="doc"
 
@@ -18,7 +18,7 @@ RDEPEND="
 	!<net-im/pidgin-2.14.0
 	dev-libs/glib:2
 	dev-libs/libxml2
-	sys-libs/ncurses:0=
+	sys-libs/ncurses:=
 "
 DEPEND="${RDEPEND}"
 BDEPEND="
@@ -29,6 +29,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}/${PN}-2.14.0-tinfo.patch"
+	"${FILESDIR}/${PN}-2.14.3-ncurses-opaque.patch"
 )
 
 src_configure() {


             reply	other threads:[~2024-12-24  5:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-24  5:06 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-10 13:21 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgnt/files/, dev-libs/libgnt/ Petr Vaněk
2020-06-11 19:21 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1735016527.3d72f18d045dae13ac30a61429ab2efa58296e5a.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox