summaryrefslogtreecommitdiffstats
path: root/source.local/l/ncurses/ncurses.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source.local/l/ncurses/ncurses.SlackBuild')
-rwxr-xr-xsource.local/l/ncurses/ncurses.SlackBuild91
1 files changed, 52 insertions, 39 deletions
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