summaryrefslogtreecommitdiffstats
path: root/source/n/nn/nn.SlackBuild
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2010-05-19 08:58:23 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:43:05 +0200
commitb76270bf9e6dd375e495fec92140a79a79415d27 (patch)
tree3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/n/nn/nn.SlackBuild
parent5a12e7c134274dba706667107d10d231517d3e05 (diff)
downloadcurrent-slackware-13.1.tar.gz
current-slackware-13.1.tar.xz
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy!
Diffstat (limited to 'source/n/nn/nn.SlackBuild')
-rwxr-xr-xsource/n/nn/nn.SlackBuild33
1 files changed, 25 insertions, 8 deletions
diff --git a/source/n/nn/nn.SlackBuild b/source/n/nn/nn.SlackBuild
index 45b694375..41757fcca 100755
--- a/source/n/nn/nn.SlackBuild
+++ b/source/n/nn/nn.SlackBuild
@@ -21,18 +21,30 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
VERSION=6.7.3
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
+ MFILE="m-i80386.h"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+ MFILE="m-x86_64.h"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ MFILE="m-i80386.h"
fi
CWD=$(pwd)
@@ -53,14 +65,19 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-zcat $CWD/nn.diff.gz | sed -e "s#/usr/lib/nn#/usr/lib${LIBDIRSUFFIX}/nn#" \
- | patch -p1 --verbose || exit 1
+zcat $CWD/nn.diff.gz \
+ | sed -e "s#m-sparc.h#${MFILE}#" \
+ | sed -e "s#/usr/lib/nn#/usr/lib${LIBDIRSUFFIX}/nn#" \
+ | patch -p0 --verbose || exit 1
+if [ $ARCH = "x86_64" ]; then
+ zcat $CWD/m-x86_64.h.gz > conf/m-x86_64.h
+fi
zcat $CWD/nn.badnntphost.diff.gz | patch -p1 --verbose || exit 1
# Taken from slamd64 (who adapted an old Ubuntu patch);
# Besides adding DESTDIR support, it gets rid of the hardlinks that are created:
zcat $CWD/nn.destdir.diff.gz | patch -p1 --verbose || exit 1
-cp config.h-dist config.h
+cat config.h-dist | sed -e "s#m-sparc.h#${MFILE}#" > config.h
make all
echo "*** USE install option 's'"