diff --git a/0001-revert-GCC_PRINTF-and-GCC_SCANF-to-workaround-some-p.patch b/0001-revert-GCC_PRINTF-and-GCC_SCANF-to-workaround-some-p.patch new file mode 100644 index 0000000000000000000000000000000000000000..d0059c49e174e1033a3a6e0f28a4d03a43949e4f --- /dev/null +++ b/0001-revert-GCC_PRINTF-and-GCC_SCANF-to-workaround-some-p.patch @@ -0,0 +1,62 @@ +From 61c58e0942e339ddacb1c7339bca3815cf693b90 Mon Sep 17 00:00:00 2001 +From: forrest_ly +Date: Wed, 16 Mar 2022 17:16:48 +0800 +Subject: [PATCH] revert GCC_PRINTF and GCC_SCANF to workaround some pkg build + fail + +--- + include/curses.h.in | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/include/curses.h.in b/include/curses.h.in +index 6acf2d0..9ecdfe6 100644 +--- a/include/curses.h.in ++++ b/include/curses.h.in +@@ -557,10 +557,14 @@ struct _win_st + + /* + * We cannot define these in ncurses_cfg.h, since they require parameters to be +- * passed (that is non-portable). ++ * passed (that is non-portable). If you happen to be using gcc with warnings ++ * enabled, define ++ * GCC_PRINTF ++ * GCC_SCANF ++ * to improve checking of calls to printw(), etc. + */ + #ifndef GCC_PRINTFLIKE +-#ifndef printf ++#if defined(GCC_PRINTF) && !defined(printf) + #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) + #else + #define GCC_PRINTFLIKE(fmt,var) /*nothing*/ +@@ -568,7 +572,7 @@ struct _win_st + #endif + + #ifndef GCC_SCANFLIKE +-#ifndef scanf ++#if defined(GCC_SCANF) && !defined(scanf) + #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) + #else + #define GCC_SCANFLIKE(fmt,var) /*nothing*/ +@@ -816,14 +820,10 @@ extern NCURSES_EXPORT(void) use_tioctl (bool); /* implemented */ + extern NCURSES_EXPORT(int) vidattr (chtype); /* implemented */ + extern NCURSES_EXPORT(int) vidputs (chtype, NCURSES_OUTC); /* implemented */ + extern NCURSES_EXPORT(int) vline (chtype, int); /* generated */ +-extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *, va_list) GCC_DEPRECATED(use vw_printw) /* implemented */ +- GCC_PRINTFLIKE(2,0); +-extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *, va_list) /* implemented */ +- GCC_PRINTFLIKE(2,0); +-extern NCURSES_EXPORT(int) vwscanw (WINDOW *, const char *, va_list) GCC_DEPRECATED(use vw_scanw) /* implemented */ +- GCC_SCANFLIKE(2,0); +-extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, const char *, va_list) /* implemented */ +- GCC_SCANFLIKE(2,0); ++extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *, va_list) GCC_PRINTFLIKE(2,0) GCC_DEPRECATED(use vw_printw); /* implemented */ ++extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *, va_list) GCC_PRINTFLIKE(2,0); /* implemented */ ++extern NCURSES_EXPORT(int) vwscanw (WINDOW *, const char *, va_list) GCC_SCANFLIKE(2,0) GCC_DEPRECATED(use vw_scanw); /* implemented */ ++extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, const char *, va_list) GCC_SCANFLIKE(2,0); /* implemented */ + extern NCURSES_EXPORT(int) waddch (WINDOW *, const chtype); /* implemented */ + extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int); /* implemented */ + extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *); /* generated */ +-- +2.27.0 + diff --git a/ncurses.spec b/ncurses.spec index 755c725aacc2bb7ec951cfb5fc01e4fdc83e67e6..49a939f98bca89e6f5a1bc67d7c1360c748b5880 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -1,12 +1,14 @@ Name: ncurses Version: 6.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Ncurses support utilities License: MIT URL: https://invisible-island.net/ncurses/ncurses.html Source0: https://invisible-mirror.net/archives/ncurses/ncurses-%{version}.tar.gz +Patch0: 0001-revert-GCC_PRINTF-and-GCC_SCANF-to-workaround-some-p.patch + BuildRequires: gcc gcc-c++ gpm-devel gnupg2 make pkgconfig Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -96,8 +98,7 @@ The ncurses-static package includes static libraries of the ncurses library. %prep -%autosetup - +%autosetup -p1 %build common_options="\ @@ -259,5 +260,8 @@ xz NEWS %changelog +* Wed Mar 16 2022 forrest_ly - 6.3-2 +- revert GCC_PRINTF and GCC_SCANF to workaround some pkg build + * Fri Mar 11 2022 forrest_ly - 6.3-1 - Init for Anolis OS 23