mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
pmars: Fix FTBFS due to ncurses change (#405380)
This commit is contained in:
commit
5fd725ebdf
2 changed files with 60 additions and 0 deletions
57
pkgs/by-name/pm/pmars/0003-fix-ncurses-opaque-WINDOW.patch
Normal file
57
pkgs/by-name/pm/pmars/0003-fix-ncurses-opaque-WINDOW.patch
Normal file
|
@ -0,0 +1,57 @@
|
|||
diff '--color=auto' -ruN a/src/curdisp.c b/src/curdisp.c
|
||||
--- a/src/curdisp.c 2025-05-08 23:23:48.070346219 +0200
|
||||
+++ b/src/curdisp.c 2025-05-08 23:29:33.851400436 +0200
|
||||
@@ -28,12 +28,6 @@
|
||||
#include "sim.h"
|
||||
#endif
|
||||
|
||||
-/* For window structure in BSD 4.4/Curses 8.x library */
|
||||
-#ifdef BSD44
|
||||
-#define _curx curx
|
||||
-#define _cury cury
|
||||
-#endif
|
||||
-
|
||||
typedef struct win_st {
|
||||
WINDOW *win;
|
||||
int page;
|
||||
@@ -428,18 +422,18 @@
|
||||
str--;
|
||||
maxchar++;
|
||||
leaveok(curwin, TRUE);
|
||||
- if (ox = curwin->_curx) {
|
||||
+ if (ox = getcurx(curwin)) {
|
||||
#if 0
|
||||
#ifdef ATTRIBUTE
|
||||
- mvwaddch(curwin, curwin->_cury, --ox, ' ' | attr);
|
||||
+ mvwaddch(curwin, getcury(curwin), --ox, ' ' | attr);
|
||||
#else
|
||||
- mvwaddch(curwin, curwin->_cury, --ox, ' ');
|
||||
+ mvwaddch(curwin, getcury(curwin), --ox, ' ');
|
||||
#endif
|
||||
#endif /* 0 */
|
||||
- mvwaddch(curwin, curwin->_cury, --ox, ' ');
|
||||
- wmove(curwin, curwin->_cury, ox);
|
||||
+ mvwaddch(curwin, getcury(curwin), --ox, ' ');
|
||||
+ wmove(curwin, getcury(curwin), ox);
|
||||
} else {
|
||||
- oy = curwin->_cury - 1;
|
||||
+ oy = getcury(curwin) - 1;
|
||||
#if 0
|
||||
#ifdef ATTRIBUTE
|
||||
mvwaddch(curwin, oy, COLS - 1, ' ' | attr);
|
||||
@@ -470,12 +464,12 @@
|
||||
if (ox--)
|
||||
#if 0
|
||||
#ifdef ATTRIBUTE
|
||||
- mvwaddch(curwin, curwin->_cury, ox, ' ' | attr);
|
||||
+ mvwaddch(curwin, getcury(curwin), ox, ' ' | attr);
|
||||
#else
|
||||
- mvwaddch(curwin, curwin->_cury, ox, ' ');
|
||||
+ mvwaddch(curwin, getcury(curwin), ox, ' ');
|
||||
#endif
|
||||
#endif /* 0 */
|
||||
- mvwaddch(curwin, curwin->_cury, ox, ' ');
|
||||
+ mvwaddch(curwin, getcury(curwin), ox, ' ');
|
||||
else
|
||||
#if 0
|
||||
#ifdef ATTRIBUTE
|
|
@ -35,6 +35,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
|
||||
# call to undeclared function 'sighandler' & undefined sighandler on Darwin
|
||||
./0002-fix-sighandler.patch
|
||||
|
||||
# ncurses' WINDOW struct was turned opaque for outside code, use functions for accessing values instead
|
||||
./0003-fix-ncurses-opaque-WINDOW.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue