Update to ncurses-6.0

Change-Id: I98ab2ea8a5e13cca9f8b7cf6277b9b14a4da4299
diff --git a/package/debian/changelog b/package/debian/changelog
new file mode 100644
index 0000000..36464e0
--- /dev/null
+++ b/package/debian/changelog
@@ -0,0 +1,11 @@
+ncurses6 (6.0+20150808) unstable; urgency=low
+
+  * latest weekly patch
+
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Thu, 06 Aug 2015 19:13:39 -0400
+
+ncurses6 (5.9-20120608) unstable; urgency=low
+
+  * initial release
+
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 08 Jun 2012 07:54:29 -0400
diff --git a/package/debian/compat b/package/debian/compat
new file mode 100644
index 0000000..7ed6ff8
--- /dev/null
+++ b/package/debian/compat
@@ -0,0 +1 @@
+5
diff --git a/package/debian/control b/package/debian/control
new file mode 100644
index 0000000..4c6e82c
--- /dev/null
+++ b/package/debian/control
@@ -0,0 +1,25 @@
+Source: ncurses6
+Section: libdevel
+Priority: optional
+Maintainer: Thomas E. Dickey <dickey@invisible-island.net>
+Homepage: http://invisible-island.net/ncurses/
+Build-Depends: debhelper (>= 7)
+Standards-Version: 3.8.2
+
+Package: ncurses6
+Architecture: any
+Depends: ${misc:Depends}
+Description: shared libraries for terminal handling
+ The ncurses library routines are a terminal-independent method of
+ updating character screens with reasonable optimization.
+ .
+ This package is used for testing ABI 6.
+
+Package: ncursest6
+Architecture: any
+Depends: ${misc:Depends}
+Description: shared libraries for terminal handling
+ The ncurses library routines are a terminal-independent method of
+ updating character screens with reasonable optimization.
+ .
+ This package is used for testing ABI 6 with pthreads.
diff --git a/package/debian/copyright b/package/debian/copyright
new file mode 100644
index 0000000..43cb3e5
--- /dev/null
+++ b/package/debian/copyright
@@ -0,0 +1,99 @@
+Upstream source http://invisible-island.net/ncurses/ncurses.html
+This package is used for testing builds of ncurses.
+
+Current ncurses maintainer: Thomas Dickey <dickey@invisible-island.net>
+
+-------------------------------------------------------------------------------
+Files: *
+Copyright: 1998-2014,2015 Free Software Foundation, Inc.
+Licence: X11
+
+Files: aclocal.m4 package
+Copyright: 1996-2014,2015 by Thomas E. Dickey
+Licence: X11
+
+Files: doc/html/NCURSES-Programming-HOWTO.html
+Copyright: 2001 by Pradeep Padala
+Licence: X11
+
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, distribute with modifications, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included
+    in all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+    IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+    DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+    OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+    THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+    Except as contained in this notice, the name(s) of the above copyright
+    holders shall not be used in advertising or otherwise to promote the
+    sale, use or other dealings in this Software without prior written
+    authorization.
+
+-------------------------------------------------------------------------------
+Files: install-sh
+Copyright:  1994 X Consortium
+Licence: X11
+
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to
+    deal in the Software without restriction, including without limitation the
+    rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+    sell copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in
+    all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+    X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+    AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+    TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+    Except as contained in this notice, the name of the X Consortium shall not
+    be used in advertising or otherwise to promote the sale, use or other deal-
+    ings in this Software without prior written authorization from the X Consor-
+    tium.
+
+-------------------------------------------------------------------------------
+Files: progs/tset.c ncurses/tinfo/read_termcap.c
+Copyright: 1980,1991,1992,1993 The Regents of the University of California.
+License: BSD
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+    3. Neither the name of the University nor the names of its contributors
+       may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    SUCH DAMAGE.
+
+-- vile: txtmode file-encoding=utf-8
diff --git a/package/debian/rules b/package/debian/rules
new file mode 100755
index 0000000..e77fd69
--- /dev/null
+++ b/package/debian/rules
@@ -0,0 +1,207 @@
+#!/usr/bin/make -f
+# Made with the aid of dh_make, by Craig Small
+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+# Some lines taken from debmake, by Cristoph Lameter.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# packages
+PACKAGES.indep = # ncurses6-docs
+PACKAGES.arch  = ncurses6 ncursest6
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+CC_NORMAL = -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
+CC_STRICT = $(CC_NORMAL) -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
+
+MY_ABI=6
+MY_DIR=/usr
+MYDATA=/usr/local/ncurses/share/terminfo
+NORMAL_DIR=$(CURDIR)/debian/ncurses$(MY_ABI)
+THREAD_DIR=$(CURDIR)/debian/ncursest$(MY_ABI)
+
+CFLAGS   = $(shell dpkg-buildflags --get CFLAGS) $(CC_NORMAL)
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS  = $(shell dpkg-buildflags --get LDFLAGS)
+
+ifneq ($(MY_DIR),/usr)
+	RPATH_ENV = RPATH_LIST=../lib:$(MY_DIR)/lib
+	RPATH_OPT = --enable-rpath
+else
+	RPATH_ENV =
+	RPATH_OPT = --disable-rpath --disable-rpath-hack
+endif
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+        CFLAGS += -O0
+else
+        CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+        INSTALL_PROGRAM += -s
+endif
+
+verbose = # -v
+
+configure = \
+	$(RPATH_ENV) \
+	CFLAGS="$(CFLAGS)" \
+	CPPFLAGS="$(CPPFLAGS)" \
+	LDFLAGS="$(LDFLAGS)" ../../configure $(RPATH_OPT) \
+		--host=$(DEB_HOST_GNU_TYPE) \
+		--build=$(DEB_BUILD_GNU_TYPE) \
+		--prefix=$(MY_DIR) \
+		--with-default-terminfo-dir=$(MYDATA) \
+		--with-terminfo-dirs=$(MYDATA):/usr/share/terminfo \
+		--disable-echo \
+		--disable-getcap \
+		--disable-leaks \
+		--disable-macros  \
+		--disable-overwrite  \
+		--disable-termcap \
+		--enable-hard-tabs \
+		--enable-pc-files \
+		--enable-warnings \
+		--enable-wgetch-events \
+		--enable-widec \
+		--program-suffix=$(MY_ABI) \
+		--verbose \
+		--with-abi-version=$(MY_ABI) \
+		--with-develop \
+		--with-extra-suffix=$(MY_ABI) \
+		--with-shared \
+		--with-termlib \
+		--with-ticlib \
+		--with-trace \
+		--with-cxx-shared \
+		--with-versioned-syms \
+		--with-xterm-kbs=DEL \
+		--without-ada \
+		--without-debug \
+		--without-normal
+
+NCURSES6_DIR = $(CURDIR)/debian/ncurses6
+NCURSEST6_DIR = $(CURDIR)/debian/ncursest6
+
+.PHONY: all config build install binary clean config-indep config-arch \
+    build-indep build-arch install-indep install-arch binary-indep \
+    binary-arch
+
+all: build
+
+config: config-indep config-arch
+build: build-indep build-arch
+install: install-indep install-arch
+binary: binary-indep binary-arch
+clean:
+	dh_testdir
+	dh_testroot
+	dh_clean $(verbose)
+	rm -rf t
+
+config-indep: $(PACKAGES.indep:%=config-%-stamp)
+config-arch: $(PACKAGES.arch:%=config-%-stamp)
+
+build-indep: $(PACKAGES.indep:%=build-%-stamp)
+build-arch: $(PACKAGES.arch:%=build-%-stamp)
+
+install-indep: $(PACKAGES.indep:%=install-%-stamp)
+install-arch: $(PACKAGES.arch:%=install-%-stamp)
+
+config-ncurses6-stamp:
+	dh_testdir
+	rm -rf t/ncurses6
+	mkdir -p t/ncurses6
+	cd t/ncurses6; $(configure)
+	touch $@
+
+config-ncursest6-stamp:
+	dh_testdir
+	rm -rf t/ncursest6
+	mkdir -p t/ncursest6
+	cd t/ncursest6; $(configure) \
+		--enable-interop \
+		--enable-sp-funcs \
+		--program-suffix=t$(MY_ABI) \
+		--with-pthread
+	touch $@
+
+build-ncurses6-stamp: config-ncurses6-stamp
+	dh_testdir
+
+	$(MAKE) -C t/ncurses6
+
+	touch $@
+
+build-ncursest6-stamp: config-ncursest6-stamp
+	dh_testdir
+
+	$(MAKE) -C t/ncursest6
+
+	touch $@
+
+install-ncurses6-stamp: build-ncurses6-stamp
+	dh_testdir
+	dh_testroot
+	dh_installdirs $(verbose)
+	dh_prep        $(verbose) -pncurses6
+
+	$(MAKE) -C t/ncurses6 install.libs install.progs DESTDIR=$(NCURSES6_DIR)
+	$(MAKE) -C t/ncurses6/test ncurses LOCAL_LIBDIR=$(MY_DIR)/lib
+
+	mv t/ncurses6/test/ncurses $(NCURSES6_DIR)$(MY_DIR)/bin/ncurses$(MY_ABI)
+
+	touch $@
+
+install-ncursest6-stamp: build-ncursest6-stamp
+	dh_testdir
+	dh_testroot
+	dh_installdirs $(verbose)
+	dh_prep        $(verbose) -pncursest6
+
+	$(MAKE) -C t/ncursest6 install.libs install.progs DESTDIR=$(NCURSEST6_DIR)
+	$(MAKE) -C t/ncursest6/test ncurses LOCAL_LIBDIR=$(MY_DIR)/lib
+
+	mv t/ncursest6/test/ncurses $(NCURSEST6_DIR)$(MY_DIR)/bin/ncursest$(MY_ABI)
+
+	touch $@
+
+# Build architecture-independent files here.
+binary-indep: install-indep
+ifneq ($(PACKAGES.indep),)
+	rm -f $(PACKAGES.indep:%=install-%-stamp)
+	dh_testdir
+	dh_testroot
+	dh_installdocs       $(verbose) $(PACKAGES.indep:%=-p%)
+	dh_installman        $(verbose) $(PACKAGES.indep:%=-p%)
+	dh_installexamples   $(verbose) $(PACKAGES.indep:%=-p%)
+	dh_installchangelogs $(verbose) $(PACKAGES.indep:%=-p%) NEWS
+	dh_compress          $(verbose) $(PACKAGES.indep:%=-p%)
+	dh_fixperms          $(verbose) $(PACKAGES.indep:%=-p%)
+	dh_installdeb        $(verbose) $(PACKAGES.indep:%=-p%)
+	dh_gencontrol        $(verbose) $(PACKAGES.indep:%=-p%)
+	dh_md5sums           $(verbose) $(PACKAGES.indep:%=-p%)
+	dh_builddeb          $(verbose) $(PACKAGES.indep:%=-p%)
+endif
+
+# Build architecture-dependent files here.
+binary-arch: install-arch
+ifneq ($(PACKAGES.arch),)
+	rm -f $(PACKAGES.arch:%=install-%-stamp)
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs $(verbose) $(PACKAGES.arch:%=-p%)  NEWS
+	dh_strip             $(verbose) $(PACKAGES.arch:%=-p%)
+	dh_compress          $(verbose) $(PACKAGES.arch:%=-p%)
+	dh_fixperms          $(verbose) $(PACKAGES.arch:%=-p%)
+	dh_installdeb        $(verbose) $(PACKAGES.arch:%=-p%)
+	dh_makeshlibs        $(verbose) $(PACKAGES.arch:%=-p%)
+	dh_shlibdeps         $(verbose) $(PACKAGES.arch:%=-p%)
+	dh_gencontrol        $(verbose) $(PACKAGES.arch:%=-p%)
+	dh_md5sums           $(verbose) $(PACKAGES.arch:%=-p%)
+	dh_builddeb          $(verbose) $(PACKAGES.arch:%=-p%)
+endif
diff --git a/package/debian/source/format b/package/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/package/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/package/debian/watch b/package/debian/watch
new file mode 100644
index 0000000..945a996
--- /dev/null
+++ b/package/debian/watch
@@ -0,0 +1,4 @@
+version=3
+
+opts=passive ftp://invisible-island.net/ncurses/current/ncurses\.tar.gz \
+ debian  uupdate