diff --git a/ncurses-compheader.patch b/ncurses-compheader.patch new file mode 100644 index 0000000..8ae7143 --- /dev/null +++ b/ncurses-compheader.patch @@ -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), \ diff --git a/ncurses.spec b/ncurses.spec index 0ed565e..ed3ea1c 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -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