From 099e074d85a9bf313e5c34e0897fdd2d10015654af339b950da8643d2efdac3a Mon Sep 17 00:00:00 2001
From: "Dr. Werner Fink" <werner@suse.com>
Date: Mon, 2 Dec 2019 08:40:47 +0000
Subject: [PATCH 1/6] Update to 6.1-20191130

OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=456
---
 ncurses-6.1-patches.tar.bz2 |  4 ++--
 ncurses.changes             | 28 ++++++++++++++++++++++++++++
 ncurses.spec                | 18 +++++++++++-------
 3 files changed, 41 insertions(+), 9 deletions(-)

diff --git a/ncurses-6.1-patches.tar.bz2 b/ncurses-6.1-patches.tar.bz2
index cfc8128..0a3d80d 100644
--- a/ncurses-6.1-patches.tar.bz2
+++ b/ncurses-6.1-patches.tar.bz2
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:8ee2ee0f06f6451c52134856dc66a08375150a95234937b420e4ed29e9f2103e
-size 1907702
+oid sha256:09709a8087e69e620acfaaa70d7e8e6299a8f36ed7a7c795e1670f50cbe5735e
+size 1932814
diff --git a/ncurses.changes b/ncurses.changes
index f718de1..207337d 100644
--- a/ncurses.changes
+++ b/ncurses.changes
@@ -1,3 +1,31 @@
+-------------------------------------------------------------------
+Mon Dec  2 08:39:17 UTC 2019 - Dr. Werner Fink <werner@suse.de>
+
+- Add ncurses patch 20191130
+  + add portability section to curs_getcchar manpage (prompted by
+    discussion with Nick Black).
+  + improve portability discussion of ACS characters in curs_addch
+    manpage.
+  + improve typography for double-quotes in manpages.
+
+-------------------------------------------------------------------
+Mon Nov 25 09:47:00 UTC 2019 - Dr. Werner Fink <werner@suse.de>
+
+- Add ncurses patch 20191123
+  + fix typo for MinGW rpm test-package.
+  + workaround in rpm specs for NFS problems in Fedora 31.
+
+-------------------------------------------------------------------
+Mon Nov 18 07:52:56 UTC 2019 - Dr. Werner Fink <werner@suse.de>
+
+- Add ncurses patch 20191116
+  + modify ncurses/Makefile.in to fix a case where Debian/testing changes
+    to the ld --as-needed configuration broke ncurses-examples test
+    packages.
+  + drop library-dependency on psapi for MinGW port, since win_driver.c
+    defines PSAPI_VERSION to 2, making it use GetProcessImageFileName
+    from kernel32.dll (prompted by patch by Simon Sobish, cf: 20140503).
+
 -------------------------------------------------------------------
 Fri Nov 15 13:15:43 UTC 2019 - Dr. Werner Fink <werner@suse.de>
 
diff --git a/ncurses.spec b/ncurses.spec
index 97d84ad..82781fc 100644
--- a/ncurses.spec
+++ b/ncurses.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package ncurses
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -629,11 +629,13 @@ mv tack-* tack
     # Make the test suite for ncursesw6
     #
     pushd test
-	CFLAGS="$CFLAGS -I%{root}%{_incdir}" LDFLAGS="$LDFLAGS -Wl,-rpath-link=%{root}%{_libdir} -L%{root}%{_libdir}" \
+	CFLAGS="$CFLAGS -I%{root}%{_incdir}/ncursesw/ -I%{root}%{_incdir}/" \
+	LDFLAGS="$LDFLAGS -Wl,-rpath-link=%{root}%{_libdir} -L%{root}%{_libdir}" \
+	LIBS="$LDFLAGS" \
 	./configure --with-ncursesw --enable-widec --prefix=$PWD
 	LD_LIBRARY_PATH=%{root}%{_libdir} \
-	make %{?_smp_mflags} TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed'
-	make install TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed'
+	make %{?_smp_mflags} TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed' TEST_LIBS='-lutil -lpthread'
+	make install TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed' TEST_LIBS='-lutil -lpthread'
 	mv bin binw
 	make distclean
     popd
@@ -769,11 +771,13 @@ mv tack-* tack
     # Make the test suite for ncurses6
     #
     pushd test
-	CFLAGS="$CFLAGS -I%{root}%{_incdir}" LDFLAGS="$LDFLAGS -Wl,-rpath-link=%{root}%{_libdir} -L%{root}%{_libdir}" \
+	CFLAGS="$CFLAGS -I%{root}%{_incdir}ncurses/ -I%{root}%{_incdir}/" \
+	LDFLAGS="$LDFLAGS -Wl,-rpath-link=%{root}%{_libdir} -L%{root}%{_libdir}" \
+	LIBS="$LDFLAGS" \
 	./configure --with-ncurses --disable-widec --prefix=$PWD
 	LD_LIBRARY_PATH=%{root}%{_libdir} \
