libgnt, bump to 2.14.3, add patch from Gentoo (fixes build) (#13596)

This commit is contained in:
Schrijvers Luc
2026-01-08 08:14:02 +01:00
committed by GitHub
parent de1df2cdb5
commit d170cd31cd
3 changed files with 132 additions and 59 deletions

View File

@@ -4,15 +4,15 @@ graphical user interfaces quickly and easily."
HOMEPAGE="https://pidgin.im/"
COPYRIGHT="2006-2021 libgnt contributors"
LICENSE="GNU GPL v2"
REVISION="3"
REVISION="1"
SOURCE_URI="http://downloads.sourceforge.net/project/pidgin/libgnt/$portVersion/libgnt-$portVersion.tar.xz"
CHECKSUM_SHA256="5ec3e68e18f956e9998d79088b299fa3bca689bcc95c86001bc5da17c1eb4bd8"
CHECKSUM_SHA256="57f5457f72999d0bb1a139a37f2746ec1b5a02c094f2710a339d8bcea4236123"
PATCHES="libgnt-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="0.14.1"
libVersion="0.14.3"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
@@ -61,7 +61,8 @@ BUILD()
{
meson build --buildtype=debugoptimized --prefix=$prefix \
--libdir=$libDir \
--includedir=$includeDir
--includedir=$includeDir \
-Dpython2=false
ninja $jobargs -C build
}

View File

@@ -1,55 +0,0 @@
From 6b1d5f1e026fd6f8cf488d117278a92e8e3ee50c Mon Sep 17 00:00:00 2001
From: Jaidyn Ann <jadedctrl@teknik.io>
Date: Mon, 28 Jun 2021 16:40:12 -0500
Subject: Fix ncurses header
diff --git a/meson.build b/meson.build
index 1084c82..4e4c70a 100644
--- a/meson.build
+++ b/meson.build
@@ -84,12 +84,17 @@ endif
if host_machine.system() == 'windows'
# FIXME: $host ?
ncurses_sys_prefix = '/usr/$host/sys-root/mingw'
+elif host_machine.system() == 'haiku'
+ ncurses_sys_prefix = \
+ run_command('finddir', 'B_SYSTEM_HEADERS_DIRECTORY').stdout().strip()
else
ncurses_sys_prefix = '/usr'
endif
ncurses_sys_dirs = [ncurses_sys_prefix + '/include/ncursesw',
- ncurses_sys_prefix + '/include']
+ ncurses_sys_prefix + '/include',
+ ncurses_sys_prefix + '/x86',
+ ncurses_sys_prefix ]
if ncurses_available
# Some distros put the headers in ncursesw/, some don't
--
2.30.2
From acf694704e43b56dbf0984fd808c5ced950df723 Mon Sep 17 00:00:00 2001
From: Jaidyn Ann <jadedctrl@teknik.io>
Date: Tue, 29 Jun 2021 09:31:31 -0500
Subject: cchat_t gntwm compat
diff --git a/gntwm.c b/gntwm.c
index ffb1f4a..affe57b 100644
--- a/gntwm.c
+++ b/gntwm.c
@@ -32,7 +32,7 @@
#define _GNU_SOURCE
#endif
-#if !defined _XOPEN_SOURCE_EXTENDED && (defined(__APPLE__) || defined(__unix__))
+#if !defined _XOPEN_SOURCE_EXTENDED && (defined(__APPLE__) || defined(__unix__) || defined(__HAIKU__))
#define _XOPEN_SOURCE_EXTENDED
#endif
--
2.30.2

View File

@@ -0,0 +1,127 @@
From 1c15caca8f7074671222b9891830c88230b9a5ce Mon Sep 17 00:00:00 2001
From: Jaidyn Ann <jadedctrl@teknik.io>
Date: Mon, 28 Jun 2021 16:40:12 -0500
Subject: Fix ncurses header
diff --git a/meson.build b/meson.build
index 009aac8..b5c2b68 100644
--- a/meson.build
+++ b/meson.build
@@ -84,12 +84,17 @@ endif
if host_machine.system() == 'windows'
# FIXME: $host ?
ncurses_sys_prefix = '/usr/$host/sys-root/mingw'
+elif host_machine.system() == 'haiku'
+ ncurses_sys_prefix = \
+ run_command('finddir', 'B_SYSTEM_HEADERS_DIRECTORY').stdout().strip()
else
ncurses_sys_prefix = '/usr'
endif
ncurses_sys_dirs = [ncurses_sys_prefix + '/include/ncursesw',
- ncurses_sys_prefix + '/include']
+ ncurses_sys_prefix + '/include',
+ ncurses_sys_prefix + '/x86',
+ ncurses_sys_prefix ]
if ncurses_available
# Some distros put the headers in ncursesw/, some don't
--
2.52.0
From 348158a60843eb62e8aee01a28094381ceefff32 Mon Sep 17 00:00:00 2001
From: Jaidyn Ann <jadedctrl@teknik.io>
Date: Tue, 29 Jun 2021 09:31:31 -0500
Subject: cchat_t gntwm compat
diff --git a/gntwm.c b/gntwm.c
index ffb1f4a..affe57b 100644
--- a/gntwm.c
+++ b/gntwm.c
@@ -32,7 +32,7 @@
#define _GNU_SOURCE
#endif
-#if !defined _XOPEN_SOURCE_EXTENDED && (defined(__APPLE__) || defined(__unix__))
+#if !defined _XOPEN_SOURCE_EXTENDED && (defined(__APPLE__) || defined(__unix__) || defined(__HAIKU__))
#define _XOPEN_SOURCE_EXTENDED
#endif
--
2.52.0
From 84868af3901bec580361b5884d52fb1764345dc6 Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Thu, 8 Jan 2026 08:07:04 +0100
Subject: applying patch libgnt-2.14.3-ncurses-opaque.patch
https://bugs.gentoo.org/928976
https://src.fedoraproject.org/rpms/libgnt/blob/rawhide/f/libgnt-2.14.1-gcc-14-fix.patch
diff --git a/gntwm.c b/gntwm.c
index affe57b..5b50d4c 100644
--- a/gntwm.c
+++ b/gntwm.c
@@ -166,38 +166,40 @@ work_around_for_ncurses_bug(void)
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);
}
}
}
--
2.52.0