make installed ncurses.h compatible with narrow-char libncurses (#1270534)

This commit is contained in:
Miroslav Lichvar 2016-01-26 10:35:22 +01:00
parent e100fa1f55
commit c00431fd69
2 changed files with 24 additions and 0 deletions

21
ncurses-compheader.patch Normal file
View File

@ -0,0 +1,21 @@
diff -up ncurses-6.0-20160116/include/curses.h.in.compheader ncurses-6.0-20160116/include/curses.h.in
--- ncurses-6.0-20160116/include/curses.h.in.compheader 2016-01-26 10:28:56.531558497 +0100
+++ ncurses-6.0-20160116/include/curses.h.in 2015-12-20 00:08:31.000000000 +0100
@@ -1152,7 +1152,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NA
#define wattron(win,at) wattr_on(win, NCURSES_CAST(attr_t, at), NULL)
#define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NULL)
-#if !NCURSES_OPAQUE
+#ifdef NCURSES_INTERNALS
#if NCURSES_WIDECHAR && @NCURSES_EXT_COLORS@
#define wattrset(win,at) ((win) \
? ((win)->_color = NCURSES_CAST(int, PAIR_NUMBER(at)), \
@@ -1300,7 +1300,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NA
#define slk_attr_off(a,v) ((v) ? ERR : slk_attroff(a))
#define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a))
-#if !NCURSES_OPAQUE
+#ifdef NCURSES_INTERNALS
#if NCURSES_WIDECHAR && @NCURSES_EXT_COLORS@
#define wattr_set(win,a,p,opts) (((win) \
? ((win)->_attrs = ((a) & ~A_COLOR), \

View File

@ -8,6 +8,8 @@ Group: System Environment/Base
URL: http://invisible-island.net/ncurses/ncurses.html
Source0: ftp://invisible-island.net/ncurses/current/ncurses-%{version}-%{revision}.tgz
# make installed ncurses.h compatible with narrow-char libncurses (#1270534)
Patch7: ncurses-compheader.patch
Patch8: ncurses-config.patch
Patch9: ncurses-libs.patch
Patch11: ncurses-urxvt.patch
@ -107,6 +109,7 @@ The ncurses-static package includes static libraries of the ncurses library.
%prep
%setup -q -n %{name}-%{version}-%{revision}
%patch7 -p1 -b .headercomp
%patch8 -p1 -b .config
%patch9 -p1 -b .libs
%patch11 -p1 -b .urxvt