summaryrefslogtreecommitdiff
path: root/academic/labplot2
diff options
context:
space:
mode:
authorFellype do Nascimento <fellype (at) gmail (dot) com>2022-05-12 23:32:44 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-05-14 19:28:00 +0700
commit0d787c1c6ec87915fb688d33cd6c653cf35ca0ee (patch)
treea6aaea0596df4ab3abfd8abbb3f68eb5bf3d64ca /academic/labplot2
parent033ed2267e934de9467edf21266f5ac76dd7b989 (diff)
downloadslackbuilds-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')
-rw-r--r--academic/labplot2/README2
-rw-r--r--academic/labplot2/doinst.sh14
-rw-r--r--academic/labplot2/labplot2.SlackBuild55
-rw-r--r--academic/labplot2/labplot2.info8
4 files changed, 59 insertions, 20 deletions
diff --git a/academic/labplot2/README b/academic/labplot2/README
index aeef594e5f..d2d56dd8cd 100644
--- a/academic/labplot2/README
+++ b/academic/labplot2/README
@@ -16,8 +16,6 @@ in LabPlot1.
optional dependencies:
-- LaTeX (to enable LaTeX typesetting in LabPlot)
- fftw
- hdf5
- netcdf
-- cfitsio
diff --git a/academic/labplot2/doinst.sh b/academic/labplot2/doinst.sh
new file mode 100644
index 0000000000..4f83cde390
--- /dev/null
+++ b/academic/labplot2/doinst.sh
@@ -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
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
diff --git a/academic/labplot2/labplot2.info b/academic/labplot2/labplot2.info
index 7e146ae6f5..e2d5be4ad8 100644
--- a/academic/labplot2/labplot2.info
+++ b/academic/labplot2/labplot2.info
@@ -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=""