ncurses: replace with netbsd-curses

This commit is contained in:
Stefan Saraev 2016-04-15 14:24:49 +03:00 committed by Lukas Rusak
parent fee76beb72
commit 0d9b10fb05
10 changed files with 47 additions and 153 deletions

View File

@ -24,7 +24,7 @@ PKG_LICENSE="LGPL"
PKG_SITE="http://www.mysql.com"
PKG_URL="http://ftp.gwdg.de/pub/misc/$PKG_NAME/Downloads/MySQL-5.1/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_HOST="zlib:host"
PKG_DEPENDS_TARGET="toolchain zlib ncurses libressl mysql:host"
PKG_DEPENDS_TARGET="toolchain zlib netbsd-curses libressl mysql:host"
PKG_PRIORITY="optional"
PKG_SECTION="database"
PKG_SHORTDESC="mysql: A database server"
@ -33,7 +33,7 @@ PKG_LONGDESC="MySQL is a SQL (Structured Query Language) database server. SQL is
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
TARGET_CFLAGS="$TARGET_CFLAGS -fPIC -DPIC -I$SYSROOT_PREFIX/usr/include/ncurses"
TARGET_CFLAGS="$TARGET_CFLAGS -fPIC -DPIC"
PKG_CONFIGURE_OPTS_HOST="--with-zlib-dir=$ROOT/$TOOLCHAIN"

View File

@ -23,7 +23,7 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.gnu.org/software/gdb/"
PKG_URL="http://ftp.gnu.org/gnu/gdb/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain zlib ncurses expat"
PKG_DEPENDS_TARGET="toolchain zlib netbsd-curses expat"
PKG_PRIORITY="optional"
PKG_SECTION="debug"
PKG_SHORTDESC="gdb: The GNU Debugger"

View File

@ -1,94 +0,0 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="ncurses"
PKG_VERSION="6.0"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="http://www.gnu.org/software/ncurses/"
PKG_URL="http://ftp.gnu.org/pub/gnu/ncurses/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain zlib"
PKG_PRIORITY="optional"
PKG_SECTION="devel"
PKG_SHORTDESC="ncurses: The ncurses (new curses) library"
PKG_LONGDESC="The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more. It uses terminfo format, supports pads and color and multiple highlights and forms characters and function-key mapping, and has all the other SYSV-curses enhancements over BSD curses."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
PKG_CONFIGURE_OPTS_TARGET="--without-ada \
--without-cxx \
--without-cxx-binding \
--disable-db-install \
--without-manpages \
--without-progs \
--without-tests \
--with-curses-h \
--without-shared \
--with-normal \
--without-debug \
--without-profile \
--without-termlib \
--without-ticlib \
--without-gpm \
--without-dbmalloc \
--without-dmalloc \
--disable-rpath \
--disable-overwrite \
--disable-database \
--with-fallbacks=linux,screen,xterm,xterm-color \
--disable-big-core \
--enable-termcap \
--enable-getcap \
--enable-getcap-cache \
--enable-symlinks \
--disable-bsdpad \
--without-rcs-ids \
--enable-ext-funcs \
--disable-const \
--enable-no-padding \
--disable-sigwinch \
--disable-tcap-names \
--without-develop \
--disable-hard-tabs \
--disable-xmc-glitch \
--disable-hashmap \
--disable-safe-sprintf \
--disable-scroll-hints \
--disable-widec \
--disable-echo \
--disable-warnings \
--disable-home-terminfo \
--disable-assertions"
pre_configure_target() {
# causes some segmentation fault's (dialog) when compiled with gcc's link time optimization.
strip_lto
CFLAGS="$CFLAGS -fPIC"
}
post_makeinstall_target() {
cp misc/ncurses-config $ROOT/$TOOLCHAIN/bin
chmod +x $ROOT/$TOOLCHAIN/bin/ncurses-config
$SED "s:\(['=\" ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" $ROOT/$TOOLCHAIN/bin/ncurses-config
ln -sf ncurses-config $ROOT/$TOOLCHAIN/bin/ncurses5-config
ln -sf ncurses5-config $ROOT/$TOOLCHAIN/bin/ncurses6-config
rm -rf $INSTALL/usr/bin/ncurses*-config
}

View File

