summaryrefslogtreecommitdiffstats
path: root/development/gcc5/gcc5.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/gcc5/gcc5.SlackBuild')
-rw-r--r--development/gcc5/gcc5.SlackBuild37
1 files changed, 19 insertions, 18 deletions
diff --git a/development/gcc5/gcc5.SlackBuild b/development/gcc5/gcc5.SlackBuild
index 502a79cd7c..791e081d93 100644
--- a/development/gcc5/gcc5.SlackBuild
+++ b/development/gcc5/gcc5.SlackBuild
@@ -62,12 +62,10 @@ BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
export ARCH
@@ -103,6 +101,7 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+###sbolint off
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
SLKLDFLAGS=""
@@ -113,6 +112,7 @@ elif [ "$ARCH" = "i486" ]; then
SLKLDFLAGS=""
LIBDIRSUFFIX=""
LIB_ARCH=i386
+###sbolint on
elif [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
SLKLDFLAGS=""
@@ -169,7 +169,7 @@ if [ ${MULTILIB} = "YES" ]; then
else
SLDESC=""
fi
-cat $CWD/slack-desc.gcc5 | sed -e "s/@MULTILIB@/${SLDESC}/" \
+cat $CWD/slack-desc | sed -e "s/@MULTILIB@/${SLDESC}/" \
> $PKG/install/slack-desc
# Unpack the gcc sources:
@@ -222,10 +222,10 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
# Fix perms/owners
chown -R root:root .
- find . -perm 777 -exec chmod 755 {} \;
- find . -perm 775 -exec chmod 755 {} \;
- find . -perm 754 -exec chmod 755 {} \;
- find . -perm 664 -exec chmod 644 {} \;
+ find . -perm 777 -exec chmod 755 {} \+
+ find . -perm 775 -exec chmod 755 {} \+
+ find . -perm 754 -exec chmod 755 {} \+
+ find . -perm 664 -exec chmod 644 {} \+
mkdir -p $PKG/usr/doc/gcc-$VERSION
cp -a \
COPYING* ChangeLog* INSTALL \
@@ -331,9 +331,9 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
+ -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ -exec chmod 644 {} \+
for patch in $CWD/fastjar-patches/* ; do
cat $patch | patch -p1 --verbose || exit 1
done
@@ -573,8 +573,8 @@ cat $CWD/libgcj-5.pc \
## Strip bloated binaries and libraries:
( cd $PKG
- find . -name "lib*so*" -exec strip --strip-unneeded "{}" \;
- find . -name "lib*a" -exec strip -g "{}" \;
+ find . -name "lib*so*" -exec strip --strip-unneeded "{}" \+
+ find . -name "lib*a" -exec strip -g "{}" \+
strip --strip-unneeded usr/bin/* 2> /dev/null
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -583,10 +583,11 @@ cat $CWD/libgcj-5.pc \
# Remove localizations overlapping with Slackware's gcc
rm -rf $PKG/usr/share/locale
-( cd $PKG
- if [ ${MULTILIB} = "YES" ]; then
- /sbin/makepkg -l y -c n $OUTPUT/${PRGNAM}-${VERSION}_multilib-$ARCH-$BUILD$TAG.$PKGTYPE
- else
- /sbin/makepkg -l y -c n $OUTPUT/${PRGNAM}-${VERSION}-$ARCH-$BUILD$TAG.$PKGTYPE
- fi
-)
+if [ ${MULTILIB} = "YES" ]; then
+ PKGVER="${VERSION}_multilib"
+else
+ PKGVER="${VERSION}"
+fi
+
+cd $PKG
+/sbin/makepkg -l y -c n "$OUTPUT/${PRGNAM}-${PKGVER}-$ARCH-$BUILD$TAG.$PKGTYPE"