mirror of
git://slackware.nl/current.git
synced 2025-01-16 15:41:42 +01:00
fa6118f0a7
a/aaa_terminfo-6.1_20181027-x86_64-2.txz: Rebuilt. a/efibootmgr-17-x86_64-1.txz: Upgraded. a/efivar-36-x86_64-1.txz: Upgraded. a/hostname-3.21-x86_64-1.txz: Upgraded. a/inotify-tools-3.20.1-x86_64-1.txz: Upgraded. a/mdadm-4.1-x86_64-1.txz: Upgraded. a/usb_modeswitch-2.5.2-x86_64-1.txz: Upgraded. a/util-linux-2.33-x86_64-1.txz: Upgraded. ap/cdrdao-1.2.4-x86_64-1.txz: Upgraded. ap/dash-0.5.10.2-x86_64-1.txz: Upgraded. ap/diffstat-1.62-x86_64-1.txz: Upgraded. ap/rpm-4.14.2.1-x86_64-1.txz: Upgraded. ap/sqlite-3.25.3-x86_64-1.txz: Upgraded. l/gnu-efi-3.0.9-x86_64-1.txz: Upgraded. l/iso-codes-4.1-noarch-1.txz: Upgraded. l/jasper-2.0.14-x86_64-1.txz: Upgraded. l/libbluray-1.0.2-x86_64-1.txz: Upgraded. l/libcap-ng-0.7.9-x86_64-1.txz: Upgraded. l/libiodbc-3.52.12-x86_64-1.txz: Upgraded. l/libodfgen-0.1.7-x86_64-1.txz: Upgraded. l/libwpd-0.10.2-x86_64-1.txz: Upgraded. l/libwpg-0.3.2-x86_64-1.txz: Upgraded. l/libyaml-0.2.1-x86_64-1.txz: Upgraded. l/ncurses-6.1_20181027-x86_64-2.txz: Rebuilt. Temporarily removed the bce feature from the linux console definition until the console is fixed. Added a linux-bce terminal definition for testing. l/sbc-1.4-x86_64-1.txz: Upgraded. l/zstd-1.3.7-x86_64-1.txz: Upgraded. n/gnupg2-2.2.11-x86_64-1.txz: Upgraded. n/ipset-7.0-x86_64-1.txz: Upgraded. n/libndp-1.7-x86_64-1.txz: Upgraded. n/npth-1.6-x86_64-1.txz: Upgraded. n/php-7.2.12-x86_64-1.txz: Upgraded. n/slrn-1.0.3a-x86_64-1.txz: Upgraded. n/snownews-1.6.10-x86_64-1.txz: Upgraded. n/whois-5.4.0-x86_64-1.txz: Upgraded. x/libinput-1.12.3-x86_64-1.txz: Upgraded. x/libva-2.3.0-x86_64-1.txz: Upgraded. x/libva-utils-2.3.0-x86_64-1.txz: Upgraded. x/libwacom-0.32-x86_64-1.txz: Upgraded. x/xdg-user-dirs-0.17-x86_64-1.txz: Upgraded. xap/blackbox-0.74-x86_64-1.txz: Upgraded.
251 lines
8.1 KiB
Bash
Executable file
251 lines
8.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Copyright 2000-2011, 2013, 2014, 2015, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
|
|
# All rights reserved.
|
|
#
|
|
# Redistribution and use of this script, with or without modification, is
|
|
# permitted provided that the following conditions are met:
|
|
#
|
|
# 1. Redistributions of this script must retain the above copyright
|
|
# notice, this list of conditions and the following disclaimer.
|
|
#
|
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
PKGNAM=ncurses
|
|
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | cut -f 2- -d - | cut -f 1,2 -d .)}
|
|
BUILD=${BUILD:-2}
|
|
|
|
# Automatically determine the architecture we're building on:
|
|
if [ -z "$ARCH" ]; then
|
|
case "$( uname -m )" in
|
|
i?86) export ARCH=i586 ;;
|
|
arm*) export ARCH=arm ;;
|
|
# Unless $ARCH is already set, use uname -m for all other archs:
|
|
*) export ARCH=$( uname -m ) ;;
|
|
esac
|
|
fi
|
|
|
|
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
|
# the name of the created package would be, and then exit. This information
|
|
# could be useful to other scripts.
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|
echo "$PKGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz"
|
|
exit 0
|
|
fi
|
|
|
|
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
|
|
|
TMP=${TMP:-/tmp}
|
|
PKG=$TMP/package-ncurses
|
|
|
|
if [ "$ARCH" = "i586" ]; then
|
|
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
|
LIBDIRSUFFIX=""
|
|
elif [ "$ARCH" = "s390" ]; then
|
|
SLKCFLAGS="-O2"
|
|
LIBDIRSUFFIX=""
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
|
SLKCFLAGS="-O2 -fPIC"
|
|
X86_64OPTS=" --with-chtype=long --with-mmask-t=long "
|
|
LIBDIRSUFFIX="64"
|
|
else
|
|
SLKCFLAGS="-O2"
|
|
LIBDIRSUFFIX=""
|
|
fi
|
|
|
|
ncurses_configure() {
|
|
CFLAGS="$SLKCFLAGS" \
|
|
./configure \
|
|
--prefix=/usr \
|
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
|
--mandir=/usr/man \
|
|
--enable-colorfgbg \
|
|
--enable-hard-tabs \
|
|
--enable-overwrite \
|
|
--enable-xmc-glitch \
|
|
--with-cxx-shared \
|
|
--with-ospeed=unsigned \
|
|
--with-termlib=tinfo \
|
|
--with-ticlib=tic \
|
|
--with-gpm \
|
|
--with-shared \
|
|
--without-debug \
|
|
--disable-static \
|
|
--without-profile \
|
|
--enable-symlinks \
|
|
--enable-pc-files \
|
|
--with-pkg-config-libdir=/usr/lib${LIBDIRSUFFIX}/pkgconfig \
|
|
--without-ada \
|
|
$X86_64OPTS \
|
|
--program-suffix="" \
|
|
--program-prefix="" \
|
|
$WIDEC \
|
|
--build=$ARCH-slackware-linux
|
|
}
|
|
|
|
rm -rf $PKG
|
|
mkdir -p $TMP $PKG
|
|
|
|
cd $TMP
|
|
rm -rf ncurses-$VERSION
|
|
tar xvf $CWD/ncurses-$VERSION.tar.?z || exit 1
|
|
cd ncurses-$VERSION || exit 1
|
|
chown -R root:root .
|
|
|
|
## NOTE: nevermind trying this... patches have multiple failures. Use the
|
|
## dated archive from upstream instead.
|
|
#
|
|
### No rollup (*.patch.sh) patch available yet for ncurses-6.1, so we'll
|
|
### comment this out for now.
|
|
## Apply upstream patch collection:
|
|
#xzcat $CWD/ncurses-6.0-20160910-patch.sh.xz > ncurses-6.0-20160910-patch.sh
|
|
#sh ncurses-6.0-20160910-patch.sh
|
|
## Apply weekly ncurses patch updates:
|
|
#for file in $CWD/patches/*.patch.gz ; do
|
|
# zcat $file | patch -p1 --verbose || exit 1
|
|
#done
|
|
|
|
zcat $CWD/ncurses.mkhashsize.diff.gz | patch -p1 --verbose || exit 1
|
|
|
|
# BCE is broken with 4.19.0 and 4.19.1 kernels. Revert this ASAP, but use it
|
|
# for now to paper over the problem:
|
|
zcat $CWD/linux-no-bce.diff.gz | patch -p1 --verbose || exit 1
|
|
|
|
# Configure/build/install to package the standard ncurses libraries:
|
|
ncurses_configure || exit 1
|
|
make $NUMJOBS || exit 1
|
|
make install DESTDIR=$PKG || exit 1
|
|
|
|
# Configure/build/install again with wide character support:
|
|
make clean
|
|
WIDEC=--enable-widec
|
|
ncurses_configure || exit 1
|
|
make $NUMJOBS || exit 1
|
|
make install DESTDIR=$PKG || exit 1
|
|
|
|
# Make a termcap file in case anyone actually needs it:
|
|
echo "# /etc/termcap" > misc/termcap
|
|
grep \$Revision: misc/terminfo.src >> misc/termcap
|
|
grep \$Date: misc/terminfo.src >> misc/termcap
|
|
echo "#" >> misc/termcap
|
|
echo "# Converted from terminfo.src for Slackware:" >> misc/termcap
|
|
echo "# tic -C -t terminfo.src > termcap" >> misc/termcap
|
|
echo "#" >> misc/termcap
|
|
echo "# This file is included to support legacy applications using libtermcap." >> misc/termcap
|
|
echo "# Modern applications will use ncurses/terminfo instead." >> misc/termcap
|
|
echo "#" >> misc/termcap
|
|
echo "#------------------------------------------------------------------------------" >> misc/termcap
|
|
echo "#" >> misc/termcap
|
|
tic -C -t misc/terminfo.src >> misc/termcap
|
|
touch -r misc/terminfo.src misc/termcap
|
|
mkdir $PKG/etc
|
|
cp -a misc/termcap $PKG/etc/termcap
|
|
|
|
# Strip stuff:
|
|
find $PKG | xargs file | grep -e "executable" -e "shared object" \
|
|
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
|
|
|
# Remove static libraries:
|
|
for file in libform.a libformw.a libmenu.a libmenuw.a libncurses++.a \
|
|
libncurses++w.a libncurses.a libncursesw.a libpanel.a libpanelw.a \
|
|
libtic.a libtinfo.a libcurses.a ; do
|
|
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/$file
|
|
done
|
|
|
|
# Check for new static residue:
|
|
if ls $PKG/usr/lib${LIBDIRSUFFIX}/*.a 1> /dev/null 2> /dev/null ; then
|
|
echo "BAILING OUT. A NEW STATIC LIBRARY HAS APPEARED:"
|
|
ls -l $PKG/usr/lib${LIBDIRSUFFIX}/*.a
|
|
exit 1
|
|
fi
|
|
|
|
# Move the include files from /usr/include into /usr/include/ncurses,
|
|
# then make symlinks back into /usr/include.
|
|
( cd $PKG/usr/include
|
|
rm -rf ncurses
|
|
mkdir ncurses
|
|
mv *.h ncurses
|
|
for file in ncurses/* ; do
|
|
ln -sf $file .
|
|
done
|
|
)
|
|
|
|
# Make an ncursesw symlink to /usr/include/ncurses:
|
|
if [ ! -d $PKG/usr/include/ncursesw -a ! -L $PKG/usr/include/ncursesw ]; then
|
|
( cd $PKG/usr/include ; ln -sf ncurses ncursesw )
|
|
fi
|
|
|
|
# Move the ncurses libraries into /lib, since they're important:
|
|
mkdir -p $PKG/lib${LIBDIRSUFFIX}
|
|
( cd $PKG/usr/lib${LIBDIRSUFFIX}
|
|
chmod 755 *.so
|
|
chmod 644 *.a
|
|
mv libncurses.so.6* $PKG/lib${LIBDIRSUFFIX}
|
|
mv libncursesw.so.6* $PKG/lib${LIBDIRSUFFIX}
|
|
mv libtinfo.so.6* $PKG/lib${LIBDIRSUFFIX}
|
|
rm -f libtinfo.so.6
|
|
ln -sf ../../lib${LIBDIRSUFFIX}/libtinfo.so.6 .
|
|
)
|
|
|
|
# Use linker loader scripts to make sure -tinfo dependency works:
|
|
( cd $PKG/usr/lib${LIBDIRSUFFIX}
|
|
rm -f libcurses.so libcursesw.so libncurses.so libncursesw.so libtermcap.so
|
|
echo "INPUT(-lncurses)" > libcurses.so
|
|
echo "INPUT(-lncursesw)" > libcursesw.so
|
|
echo "INPUT(libncurses.so.6 -ltinfo)" > libncurses.so
|
|
echo "INPUT(libncursesw.so.6 -ltinfo)" > libncursesw.so
|
|
echo "INPUT(-ltinfo)" > libtermcap.so
|
|
)
|
|
|
|
# Use various upstream/fixed/better terminfo files to update the terminfo
|
|
# database. Only *.terminfo files in $CWD/terminfo will be used.
|
|
export TERMINFO=$PKG/usr/share/terminfo
|
|
for tfile in $CWD/terminfo/*.terminfo ; do
|
|
if [ -r $tfile ]; then
|
|
progs/tic -v $tfile
|
|
fi
|
|
done
|
|
unset TERMINFO
|
|
|
|
# Add /usr/doc/ncurses-xxxxx with appropriate files:
|
|
mkdir -p $PKG/usr/doc/ncurses-$VERSION
|
|
cp -a \
|
|
ANNOUNCE AUTHORS COPYING* INSTALL MANIFEST NEWS README* TO-DO VERSION \
|
|
$PKG/usr/doc/ncurses-$VERSION
|
|
mkdir -p $PKG/usr/doc/ncurses-$VERSION/c++
|
|
cp -a \
|
|
c++/NEWS c++/PROBLEMS c++/README-first \
|
|
$PKG/usr/doc/ncurses-$VERSION/c++
|
|
|
|
# We don't need the log of every change here, but we'll take some.
|
|
# If you need the whole thing probably you already extracted the
|
|
# sources...
|
|
if [ -r NEWS ]; then
|
|
DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
|
|
cat NEWS | head -n 1000 > $DOCSDIR/NEWS
|
|
echo >> $DOCSDIR/NEWS
|
|
echo " +++ SNIP +++ " >> $DOCSDIR/NEWS
|
|
echo >> $DOCSDIR/NEWS
|
|
echo " see source code for full file " >> $DOCSDIR/NEWS
|
|
echo >> $DOCSDIR/NEWS
|
|
touch -r NEWS $DOCSDIR/NEWS
|
|
fi
|
|
|
|
mkdir -p $PKG/install
|
|
zcat $CWD/doinst.sh.gz | sed "s,usr/lib,usr/lib${LIBDIRSUFFIX},g" > $PKG/install/doinst.sh
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
cd $PKG
|
|
/sbin/makepkg -l y -c n $TMP/ncurses-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
|
|
|