aboutsummaryrefslogtreecommitdiff
path: root/academic/labplot2/labplot2.SlackBuild
diff options
context:
space:
mode:
authorFellype do Nascimento <fellype(at)gmail.com>2016-09-23 05:07:20 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-09-23 05:07:20 +0700
commit90dfe7b874e29ed0f2002ca1b00589c2b4c74349 (patch)
tree1e440540192e5c6f19c52e25fa47c4d9293d3051 /academic/labplot2/labplot2.SlackBuild
parent89b2ac7c5be9456063949ddf36fbabe4d71f33e4 (diff)
academic/labplot2: Updated for version 2.3.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic/labplot2/labplot2.SlackBuild')
-rw-r--r--academic/labplot2/labplot2.SlackBuild56
1 files changed, 26 insertions, 30 deletions
diff --git a/academic/labplot2/labplot2.SlackBuild b/academic/labplot2/labplot2.SlackBuild
index ca807e8da1a2..ca405b232ecc 100644
--- a/academic/labplot2/labplot2.SlackBuild
+++ b/academic/labplot2/labplot2.SlackBuild
@@ -2,17 +2,16 @@
# Slackware build script for LabPlot
# Based on the Slackware 14.1 SlackBuild and AUR PKGBUILD for labplot
# Written by Fellype do Nascimento <fellype(at)gmail.com>
-#last modification of this build script: 2014/12/12
NAME=labplot
PRGNAM=labplot2
-VERSION=${VERSION:-2.0.1}
+VERSION=${VERSION:-2.3.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i686 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -23,18 +22,12 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"; SLKLDFLAGS=""; LIBDIRSUFFIX=""; CHOST=i486
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"; SLKLDFLAGS=""; LIBDIRSUFFIX=""; CHOST=i486
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -fPIC"; SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
fi
set -e
@@ -43,7 +36,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $NAME-$VERSION
-tar xvf $CWD/$NAME-$VERSION.tar.bz2
+tar -xJf $CWD/$NAME-$VERSION.tar.xz
cd $NAME-$VERSION
chown -R root:root .
find -L . \
@@ -52,29 +45,32 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Use -fpermissive to fix build failure with gcc-5.2.0
-mkdir -p build
-cd build
- cmake \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -fpermissive" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DMAN_INSTALL_DIR=/usr/man \
- -DCMAKE_BUILD_TYPE=Release ..
- make
- make install DESTDIR=$PKG
-cd ..
+./compile
-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
+( cd build/
+cmake ./ -DCMAKE_INSTALL_PREFIX=/usr
+cmake ./ -DCMAKE_BUILD_TYPE=Release
+make install DESTDIR=$PKG
+)
+
+( cd $PKG
+find -L . | xargs -O file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find -L . | xargs -O file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find -L . | xargs -O file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null || true
+)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS ChangeLog COPYING INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS ChangeLog COPYING INSTALL README \
+$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+if [ -e /usr/bin/requiredbuilder ]; then
+ requiredbuilder -v -y -s $CWD $PKG
+fi
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+