ncurses - CRT screen handling and optimization package ChangeLog


# GNU Ncurses 6.2 (ncurses = new curses)
# ===============
# Slackware 13.37, 14.0, 14.1, 14.2: ncurses 5.9

# Many other pieces of software can be removed before you install a new
# version with little to no ill-effects, 'make uninstall' the old one, 'make
# install' the new one.  ncurses is so widely used that you may not be able
# to get away with that, without breaking a bunch of things.  Below we blow
# away files that may be left over from old source-installed versions of
# ncurses, ass|u|me'ing that you still have libncurses in /lib or /lib64
# from Slackware's aaa_elflibs|aaa_libraries package to keep things working
# that use it.  If you are not comfortable with that, skip the cleanup part
# before 'make install' below, then either leave it all there and hope for
# the best, or manually clean up files after the new version is installed -
# look for a date that is other than today.
# Loads of console programs like dialog, lynx, mc, mutt, ncftp, joe, vim,
# etc. use ncurses and even things like the Dropbox daemon do, so running
# something like:
#   lsof /lib*/libncurses.* /usr/lib*/libncurses.*
# is not a bad idea, to find out what running programs are using it.

# The home page for Ncurses is
# but the GNU page for it is here:

# If you have any trouble downloading Ncurses from, you can
# also get it here:

# Release notes

# Prerequisites:
# pkg-config
# ctags

# Due to the number of patches, create a directory for the ncurses tarball
# and patches, move the tarball and patches into it (if you previously had
# any of them):
mkdir -p -m 0700 ~/installed/ncurses
( cd ~/installed
  mv -f ncurses-6.2.tar.gz ncurses-*.patch.gz    ncurses-* ncurses/ 2> /dev/null )

# Get it
test -f installed/ncurses/ncurses-6.2.tar.gz &&
mv installed/ncurses/ncurses-6.2.tar.gz .
test ! -f ncurses-6.2.tar.gz &&

# Verify tarball w/ sha256sum:
# (this came from my gpg-verified tarball)
echo "30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d  ncurses-6.2.tar.gz" | sha256sum -c

# Verify tarball w/ gpg:
( gpg --list-keys F7E48EDB > /dev/null 2>&1 || gpg --recv-keys F7E48EDB ) &&
wget -nc &&
  gpg --verify ncurses-6.2.tar.gz.sig && rm ncurses-6.2.tar.gz.sig

# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "ncurses-*" -exec rm -r {} \;
tar xzvf ~/ncurses-6.2.tar.gz
cd ncurses-6.2
test $UID = 0 && chown -R root:root .

# gpg-verify, then apply patches that have come out since the full release
# if there is one, the latest rollout patch:
# [ Note: When I did this, one patch to ANNOUNCEMENT was .rej, changing it
#   from a 6.1 version to 6.2, but that is just a text doc file, so just
#   ignored that ]
gpg --list-keys F7E48EDB > /dev/null 2>&1 || gpg --recv-keys F7E48EDB
mv -f ~/installed/ncurses/ncurses-6.2-*.patch.gz .
rm -f ~/installed/ncurses/ncurses-*.patch.gz
wget -N
unzip -n
chmod u+w ncurses-6.2-*.patch.gz*
for file in ncurses-6.2-*.patch.gz;
  test -f ${file}.asc && gpg --verify ${file}.asc && rm ${file}.asc
  zcat $file | patch -p1 -N && mv -f $file ~/installed/ncurses/
  echo "Hit enter to continue"

# Configure build #1 (*) for 64-bit
test $(uname -m) = 'x86_64' && LIBDIR=lib64 &&
CFLAGS="-O2 -fPIC" ./configure --prefix=/usr --libdir=/usr/${LIBDIR} --mandir=/usr/man --without-ada --with-pkg-config-libdir=/usr/${LIBDIR}/pkgconfig --enable-pc-files --with-shared --without-normal --without-debug --disable-overwrite --enable-symlinks --enable-hard-tabs --with-cxx-shared --enable-xmc-glitch --enable-colorfgbg --with-ospeed=unsigned --with-termlib --with-ticlib=tic --with-chtype=long --with-mmask-t=long

# Configure build #1 (*) for anything else
test $(uname -m) != 'x86_64' && LIBDIR=lib &&
CFLAGS="-O2" ./configure --prefix=/usr --libdir=/usr/${LIBDIR} --mandir=/usr/man --without-ada --with-pkg-config-libdir=/usr/${LIBDIR}/pkgconfig --enable-pc-files --with-shared --without-normal --without-debug --disable-overwrite --enable-symlinks --enable-hard-tabs --with-cxx-shared --enable-xmc-glitch --enable-colorfgbg --with-ospeed=unsigned --with-ticlib=tic

# Build it

# Become root to clean up old files and to install it

# As I write this, Slackware-current no longer includes a libtermcap
# package, and ncurses includes a /usr/include/termcap.h ...
text -x /sbin/removepkg && /sbin/removepkg libtermcap

