From d73dfdc7fe96db8cdcd2d6301ab0a735e02a1cee Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Tue, 11 May 2010 22:26:53 +0200 Subject: system/p7zip: Updated for version 4.58 --- system/p7zip/p7zip.SlackBuild | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'system/p7zip/p7zip.SlackBuild') diff --git a/system/p7zip/p7zip.SlackBuild b/system/p7zip/p7zip.SlackBuild index ef0aedd8b5..898e0baf28 100644 --- a/system/p7zip/p7zip.SlackBuild +++ b/system/p7zip/p7zip.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for p7zip -# Copyright 2007 Heinz Wiesinger +# Copyright 2007-2008 Heinz Wiesinger # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,9 +23,9 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=p7zip -VERSION=4.57 +VERSION=4.58 ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -33,6 +33,14 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + set -e rm -rf $PKG @@ -44,33 +52,28 @@ cd ${PRGNAM}_${VERSION} chown -R root:root . chmod -R u+w,go+r-w,a-s . -# p7zip does not take CXXFLAGS nor CFLAGS, so we have to hardcode -# them into special makefiles -if [ "$ARCH" = "i486" ]; then - cp -f $CWD/makefile.slackware-i486 ./makefile.machine -elif [ "$ARCH" = "i686" ]; then - cp -f $CWD/makefile.slackware-i686 ./makefile.machine -fi +# Modify CFLAGS directly in the makefile +sed -i "s/OPTFLAGS=-O/OPTFLAGS=$SLKCFLAGS/" makefile.machine -make all2 DEST_HOME=/usr DEST_DIR=$PKG -make install DEST_HOME=/usr DEST_DIR=$PKG +make all3 \ + DEST_HOME=/usr \ + DEST_SHARE_DOC=/usr/doc/$PRGNAM-$VERSION \ + DEST_DIR=$PKG +make install \ + DEST_HOME=/usr \ + DEST_SHARE_DOC=/usr/doc/$PRGNAM-$VERSION \ + DEST_DIR=$PKG -( 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-unneeded 2> /dev/null -) +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true ( cd $PKG/usr/man find . -type f -exec gzip -9 {} \; for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done ) -mkdir -p $PKG/usr/doc/ -mv $PKG/usr/share/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION -rm -rf $PKG/usr/share cp -a TODO $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -( cd $PKG/usr/doc ; ln -s $PRGNAM-$VERSION $PRGNAM ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -- cgit v1.2.3