@ -1,46 +0,0 @@
https://bugs.gentoo.org/545114
extracted from the upstream change (which had many unrelated commits in one)
From 97bb4678dc03e753290b39bbff30ba2825df9517 Mon Sep 17 00:00:00 2001
From: "Thomas E. Dickey" <dickey@invisible-island.net>
Date: Sun, 7 Dec 2014 03:10:09 +0000
Subject: [PATCH] ncurses 5.9 - patch 20141206
+ modify MKlib_gen.sh to work around change in development version of
gcc introduced here:
https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html
(reports by Marcus Shawcroft, Maohui Lei).
diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh
index d8cc3c9..b91398c 100755
--- a/ncurses/base/MKlib_gen.sh
+++ b/ncurses/base/MKlib_gen.sh
@@ -474,11 +474,22 @@ sed -n -f $ED1 \
-e 's/gen_$//' \
-e 's/ / /g' >>$TMP
+cat >$ED1 <<EOF
+s/ / /g
+s/^ //
+s/ $//
+s/P_NCURSES_BOOL/NCURSES_BOOL/g
+EOF
+
+# A patch discussed here:
+# https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
+# introduces spurious #line markers. Work around that by ignoring the system's
+# attempt to define "bool" and using our own symbol here.
+sed -e 's/bool/P_NCURSES_BOOL/g' $TMP > $ED2
+cat $ED2 >$TMP
+
$preprocessor $TMP 2>/dev/null \
-| sed \
- -e 's/ / /g' \
- -e 's/^ //' \
- -e 's/_Bool/NCURSES_BOOL/g' \
+| sed -f $ED1 \
| $AWK -f $AW2 \
| sed -f $ED3 \
| sed \

View File

@ -0,0 +1,36 @@
################################################################################
# This file is part of LibreELEC - http://www.libreelec.tv
# Copyright (C) 2016 Team LibreELEC
#
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="netbsd-curses"
PKG_VERSION="47b256a"
PKG_ARCH="any"
PKG_SITE="https://github.com/sabotage-linux/netbsd-curses"
PKG_URL="https://github.com/sabotage-linux/netbsd-curses/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="devel"
PKG_SHORTDESC="netbsd-libcurses portable edition"
PKG_LONGDESC="netbsd-libcurses portable edition"
make_target() {
make HOSTCC="$HOST_CC" PREFIX=/usr all-static
}
makeinstall_target() {
make HOSTCC="$HOST_CC" PREFIX=$SYSROOT_PREFIX/usr install-static
}

View File

@ -23,7 +23,7 @@ PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="http://www.gnu.org/readline"
PKG_URL="http://ftp.gnu.org/gnu/readline/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain ncurses"
PKG_DEPENDS_TARGET="toolchain netbsd-curses"
PKG_PRIORITY="optional"
PKG_SECTION="devel"
PKG_SHORTDESC="readline: The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in."

View File

@ -64,6 +64,8 @@ pre_configure_target() {
# bluez fails to build in subdirs
cd $ROOT/$PKG_BUILD
rm -rf .$TARGET_NAME
export LIBS="-ltermcap"
}
post_makeinstall_target() {

View File

@ -16,7 +16,7 @@ index 41efc1f..d1d3ddc 100644
client_connmanctl_LDADD = gdbus/libgdbus-internal.la @DBUS_LIBS@ @GLIB_LIBS@ \
- -lreadline -ldl
+ -lreadline -lncurses -ldl
+ -lreadline -lncurses -ltermcap -ldl
endif
noinst_PROGRAMS += unit/test-pbkdf2-sha1 unit/test-prf-sha1 unit/test-ippool

View File

@ -23,7 +23,7 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://invisible-island.net/dialog/"
PKG_URL="ftp://invisible-island.net/dialog/$PKG_NAME-$PKG_VERSION.tgz"
PKG_DEPENDS_TARGET="toolchain ncurses"
PKG_DEPENDS_TARGET="toolchain netbsd-curses"
PKG_PRIORITY="optional"
PKG_SECTION="tools"
PKG_SHORTDESC="dialog: A utility for creating TTY dialog boxes"
@ -43,7 +43,3 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-nls \
--disable-mixedform \
--disable-tailbox"
pre_configure_target() {
export NCURSES_CONFIG="$ROOT/$TOOLCHAIN/bin/ncurses-config"
}

View File

@ -23,7 +23,7 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.nano-editor.org/"
PKG_URL="http://ftp.gnu.org/gnu/nano/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain ncurses"
PKG_DEPENDS_TARGET="toolchain netbsd-curses"
PKG_PRIORITY="optional"
PKG_SECTION="shell/texteditor"
PKG_SHORTDESC="nano: Pico editor clone with enhancements"
@ -33,10 +33,10 @@ PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
PKG_CONFIGURE_OPTS_TARGET="--disable-utf8 \
--disable-nls"
--disable-nls \
--disable-libmagic"
pre_configure_target() {
export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/ncurses"
export LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"`
export LIBS="$LIBS -lz"
}