# Remove Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg ncurses

# Remove files from old source-installed versions.
# We do not mess with Slackware package libncurses or aaa_elflibs /lib*/
# files here.
( cd /usr/bin ; rm -f clear infocmp ncurses5-config ncursesw5-config   ncurses6-config ncursesw6-config tabs tic toe tput tset )
find /usr/doc -maxdepth 1 -type d -name "ncurses-*" -exec rm -r {} \;
find /usr/include -type l -ilname "ncurses/*" -exec rm -r {} \;
test -d /usr/include/ncurses && rm -r /usr/include/ncurses
for lib in libform libformw libmenu libmenuw libncurses++ libncurses++w libncurses libncursesw libpanel libpanelw;
  ( cd /usr/lib ; rm -f "${lib}.*" )
  test -d /usr/lib64 && ( cd /usr/lib64 ; rm -f "${lib}.*" )
test -L /usr/include/ncursesw &&
rm -f /usr/include/ncursesw

# If you have a termcap.h from the libtermcap package and you want to move
# it out of the way for the one from ncurses:
grep -q usr/include/termcap.h /var/adm/packages/libtermcap* &&
test ! -L /usr/include/termcap.h &&
  mv -f /usr/include/termcap.h /usr/include/termcap.h.orig

# Install the new version
make install

# Create symlinks from the *.h files in /usr/include/ncurses/
# to /usr/include
( cd /usr/include
  for file in ncurses/*.h ; do ln -sf $file . ; done )

# Become yourself again (to rebuild it)

# Clean the previous build files
make clean

# Configure build #2 (*) for 64-bit
test $(uname -m) = 'x86_64' && LIBDIR=lib64 &&
CFLAGS="-O2 -fPIC" ./configure --prefix=/usr --libdir=/usr/${LIBDIR} --mandir=/usr/man --without-ada --with-pkg-config-libdir=/usr/${LIBDIR}/pkgconfig --enable-pc-files --with-shared --without-normal --without-debug --disable-overwrite --enable-symlinks --enable-hard-tabs --with-cxx-shared --enable-xmc-glitch --enable-colorfgbg --with-ospeed=unsigned --with-termlib --with-ticlib=tic --with-chtype=long --with-mmask-t=long --enable-widec

# Configure build #2 (*) for anything else
test $(uname -m) != 'x86_64' && LIBDIR=lib &&
CFLAGS="-O2" ./configure --prefix=/usr --libdir=/usr/${LIBDIR} --mandir=/usr/man --without-ada --with-pkg-config-libdir=/usr/${LIBDIR}/pkgconfig --enable-pc-files --with-shared --without-normal --without-debug --disable-overwrite --enable-symlinks --enable-hard-tabs --with-cxx-shared --enable-xmc-glitch --enable-colorfgbg --with-ospeed=unsigned --with-termlib --with-ticlib=tic --enable-widec

# Re-build it

# Become root to install it

# Install the 'w' version of everything
# It will just install the same man pages, /usr/share/terminfo files...
make install

# If you're really low on drive space, I'm pretty sure you could zap
# /usr/include/ncursesw and symlink from /usr/include/ncurses to that

# Move libncurses library files into /lib*/, fix up symlinks to make sure
# all is well
test $(uname -m) = 'x86_64' && LIBDIR=lib64
test $(uname -m) != 'x86_64' && LIBDIR=lib

( cd /usr/${LIBDIR}
  rm -f
  rm -f
  mv -f* /${LIBDIR}/
  mv -f* /${LIBDIR}/
  mv -f* /${LIBDIR}/
  mv -f* /${LIBDIR}/
  ln -sf /${LIBDIR}/
  ln -sf /${LIBDIR}/
  ln -sf /${LIBDIR}/
  ln -sf /${LIBDIR}/
  ln -sf /${LIBDIR}/
  ln -sf /${LIBDIR}/ )

( cd /${LIBDIR}
  rm -f
  ln -sf
  ln -sf
  ln -sf
  ln -sf
  ln -sf
  ln -sf
  ln -sf
  ln -sf )

# If you want things looking for -lcurses (no "n") to work
echo "INPUT(-lncurses)" > /usr/${LIBDIR}/
echo "INPUT(-lncursesw)" > /usr/${LIBDIR}/

# Make sure the linker can see the libraries

# Unset the temporary lib or lib64
unset LIBDIR

# ncurses has a 'clear' and the textutils package has a 'clear'.  The latter
# is a shell script that runs 'tput clear'.  textutils, fileutils, and
# sh-utils became coreutils, and there was no clear in Slackware's coreutils
# last time I checked.

# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .

# Become yourself again

# Save the tarball for later
mkdir -p -m 0700 installed
rm -f installed/ncurses-*.tar.* installed/ncurses/ncurses-*.tar.*
mv ncurses-6.2.tar.gz installed/ncurses/

List of HOWTOs

Last updated: 2023-09-09 10:40pm EDT(-0400)
Copyright © 2001-2023 Jason Englander. All Rights reserved.