-	make %{?_smp_mflags} TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed'
-	make install TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed'
+	make %{?_smp_mflags} TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed' TEST_LIBS='-lutil -lpthread'
+	make install TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed' TEST_LIBS='-lutil -lpthread'
 	make distclean
     popd
 %endif

From e63774fa2eb298ab2d1c5ebdb8e3f05b26ab24e08a0a16ee746684d51a9c1ff1 Mon Sep 17 00:00:00 2001
From: "Dr. Werner Fink" <werner@suse.com>
Date: Thu, 12 Dec 2019 06:38:40 +0000
Subject: [PATCH 2/6] Update to 6.1-20191207

OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=457
---
 ncurses-6.1-patches.tar.bz2 | 4 ++--
 ncurses.changes             | 7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ncurses-6.1-patches.tar.bz2 b/ncurses-6.1-patches.tar.bz2
index 0a3d80d..12b73b5 100644
--- a/ncurses-6.1-patches.tar.bz2
+++ b/ncurses-6.1-patches.tar.bz2
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:09709a8087e69e620acfaaa70d7e8e6299a8f36ed7a7c795e1670f50cbe5735e
-size 1932814
+oid sha256:a4c755271dae9f6e710be26ab7ed78a7d60bcf2d6b2e4d627d83fc7712a61ade
+size 1942122
diff --git a/ncurses.changes b/ncurses.changes
index 207337d..79b7fae 100644
--- a/ncurses.changes
+++ b/ncurses.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Thu Dec 12 06:37:06 UTC 2019 - Dr. Werner Fink <werner@suse.de>
+
+- Add ncurses patch 20191207
+  + fix a few warnings for test-package builds
+  + add curses_trace(), to replace trace().
+
 -------------------------------------------------------------------
 Mon Dec  2 08:39:17 UTC 2019 - Dr. Werner Fink <werner@suse.de>
 

From 83c1b6075da26cb2fcab89c007508fc9ce564872abdc073b016775d5cbcece9c Mon Sep 17 00:00:00 2001
From: "Dr. Werner Fink" <werner@suse.com>
Date: Mon, 16 Dec 2019 10:34:37 +0000
Subject: [PATCH 3/6] Avoid private requirement due (lib)tinfo is used for
 both, normal and wide

OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=458
---
 handle.linux                | 28 ++++++++++++++--------------
 ncurses-6.1-patches.tar.bz2 |  4 ++--
 ncurses.changes             | 14 ++++++++++++++
 ncurses.spec                | 31 +++++++------------------------
 4 files changed, 37 insertions(+), 40 deletions(-)

diff --git a/handle.linux b/handle.linux
index 6a7db13..6e91689 100644
--- a/handle.linux
+++ b/handle.linux
@@ -17,10 +17,10 @@ ed=
 declare -i line=0
 
 if test -r run_cmd.sh ; then
-    function tc { sh run_cmd.sh $BUILD_TIC -U -C -r ${1+"$@"}; }
+    function tc { sh run_cmd.sh $BUILD_TIC -0 -U -C -r ${1+"$@"}; }
     function ic { sh run_cmd.sh $BUILD_INFOCMP -A $TERMINFO ${1+"$@"}; }
 else
-    function tc { $BUILD_TIC -U -C -r ${1+"$@"}; }
+    function tc { $BUILD_TIC -0 -U -C -r ${1+"$@"}; }
     function ic { $BUILD_INFOCMP -A $TERMINFO ${1+"$@"}; }
 fi
 
@@ -45,35 +45,35 @@ for l in $(grep '^linux' $TERMCAP); do
 
     entry="$(tc $tmp2 | grep -v '^#')"
 
-    new=$(echo "$entry" | sed -e '/:a[el]=.*/a\
-	:ac=' | sed -e "s/\t:ac=/${acsc//\\/\\\\}\\\\/")
+    new=$(echo "$entry" | sed -e '\:a[el]=.*a\
+	:ac=' | sed -e "s\t:ac=${acsc//\\/\\\\}\\\\")
     new=$(echo "$new" | sed -e '/:a[el]=.*/i\
-	:S2=' | sed -e "s/\t:S2=/${mpch//\\/\\\\}\\\\/")
-    new=$(echo "$new" | sed -e '/:s.=.*/i\
-	:\.\.sa=' | sed -e "s/\t:\.\.sa=/${sgr//\\/\\\\}\\\\/")
+	:S2=' | sed -e "s\t:S2=${mpch//\\/\\\\}\\\\")
+    new=$(echo "$new" | sed -e '\:s.=.*i\
+	:\.\.sa=' | sed -e "s\t:\.\.sa=${sgr//\\/\\\\}\\\\")
 
     if test "${#new}" -gt 1024 ; then
