Ivan Davidov 77f04c6c8a Major structural changes.
- New overlay bundle which provides the MLL sources.
- The build process has been enhanced.
--- Sources are provided as part of the new overlay bundle.
--- The MLL scripts have been refactored to handle the above change.
--- The overlay dependency file has been renamed.
NOTE: at this point some overlay bundles may be broken due to the numerous changes that haven't been fully tested.
2017-11-29 03:55:56 +02:00

66 lines
1.6 KiB
Bash
Executable File

#!/bin/sh
set -e
. ../../common.sh
cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the ncurses source directory which ls finds, e.g. 'ncurses-6.0'.
cd $(ls -d ncurses-*)
echo "Preparing ncurses work area. This may take a while..."
make -j $NUM_JOBS clean
rm -rf $DEST_DIR
# Remove static library
sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in
# http://www.linuxfromscratch.org/lfs/view/development/chapter06/ncurses.html
# Configure Ncurses
echo "Configuring Ncurses..."
CFLAGS="$CFLAGS" ./configure \
--prefix=/usr \
--with-termlib \
--with-terminfo-dirs=/lib/terminfo \
--with-default-terminfo-dirs=/lib/terminfo \
--without-normal \
--without-debug \
--without-cxx-binding \
--with-abi-version=5 \
--enable-widec \
--enable-pc-files \
--with-shared \
CPPFLAGS=-I$PWD/ncurses/widechar \
LDFLAGS=-L$PWD/lib \
CPPFLAGS="-P"
# Most configuration switches are from AwlsomeAlex
# https://github.com/AwlsomeAlex/AwlsomeLinux/blob/59d59730703b058081a2371076a807590cacb31e/src/overlay_ncurses.sh
# CPPFLAGS fixes a bug with Ubuntu 16.04
# https://trac.sagemath.org/ticket/19762
echo "Building ncurses..."
make -j $NUM_JOBS
echo "Installing ncurses..."
make -j $NUM_JOBS install DESTDIR=$DEST_DIR
# Symnlink wide character libraries
cd $DEST_DIR/usr/lib
ln -s libncursesw.so.5 libncurses.so.5
ln -s libncurses.so.5 libncurses.so
ln -s libtinfow.so.5 libtinfo.so.5
ln -s libtinfo.so.5 libtinfo.so
echo "Reducing ncurses size..."
strip -g $DEST_DIR/usr/bin/*
cp -r $DEST_DIR/usr/* $OVERLAY_ROOTFS
echo "ncurses has been installed."
cd $SRC_DIR