From 1da30f99acfa40f44105170f42dc303acc4f37f7 Mon Sep 17 00:00:00 2001 From: Giancarlo Dessi Date: Thu, 25 May 2023 19:56:03 +0100 Subject: gis/saga-gis: Updated for version 9.0.1. Signed-off-by: bedlam Signed-off-by: Willy Sudiarto Raharjo --- gis/saga-gis/README | 41 ++++++++++++++++--------- gis/saga-gis/doinst.sh | 13 ++++++++ gis/saga-gis/saga-gis.SlackBuild | 66 ++++++++++++++++------------------------ gis/saga-gis/saga-gis.info | 12 ++++---- 4 files changed, 72 insertions(+), 60 deletions(-) create mode 100644 gis/saga-gis/doinst.sh diff --git a/gis/saga-gis/README b/gis/saga-gis/README index 8b46a6db2e59..92157708cdb7 100644 --- a/gis/saga-gis/README +++ b/gis/saga-gis/README @@ -1,19 +1,30 @@ -System for Automated Geoscientific Analyses (SAGA) is a Geographic -System Information software with immense capabilities for geodata -System processing and analysis. +System for Automated Geoscientific Analyses (SAGA) is a Geographic +Information System software with immense capabilities for geodata +processing and analysis. -SAGA supports the implementation of new functions with an effective -API. Functions are organised as modules in framework independent -Module Libraries and can be accessed via SAGA's Graphical User -Interface or various scripting environments (shell scripts, Python, +SAGA supports the implementation of new functions with an effective +API. Functions are organised as modules in framework independent +Module Libraries and can be accessed via SAGA's Graphical User +Interface or various scripting environments (shell scripts, Python, R and so on). -SAGA can use these optional dependencies: libharu, liblas, postgresql -and qhull. SAGA currently does not build when vigra is installed. +SAGA can use these optional autodetected dependencies enabled if they +are found in the system: +libharu, OpenMP, OpenCV, qhull, vigra, pdal, postgresql/postgis, +libLAS, proj, hdf5. Previous issues given with OpenCV version 4 or +greater and vigra seem solved in last versions of SAGA. -To enable opencv, set OPENCV=ON. By default OpenCV is disabled since -SAGA does not build when opencv version 4 or greater is installed. For -a compatible version of OpenCV, use the opencv-legacy SlackBuild. - -If SAGA fails to run after an upgrade, uninstall old versions of SAGA -before compilation. +WARNINGS: +1) Unlike earlier versions of SAGA, the build of last versions + requires wxGTK3 => 3.1 that is not available in Slackbuilds.org at + the moment. If you want to build this version of SAGA you have to + install the package wxWidgets (also available in Slackbuilds.org). +2) SAGA requires an ODBC driver in the system. It works both with + iODBC (installed with the libiodbc package (included in Slackware + 15.0) and unixODBC (installed from the SBo's slackbuild). The build + first searches for unixODBC then for iODBC. It fails if any driver + is found. These drivers are in conflict so, if you have installed + and then removed unixODBC, please make sure to reinstall libiodbc. + You should also consider that a package prebuilt in a Slackware + with unixODBC should not be installed in a system with iODB (and + vice versa). diff --git a/gis/saga-gis/doinst.sh b/gis/saga-gis/doinst.sh new file mode 100644 index 000000000000..aea0f894eb32 --- /dev/null +++ b/gis/saga-gis/doinst.sh @@ -0,0 +1,13 @@ +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/gis/saga-gis/saga-gis.SlackBuild b/gis/saga-gis/saga-gis.SlackBuild index 68d972c9eb2a..d5bd83f9f695 100644 --- a/gis/saga-gis/saga-gis.SlackBuild +++ b/gis/saga-gis/saga-gis.SlackBuild @@ -2,6 +2,7 @@ # Slackware build script for saga-gis +# Copyright 2023 Giancarlo Dessi, Cagliari, IT # Copyright 2014-2021 Benjamin Trigona-Harany # All rights reserved. # @@ -22,13 +23,11 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# 20220301 bkw: Modified by SlackBuilds.org: fix wxPython/wxGTK3 conflict. - cd $(dirname $0) ; CWD=$(pwd) PRGNAM=saga-gis -VERSION=${VERSION:-7.9.0} -BUILD=${BUILD:-2} +VERSION=${VERSION:-9.0.1} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -47,6 +46,7 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -73,59 +73,47 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $SRCNAM-$VERSION tar xvf $CWD/$SRCNAM-$VERSION.tar.gz -cd $SRCNAM-$VERSION +cd $SRCNAM-$VERSION/saga-gis + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \+ -o \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ - -if [ "$OPENCV" != "ON" ] ; then - sed -i "s/CVFOUND=1/true/g" configure -fi - -sed -i "s/isinf/std::isinf/g" src/saga_core/saga_gui/wksp_map_layer.cpp - -# 20220308 bkw: no configure option or environment variable for the -# wx config script to use, so force it this way: -mkdir -p wxtmp -ln -s /usr/lib$LIBDIRSUFFIX/wx/config/gtk3-unicode-3.0 wxtmp/wx-config -export PATH=$(pwd)/wxtmp:$PATH - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -PYTHON=python3 \ -./configure \ - --build=$ARCH \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --mandir=/usr/man \ - --enable-python \ - --disable-odbc \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_MANDIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install/strip DESTDIR=$PKG +cd .. 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 +# DCMAKE_INSTALL_MANDIR is not applied by the process we move files manually from /usr/share +mv $PKG/usr/share/man $PKG/usr/ 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 mv $PKG/usr/share/metainfo $PKG/usr/share/appdata +# fix some bad perms in doc files that have to install +chmod 644 readme.md src/*.txt + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - AUTHORS COPYING ChangeLog NEWS README \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a readme.md src/gpl.txt src/lgpl.txt $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -rm -f $PKG/usr/lib*/*.la - 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/gis/saga-gis/saga-gis.info b/gis/saga-gis/saga-gis.info index 7cebff7e7fc7..d0433539eb92 100644 --- a/gis/saga-gis/saga-gis.info +++ b/gis/saga-gis/saga-gis.info @@ -1,10 +1,10 @@ PRGNAM="saga-gis" -VERSION="7.9.0" +VERSION="9.0.1" HOMEPAGE="http://www.saga-gis.org" -DOWNLOAD="https://sourceforge.net/projects/saga-gis/files/SAGA%20-%207/SAGA%20-%207.9.0/saga-7.9.0.tar.gz" -MD5SUM="b988d202508ea8387150d13ff9292fa5" +DOWNLOAD="https://sourceforge.net/projects/saga-gis/files/SAGA%20-%209/SAGA%20-%209.0.1/saga-9.0.1.tar.gz" +MD5SUM="d06e4efbd97b87bccbb5a7fcec7225a2" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="gdal postgresql wxGTK3" -MAINTAINER="Benjamin Trigona-Harany" -EMAIL="slackbuilds@jaxartes.net" +REQUIRES="wxWidgets" +MAINTAINER="Giancarlo Dessi" +EMAIL="slack@giand.it" -- cgit v1.2.3