diff options
Diffstat (limited to 'academic/Kst')
-rw-r--r-- | academic/Kst/Kst.SlackBuild | 70 | ||||
-rw-r--r-- | academic/Kst/Kst.info | 12 | ||||
-rw-r--r-- | academic/Kst/Kst_gsl2.patch | 53 | ||||
-rw-r--r-- | academic/Kst/README | 5 | ||||
-rw-r--r-- | academic/Kst/fix_hdf5_path.patch | 11 |
5 files changed, 72 insertions, 79 deletions
diff --git a/academic/Kst/Kst.SlackBuild b/academic/Kst/Kst.SlackBuild index 527bc6ba1b..44e4fea74b 100644 --- a/academic/Kst/Kst.SlackBuild +++ b/academic/Kst/Kst.SlackBuild @@ -1,13 +1,35 @@ -#!/bin/sh +#!/bin/bash + # Slackware build script for Kst -# Based on Slackware 14.1 SlackBuild and AUR PKGBUILD for Kst -# Written by Fellype do Nascimento <fellype(at)gmail.com> -# last modification of this build script: 2014/12/10 +# Copyright 2014-2023 Fellype do Nascimento, Guaratingueta, Brazil +# SBo team have contributed to the maintenance of this build script :) +# +# Based on Slackware 15.0 SlackBuild and AUR PKGBUILD for Kst +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) PRGNAM=Kst -VERSION=${VERSION:-2.0.8} +VERSION=${VERSION:-20221025_5fdd819} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -17,15 +39,22 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686"; SLKLDFLAGS=""; LIBDIRSUFFIX=""; CHOST=i486 +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686"; SLKLDFLAGS=""; LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686"; SLKLDFLAGS=""; LIBDIRSUFFIX=""; CHOST=i486 + SLKCFLAGS="-O2 -march=i686 -mtune=i686"; SLKLDFLAGS=""; LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC"; SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" fi @@ -36,7 +65,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar -zxvf $CWD/$PRGNAM-$VERSION.tar.gz +tar -xvf $CWD/$PRGNAM-$VERSION.tar.?z cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -45,19 +74,24 @@ 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 {} \; -# Fix build failure with gsl-2.1 (gsl API change) -patch -p1 < $CWD/Kst_gsl2.patch +# Fix the path for H5Cpp.h +patch -p1 < $CWD/fix_hdf5_path.patch src/datasources/hdf5/hdf5.h + +# Fix an issue with the newer cmake +sed -i "s|else(GCC|elseif(GCC|" CMakeLists.txt || exit 1 sed -i "s/find_package\(PythonLibs REQUIRED\)/SET \(PythonLibs \"\/usr\/lib${LIBDIRSUFFIX}\/libpython2.7.so\"\)/" \ -./cmake/pyKst/CMakeLists.txt -sed -i "s/\${NUMPY_VERSION_PATCH}/0/" ./cmake/modules/FindNumPy.cmake +./cmake/pyKst/CMakeLists.txt || exit 1 +sed -i "s/\${NUMPY_VERSION_PATCH}/0/" ./cmake/modules/FindNumPy.cmake || exit 1 cp -r ./cmake/pyKst/* ./pyKst/ cmake ./ \ --Dkst_release=1 \ --Dkst_version_string=1 \ +-Dkst_release=2 \ +-Dkst_version_string=$VERSION \ -Dkst_svnversion=0 \ -Dkst_python=1 \ --DPYTHON_EXECUTABLE=/usr/bin/python2.7 \ +-Dkst_qt4=OFF \ +-Dkst_qt5=ON \ +-DPYTHON_EXECUTABLE=/usr/bin/python2 \ -Dkst_python_prefix=/usr/lib$LIBDIRSUFFIX/python2.7 \ -Dkst_install_prefix=/usr/ \ -Dkst_install_libdir=/usr/lib$LIBDIRSUFFIX @@ -83,4 +117,4 @@ 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:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/academic/Kst/Kst.info b/academic/Kst/Kst.info index 8912bc7380..adff979071 100644 --- a/academic/Kst/Kst.info +++ b/academic/Kst/Kst.info @@ -1,10 +1,10 @@ PRGNAM="Kst" -VERSION="2.0.8" -HOMEPAGE="https://kst-plot.kde.org/" -DOWNLOAD="http://netcologne.dl.sourceforge.net/project/kst/Kst%202.0.8/Kst-2.0.8.tar.gz" -MD5SUM="6f52c16edb63e8980520bfdaebed3eae" +VERSION="20221025_5fdd819" +HOMEPAGE="https://apps.kde.org/kst/" +DOWNLOAD="https://sourceforge.net/projects/slackbuildsdirectlinks/files/Kst/Kst-20221025_5fdd819.tar.xz" +MD5SUM="402fac69d4701cd7f223159e70b73439" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="scipy" +REQUIRES="python2-scipy" MAINTAINER="Fellype do Nascimento" -EMAIL="fellype(at)gmail.com" +EMAIL="fellype (at) gmail (dot) com" diff --git a/academic/Kst/Kst_gsl2.patch b/academic/Kst/Kst_gsl2.patch deleted file mode 100644 index 1a7db24321..0000000000 --- a/academic/Kst/Kst_gsl2.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff -u -r Kst-2.0.8/src/plugins/fits/non_linear.h Kst-2.0.8-patched/src/plugins/fits/non_linear.h ---- Kst-2.0.8/src/plugins/fits/non_linear.h 2014-02-13 09:41:44.000000000 +0000 -+++ Kst-2.0.8-patched/src/plugins/fits/non_linear.h 2015-11-18 22:28:40.761417846 +0000 -@@ -18,6 +18,7 @@ - #include <gsl/gsl_blas.h> - #include <gsl/gsl_multifit_nlin.h> - #include <gsl/gsl_statistics.h> -+#include <gsl/gsl_version.h> - #include "common.h" - - struct data { -@@ -177,7 +178,15 @@ - } - iIterations++; - } while( iStatus == GSL_CONTINUE && iIterations < MAX_NUM_ITERATIONS ); -+ -+#if GSL_MAJOR_VERSION >=2 -+ gsl_matrix *J=gsl_matrix_alloc(pSolver->fdf->n, pSolver->fdf->p); -+ gsl_multifit_fdfsolver_jac (pSolver, J); -+ gsl_multifit_covar( J, 0.0, pMatrixCovariance ); -+ gsl_matrix_free(J); -+#else - gsl_multifit_covar( pSolver->J, 0.0, pMatrixCovariance ); -+#endif - - // - // determine the fitted values... -diff -u -r Kst-2.0.8/src/plugins/fits/non_linear_weighted.h Kst-2.0.8-patched/src/plugins/fits/non_linear_weighted.h ---- Kst-2.0.8/src/plugins/fits/non_linear_weighted.h 2014-02-13 09:41:44.000000000 +0000 -+++ Kst-2.0.8-patched/src/plugins/fits/non_linear_weighted.h 2015-11-18 22:28:44.004399807 +0000 -@@ -18,6 +18,7 @@ - #include <gsl/gsl_blas.h> - #include <gsl/gsl_multifit_nlin.h> - #include <gsl/gsl_statistics.h> -+#include <gsl/gsl_version.h> - #include "common.h" - - struct data { -@@ -193,7 +194,14 @@ - } - while( iStatus == GSL_CONTINUE && iIterations < MAX_NUM_ITERATIONS ); - -+#if GSL_MAJOR_VERSION >=2 -+ gsl_matrix *J=gsl_matrix_alloc(pSolver->fdf->n, pSolver->fdf->p); -+ gsl_multifit_fdfsolver_jac (pSolver, J); -+ gsl_multifit_covar( J, 0.0, pMatrixCovariance ); -+ gsl_matrix_free(J); -+#else - gsl_multifit_covar( pSolver->J, 0.0, pMatrixCovariance ); -+#endif - - // - // determine the fitted values... diff --git a/academic/Kst/README b/academic/Kst/README index cfad9f4c4b..314ac53aab 100644 --- a/academic/Kst/README +++ b/academic/Kst/README @@ -8,14 +8,15 @@ Kst is very user-friendly (both the community and the program itself!). Kst contains many powerful built-in features and is expandable with plugins and extensions. -Kst is licensed under the GPL, and is as such freely available for anyone. +Kst is licensed under the GPL, and is as such freely available for +anyone. Note that KDE libraries are an optional dependency (i.e. you can run Kst without KDE, but you get additional features when running on a platform with KDE). Optional dependencies are: -- gsl (a lot of very useful data analysis plugins are based) - RECOMMENDED +- hdf5 (provides support for the HDF5 file formats) - netcdf (which provides support for files in the netCDF format) - muParser (which is used in the general non-linear fitting plugin) - GetData (which provides support for files in the Dirfile format) diff --git a/academic/Kst/fix_hdf5_path.patch b/academic/Kst/fix_hdf5_path.patch new file mode 100644 index 0000000000..bcdc1403ae --- /dev/null +++ b/academic/Kst/fix_hdf5_path.patch @@ -0,0 +1,11 @@ +--- Kst-20220116_2b8e03e/src/datasources/hdf5/hdf5.h 2022-01-15 22:42:17.000000000 -0300 ++++ Kst-20220116_2b8e03e/src/datasources/hdf5/hdf5.h.new 2022-03-01 09:50:10.407808017 -0300 +@@ -18,7 +18,7 @@ + #include <dataplugin.h> + + #include <QFileInfo> +-#include <hdf5/serial/H5Cpp.h> ++#include <H5Cpp.h> + #include <exception> + + #include "debug.h" |