diff options
author | Eric Hameleers <alien@slackware.com> | 2013-05-23 13:19:28 +0200 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2013-05-23 13:19:28 +0200 |
commit | 3d3e62b012a6fd1cc56477c778424534d0f3fca2 (patch) | |
tree | cfdd3cba07f63a9a004f82aa5f9e7b6945027de2 /source.local/l | |
parent | bee61430a6daecf2bd065518ce275c9d5d377440 (diff) | |
download | alienarm-3d3e62b012a6fd1cc56477c778424534d0f3fca2.tar.gz alienarm-3d3e62b012a6fd1cc56477c778424534d0f3fca2.tar.xz |
NCURSES: change the *.so soft links to include -ltinfo.
This fixes linking to libncurses and libncursesw: linking also
to libtinfo is required, otherwise some symbols will be missing.
This trick was copied from Debian and Fedora. Note that splitting
off libtinfo is a long-term goal of the ncurses developers, as it
allows for some smaller binaries. However this causes the linking
issues as described above when using modern binutils. Hence this
linking trick.
Diffstat (limited to 'source.local/l')
-rw-r--r-- | source.local/l/ncurses/ncurses-5.9-20130504-patch.sh.xz | bin | 0 -> 466028 bytes | |||
-rwxr-xr-x | source.local/l/ncurses/ncurses.SlackBuild | 91 |
2 files changed, 52 insertions, 39 deletions
diff --git a/source.local/l/ncurses/ncurses-5.9-20130504-patch.sh.xz b/source.local/l/ncurses/ncurses-5.9-20130504-patch.sh.xz Binary files differnew file mode 100644 index 0000000..87b2f00 --- /dev/null +++ b/source.local/l/ncurses/ncurses-5.9-20130504-patch.sh.xz diff --git a/source.local/l/ncurses/ncurses.SlackBuild b/source.local/l/ncurses/ncurses.SlackBuild index 78079c4..7223934 100755 --- a/source.local/l/ncurses/ncurses.SlackBuild +++ b/source.local/l/ncurses/ncurses.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2000-2011 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2000-2011, 2013 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,41 +24,42 @@ PKGNAM=ncurses -VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} - -# Automatically determine the architecture we're building on: -MARCH=$( uname -m ) -if [ -z "$ARCH" ]; then - case "$MARCH" in - i?86) export ARCH=i486 ;; - armv7hl) export ARCH=$MARCH ;; - arm*) export ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$MARCH ;; - esac -fi +VERSION=${VERSION:-5.9} +BUILD=${BUILD:-2} -CWD=$(pwd) -TMP=${TMP:-/tmp} -PKG=$TMP/package-ncurses - -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -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" -elif [ "$ARCH" = "armv7hl" ]; then - SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" - LIBDIRSUFFIX="" +if [ -e $CWD/machine.conf ]; then + . $CWD/machine.conf ] +elif [ -e /etc/slackbuild/machine.conf ]; then + . /etc/slackbuild/machine.conf ] else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" + # Automatically determine the architecture we're building on: + MARCH=$( uname -m ) + if [ -z "$ARCH" ]; then + case "$MARCH" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$MARCH ;; + esac + fi + # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX: + if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -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" + elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" + else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + fi fi case "$ARCH" in @@ -66,23 +67,30 @@ case "$ARCH" in *) TARGET=$ARCH-slackware-linux ;; esac +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-ncurses + ncurses_configure() { CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ --with-gpm \ - --disable-termcap \ --with-normal \ + --disable-termcap \ --with-termlib=tinfo \ --with-shared \ --enable-symlinks \ + --enable-pc-files \ + --with-pkg-config-libdir=/usr/lib${LIBDIRSUFFIX}/pkgconfig \ --without-debug \ --without-profile \ --without-ada \ $X86_64OPTS \ - --program-suffix="" \ - --program-prefix="" \ + --program-suffix= \ + --program-prefix= \ $WIDEC \ --build=$TARGET } @@ -108,6 +116,10 @@ if [ ! -z "$(ls $CWD/patches/ncurses-$VERSION-2*.patch.gz 2> /dev/null)" ]; then done fi +# Apply upstream patch collection: +xzcat $CWD/ncurses-5.9-20130504-patch.sh.xz > ncurses-5.9-20130504-patch.sh +sh ncurses-5.9-20130504-patch.sh + zcat $CWD/ncurses.mkhashsize.diff.gz | patch -p1 --verbose || exit 1 # End of preparations @@ -160,10 +172,11 @@ mkdir -p $PKG/lib${LIBDIRSUFFIX} chmod 644 *.a mv libncurses.so.5* $PKG/lib${LIBDIRSUFFIX} mv libncursesw.so.5* $PKG/lib${LIBDIRSUFFIX} + # Always add -ltinfo when linking with -lncurses or -lncursesw rm -f libncurses.so - ln -sf /lib${LIBDIRSUFFIX}/libncurses.so.5 libncurses.so + echo "INPUT(libncurses.so.5 -ltinfo)" > libncurses.so rm -f libncursesw.so - ln -sf /lib${LIBDIRSUFFIX}/libncursesw.so.5 libncursesw.so + echo "INPUT(libncursesw.so.5 -ltinfo)" > libncursesw.so # Olde obsolete names, just in case rm -f libcurses.so ln -sf libncurses.so libcurses.so |