public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/cunit/files/, dev-util/cunit/
@ 2024-12-15 19:30 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2024-12-15 19:30 UTC (permalink / raw
  To: gentoo-commits

commit:     e97a34fd0c3e99e50a659ef8c0ca5b630272fb37
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 15 19:28:55 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 19:29:31 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e97a34fd

dev-util/cunit: fix build w/ new ncurses

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

 dev-util/cunit/cunit-2.1_p3-r1.ebuild              |  1 +
 .../cunit/files/cunit-2.1_p3-ncurses-opaque.patch  | 55 ++++++++++++++++++++++
 2 files changed, 56 insertions(+)

diff --git a/dev-util/cunit/cunit-2.1_p3-r1.ebuild b/dev-util/cunit/cunit-2.1_p3-r1.ebuild
index 9c91de94aa6d..f2939479882e 100644
--- a/dev-util/cunit/cunit-2.1_p3-r1.ebuild
+++ b/dev-util/cunit/cunit-2.1_p3-r1.ebuild
@@ -27,6 +27,7 @@ S="${WORKDIR}/${MY_P}"
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.1_p3-ncurses-format-security.patch
+	"${FILESDIR}"/${PN}-2.1_p3-ncurses-opaque.patch
 )
 
 src_prepare() {

diff --git a/dev-util/cunit/files/cunit-2.1_p3-ncurses-opaque.patch b/dev-util/cunit/files/cunit-2.1_p3-ncurses-opaque.patch
new file mode 100644
index 000000000000..fa52f683faa0
--- /dev/null
+++ b/dev-util/cunit/files/cunit-2.1_p3-ncurses-opaque.patch
@@ -0,0 +1,55 @@
+https://bugs.gentoo.org/932110
+https://sources.debian.org/data/main/c/cunit/2.1-3-dfsg-2.7/debian/patches/curses_ftbfs.patch
+
+Description: Use getters for accessing fields of opaque type WINDOW in Curses.c
+Author: Mate Kukri <mate.kukri@canonical.com>
+Last-Update: 2024-01-04
+
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/CUnit/Sources/Curses/Curses.c
++++ b/CUnit/Sources/Curses/Curses.c
+@@ -256,10 +256,10 @@
+ 
+   start_color();
+ 
+-  f_nLeft = application_windows.pMainWin->_begx;
+-  f_nTop = application_windows.pMainWin->_begy;
+-  f_nWidth = application_windows.pMainWin->_maxx;
+-  f_nHeight = application_windows.pMainWin->_maxy;
++  f_nLeft = getbegx(application_windows.pMainWin);
++  f_nTop = getbegy(application_windows.pMainWin);
++  f_nWidth = getmaxx(application_windows.pMainWin) - 1;
++  f_nHeight = getmaxy(application_windows.pMainWin) - 1;
+ 
+   if (NULL == (application_windows.pTitleWin = newwin(3, f_nWidth, 0, 0))) {
+     goto title_fail;
+@@ -358,10 +358,10 @@
+ {
+   refresh();
+ 
+-  f_nLeft = application_windows.pMainWin->_begx;
+-  f_nTop = application_windows.pMainWin->_begy;
+-  f_nWidth = application_windows.pMainWin->_maxx;
+-  f_nHeight = application_windows.pMainWin->_maxy;
++  f_nLeft = getbegx(application_windows.pMainWin);
++  f_nTop = getbegy(application_windows.pMainWin);
++  f_nWidth = getmaxx(application_windows.pMainWin) - 1;
++  f_nHeight = getmaxy(application_windows.pMainWin) - 1;
+ 
+   refresh_title_window();
+   refresh_progress_window();
+@@ -907,10 +907,10 @@
+   pPad->uiColumns = uiCols;
+   pPad->uiPadRow = 0;
+   pPad->uiPadCol = 0;
+-  pPad->uiWinLeft = application_windows.pDetailsWin->_begx + 1;
+-  pPad->uiWinTop = application_windows.pDetailsWin->_begy + 1;
+-  pPad->uiWinColumns = application_windows.pDetailsWin->_maxx - 2;
+-  pPad->uiWinRows = application_windows.pDetailsWin->_maxy - 2;
++  pPad->uiWinLeft = getbegx(application_windows.pDetailsWin) + 1;
++  pPad->uiWinTop = getbegy(application_windows.pDetailsWin) + 1;
++  pPad->uiWinColumns = getmaxx(application_windows.pDetailsWin) - 3;
++  pPad->uiWinRows = getmaxy(application_windows.pDetailsWin) - 3;
+ 
+   bStatus = true;
+ 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-15 19:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-15 19:30 [gentoo-commits] repo/gentoo:master commit in: dev-util/cunit/files/, dev-util/cunit/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox