Browse Source

ncurses: moved out all functions out of the main flow trying to make the conf file more readable

stable/0.2
Christian Wiese 14 years ago
parent
commit
8753992b8b
  1. 110
      base/ncurses/ncurses.conf

110
base/ncurses/ncurses.conf

@ -53,25 +53,6 @@ tic_only() {
cp -a progs/tic $root/bin cp -a progs/tic $root/bin
} }
if atstage toolchain; then
buildloops=1
custmain='tic_only'
else
# on systems having NLS support we build ncurses twice
if [ "$SDECFG_DISABLE_NLS" != 1 ]; then
buildloops=2
fi
# sparc64 may need extra love
if [ "$arch" == "sparc64" -a "$SDECFG_SPARC64_32BIT" = 1 ]; then
# double the loops
buildloops=$( expr $buildloops \* 2 )
fi
configscript="../configure"
ncurses_preconf() { ncurses_preconf() {
if [ $buildloop -eq 1 ]; then if [ $buildloop -eq 1 ]; then
# first loop is easy, always simply narrowc # first loop is easy, always simply narrowc
@ -115,35 +96,9 @@ ncurses_preconf() {
fi fi
} }
hook_add preconf 3 "ncurses_preconf" # create compatibility symlinks for curses
[ "$SDECFG_STATIC" != 1 ] && var_append extraconfopt " " "--with-shared"
var_append extraconfopt " " "--with-normal"
# Fine-Tuning:
#
# make tic use symbolic links not hard links
var_append extraconfopt " " "--enable-symlinks"
# Extensions:
#
# compile with SIGWINCH handler
var_append extraconfopt " " "--enable-sigwinch"
# Development Code:
#
# compile with hard-tabs code
var_append extraconfopt " " "--enable-hard-tabs"
# Experimental Code:
#
# compile with $COLORFGBG code
var_append extraconfopt " " "--enable-colorfgbg"
# always create compatibility symlinks for curses
make_curses_symlinks() { make_curses_symlinks() {
echo "Creating compatibility symlinks for curses." echo "Creating compatibility symlinks for curses."
if [ "$SDECFG_STATIC" != 1 ]; then if [ "$SDECFG_STATIC" != 1 ]; then
ln -svf libncurses.so $root$libdir/libcurses.so ln -svf libncurses.so $root$libdir/libcurses.so
@ -151,8 +106,8 @@ make_curses_symlinks() {
ln -svf libncurses.a $root$libdir/libcurses.a ln -svf libncurses.a $root$libdir/libcurses.a
} }
hook_add postmake 5 "make_curses_symlinks"
# functions we use when termcap package is installed
remove_include_termcap() { remove_include_termcap() {
echo "Removing 'termcap.h' from include/Makefile for 'make install'." echo "Removing 'termcap.h' from include/Makefile for 'make install'."
sed -i 's,termcap.h,,g' include/Makefile sed -i 's,termcap.h,,g' include/Makefile
@ -168,13 +123,58 @@ make_termcap_symlinks() {
ln -svf libncurses.a $root$libdir/libtermcap.a ln -svf libncurses.a $root$libdir/libtermcap.a
} }
if pkginstalled termcap ; then if atstage toolchain; then
echo_status "Found termcap package ->" \ buildloops=1
"disable ncurses internal termcap library." custmain='tic_only'
var_append extraconfopt " " "--disable-termcap"
hook_add inmake 5 "remove_include_termcap"
else else
hook_add postmake 6 "make_termcap_symlinks" # on systems having NLS support we build ncurses twice
fi if [ "$SDECFG_DISABLE_NLS" != 1 ]; then
buildloops=2
fi
# sparc64 may need extra love
if [ "$arch" == "sparc64" -a "$SDECFG_SPARC64_32BIT" = 1 ]; then
# double the loops
buildloops=$( expr $buildloops \* 2 )
fi
configscript="../configure"
hook_add preconf 3 "ncurses_preconf"
[ "$SDECFG_STATIC" != 1 ] && var_append extraconfopt " " "--with-shared"
var_append extraconfopt " " "--with-normal"
# Fine-Tuning:
#
# make tic use symbolic links not hard links
var_append extraconfopt " " "--enable-symlinks"
# Extensions:
#
# compile with SIGWINCH handler
var_append extraconfopt " " "--enable-sigwinch"
# Development Code:
#
# compile with hard-tabs code
var_append extraconfopt " " "--enable-hard-tabs"
# Experimental Code:
#
# compile with $COLORFGBG code
var_append extraconfopt " " "--enable-colorfgbg"
# always create compatibility symlinks for curses
hook_add postmake 5 "make_curses_symlinks"
if pkginstalled termcap ; then
echo_status "Found termcap package ->" \
"disable ncurses internal termcap library."
var_append extraconfopt " " "--disable-termcap"
hook_add inmake 5 "remove_include_termcap"
else
hook_add postmake 6 "make_termcap_symlinks"
fi
fi fi

Loading…
Cancel
Save