From 2d5b7b9b5bb9a6058241a08a58f2f402a50f6166 Mon Sep 17 00:00:00 2001
From: Tibor Nagy <xnagytibor@gmail.com>
Date: Sun, 3 Dec 2017 22:43:28 +0100
Subject: [PATCH] Add ncursesw recipe, terminfo changes

---
 recipes/ncurses/recipe.sh            |  3 ++-
 recipes/ncursesw/01-config-sub.patch | 21 +++++++++++++++
 recipes/ncursesw/recipe.sh           | 38 ++++++++++++++++++++++++++++
 recipes/terminfo/recipe.sh           |  6 ++---
 recipes/vim/recipe.sh                |  3 ++-
 5 files changed, 66 insertions(+), 5 deletions(-)
 create mode 100644 recipes/ncursesw/01-config-sub.patch
 create mode 100644 recipes/ncursesw/recipe.sh

diff --git a/recipes/ncurses/recipe.sh b/recipes/ncurses/recipe.sh
index a31c4ab02..ee3b27c5d 100644
--- a/recipes/ncurses/recipe.sh
+++ b/recipes/ncurses/recipe.sh
@@ -1,5 +1,6 @@
 VERSION=6.0
 TAR=http://ftp.gnu.org/gnu/ncurses/ncurses-$VERSION.tar.gz
+DEPENDS="terminfo"
 
 function recipe_version {
     echo "$VERSION"
@@ -13,7 +14,7 @@ function recipe_update {
 
 function recipe_build {
     export CPPFLAGS="-P"
-    ./configure --host=${HOST} --prefix=""
+    ./configure --host=${HOST} --prefix="" --disable-db-install
     make
     skip=1
 }
diff --git a/recipes/ncursesw/01-config-sub.patch b/recipes/ncursesw/01-config-sub.patch
new file mode 100644
index 000000000..8ed32be67
--- /dev/null
+++ b/recipes/ncursesw/01-config-sub.patch
@@ -0,0 +1,21 @@
+diff -ru source/config.sub source-new/config.sub
+--- source/config.sub	2015-05-02 13:52:04.000000000 +0200
++++ source-new/config.sub	2017-08-13 13:12:16.485670615 +0200
+@@ -2,7 +2,7 @@
+ # Configuration validation subroutine script.
+ #   Copyright 1992-2015 Free Software Foundation, Inc.
+ 
+-timestamp='2015-03-08'
++timestamp='2017-08-13'
+ 
+ # This file is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by
+@@ -1371,7 +1371,7 @@
+ 	# The portable systems comes first.
+ 	# Each alternative MUST END IN A *, to match a version number.
+ 	# -sysv* is not here because it comes later, after sysvr4.
+-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
++	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -redox* \
+ 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ 	      | -sym* | -kopensolaris* | -plan9* \
diff --git a/recipes/ncursesw/recipe.sh b/recipes/ncursesw/recipe.sh
new file mode 100644
index 000000000..8f454dbe9
--- /dev/null
+++ b/recipes/ncursesw/recipe.sh
@@ -0,0 +1,38 @@
+VERSION=6.0
+TAR=http://ftp.gnu.org/gnu/ncurses/ncurses-$VERSION.tar.gz
+DEPENDS="terminfo"
+
+function recipe_version {
+    echo "$VERSION"
+    skip=1
+}
+
+function recipe_update {
+    echo "skipping update"
+    skip=1
+}
+
+function recipe_build {
+    export CPPFLAGS="-P"
+    ./configure --host=${HOST} --prefix="" --enable-widec --disable-db-install
+    make
+    skip=1
+}
+
+function recipe_test {
+    echo "skipping test"
+    skip=1
+}
+
+function recipe_clean {
+    make clean
+    skip=1
+}
+
+function recipe_stage {
+    dest="$(realpath $1)"
+    make DESTDIR="$dest" install
+    rm -rf "$1"/bin
+    rm -rf "$1"/share/{doc,info,man}
+    skip=1
+}
diff --git a/recipes/terminfo/recipe.sh b/recipes/terminfo/recipe.sh
index e45ed9dc9..2321f0df0 100644
--- a/recipes/terminfo/recipe.sh
+++ b/recipes/terminfo/recipe.sh
@@ -21,12 +21,12 @@ function recipe_test {
 }
 
 function recipe_clean {
-    echo "skipping clean" 
+    echo "skipping clean"
     skip=1
 }
 
 function recipe_stage {
-    mkdir -p ../stage/share/terminfo
-    cp -r  * ../stage/share/terminfo/
+    mkdir -p ../stage/share
+    cp -r  * ../stage/share/
     skip=1
 }
diff --git a/recipes/vim/recipe.sh b/recipes/vim/recipe.sh
index c14e95e90..b0b64523d 100644
--- a/recipes/vim/recipe.sh
+++ b/recipes/vim/recipe.sh
@@ -1,6 +1,7 @@
 VERSION=8.0.586
 TAR=http://ftp.vim.org/vim/unix/vim-$VERSION.tar.bz2
 BUILD_DEPENDS=(ncurses)
+DEPENDS="terminfo"
 
 export AR="${HOST}-ar"
 export AS="${HOST}-as"
@@ -35,7 +36,7 @@ function recipe_build {
     export vim_cv_stat_ignores_slash=no
     export vim_cv_memmove_handles_overlap=yes
     ./configure --host=${HOST} --prefix=/ --with-tlib=ncurses
-    make 
+    make
     skip=1
 }
 
-- 
GitLab