diff options
author | Eric Hameleers <alien@slackware.com> | 2006-08-16 21:00:40 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2006-08-16 21:00:40 +0000 |
commit | 7f3403832650a19008d0830697fb2d3b992e0431 (patch) | |
tree | e5fac8340de7a7cc20ad0e514463fe01fffed754 /kdmtheme | |
parent | e52bb6dbbf2adfffead34306c3ff3b4e30c86582 (diff) | |
download | asb-7f3403832650a19008d0830697fb2d3b992e0431.tar.gz asb-7f3403832650a19008d0830697fb2d3b992e0431.tar.xz |
Added GCC check for compatibility across Slackware versions with different compilers.
Diffstat (limited to 'kdmtheme')
-rwxr-xr-x | kdmtheme/build/kdmtheme.SlackBuild | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/kdmtheme/build/kdmtheme.SlackBuild b/kdmtheme/build/kdmtheme.SlackBuild index 818f8947..4582bc0d 100755 --- a/kdmtheme/build/kdmtheme.SlackBuild +++ b/kdmtheme/build/kdmtheme.SlackBuild @@ -46,10 +46,17 @@ SRCURL[0]="http://beta.smileaf.org/files/${PRGNAM}/${PRGNAM}-${VERSION}.tar.bz2" ## --- with a little luck, you won't have to edit below this point --- ## ## +# Slackware 11 and up need other option (gcc > 3.3.x) +if [ `gcc -dumpversion | tr -d '.' |cut -c 1-2` -gt 33 ]; then + MOPT=tune +else + MOPT=cpu +fi + if [ "$ARCH" = "i386" ]; then - SLKCFLAGS="-O2 -march=i386 -mtune=i686" + SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686" elif [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" + SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then @@ -171,14 +178,12 @@ chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* # Move incorrectly installed man pages [ -d $PKG/usr/share/man ] && mv $PKG/usr/share/man $PKG/usr/ && rmdir $PKG/usr/share # Compress the man page(s) -find $PKG/usr/man -name "*.?" -type f -exec gzip -9f {} \; +[ -d $PKG/usr/man ] && find $PKG/usr/man -name "*.?" -type f -exec gzip -9f {} \; # Strip binaries ( cd $PKG - 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-unneed -ed 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 ) @@ -205,8 +210,9 @@ fi cd $PKG makepkg --linkadd y --chown n $TMP/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz \ 2>&1 | tee $CWD/makepkg-${PRGNAM}.log -(cd $TMP && md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD} -.tgz.md5) +(cd $TMP + md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5 +) cat $PKG/install//slack-desc | grep "^${PRGNAM}" > $TMP/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt if [ -f $PKG/install/slack-required ]; then cat $PKG/install/slack-required > $TMP/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.dep |