diff options
author | Fellype do Nascimento | 2022-05-13 00:32:44 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo | 2022-05-14 14:28:00 +0200 |
commit | 0d787c1c6ec87915fb688d33cd6c653cf35ca0ee (patch) | |
tree | a6aaea0596df4ab3abfd8abbb3f68eb5bf3d64ca /academic/labplot2/labplot2.SlackBuild | |
parent | 033ed2267e934de9467edf21266f5ac76dd7b989 (diff) | |
download | slackbuilds-0d787c1c6ec87915fb688d33cd6c653cf35ca0ee.tar.gz |
academic/labplot2: Updated for version 2.9.0.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic/labplot2/labplot2.SlackBuild')
-rw-r--r-- | academic/labplot2/labplot2.SlackBuild | 55 |
1 files changed, 40 insertions, 15 deletions
diff --git a/academic/labplot2/labplot2.SlackBuild b/academic/labplot2/labplot2.SlackBuild index 90b9c916fc..66702f9d28 100644 --- a/academic/labplot2/labplot2.SlackBuild +++ b/academic/labplot2/labplot2.SlackBuild @@ -27,7 +27,7 @@ NAME=labplot cd $(dirname $0) ; CWD=$(pwd) PRGNAM=labplot2 -VERSION=${VERSION:-2.8.2} +VERSION=${VERSION:-2.9.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -53,11 +53,17 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686"; SLKLDFLAGS=""; LIBDIRSUFFIX=""; CHOST=i486 + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686"; SLKLDFLAGS=""; LIBDIRSUFFIX=""; CHOST=i486 + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC"; SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi set -e @@ -68,6 +74,11 @@ cd $TMP rm -rf $NAME-$VERSION tar -xJf $CWD/$NAME-$VERSION.tar.xz cd $NAME-$VERSION + +# Avoid readstat-1.1.6.tar.gz to be removed and downloaded again from github. +# Use the one downloaded previously instead. +sed -i "s:https\://github.com/WizardMac/ReadStat/releases/download/v\${ext_version}/readstat-\${ext_version}.tar.gz:$CWD/readstat-1.1.6.tar.gz:" src/3rdparty/CMakeLists.txt + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -78,27 +89,41 @@ find -L . \ ./compile ( cd build/ -cmake ./ -DCMAKE_INSTALL_PREFIX=/usr -cmake ./ -DCMAKE_BUILD_TYPE=Release -make install DESTDIR=$PKG +cmake ./ -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_BUILD_TYPE=Release \ + -DMAN_INSTALL_DIR=/usr/man \ + .. +make +make install/strip 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 -) +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 + +# no usr/share/doc dir +mkdir -p $PKG/usr/doc +mv $PKG/usr/share/doc/* $PKG/usr/doc +rmdir $PKG/usr/share/doc + +# Leave only one main category in key "Categories" for the .desktop file +sed -i "s:Qt;KDE;Education;Science;Physics;Math;:Science;:" $PKG/usr/share/applications/org.kde.labplot2.desktop + +# Fix permissions in .desktop file +chmod 0644 $PKG/usr/share/applications/org.kde.labplot2.desktop -find $PKG/usr/share/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/share/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS ChangeLog COPYING INSTALL README.md \ +cp -a AUTHORS ChangeLog README.md LICENSES/* \ $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 cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |