1# ncurses 6.1 - patch 20191228 - Thomas E. Dickey
2#
3# ------------------------------------------------------------------------------
4#
5# Ncurses 6.1 is at
6# 	ftp.gnu.org:/pub/gnu
7#
8# Patches for ncurses 6.1 can be found at
9# 	ftp://ftp.invisible-island.net/ncurses/6.1
10#	http://invisible-mirror.net/archives/ncurses/6.1
11#
12# ------------------------------------------------------------------------------
13# ftp://ftp.invisible-island.net/ncurses/6.1/ncurses-6.1-20191228.patch.gz
14# patch by Thomas E. Dickey <dickey@invisible-island.net>
15# created  Sun Dec 29 02:31:23 UTC 2019
16# ------------------------------------------------------------------------------
17# NEWS                             |   10 +++++++++-
18# VERSION                          |    2 +-
19# dist.mk                          |    4 ++--
20# misc/gen-pkgconfig.in            |   10 +++++++---
21# misc/ncurses-config.in           |    5 ++++-
22# package/debian-mingw/changelog   |    4 ++--
23# package/debian-mingw64/changelog |    4 ++--
24# package/debian/changelog         |    4 ++--
25# package/mingw-ncurses.nsi        |    4 ++--
26# package/mingw-ncurses.spec       |    2 +-
27# package/ncurses.spec             |   22 +++++++++++++++-------
28# package/ncursest.spec            |   23 +++++++++++++++--------
29# 12 files changed, 62 insertions(+), 32 deletions(-)
30# ------------------------------------------------------------------------------
31Index: NEWS
32Prereq:  1.3420
33--- ncurses-6.1-20191221+/NEWS	2019-12-21 22:43:54.000000000 +0000
34+++ ncurses-6.1-20191228/NEWS	2019-12-25 23:16:49.000000000 +0000
35@@ -25,7 +25,7 @@
36 -- sale, use or other dealings in this Software without prior written        --
37 -- authorization.                                                            --
38 -------------------------------------------------------------------------------
39--- $Id: NEWS,v 1.3420 2019/12/21 22:43:54 tom Exp $
40+-- $Id: NEWS,v 1.3422 2019/12/25 23:16:49 tom Exp $
41 -------------------------------------------------------------------------------
42
43 This is a log of changes that ncurses has gone through since Zeyd started
44@@ -45,6 +45,14 @@
45 Changes through 1.9.9e did not credit all contributions;
46 it is not possible to add this information.
47
48+20191228
49+	+ in gen-pkgconfig.in, move the RPATH_LIST and PRIVATE_LIBS assignments
50+	  past the various prefix/libdir assignments, to allow for using those
51+	  symbols, e.g., as done via CF_SHARED_OPTS.
52+	+ improve ncurses*-config and pc-files by filtering out linker-specs.
53+	+ modify test-package to more closely match Fedora's configuration
54+	  for PIE/PIC feature and debug-packages.
55+
56 20191221
57 	+ correct pathname used in Ada95 sample programs for explain.txt, to
58 	  work with test-packages.
59Index: VERSION
60--- ncurses-6.1-20191221+/VERSION	2019-12-21 11:16:12.000000000 +0000
61+++ ncurses-6.1-20191228/VERSION	2019-12-28 15:45:41.000000000 +0000
62@@ -1 +1 @@
63-5:0:10	6.1	20191221
64+5:0:10	6.1	20191228
65Index: dist.mk
66Prereq:  1.1320
67--- ncurses-6.1-20191221+/dist.mk	2019-12-21 11:16:12.000000000 +0000
68+++ ncurses-6.1-20191228/dist.mk	2019-12-28 15:45:41.000000000 +0000
69@@ -25,7 +25,7 @@
70 # use or other dealings in this Software without prior written               #
71 # authorization.                                                             #
72 ##############################################################################
73-# $Id: dist.mk,v 1.1320 2019/12/21 11:16:12 tom Exp $
74+# $Id: dist.mk,v 1.1321 2019/12/28 15:45:41 tom Exp $
75 # Makefile for creating ncurses distributions.
76 #
77 # This only needs to be used directly as a makefile by developers, but
78@@ -37,7 +37,7 @@
79 # These define the major/minor/patch versions of ncurses.
80 NCURSES_MAJOR = 6
81 NCURSES_MINOR = 1
82-NCURSES_PATCH = 20191221
83+NCURSES_PATCH = 20191228
84
85 # We don't append the patch to the version, since this only applies to releases
86 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
87Index: misc/gen-pkgconfig.in
88Prereq:  1.40
89--- ncurses-6.1-20191221+/misc/gen-pkgconfig.in	2019-10-12 22:27:10.000000000 +0000
90+++ ncurses-6.1-20191228/misc/gen-pkgconfig.in	2019-12-25 23:09:13.000000000 +0000
91@@ -1,5 +1,5 @@
92 #!@SHELL@
93-# $Id: gen-pkgconfig.in,v 1.40 2019/10/12 22:27:10 tom Exp $
94+# $Id: gen-pkgconfig.in,v 1.42 2019/12/25 23:09:13 tom Exp $
95 ##############################################################################
96 # Copyright (c) 2009-2018,2019 Free Software Foundation, Inc.                #
97 #                                                                            #
98@@ -46,8 +46,6 @@
99 DFT_DEP_SUFFIX=@DFT_DEP_SUFFIX@
100 TINFO_ARG_SUFFIX=@TINFO_ARG_SUFFIX@
101 CXX_LIB_SUFFIX=@CXX_LIB_SUFFIX@
102-RPATH_LIST=@RPATH_LIST@
103-PRIVATE_LIBS="@PRIVATE_LIBS@"
104
105 suffix=@PC_MODULE_SUFFIX@
106 prefix="@prefix@"
107@@ -55,6 +53,9 @@
108 includedir="@includedir@@includesubdir@"
109 libdir="@libdir@"
110
111+RPATH_LIST=@RPATH_LIST@
112+PRIVATE_LIBS="@PRIVATE_LIBS@"
113+
114 show_prefix='@prefix@'
115 show_exec_prefix='@exec_prefix@'
116 show_includedir='@includedir@@includesubdir@'
117@@ -84,6 +85,9 @@
118 	-l*) # LIBS is handled specially below
119 		continue
120 		;;
121+	-specs*) # ignore linker specs-files which were used to build library
122+		continue
123+		;;
124 	-Wl,-z,*) # ignore flags used to manipulate shared image
125 		continue
126 		;;
127Index: misc/ncurses-config.in
128Prereq:  1.41
129--- ncurses-6.1-20191221+/misc/ncurses-config.in	2019-10-12 21:25:17.000000000 +0000
130+++ ncurses-6.1-20191228/misc/ncurses-config.in	2019-12-25 00:54:55.000000000 +0000
131@@ -1,5 +1,5 @@
132 #!@SHELL@
133-# $Id: ncurses-config.in,v 1.41 2019/10/12 21:25:17 tom Exp $
134+# $Id: ncurses-config.in,v 1.42 2019/12/25 00:54:55 tom Exp $
135 ##############################################################################
136 # Copyright (c) 2006-2018,2019 Free Software Foundation, Inc.                #
137 #                                                                            #
138@@ -103,6 +103,9 @@
139 for opt in -L$libdir @LDFLAGS@ @EXTRA_LDFLAGS@ $LIBS
140 do
141 	case $opt in
142+	-specs*) # ignore linker specs-files which were used to build library
143+		continue
144+		;;
145 	-Wl,-z,*) # ignore flags used to manipulate shared image
146 		continue
147 		;;
148Index: package/debian-mingw/changelog
149--- ncurses-6.1-20191221+/package/debian-mingw/changelog	2019-12-21 11:16:12.000000000 +0000
150+++ ncurses-6.1-20191228/package/debian-mingw/changelog	2019-12-28 15:45:41.000000000 +0000
151@@ -1,8 +1,8 @@
152-ncurses6 (6.1+20191221) unstable; urgency=low
153+ncurses6 (6.1+20191228) unstable; urgency=low
154
155   * latest weekly patch
156
157- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 21 Dec 2019 06:16:12 -0500
158+ -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 24 Dec 2019 06:02:28 -0500
159
160 ncurses6 (5.9-20131005) unstable; urgency=low
161
162Index: package/debian-mingw64/changelog
163--- ncurses-6.1-20191221+/package/debian-mingw64/changelog	2019-12-21 11:16:12.000000000 +0000
164+++ ncurses-6.1-20191228/package/debian-mingw64/changelog	2019-12-28 15:45:41.000000000 +0000
165@@ -1,8 +1,8 @@
166-ncurses6 (6.1+20191221) unstable; urgency=low
167+ncurses6 (6.1+20191228) unstable; urgency=low
168
169   * latest weekly patch
170
171- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 21 Dec 2019 06:16:12 -0500
172+ -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 24 Dec 2019 06:02:28 -0500
173
174 ncurses6 (5.9-20131005) unstable; urgency=low
175
176Index: package/debian/changelog
177--- ncurses-6.1-20191221+/package/debian/changelog	2019-12-21 11:16:12.000000000 +0000
178+++ ncurses-6.1-20191228/package/debian/changelog	2019-12-28 15:45:41.000000000 +0000
179@@ -1,8 +1,8 @@
180-ncurses6 (6.1+20191221) unstable; urgency=low
181+ncurses6 (6.1+20191228) unstable; urgency=low
182
183   * latest weekly patch
184
185- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 21 Dec 2019 06:16:12 -0500
186+ -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 24 Dec 2019 06:02:28 -0500
187
188 ncurses6 (5.9-20120608) unstable; urgency=low
189
190Index: package/mingw-ncurses.nsi
191Prereq:  1.366
192--- ncurses-6.1-20191221+/package/mingw-ncurses.nsi	2019-12-21 11:16:12.000000000 +0000
193+++ ncurses-6.1-20191228/package/mingw-ncurses.nsi	2019-12-24 11:02:28.000000000 +0000
194@@ -1,4 +1,4 @@
195-; $Id: mingw-ncurses.nsi,v 1.366 2019/12/21 11:16:12 tom Exp $
196+; $Id: mingw-ncurses.nsi,v 1.367 2019/12/24 11:02:28 tom Exp $
197
198 ; TODO add examples
199 ; TODO bump ABI to 6
200@@ -10,7 +10,7 @@
201 !define VERSION_MAJOR "6"
202 !define VERSION_MINOR "1"
203 !define VERSION_YYYY  "2019"
204-!define VERSION_MMDD  "1221"
205+!define VERSION_MMDD  "1228"
206 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
207
208 !define MY_ABI   "5"
209Index: package/mingw-ncurses.spec
210--- ncurses-6.1-20191221+/package/mingw-ncurses.spec	2019-12-21 11:16:12.000000000 +0000
211+++ ncurses-6.1-20191228/package/mingw-ncurses.spec	2019-12-24 11:02:28.000000000 +0000
212@@ -3,7 +3,7 @@
213 Summary: shared libraries for terminal handling
214 Name: mingw32-ncurses6
215 Version: 6.1
216-Release: 20191221
217+Release: 20191228
218 License: X11
219 Group: Development/Libraries
220 Source: ncurses-%{version}-%{release}.tgz
221Index: package/ncurses.spec
222--- ncurses-6.1-20191221+/package/ncurses.spec	2019-12-21 11:16:12.000000000 +0000
223+++ ncurses-6.1-20191228/package/ncurses.spec	2019-12-24 14:48:17.000000000 +0000
224@@ -1,15 +1,12 @@
225 Summary: shared libraries for terminal handling
226 Name: ncurses6
227 Version: 6.1
228-Release: 20191221
229+Release: 20191228
230 License: X11
231 Group: Development/Libraries
232 Source: ncurses-%{version}-%{release}.tgz
233 # URL: https://invisible-island.net/ncurses/
234
235-%define CC_NORMAL -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
236-%define CC_STRICT %{CC_NORMAL} -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
237-
238 %global MY_ABI 6
239
240 # save value before redefining
241@@ -33,8 +30,11 @@
242 %global is_redhat   %(test -f /etc/redhat-release && echo 1 || echo 0)
243 %global is_suse     %(test -f /etc/SuSE-release && echo 1 || echo 0)
244
245-# nor are debug-symbols
246+%if %{is_redhat}
247+# generate debug/debug-source packages.
248+%else
249 %define debug_package %{nil}
250+%endif
251
252 %if %{is_mandriva}
253 %define _disable_ld_as_needed 1
254@@ -100,8 +100,6 @@
255 	--without-debug \\\
256 	--without-normal
257
258-CFLAGS="%{CC_NORMAL}" \
259-RPATH_LIST=../lib:%{_libdir} \
260 %configure %{CFG_OPTS}
261
262 make
263@@ -113,6 +111,11 @@
264 rm -f test/ncurses
265 ( cd test && make ncurses LOCAL_LIBDIR=%{_libdir} && mv ncurses $RPM_BUILD_ROOT/%{_bindir}/ncurses%{MY_ABI} )
266
267+%if %{is_redhat}
268+%ldconfig_scriptlets libs
269+%ldconfig_scriptlets c++-libs
270+%endif
271+
272 %clean
273 if rm -rf $RPM_BUILD_ROOT; then
274   echo OK
275@@ -129,6 +132,11 @@
276
277 %changelog
278
279+* Tue Dec 24 2019 Thomas Dickey
280+- drop custom CC_NORMAL warning flags because setting CFLAGS interferes with
281+  matching Fedora's PIE/PIC configuration.  Also, generate debug/debug-source
282+  packages.
283+
284 * Sat Nov 16 2019 Thomas Dickey
285 - modify clean-rule to work around Fedora NFS bugs.
286
287Index: package/ncursest.spec
288--- ncurses-6.1-20191221+/package/ncursest.spec	2019-12-21 11:16:12.000000000 +0000
289+++ ncurses-6.1-20191228/package/ncursest.spec	2019-12-24 14:59:53.000000000 +0000
290@@ -1,15 +1,12 @@
291 Summary: Curses library with POSIX thread support.
292 Name: ncursest6
293 Version: 6.1
294-Release: 20191221
295+Release: 20191228
296 License: X11
297 Group: Development/Libraries
298 Source: ncurses-%{version}-%{release}.tgz
299 # URL: https://invisible-island.net/ncurses/
300
301-%define CC_NORMAL -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
302-%define CC_STRICT %{CC_NORMAL} -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
303-
304 %global MY_ABI 6
305
306 # save value before redefining
307@@ -33,8 +30,11 @@
308 %global is_redhat   %(test -f /etc/redhat-release && echo 1 || echo 0)
309 %global is_suse     %(test -f /etc/SuSE-release && echo 1 || echo 0)
310
311-# nor are debug-symbols
312+%if %{is_redhat}
313+# generate debug/debug-source packages.
314+%else
315 %define debug_package %{nil}
316+%endif
317
318 %if %{is_mandriva}
319 %define _disable_ld_as_needed 1
320@@ -54,7 +54,6 @@
321 %setup -q -n ncurses-%{version}-%{release}
322
323 %build
324-%define my_srcdir ..
325 %define CFG_OPTS \\\
326 	--target %{_target_platform} \\\
327 	--prefix=%{_prefix} \\\
328@@ -101,8 +100,6 @@
329 	--without-debug \\\
330 	--without-normal
331
332-CFLAGS="%{CC_NORMAL}" \
333-RPATH_LIST=../lib:%{_libdir} \
334 %configure %{CFG_OPTS} \
335 	--enable-interop \
336 	--enable-sp-funcs \
337@@ -117,6 +114,11 @@
338 rm -f test/ncurses
339 ( cd test && make ncurses LOCAL_LIBDIR=%{_libdir} && mv ncurses $RPM_BUILD_ROOT/%{_bindir}/ncursest%{MY_ABI} )
340
341+%if %{is_redhat}
342+%ldconfig_scriptlets libs
343+%ldconfig_scriptlets c++-libs
344+%endif
345+
346 %clean
347 if rm -rf $RPM_BUILD_ROOT; then
348   echo OK
349@@ -133,6 +135,11 @@
350
351 %changelog
352
353+* Tue Dec 24 2019 Thomas Dickey
354+- drop custom CC_NORMAL warning flags because setting CFLAGS interferes with
355+  matching Fedora's PIE/PIC configuration.  Also, generate debug/debug-source
356+  packages.
357+
358 * Sat Nov 16 2019 Thomas Dickey
359 - modify clean-rule to work around Fedora NFS bugs.
360
361