ncurses: convert to new package format

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-12-07 21:09:25 +01:00
parent 756951f934
commit 92c0a822e6
5 changed files with 149 additions and 236 deletions

View File

@ -1,118 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program 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, or (at your option)
# any later version.
#
# This Program 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.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
CWD=`pwd`
setup_toolchain host
cd $PKG_BUILD/ncurses-host
./configure --host=$HOST_NAME \
--build=$HOST_NAME \
--prefix=$ROOT/$TOOLCHAIN \
--with-shared \
make -C include
make -C progs tic
cp progs/tic $ROOT/$TOOLCHAIN/bin
cp lib/*.so* $ROOT/$TOOLCHAIN/lib
make -C include install
cd "$CWD"
setup_toolchain target
# causes some segmentation fault's (dialog) when compiled with gcc's link time optimization.
strip_linker_plugin
$SCRIPTS/build toolchain
cd $PKG_BUILD
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--sysconfdir=/etc \
--with-build-cc=$HOST_CC \
--with-build-cppflags="$HOST_CPPFLAGS -I../include" \
--with-build-cflags="$HOST_CFLAGS" \
--with-build-ldflags="$HOST_LDFLAGS" \
--without-cxx \
--without-cxx-binding \
--without-ada \
--without-progs \
--with-shared \
--with-normal \
--without-debug \
--without-profile \
--with-termlib \
--without-dbmalloc \
--without-dmalloc \
--without-gpm \
--disable-rpath \
--disable-overwrite \
--enable-database \
--disable-big-core \
--enable-termcap \
--enable-getcap \
--disable-getcap-cache \
--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-assertions
make -C include
make -C ncurses
make -C panel
make -C menu
make -C form
$AR cru lib/libncurses.a obj_s/*.o
$MAKEINSTALL -C include
$MAKEINSTALL -C ncurses
$MAKEINSTALL -C panel
$MAKEINSTALL -C menu
$MAKEINSTALL -C form
cp $SYSROOT_PREFIX/usr/include/ncurses/curses.h \
$SYSROOT_PREFIX/usr/include/ncurses/term.h \
$SYSROOT_PREFIX/usr/include/
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

View File

@ -1,51 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program 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, or (at your option)
# any later version.
#
# This Program 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.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
mkdir -p $INSTALL/usr/lib
cp -PR $PKG_BUILD/lib/libncurses.so* $INSTALL/usr/lib
cp -PR $PKG_BUILD/lib/libtinfo.so* $INSTALL/usr/lib
if [ "$DEVTOOLS" = yes ]; then
cp -PR $PKG_BUILD/lib/libpanel.so* $INSTALL/usr/lib
cp -PR $PKG_BUILD/lib/libform.so* $INSTALL/usr/lib
cp -PR $PKG_BUILD/lib/libmenu.so* $INSTALL/usr/lib
fi
mkdir -p $INSTALL/usr/share/terminfo/l
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe linux \
$PKG_BUILD/misc/terminfo.src
mkdir -p $INSTALL/usr/share/terminfo/s
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe screen \
$PKG_BUILD/misc/terminfo.src
mkdir -p $INSTALL/usr/share/terminfo/v
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe vt100 \
$PKG_BUILD/misc/terminfo.src
mkdir -p $INSTALL/usr/share/terminfo/x
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe xterm \
$PKG_BUILD/misc/terminfo.src
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe xterm-color \
$PKG_BUILD/misc/terminfo.src

View File

@ -1,36 +0,0 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program 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, or (at your option)
# any later version.
#
# This Program 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.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="ncurses"
PKG_VERSION="5.7"
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=""
PKG_BUILD_DEPENDS=""
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"

View File

@ -0,0 +1,149 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program 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, or (at your option)
# any later version.
#
# This Program 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.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="ncurses"
PKG_VERSION="5.7"
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=""
PKG_BUILD_DEPENDS_HOST=""
PKG_BUILD_DEPENDS_TARGET="toolchain ncurses:host"
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"
export BUILD_CC="$HOST_CC"
export BUILD_CPPFLAGS="$HOST_CPPFLAGS -I../include"
export BUILD_CFLAGS="$HOST_CFLAGS"
export BUILD_LDFLAGS="$HOST_LDFLAGS"
PKG_CONFIGURE_OPTS_HOST="--with-shared"
PKG_CONFIGURE_OPTS_TARGET="--without-cxx \
--without-cxx-binding \
--without-ada \
--without-progs \
--with-shared \
--with-normal \
--without-debug \
--without-profile \
--with-termlib \
--without-dbmalloc \
--without-dmalloc \
--without-gpm \
--disable-rpath \
--disable-overwrite \
--enable-database \
--disable-big-core \
--enable-termcap \
--enable-getcap \
--disable-getcap-cache \
--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-assertions"
pre_configure_target() {
# causes some segmentation fault's (dialog) when compiled with gcc's link time optimization.
strip_linker_plugin
}
make_host() {
make -C include
make -C progs tic
}
makeinstall_host() {
cp progs/tic $ROOT/$TOOLCHAIN/bin
cp lib/*.so* $ROOT/$TOOLCHAIN/lib
make -C include install
}
make_target() {
make -C include
make -C ncurses
make -C panel
make -C menu
make -C form
$AR cru lib/libncurses.a obj_s/*.o
}
makeinstall_target() {
$MAKEINSTALL -C include
$MAKEINSTALL -C ncurses
$MAKEINSTALL -C panel
$MAKEINSTALL -C menu
$MAKEINSTALL -C form
cp $SYSROOT_PREFIX/usr/include/ncurses/curses.h \
$SYSROOT_PREFIX/usr/include/ncurses/term.h \
$SYSROOT_PREFIX/usr/include/
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
make DESTDIR=$INSTALL -C include install
make DESTDIR=$INSTALL -C ncurses install
make DESTDIR=$INSTALL -C panel install
make DESTDIR=$INSTALL -C menu install
make DESTDIR=$INSTALL -C form install
}
post_makeinstall_target() {
mkdir -p $INSTALL/usr/share/terminfo/l
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe linux \
$ROOT/$PKG_BUILD/misc/terminfo.src
mkdir -p $INSTALL/usr/share/terminfo/s
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe screen \
$ROOT/$PKG_BUILD/misc/terminfo.src
mkdir -p $INSTALL/usr/share/terminfo/v
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe vt100 \
$ROOT/$PKG_BUILD/misc/terminfo.src
mkdir -p $INSTALL/usr/share/terminfo/x
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe xterm \
$ROOT/$PKG_BUILD/misc/terminfo.src
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe xterm-color \
$ROOT/$PKG_BUILD/misc/terminfo.src
}

View File

@ -1,31 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program 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, or (at your option)
# any later version.
#
# This Program 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.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
$SCRIPTS/build toolchain
NCURSES_DIR=`ls -d $PKG_BUILD`
cp -r "$NCURSES_DIR" "$BUILD/ncurses-host" || rm -rf "$BUILD/ncurses-host"
mv "$BUILD/ncurses-host" "$NCURSES_DIR"