-	new=$(echo "$entry" | sed -e '/\t:a[el]=.*/a\
-	:ac=' | sed -e "s/\t:ac=/${acsc//\\/\\\\}\\\\/")
+	new=$(echo "$entry" | sed -e '\\t:a[el]=.*a\
+	:ac=' | sed -e "s\t:ac=${acsc//\\/\\\\}\\\\")
 	new=$(echo "$new" | sed -e '/\t:a[el]=.*/i\
-	:S2=' | sed -e "s/\t:S2=/${mpch//\\/\\\\}\\\\/")
+	:S2=' | sed -e "s\t:S2=${mpch//\\/\\\\}\\\\")
     fi
 
     if test "${#new}" -gt 1024 ; then
-	new=$(echo "$entry" | sed -e '/\t:a[el]=.*/i\
-	:S2=' | sed -e "s/\t:S2=/${mpch//\\/\\\\}\\\\/")
+	new=$(echo "$entry" | sed -e '\\t:a[el]=.*i\
+	:S2=' | sed -e "s\t:S2=${mpch//\\/\\\\}\\\\")
     fi
 
     if test "${#new}" -gt 1024 ; then
 	new="$entry"
     fi
 
-    line=$(grep -n "${l//\\/\\\\}" ${TERMCAP##*/}.new| sed 's/:.*//')
+    line=$(grep -n "${l//\\/\\\\}" ${TERMCAP##*/}.new| sed 's:.*')
     : $((line--))
     echo "$entry" > $tmp1
     echo "$new"   > $tmp2
 
-    ed=$(diff -e $tmp1 $tmp2| sed "s/^\([0-9]\+a\)/$line\n+\1/")
+    ed=$(diff -e $tmp1 $tmp2| sed "s^\([0-9]\+a\)$line\n+\1")
 
     ed ${TERMCAP##*/}.new &> /dev/null <<-EOF
 	${ed}
diff --git a/ncurses-6.1-patches.tar.bz2 b/ncurses-6.1-patches.tar.bz2
index 12b73b5..dde0ac1 100644
--- a/ncurses-6.1-patches.tar.bz2
+++ b/ncurses-6.1-patches.tar.bz2
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:a4c755271dae9f6e710be26ab7ed78a7d60bcf2d6b2e4d627d83fc7712a61ade
-size 1942122
+oid sha256:bb4b81383f1f2882930cba31b77e17f42b31c535f3fe3608bb53e07badf6154e
+size 1949169
diff --git a/ncurses.changes b/ncurses.changes
index 79b7fae..052cf5d 100644
--- a/ncurses.changes
+++ b/ncurses.changes
@@ -1,3 +1,17 @@
+-------------------------------------------------------------------
+Mon Dec 16 10:15:37 UTC 2019 - Dr. Werner Fink <werner@suse.de>
+
+- Also remove private requirements as (lib)tinfo are binary
+  compatible with normal and wide version of (lib)ncurses
+
+-------------------------------------------------------------------
+Mon Dec 16 09:09:31 UTC 2019 - Dr. Werner Fink <werner@suse.de>
+
+- Add ncurses patch 20191214
+  + add exit_curses() and exit_terminfo() to replace internal symbols for
+    leak-checking.
+- Let helper script handle.linux call sed command smart
+
 -------------------------------------------------------------------
 Thu Dec 12 06:37:06 UTC 2019 - Dr. Werner Fink <werner@suse.de>
 
diff --git a/ncurses.spec b/ncurses.spec
index 82781fc..9375206 100644
--- a/ncurses.spec
+++ b/ncurses.spec
@@ -602,13 +602,10 @@ mv tack-* tack
     rm -vf %{root}%{_libdir}/pkgconfig/tic.pc
     rm -vf %{root}%{_libdir}/pkgconfig/tinfo.pc
     mv -vf %{root}%{_libdir}/pkgconfig/*.pc pc/
-    sed -ri 's@^(Requires.private: ).*@\1panelw, menuw, formw, ncursesw, tinfo@' \
-								pc/ncurses++w.pc
-    sed -ri 's@^(Requires.private: ).*@\1ncursesw, tinfo@'      pc/{form,menu,panel}w.pc
-    sed -ri 's@^(Libs.private: .*)@\1 -lncursesw -ltinfo -ldl@' pc/{form,menu,panel}w.pc
-
+    sed -ri 's@^(Requires.private:).*@\1@'  pc/*.pc
     sh %{S:6} --cflags "$(pkg-config --cflags ncursesw)" --libs "$(pkg-config --libs ncursesw)" \
 	%{root}%{_bindir}/ncursesw6-config
+
     #
     # Some tests
     #
@@ -695,14 +692,9 @@ mv tack-* tack
 	sed -ri 's@^(libdir=).*@\1%{_libdir}/ncurses5@' "$pc"
 	sed -ri 's@^(Libs: )(.*)@\1-L${libdir}\2@' "$pc"
 	mv -f $pc pc/${base}5.pc
+	sed -ri 's@^(Cflags:.*)@\1-I%{_incdir}/ncurses5 @' pc/${base}5.pc
+	sed -ri 's@^(Requires.private:).*@\1@'             pc/${base}5.pc
     done
-    sed -ri 's@^(Requires.private: ).*@\1panel5, menu5, form5, ncurses5, tinfo5@' \
-								pc/ncurses++5.pc
-    sed -ri 's@^(Requires.private: ).*@\1ncurses5, tinfo5@'     pc/{form,menu,panel}5.pc
-    sed -ri 's@^(Libs.private: .*)@\1 -lncurses -ltinfo -ldl@'  pc/{form,menu,panel}5.pc
-    sed -ri 's@^(Requires.private: ).*@\1tinfo5@'               pc/tic5.pc
-    sed -ri 's@^(Libs.private: .*)@\1 -ltinfo@'                 pc/tic5.pc
-
     sh %{S:6} --cflags "$(pkg-config --cflags ncurses5)" --libs "$(pkg-config --libs ncurses5)" \
 	%{root}%{_bindir}/ncurses5-config
 
@@ -752,13 +744,7 @@ mv tack-* tack
 	sh ../edit_man.sh normal installing %{root}%{_mandir} . ncurses6-config.1
     popd
     mv -f %{root}%{_libdir}/pkgconfig/*.pc pc/
-    sed -ri 's@^(Requires.private: ).*@\1panel, menu, form, ncurses, tinfo@' \
-								pc/ncurses++.pc
-    sed -ri 's@^(Requires.private: ).*@\1ncurses, tinfo@'       pc/{form,menu,panel}.pc
-    sed -ri 's@^(Libs.private: .*)@\1 -lncurses -ltinfo -ldl@'  pc/{form,menu,panel}.pc
-    sed -ri 's@^(Requires.private: ).*@\1tinfo@'                pc/tic.pc
-    sed -ri 's@^(Libs.private: .*)@\1 -ltinfo@'                 pc/tic.pc
-
+    sed -ri 's@^(Requires.private:).*@\1@' pc/*.pc
     sh %{S:6} --cflags "$(pkg-config --cflags ncurses)" --libs "$(pkg-config --libs ncurses)" \
 	%{root}%{_bindir}/ncurses6-config
     #
@@ -843,12 +829,9 @@ mv tack-* tack
 	sed -ri 's@^(libdir=).*@\1%{_libdir}/ncurses5@' "$pc"
 	sed -ri 's@^(Libs: )(.*)@\1-L${libdir}\2@' "$pc"
 	mv -f $pc pc/${base}5.pc
+	sed -ri 's@^(Cflags:.*)@\1-I%{_incdir}/ncurses5 @' pc/${base}5.pc
+	sed -ri 's@^(Requires.private:).*@\1@'             pc/${base}5.pc
     done
-    sed -ri 's@^(Requires.private: ).*@\1panelw5, menuw5, formw5, ncursesw5, tinfo5@' \
-								pc/ncurses++w5.pc
-    sed -ri 's@^(Requires.private: ).*@\1ncursesw5, tinfo5@'    pc/{form,menu,panel}w5.pc
-    sed -ri 's@^(Libs.private: .*)@\1 -lncursesw -ltinfo -ldl@' pc/{form,menu,panel}w5.pc
-
     sh %{S:6} --cflags "$(pkg-config --cflags ncursesw5)" --libs "$(pkg-config --libs ncursesw5)" \
 	%{root}%{_bindir}/ncursesw5-config
 

From 12696e09fbb2a4f4627f865d47d5a67f9964e7b636d2c86250f2c16a1fd066b7 Mon Sep 17 00:00:00 2001
From: "Dr. Werner Fink" <werner@suse.com>
Date: Tue, 17 Dec 2019 09:05:36 +0000
Subject: [PATCH 4/6] Addd missing space between two include options for ABI 5
 package configuration

OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=459
---
 ncurses.changes |  6 ++++++
 ncurses.spec    | 14 +++++++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/ncurses.changes b/ncurses.changes
index 052cf5d..feea317 100644
--- a/ncurses.changes
+++ b/ncurses.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Tue Dec 17 09:03:41 UTC 2019 - Dr. Werner Fink <werner@suse.de>
+
+- Addd missing space between two include options for ABI 5
+  package configuration 
+
 -------------------------------------------------------------------
 Mon Dec 16 10:15:37 UTC 2019 - Dr. Werner Fink <werner@suse.de>
 
diff --git a/ncurses.spec b/ncurses.spec
index 9375206..9d7b516 100644
--- a/ncurses.spec
+++ b/ncurses.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package ncurses
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2019 SUSE LLC.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -688,11 +688,13 @@ mv tack-* tack
 	test -e "$pc" || break
 	base=${pc%%.pc}
 	base=${base##*/}
-	sed -ri 's@^(includedir=).*@\1%{_incdir}/ncurses5/ncurses@' "$pc"
+	sed -ri '\@includedir=@i\
+includedir5=%{_incdir}/ncurses5' "$pc"
+	sed -ri 's@^(includedir=).*@\1${includedir5}/ncurses@' "$pc"
 	sed -ri 's@^(libdir=).*@\1%{_libdir}/ncurses5@' "$pc"
 	sed -ri 's@^(Libs: )(.*)@\1-L${libdir}\2@' "$pc"
 	mv -f $pc pc/${base}5.pc
-	sed -ri 's@^(Cflags:.*)@\1-I%{_incdir}/ncurses5 @' pc/${base}5.pc
+	sed -ri 's@^(Cflags:.*)(-I.*)@\1-I${includedir5} \2@' pc/${base}5.pc
 	sed -ri 's@^(Requires.private:).*@\1@'             pc/${base}5.pc
     done
     sh %{S:6} --cflags "$(pkg-config --cflags ncurses5)" --libs "$(pkg-config --libs ncurses5)" \
@@ -825,11 +827,13 @@ mv tack-* tack
 	test -e "$pc" || break
 	base=${pc%%.pc}
 	base=${base##*/}
-	sed -ri 's@^(includedir=).*@\1%{_incdir}/ncurses5/ncursesw@' "$pc"
+	sed -ri '\@includedir=@i\
+includedir5=%{_incdir}/ncurses5' "$pc"
+	sed -ri 's@^(includedir=).*@\1${includedir5}/ncurses@' "$pc"
 	sed -ri 's@^(libdir=).*@\1%{_libdir}/ncurses5@' "$pc"
 	sed -ri 's@^(Libs: )(.*)@\1-L${libdir}\2@' "$pc"
 	mv -f $pc pc/${base}5.pc
-	sed -ri 's@^(Cflags:.*)@\1-I%{_incdir}/ncurses5 @' pc/${base}5.pc
+	sed -ri 's@^(Cflags:.*)(-I.*)@\1-I${includedir5} \2@' pc/${base}5.pc
 	sed -ri 's@^(Requires.private:).*@\1@'             pc/${base}5.pc
     done
     sh %{S:6} --cflags "$(pkg-config --cflags ncursesw5)" --libs "$(pkg-config --libs ncursesw5)" \

From af18c868b826e77fb258e1eec4fd9d650bf806b1d332a8831140364fe0973c71 Mon Sep 17 00:00:00 2001
From: "Dr. Werner Fink" <werner@suse.com>
Date: Wed, 18 Dec 2019 11:06:04 +0000
Subject: [PATCH 5/6] Work around missing defintion of GSS_NORETURN

OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=460
---
 ncurses.changes           |  6 ++++++
 ncurses.spec              |  2 ++
 workaround-20191214.patch | 16 ++++++++++++++++
 3 files changed, 24 insertions(+)
 create mode 100644 workaround-20191214.patch

diff --git a/ncurses.changes b/ncurses.changes
index feea317..bfb1e98 100644
--- a/ncurses.changes
+++ b/ncurses.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Wed Dec 18 09:25:48 UTC 2019 - Dr. Werner Fink <werner@suse.de>
+
+- Add temporary patch workaround-20191214.patch to add missed
+  declaration of GCC_NORETURN in term.h
+
 -------------------------------------------------------------------
 Tue Dec 17 09:03:41 UTC 2019 - Dr. Werner Fink <werner@suse.de>
 
diff --git a/ncurses.spec b/ncurses.spec
index 9d7b516..309090e 100644
--- a/ncurses.spec
+++ b/ncurses.spec
@@ -75,6 +75,7 @@ Source7:        baselibs.conf
 Patch0:         ncurses-6.1.dif
 Patch1:         ncurses-5.9-ibm327x.dif
 Patch2:         ncurses-5.7-tack.dif
+Patch3:         workaround-20191214.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %global         _miscdir    %{_datadir}/misc
 %global         _incdir     %{_includedir}
@@ -311,6 +312,7 @@ tar -xzf %{S:5}
 mv tack-* tack
 %patch1 -p0 -b .327x
 %patch2 -p0 -b .hs
+%patch3 -p0 -b .workaround
 %patch0 -p0 -b .p0
 
 %build
diff --git a/workaround-20191214.patch b/workaround-20191214.patch
new file mode 100644
index 0000000..c3dffbf
--- /dev/null
+++ b/workaround-20191214.patch
@@ -0,0 +1,16 @@
+---
+ include/MKterm.h.awk.in |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- include/MKterm.h.awk.in
++++ include/MKterm.h.awk.in	2019-12-18 09:23:20.480600045 +0000
+@@ -376,6 +376,9 @@ END {
+ 	print  "/*"
+ 	print  " * Debugging features."
+ 	print  " */"
++	print  "#ifndef GCC_NORETURN"
++	print  "#define GCC_NORETURN /* nothing */"
++	print  "#endif"
+ 	print  "extern NCURSES_EXPORT(void)    exit_terminfo(int) GCC_NORETURN;"
+ 	print  ""
+ 	print  "#ifdef __cplusplus"

From 430a08e4094451e804b0f4a2687577ba73b444048a227bb0631d24343de2616c Mon Sep 17 00:00:00 2001
From: "Dr. Werner Fink" <werner@suse.com>
Date: Tue, 7 Jan 2020 09:48:33 +0000
Subject: [PATCH 6/6] Update to 6.1-20200104

OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=461
---
 ncurses-6.1-patches.tar.bz2 |  4 ++--
 ncurses-6.1.dif             | 48 ++++++++++++++++++-------------------
 ncurses.changes             | 35 +++++++++++++++++++++++++++
 ncurses.spec                |  6 ++---
 workaround-20191214.patch   | 16 -------------
 5 files changed, 63 insertions(+), 46 deletions(-)
 delete mode 100644 workaround-20191214.patch

diff --git a/ncurses-6.1-patches.tar.bz2 b/ncurses-6.1-patches.tar.bz2
index dde0ac1..ce6a5c2 100644
--- a/ncurses-6.1-patches.tar.bz2
+++ b/ncurses-6.1-patches.tar.bz2
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:bb4b81383f1f2882930cba31b77e17f42b31c535f3fe3608bb53e07badf6154e
-size 1949169
+oid sha256:b58c0c1f395e26837ef5ac61108bfd63cb57f5be2ed1207b5099492d7773f11a
+size 2033554
diff --git a/ncurses-6.1.dif b/ncurses-6.1.dif
index fff0af1..878c44d 100644
--- a/ncurses-6.1.dif
+++ b/ncurses-6.1.dif
@@ -31,7 +31,7 @@
  #include <stdio.h>
  
  #if defined(__cplusplus)
-@@ -5279,12 +5279,15 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -5280,12 +5280,15 @@ cat >>$cf_edit_man <<CF_EOF
  		echo '? missing rename for '\$cf_source
  		cf_target="\$cf_source"
  	fi
@@ -49,7 +49,7 @@
  	sed	-f $cf_man_alias \\
  CF_EOF
  
-@@ -5294,7 +5297,7 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -5295,7 +5298,7 @@ cat >>$cf_edit_man <<CF_EOF
  CF_EOF
  else
  cat >>$cf_edit_man <<CF_EOF
@@ -58,7 +58,7 @@
  CF_EOF
  fi
  
-@@ -5334,7 +5337,7 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -5335,7 +5338,7 @@ cat >>$cf_edit_man <<CF_EOF
  		mv \$TMP.$cf_so_strip \$TMP
  	fi
  	fi
@@ -67,7 +67,7 @@
  CF_EOF
  fi
  
-@@ -5343,23 +5346,23 @@ case "$MANPAGE_FORMAT" in
+@@ -5344,23 +5347,23 @@ case "$MANPAGE_FORMAT" in
  cat >>$cf_edit_man <<CF_EOF
  	if test \$form = format ; then
  		# BSDI installs only .0 suffixes in the cat directories
@@ -97,7 +97,7 @@
  				for cf_alias in \$aliases
  				do
  					if test \$section = 1 ; then
-@@ -5368,7 +5371,7 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -5369,7 +5372,7 @@ cat >>$cf_edit_man <<CF_EOF
  
  					if test "$MANPAGE_SYMLINKS" = yes ; then
  						if test -f \$cf_alias\${suffix} ; then
@@ -106,7 +106,7 @@
  							then
  								continue
  							fi
-@@ -5378,18 +5381,18 @@ CF_EOF
+@@ -5379,18 +5382,18 @@ CF_EOF
  case "x$LN_S" in
  (*-f)
  cat >>$cf_edit_man <<CF_EOF
@@ -128,7 +128,7 @@
  						echo ".so \$cf_source" >\$TMP
  CF_EOF
  if test -n "$cf_compress" ; then
-@@ -5409,9 +5412,9 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -5410,9 +5413,9 @@ cat >>$cf_edit_man <<CF_EOF
  			)
  		)
  	elif test \$verb = removing ; then
@@ -141,7 +141,7 @@
  		)
  		test -d \$cf_subdir\${section} &&
  		test -n "\$aliases" && (
-@@ -5431,6 +5434,7 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -5432,6 +5435,7 @@ cat >>$cf_edit_man <<CF_EOF
  #		echo ".hy 0"
  		cat \$TMP
  	fi
@@ -151,7 +151,7 @@
  done
 --- configure
 +++ configure	2019-11-11 09:30:23.210670661 +0000
-@@ -5590,7 +5590,7 @@ echo $ECHO_N "checking for an rpath opti
+@@ -5596,7 +5596,7 @@ echo $ECHO_N "checking for an rpath opti
  		fi
  		;;
  	(linux*|gnu*|k*bsd*-gnu|freebsd*)
@@ -160,7 +160,7 @@
  		;;
  	(openbsd[2-9].*|mirbsd*)
  		LD_RPATH_OPT="-Wl,-rpath,"
-@@ -14076,12 +14076,15 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -14082,12 +14082,15 @@ cat >>$cf_edit_man <<CF_EOF
  		echo '? missing rename for '\$cf_source
  		cf_target="\$cf_source"
  	fi
@@ -178,7 +178,7 @@
  	sed	-f $cf_man_alias \\
  CF_EOF
  
-@@ -14091,7 +14094,7 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -14097,7 +14100,7 @@ cat >>$cf_edit_man <<CF_EOF
  CF_EOF
  else
  cat >>$cf_edit_man <<CF_EOF
@@ -187,7 +187,7 @@
  CF_EOF
  fi
  
-@@ -14131,7 +14134,7 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -14137,7 +14140,7 @@ cat >>$cf_edit_man <<CF_EOF
  		mv \$TMP.$cf_so_strip \$TMP
  	fi
  	fi
@@ -196,7 +196,7 @@
  CF_EOF
  fi
  
-@@ -14140,23 +14143,23 @@ case "$MANPAGE_FORMAT" in
+@@ -14146,23 +14149,23 @@ case "$MANPAGE_FORMAT" in
  cat >>$cf_edit_man <<CF_EOF
  	if test \$form = format ; then
  		# BSDI installs only .0 suffixes in the cat directories
@@ -226,7 +226,7 @@
  				for cf_alias in \$aliases
  				do
  					if test \$section = 1 ; then
-@@ -14165,7 +14168,7 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -14171,7 +14174,7 @@ cat >>$cf_edit_man <<CF_EOF
  
  					if test "$MANPAGE_SYMLINKS" = yes ; then
  						if test -f \$cf_alias\${suffix} ; then
@@ -235,7 +235,7 @@
  							then
  								continue
  							fi
-@@ -14175,18 +14178,18 @@ CF_EOF
+@@ -14181,18 +14184,18 @@ CF_EOF
  case "x$LN_S" in
  (*-f)
  cat >>$cf_edit_man <<CF_EOF
@@ -257,7 +257,7 @@
  						echo ".so \$cf_source" >\$TMP
  CF_EOF
  if test -n "$cf_compress" ; then
-@@ -14206,9 +14209,9 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -14212,9 +14215,9 @@ cat >>$cf_edit_man <<CF_EOF
  			)
  		)
  	elif test \$verb = removing ; then
@@ -270,7 +270,7 @@
  		)
  		test -d \$cf_subdir\${section} &&
  		test -n "\$aliases" && (
-@@ -14228,6 +14231,7 @@ cat >>$cf_edit_man <<CF_EOF
+@@ -14234,6 +14237,7 @@ cat >>$cf_edit_man <<CF_EOF
  #		echo ".hy 0"
  		cat \$TMP
  	fi
@@ -278,7 +278,7 @@
  	;;
  esac
  done
-@@ -25371,6 +25375,7 @@ if test "$with_termlib" != no ; then
+@@ -25378,6 +25382,7 @@ if test "$with_termlib" != no ; then
  		TINFO_LDFLAGS="-L${LIB_DIR}"
  		SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
  	fi
@@ -359,8 +359,8 @@
  arrays of characters representing all or part of a CRT screen.
 --- misc/gen-pkgconfig.in
 +++ misc/gen-pkgconfig.in	2019-11-15 13:14:38.635601252 +0000
-@@ -84,6 +84,9 @@ do
- 	-l*) # LIBS is handled specially below
+@@ -88,6 +88,9 @@ do
+ 	-specs*) # ignore linker specs-files which were used to build library
  		continue
  		;;
 +	-Wl,--hash-size=*) # ignore hash as gold linker can not do
