summaryrefslogtreecommitdiffstats
path: root/source/d/cscope/cscope.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/cscope/cscope.SlackBuild')
-rwxr-xr-xsource/d/cscope/cscope.SlackBuild30
1 files changed, 26 insertions, 4 deletions
diff --git a/source/d/cscope/cscope.SlackBuild b/source/d/cscope/cscope.SlackBuild
index 21e86d3f0..e88ece4d8 100755
--- a/source/d/cscope/cscope.SlackBuild
+++ b/source/d/cscope/cscope.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,13 +22,13 @@
PKGNAM=cscope
-VERSION=${VERSION:-$(echo $(basename $(echo $PRGNAM-*.tar.bz2 | cut -f 2 -d -) .tar.bz2) | cut -f 2 -d -)}
+VERSION=${VERSION:-$(echo $(basename $(echo $PRGNAM-*.tar.xz | cut -f 2 -d -) .tar.xz) | cut -f 2 -d -)}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ 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 ) ;;
@@ -41,12 +41,32 @@ PKG=$TMP/package-cscope
NUMJOBS=${NUMJOBS:-" -j7 "}
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-$VERSION
-tar xvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.xz || exit 1
cd ${PKGNAM}-$VERSION || exit 1
chown -R root:root .
find . \
@@ -55,8 +75,10 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--build=${ARCH}-slackware-linux