mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
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>
This commit is contained in:
parent
033ed2267e
commit
0d787c1c6e
4 changed files with 59 additions and 20 deletions
|
@ -16,8 +16,6 @@ in LabPlot1.
|
|||
|
||||
optional dependencies:
|
||||
|
||||
- LaTeX (to enable LaTeX typesetting in LabPlot)
|
||||
- fftw
|
||||
- hdf5
|
||||
- netcdf
|
||||
- cfitsio
|
||||
|
|
14
academic/labplot2/doinst.sh
Normal file
14
academic/labplot2/doinst.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ -x /usr/bin/update-mime-database ]; then
|
||||
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
|
||||
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
||||
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
|
@ -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
|
||||
|
||||
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
|
||||
# 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/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
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
PRGNAM="labplot2"
|
||||
VERSION="2.8.2"
|
||||
VERSION="2.9.0"
|
||||
HOMEPAGE="https://labplot.kde.org/"
|
||||
DOWNLOAD="https://download.kde.org/stable/labplot/2.8.2/labplot-2.8.2.tar.xz"
|
||||
MD5SUM="0d95441aa1b07898ed5811ff2dc485b7"
|
||||
DOWNLOAD="https://download.kde.org/stable/labplot/2.9.0/labplot-2.9.0.tar.xz \
|
||||
https://github.com/WizardMac/ReadStat/releases/download/v1.1.6/readstat-1.1.6.tar.gz"
|
||||
MD5SUM="6a189f66f610954aa54461f4faf9815d \
|
||||
b95f9385ecd629f665d8c5d7e2570398"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
|
|
Loading…
Reference in a new issue