@@ -369,7 +369,7 @@
  	-Wl,-z,*) # ignore flags used to manipulate shared image
  		continue
  		;;
-@@ -127,6 +130,7 @@ do
+@@ -131,6 +134,7 @@ do
  	LIBS="-l$name"
  
  	desc="ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@"
@@ -377,7 +377,7 @@
  	reqs=
  
  	if [ $name = $MAIN_LIBRARY ]; then
-@@ -137,9 +141,11 @@ do
+@@ -141,9 +145,11 @@ do
  		desc="$desc terminal interface library"
  	elif expr $name : ".*${CXX_NAME}.*" >/dev/null ; then
  		reqs="$PANEL_LIBRARY${suffix}, $MENU_LIBRARY${suffix}, $FORM_LIBRARY${suffix}, $MAIN_LIBRARY${suffix}"
@@ -389,7 +389,7 @@
  		desc="$desc add-on library"
  	fi
  
-@@ -149,6 +155,8 @@ do
+@@ -153,6 +159,8 @@ do
  	   [ $NEED_TINFO != yes ] ; then
  		[ -n "$reqs" ] && reqs="$reqs, "
  		reqs="${reqs}${SUB_LIBRARY}${suffix}"
@@ -795,7 +795,7 @@
  	$(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@
 --- ncurses/curses.priv.h
 +++ ncurses/curses.priv.h	2019-11-11 09:30:23.214670585 +0000
-@@ -2248,6 +2248,8 @@ extern NCURSES_EXPORT(char *) _nc_tracec
+@@ -2244,6 +2244,8 @@ extern NCURSES_EXPORT(char *) _nc_tracec
  extern NCURSES_EXPORT(char *) _nc_tracemouse (SCREEN *, MEVENT const *);
  extern NCURSES_EXPORT(char *) _nc_trace_mmask_t (SCREEN *, mmask_t);
  extern NCURSES_EXPORT(int) _nc_access (const char *, int);
diff --git a/ncurses.changes b/ncurses.changes
index bfb1e98..326016e 100644
--- a/ncurses.changes
+++ b/ncurses.changes
@@ -1,3 +1,38 @@
+-------------------------------------------------------------------
+Tue Jan  7 09:12:06 UTC 2020 - Dr. Werner Fink <werner@suse.de>
+
+- Add ncurses patch 20200104
+  + modify a couple of macros in aclocal.m4 to allow autoconf 2.69 to
+    "work", to help illustrate discussion in
+    https://invisible-island.net/autoconf/my-autoconf.html
+  + fix some warnings from autoheader-252
+- Correct include path for ncursesw5 and co
+
+-------------------------------------------------------------------
+Sun Dec 29 09:21:53 UTC 2019 - Dr. Werner Fink <werner@suse.de>
+
+- Add ncurses patch 20191228
+  + in gen-pkgconfig.in, move the RPATH_LIST and PRIVATE_LIBS assignments
+    past the various prefix/libdir assignments, to allow for using those
+    symbols, e.g., as done via CF_SHARED_OPTS.
+  + improve ncurses*-config and pc-files by filtering out linker-specs.
+  + modify test-package to more closely match Fedora's configuration
+    for PIE/PIC feature and debug-packages.
+
+-------------------------------------------------------------------
+Thu Dec 26 14:15:16 UTC 2019 - Dr. Werner Fink <werner@suse.de>
+
+- Add ncurses patch 20191221
+  + correct pathname used in Ada95 sample programs for explain.txt, to
+    work with test-packages.
+  + improve tracemunch:
+    + keep track of TERMINAL* values
+    + if tracing was first turned on after initialization, attempt to
+      show distinct screen, window and terminal names anyway.
+  + ensure that GCC_NORETURN is defined in term.h, because the prototype
+    for exit_terminfo() uses it (report by Werner Fink).
+- Remove patch workaround-20191214.patch as fixed upstream
+
 -------------------------------------------------------------------
 Wed Dec 18 09:25:48 UTC 2019 - Dr. Werner Fink <werner@suse.de>
 
diff --git a/ncurses.spec b/ncurses.spec
index 309090e..efea475 100644
--- a/ncurses.spec
+++ b/ncurses.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package ncurses
 #
-# Copyright (c) 2019 SUSE LLC.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -75,7 +75,6 @@ Source7:        baselibs.conf
 Patch0:         ncurses-6.1.dif
 Patch1:         ncurses-5.9-ibm327x.dif
 Patch2:         ncurses-5.7-tack.dif
-Patch3:         workaround-20191214.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %global         _miscdir    %{_datadir}/misc
 %global         _incdir     %{_includedir}
@@ -312,7 +311,6 @@ tar -xzf %{S:5}
 mv tack-* tack
 %patch1 -p0 -b .327x
 %patch2 -p0 -b .hs
-%patch3 -p0 -b .workaround
 %patch0 -p0 -b .p0
 
 %build
@@ -831,7 +829,7 @@ includedir5=%{_incdir}/ncurses5' "$pc"
 	base=${base##*/}
 	sed -ri '\@includedir=@i\
 includedir5=%{_incdir}/ncurses5' "$pc"
-	sed -ri 's@^(includedir=).*@\1${includedir5}/ncurses@' "$pc"
+	sed -ri 's@^(includedir=).*@\1${includedir5}/ncursesw@' "$pc"
 	sed -ri 's@^(libdir=).*@\1%{_libdir}/ncurses5@' "$pc"
 	sed -ri 's@^(Libs: )(.*)@\1-L${libdir}\2@' "$pc"
 	mv -f $pc pc/${base}5.pc
diff --git a/workaround-20191214.patch b/workaround-20191214.patch
deleted file mode 100644
index c3dffbf..0000000
--- a/workaround-20191214.patch
+++ /dev/null
@@ -1,16 +0,0 @@
----
- include/MKterm.h.awk.in |    3 +++
- 1 file changed, 3 insertions(+)
-
---- include/MKterm.h.awk.in
-+++ include/MKterm.h.awk.in	2019-12-18 09:23:20.480600045 +0000
-@@ -376,6 +376,9 @@ END {
- 	print  "/*"
- 	print  " * Debugging features."
- 	print  " */"
-+	print  "#ifndef GCC_NORETURN"
-+	print  "#define GCC_NORETURN /* nothing */"
-+	print  "#endif"
- 	print  "extern NCURSES_EXPORT(void)    exit_terminfo(int) GCC_NORETURN;"
- 	print  ""
- 	print  "#ifdef __cplusplus"