From 0150491966bea9c31960aee4885c436c9053d8ef Mon Sep 17 00:00:00 2001 From: Brenton Earl Date: Sat, 14 Jan 2017 01:43:40 +0700 Subject: [PATCH] python/pyPdf: Fix script. Signed-off-by: Willy Sudiarto Raharjo --- python/pyPdf/pyPdf.SlackBuild | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/python/pyPdf/pyPdf.SlackBuild b/python/pyPdf/pyPdf.SlackBuild index 4ab9a82b2a..8facf6c0a1 100644 --- a/python/pyPdf/pyPdf.SlackBuild +++ b/python/pyPdf/pyPdf.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for pyPdf. # Copyright 2009-2011 Marco Bonetti -# Copyright 2015-2016 Brenton Earl +# Copyright 2015-2017 Brenton Earl # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,6 +24,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=pyPdf +SRCNAM=pyPDF2 VERSION=${VERSION:-1.26.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -46,13 +47,27 @@ OUTPUT=${OUTPUT:-/tmp} DOCS="CHANGELOG LICENSE README.md" SAMPLES="Scripts/ Sample_Code/ Resources/" +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 cd $TMP rm -rf $SRCDIRNAM-$VERSION -tar xvf $CWD/$SRCDIRNAM-$VERSION.tar.gz +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz cd $SRCDIRNAM-$VERSION chown -R root:root . find -L . \