From 9e97654de5236540991d935511f475dc44859a88 Mon Sep 17 00:00:00 2001 From: Brenton Earl Date: Thu, 29 Dec 2016 21:29:49 +0000 Subject: perl/perl-tree-dagnode: Switch to i586, cleanup SlackBuild. Signed-off-by: David Spencer --- .../perl-tree-dagnode/perl-tree-dagnode.SlackBuild | 32 +++++++++++++++------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'perl/perl-tree-dagnode') diff --git a/perl/perl-tree-dagnode/perl-tree-dagnode.SlackBuild b/perl/perl-tree-dagnode/perl-tree-dagnode.SlackBuild index a02e81f748..75346df6a6 100644 --- a/perl/perl-tree-dagnode/perl-tree-dagnode.SlackBuild +++ b/perl/perl-tree-dagnode/perl-tree-dagnode.SlackBuild @@ -32,7 +32,7 @@ SRCNAM=Tree-DAG_Node if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -43,7 +43,21 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -set -eu +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -53,10 +67,10 @@ tar xvf $CWD/$SRCNAM-$VERSION.tgz cd $SRCNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; perl Makefile.PL \ PREFIX=/usr \ @@ -66,16 +80,14 @@ make make test make install DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -# Remove perllocal.pod and other special files that don't need to be installed, -# as they will overwrite what's already on the system find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true -# Remove empty directories find $PKG -depth -type d -empty -delete || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -- cgit v1.2.3