From 333122f9ea2e0805311b815c7183351e1859ecb3 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 29 May 2017 18:21:50 +0200 Subject: [PATCH] fix compatibility between libtinfo and libncurses (#1456340) --- ncurses-screenpair.patch | 28 ++++++++++++++++++++++++++++ ncurses.spec | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 ncurses-screenpair.patch diff --git a/ncurses-screenpair.patch b/ncurses-screenpair.patch new file mode 100644 index 0000000..7c8d749 --- /dev/null +++ b/ncurses-screenpair.patch @@ -0,0 +1,28 @@ +diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h +index abe2139..8cc8e8d 100644 +--- a/ncurses/curses.priv.h ++++ b/ncurses/curses.priv.h +@@ -1137,11 +1137,6 @@ struct screen { + int _pair_count; /* same as COLOR_PAIRS */ + int _pair_limit; /* actual limit of color-pairs */ + #if NCURSES_EXT_FUNCS +-#if USE_NEW_PAIR +- void *_ordered_pairs; /* index used by alloc_pair() */ +- int _pairs_used; /* actual number of color-pairs used */ +- int _recent_pair; /* number for most recent free-pair */ +-#endif + bool _assumed_color; /* use assumed colors */ + bool _default_color; /* use default colors */ + bool _has_sgr_39_49; /* has ECMA default color support */ +@@ -1295,6 +1290,11 @@ struct screen { + /* + * ncurses/ncursesw are the same up to this point. + */ ++#if NCURSES_EXT_FUNCS && USE_NEW_PAIR ++ void *_ordered_pairs; /* index used by alloc_pair() */ ++ int _pairs_used; /* actual number of color-pairs used */ ++ int _recent_pair; /* number for most recent free-pair */ ++#endif + #if USE_WIDEC_SUPPORT + /* recent versions of 'screen' have partially-working support for + * UTF-8, but do not permit ACS at the same time (see tty_update.c). diff --git a/ncurses.spec b/ncurses.spec index 1eb8d1c..ae89772 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -12,6 +12,7 @@ Patch8: ncurses-config.patch Patch9: ncurses-libs.patch Patch11: ncurses-urxvt.patch Patch12: ncurses-kbs.patch +Patch13: ncurses-screenpair.patch BuildRequires: gpm-devel pkgconfig Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -125,6 +126,7 @@ The ncurses-static package includes static libraries of the ncurses library. %patch9 -p1 -b .libs %patch11 -p1 -b .urxvt %patch12 -p1 -b .kbs +%patch13 -p1 -b .screenpair for f in ANNOUNCE; do iconv -f iso8859-1 -t utf8 -o ${f}{_,} &&